Introduction: TV Remote Light Switch
I wanted to have the ability to turn my lights and fan on and off with my TV remote. I like this much better than a smartphone enabled light switch because it's much cheaper, and more convenient. Instead of unlocking my phone, going to the app, letting it load, and then turning the lights off, I can just point the remote at the switch and turn the lights and fan on and off with the press of a button.
Step 1: What You Need
Buttons ( I started with push button and upgraded to capacitive touch)
Step 2: Wiring Schematic
The actual wiring looks very messy so I made a drawing of the schematic. If you use push buttons, the wiring will be slightly different
Step 3: Code
Below is the code I used to make the Arduino work. I am not a very good programmer so I am sure it is just barely working and I apologize for the sloppy coding. A big thing to realize is that if you just copy and paste it, it will not work. You need an IRlibrary. If you google it, you will be able to figure it out.
Step 4: Finishing the Build
Once the arduino is wired like the schematic shows, remove the light switches. Remember to turn off electricity in the room you are working in. The leads that went into the light switch now go into your relay. In theory, you should be able to draw power required for the arduino from the same wire going to the lights, but I didn't want to risk messing it up so I drew power from a nearby outlet. For the final result, I swapped out the push buttons with capacitive touch buttons with tin foil on them for extra working area. I also made a box from leftover laminate flooring. I hope you enjoyed this project. I absolutely love using it and hope you will too.