Remote Controlled Light Switch (Arduino)
by Engineering Teens in Circuits > Arduino
482 Views, 0 Favorites, 0 Comments
Remote Controlled Light Switch (Arduino)
Engineering Teens
Who likes to get out of bed to turn the light off? I most defiantly do not. It is so annoying to have to get in bed and then get back out to turn the light off, and then you have to walk back in the dark. So, we needed a stay in bed solution. Some of you are probably thinking why you don’t just go buy a smart light system and install it, but it’s boring there’s no creativity or real hands-on experience. I’ve been building stuff for a long time and there’s just something about doing it yourself that is so magical. For one you know what’s going on, and two you learn so much. I can’t quite put my finger on it but putting something together and seeing it work is just flat out special.
For this build we will be using an Arduino uno, which is a little overkill for this build but it’s what we had. Arduino is an open-source platform, the software is very easy to use and understand. Arduino boards are capable of reading sensors inputs and using that input to give an output to move a motor or turn on a LED and tons of other crazy cool tasks. Arduino is used for countless applications. There are lots of different Arduino boards, the Arduino uno being one of the bigger of the Arduino boards. In its simplest form Arduino boards are small computers, that are really easy to program on
Supplies
Tools
- Flat head screwdriver
- Drill and drill bits
- Dremel
- Wire strippers
- Wire cutter
Parts
- Arduino nano or Arduino Uno
- Arduino extension
- Light switch
- Male to male wires
- Female to male wires
- IR sensor
- IR Receiver
- Sevo
- 12- or 14-gauge wire
- Remote
+
Light Switch Construction
- 1- Take the top off the light switch off
- 2- Don’t lose the little metal piece
- 3- Using 14-gauge wire bend it around the switch then strip everything past the middle point
- 4- Cut the wire about 2 inches past the light switch
- 5- Drill a hole that your bare wire can fit in snuggly
- 6- Opposite of your hole dremmel out a valley that your wire can sit in
- 7- Bend your wire out as flat as possible
- 8- Bend your wire up flush with the light switch
- 9- Hot glue the wire down to the switch
- 10- Dremmel out the small lip opposite of the terminal screws
- 11- Then drill a hole with a 1/4-inch drill bit in the notch you just created
- 12- Stick you wire thru the hole and push the two pieces together
- 13- Bend the wire flush with the back of the light switch (The back is typically black)
- 14- Hot glue your servo to the back of the light switch, line the servo up with the hole that you made
- 15- Drill holes for your sensors in the drill plate
- 16- Cut little notches in the switch plate for your wires to sit in
- 17- Turn the power off when installing
- 18- Install the switch
- 19- Cut little notches in the side of your dry wall so that it sites flush with the wall
- 20- wire everything together
Remote Decoding Code
When your code is uploaded and your IR receiver, point your remote eat the IR receiver and open the com in the top right corner and it will give you a hex number
You are going to use this hex number in the full code
We are using a Samsung remote but if you are using a different brand, just copy and paste it from the code above and replace it with the define Decode_samsung
Downloads
Final Code
Upload your code to the Arduino, wire the Arduino up to the sensors and light switch and your good to go.