[defineweblang title=”Change Video Language” language=”English,Hindi”]
[getvideolang url= “https://www.youtube.com/embed/YUTXvY1qDy0?start=45″ language=”English”][/getvideolang]
[getvideolang url= “https://www.youtube.com/embed/9OvwUS6Pkn8?start=82″ language=”Hindi”][/getvideolang]
If you are still using the traditional switches, then I’m sorry to say this but they are outdated now. Moreover, these traditional switches have mechanical moving parts which get damaged on continuous use.
Nowadays, old switch boards are getting replaced by modern touch switches that not only enhance the look of our homes but are also far easier and safer to use. Theses modern touch switches have extra functions and as no moving parts are involved in building them, they also last longer than the traditional ones.
Despite these advantages, many people still use old switches because a modern smart touch switch is quite expensive, and every person can’t afford to have it.
This is the reason why I decided to make an affordable “Smart LCD Display Touch Switch Board” that would be far cheaper than the ones currently available in the market. This switch board, which can be controlled wirelessly through an android app, will also have air temperature displayed on its screen.
Now, let’s collect the components to start the project
Bill Of Materials
Setting Arduino Library
First of all, we need to install the required library to the Arduino IDE. For this, we will go to Sketch menu and click on the manage library. After this, search the library name and click on install button. The libraries needed for this project are Addafruit GFX library, Touch screen library and NTC thermistor library.
NOTE: Every touch screen has its own Library. So, find the library for your TFT screen model and install that. Here I have used MCUFriend 2.4 TFT LCD Library St7789v and installed it as shown in (Fig 3,4,5,6) .
As we have installed the required library, let’s start coding.
In the first part of coding, we will initialise the required libraries in code as you can see in Fig 7.
After that we will create a function to get the point of touch on LCD screen in X and Y Coordinates. Refer (Fig .8).
Next, we will add codes for the colours we are going to use in our LDC Display (Refer Fig 9).
Then we will create a setup function where we will add the codes to show buttons and all other elements on LCD display. (Refer Fig 10,11)
Since we are now done with the coding part. Next is app building.
First, we will create a layout for app and then add the following components to it: –
- 4 Buttons
- 1 list picker
- 1 Bluetooth Clint
After this you can go to MIT App inventor code blocks. Pick and place the code block according to fig below Refer Fig 13.
Now, we need to connect the components and fix all the components and relay module in switch box as illustrated in Fig 15,16,17,18,19.
|PIN 13||Relay IN 1|
|PIN 12||Relay IN 2|
|VIN & VCC of Relay||Power Supply 5-6V|
|GND & GND of Relay||Power Supply Terminal -Ve|
|PIN A5||Thermistor Sensor|
Congrats!! Your “Smart Touch Switch Board” is ready now.
Check each connection carefully as any wrong connect might result in electric short circuit. When you are sure that all the connections are being done correctly, power the Arduino and relay with 5V DC and then plug the AC appliances connected to relay for switching.
When you press the OFF button, the relay turns off the electronic appliances connected to it. When you touch the ON button, it will turn on the electronic appliances connected to it.
Now, try it using the app. Open the app and click on the Bluetooth Icon button and connect to Bluetooth HC 05 of Switch Board and then click on the ON/OFF button in app to control the electronic appliances wirelessly.