I know all of you face this problem at least one in your life the switch board got broken by continuous using.Most of the mechanical switch get broken due to turning it on and off a lots of time either the spring inside the switch get displaced or might some other problem may cause and the switch board get broken.These mechanical switches also going to be out dated and looks so old type.Recently one of my switch board in my room got broken and I was wondering to fix it and came up with this Idea why not fix it and turn it into modern touch switch board.As it has fancy touch screen based switch without any moving mechanical part so it do not get broken due to continuous use of it unlike the old mechanical type switch and also we can add some extra functionality to it like live temperature monitoring of room. So lets start making it.
Step 1: Parts We Need to Shop Before Making It.
It is obvious that first we need a old broken switch board that we need to fix apart from this we need to collect the following parts from market or online store.
- 2.4 T.F.T display for Arduino(I am using st7789v TFT display)
- 5v Relay
- 220 volt Ac to 5v dc power adapter circuit.(You can got it from old charger.NOTE:voltage rating is different for different country so buy it according to your own country)
- Some wire
- female jumper wire
Thermistor(optional if you want to add temperature monitoring to it)
Step 2: Preparing the Broken Board.
First remove all the switches from the broken switch board box.Then we need to cut the Front face switch board box cover to exact size of the TFT display as in pic above you can see the cut of the face of the switch board cover.
Now leave the board we are going to prepare the Arduino uno for making the board.Downlode the MCU FRIEND 2.4 TFT library to Arduino IDE.Then downlode the following code as in link below and then plug the Arduino into your pc then upload the code to the Arduino. Now attach the the 2.4 TFT display to Arduino.Now you can see the two beautiful switch Icon on the LCD display now our Arduino and display is ready.
Step 3: Making the Connections and Giving Final Touch.
All the GPIO pins of arduino is used by TFT LCD display except 2 pins i.e. pin 13 and A5.
so we are going to use these pin for controlling the switch.Solder the wire to arduino pin 13 and connect it to the input of 5v relay and solder output pin of temperature sensor or thermistor to A5 pin of Arduino.Now connect the output +ve of AC to %v DC adapter to +ve of arduini and +ve terminal of 5V relay then -ve respectively.
Now connect the live wire of power supply to comm of relay and AC adapter live wire and neutral wire of power supply to AC to dc adapter and neutral wire of plug of to which you want to control.Now connect the NO(normally open) pin of relay module to live wire of plug of which you wand to control as shown in pic .You can clearly see in pic all the steps.Now carefully check all the connections and and wiring and make sure any thing is not short circuiting.
After checking carefully now assemble all the in electric board and make the LCD display perfectly fit in the cut part of board cover then fix it with hot glue now tight the cover switch board cover with its screw.
Step 4: Congrats You Have Converted Your Old Broken Switch Board Into Smart Touch Switch Board.
Now your smart switch board is ready far better than the old switch board.Now play with it by switching just by touching the beautiful display you can also see the live temperate on the display.Now surprise your friend with your own modified smart touch switch board.