Introduction: Automated Light Switch Controller
Hello and welcome to my first Instructable! Today I will be showing you how to make a light switch controller that is completely automated, completely hidden in the wall, and completely awesome! I hope you enjoy it!
I spend a lot of my time laying in my bed, and absolutely despise having to get up and walk across the room to turn off the lights, nor have I mastered the art of throwing a pillow across the room to turn off the switch. For that reason, I got the idea to make a light switch that can be controlled with an infrared remote that will sit on my nightstand. I also will replace the original switch with a button because I do not want the remote to be the only input.
Roughly 57% of Americans hit their snooze button at least once in the morning, and I am no doubt a part of that group. So if I am already going to rip out the old switch and replace it with a high-tech one, why not add an alarm feature that will automatically turn on the lights at a specified time?
Step 1: Gather Materials
For this project, you will need a few things. These will include:
1 - Arduino (I chose the Pro Mini)
1 - RTC module
1- Op Amp (I chose the LM324
1 - 5V Regulator
1 - Relay Board
1 - IR Receiver
1 - RGB Led
2 - Pushbuttons of your choice
1 - PCB board
4 - Resistors
Lots of headers and wire
Basic electronics tools
Step 2: Breadboard and Circuit Design
Once you have all materials and tools ready, you can jump into the design process. Follow the schematic provided and make sure to always check connections twice. I usually connect all components on a breadboard first before soldering everything down to a PCB board, just to make sure that it all works correctly.
Step 3: Code
Download the code below and upload to Arduino.
Step 4: Solder Onto PCB
After you have tested the circuit and uploaded the code, you are ready to solder everything down and make everything permanent. Make sure that you take your time and double check before making any connections. Also don't forget to hook up a fan nearby to prevent from inhaling and solder fumes by accident. Solder jumper wires to all breakout components and use heat shrink tubing to protect the connection and prevent shorts.
Step 5: Cutting and Drilling
In order to mount all of the buttons and sensors to the cover plate, a few holes must be drilled and other parts cut depending on the size of your pieces. For that same reason, I will not provide instructions or dimensions for this step.
Step 6: Mount Everything to the Cover Plate
This step is pretty intuitive, just put all of the components into their fitting spots on the cover plate and hot glue what needs to be glued down.
Step 7: Put Everything Into the Wall
Lastly, remove the lousy old switch and attach the wires to your relay board. Please DO NOT forget to cut off the fuse to the room you plan on changing the light switch to, or serious injury could be right around the corner. Once you have everything installed, tighten the screws and enjoy!
Step 8: Enjoy Your New Switch
That's it, you are all done! You can now toggle your lights from anywhere in the room and will hopefully not sleep through any more alarms. I hope you enjoyed this Instructable, and if you have any questions please feel free to comment.
We have a be nice policy.
Please be positive and constructive.