How to Make a Remote Control Light Switch

01/06/2022

The remote control light switch replaces the panel that normally covers your existing light switch. The light switch is turned on and off using a servo motor operated system. The light is controlled by a pair of radio transceivers, one in the mechanism and one in the remote. If you chance to be close, it also has a button on the front that turns it on.

This is my initial draught of the design, and I'm largely utilising components I already have, so there's definitely space for improvement or other cool features. In this Instructable, I'll walk you through the steps I took to design and build it. I'll send you the CAD files and code that I have, but you're free to edit or create your own.

Step 1: Create a switch model.

The first step is to use a CAD software to model the light switch you have. Fusion 360 was my choice. I measured and designed the switch and the panel behind it, then joined them together using joints. To allow the switch to spin up and down like it does in real life, I utilised a rotating joint. This is particularly useful for seeing how well the other components fit together.

The Carriage is the second step.

The light switch in my concept is bumped up and down by a sliding "carriage." It is supported by two 1/8in steel circular bars and features a rectangular hole in the centre through which the switch passes.

To make it glide more smoothly, I added some little brass bushings that I produced on a lathe. They are press fit into holes in the carriage and have an inner diameter of 1/8in, an outer diameter of 3/16in, and a length of 1/4in. I know it's probably a little excessive, but I wanted to give it a go. You can probably get by without them because they aren't essential. All you have to do now is reduce the holes in the carriage design so that it can move freely on the rods. It's loose enough to move about easily, but not so loose that it wiggles or pivots.

Step 3: Pinion and Rack

The carriage must then be able to travel up and down. To drive it, I picked a rack and pinion with a servo motor. I designed the rack in Fusion 360 using a gear generator plugin and then mounted it to the carriage. Then I created a pinion gear to match, complete with a flange that goes over the servo horn. These were added to the assembly and positioned such that they fit together neatly.

Step 4: Enclosure and Mounting

The next step is to create mounting geometries for the servo and Arduino, as well as an attractive enclosure to house everything. I placed the Arduino and servo where I needed them, then edited the panel design within the assembly using the edit in situ tool. All of the mounting holes and features were projected and extruded to fit. I decided to attempt to construct some little dovetails on the plate that it can slot into for the lid that covers all of the electronics. It fits together neatly with the appropriate tolerances or a little filing.

It's time to print now that everything has been designed! Modify my designs to fit your switch or hardware if necessary. If you can, make it even cooler.

Wiring (Step 5)

I utilised an RF-24 radio transceiver for wireless control. I had a couple on hand, and they're not difficult to use. Make sure the RF module's power pin is connected to the Arduino's 3.3 volt pin. You could fry it if you attach it incorrectly!

The servo is connected to the Arduino's 5V, ground, and a digital pin.

The ground and another digital pin are connected to the pushbutton. Normally, a resistor is required to wire a basic button like this; but, if we attach this one to ground and a digital pin, and set the pin mode to INPUT PULLUP, we can get away without one. Handy!

As shown in the schematic, connect the RF-24, the servo, and the button.

Assembly (Step 6)

It's time to put it all together now that we have all of the pieces. Press the bushings into the carriage's holes if you created them. Pass the rods through the holes in the carriage and the panel.

Make sure the rack and pinion are aligned such that the servo has rotated half of its length when the carriage is in the centre of the sliders, allowing it to move the carriage both upward and downward.

Attach the servo and Arduino to the lid using bolts, and the pushbutton to the lid with a pushbutton. Assemble the enclosure by ensuring that all of the wires are in the proper locations.

Programming is the seventh step.

This is an easy programme to programme. To use it, you'll need to obtain the RF-24 library. Using the Arduino IDE library manager, locate the 'RF24 by TMRh20' library.

The controller's code merely checks if a button has been pressed or not. It transmits a '1' to the light switch device if it has.

The light switch gadget will check to see whether anything has been received on its radio or if the front button has been touched. If it has, it turns the servo forward or backward to turn on or off the lights. That's all there is to it!

To suit your light switch, you may need to modify the distance the servo motor turns. Change the upPosition and downPosition variables in the code until it moves the correct amount.

More information have been added to the code comments, so if you want the nitty gritty stuff, they're all there.

The Controller (Step 8)

The controller is straightforward. A pushbutton and an RF module are included. I would have constructed a lovely enclosure for this if it were a finished product, but for now, it's slapped together on a breadboard.

Because that's all I had on hand, I utilised an Arduino Mega with a breadboard shield. It should work with any Arduino.

Installation (Step 9)

Remove the lid by loosening the two screws that keep it in place. Attach the new automated light switch cover to the switch using the same two screws. Ensure that the switch is inserted into the carriage's slot.

Make sure you don't touch any of the cables or anything else inside. Electricity may be quite hazardous.

Both the switch and the controller must be plugged in to work. The RF modules may take a few seconds to load up, but once they do, you should be able to control your lights with the touch of a button. What a great idea!

Step ten: Enhancements

So far, I'm pretty satisfied with how this has turned out. For a long time, I've wanted to construct a remote control light switch like this. This endeavour was also a terrific learning opportunity for me. If I were to build one again, I'd do a lot of things differently.

For example, the light switcher is currently powered by the Arduino's USB connection. Unfortunately, there isn't a wall outlet within a 10-foot radius of the device that I can plug it into. Oops. Perhaps I'll include a battery pack.

In addition, I believe the remote control might be changed with something more user-friendly. I selected the RF-24 modules since I already had them and knew how to use them, but there are certainly better possibilities. I believe that controlling it over Bluetooth using a phone app would be quite convenient.

Another option for flipping the switch is to utilise a different mechanism. A mechanism with a fascinating gear train, smart connection, or a charming design that matches your room's décor may be a pleasant addition. The options are limitless.

© 2021 SKI Rental | All rights reserved
Powered by Webnode
Create your website for free! This website was made with Webnode. Create your own for free today! Get started