A few weeks back, I was looking through my boxes of spare parts when I noticed an old R/C car. An idea struck me. "I wonder if I could use this to remotely control other things, like appliances or electronics. This project is the realization of that idea. It illustrates how to build a compact, inexpensive, remote-controlled outlet that can be used for any number of things. Maybe you need a remote detonator for your Fourth of July fireworks show. Maybe you just want to turn on your stereo without leaving the couch. Whatever your application, I encourage you to follow along and build one yourself! If you get stuck, I have included a troubleshooting guide as the last step. It explains how to resolve some potential problems that may arise during the build. If you still have a question or concern, feel free to leave a comment or send me a message. I would be happy to help anyone interested in this project. Best of luck!
Step 1: Tools and Materials
Note: There are many viable alternatives to the component parts listed above. For example, almost any low power, NPN transistor can replace the 2N3904. I simply used these because they are relatively common. That said, make sure that your fuse has an amperage rating that is less than or equal to that of your relay contacts and cheater plug. This will keep the electronics of the device (and your home) safe because the fuse will be the first thing to fail if something goes wrong.
Step 2: Disassemble the R/C Toy
Begin by removing the batteries from your toy. Strip away the outer casings until the main circuit board is accessible. Label the wires that provide power to the board and the ones that go to the motor(s). Desolder the wires from the motor(s), but leave the power wires attached. This will allow you to test the circuit without the toy driving away. Additionally, it is a good idea to take a picture of the board at this point. Wires are prone to breaking off during testing, and it can be quite difficult to determine where they went without a picture for reference.
Step 3: Test the R/C Circuit
Now it's time to break out the multimeter! First, attach the test leads to one pair of motor wires that you desoldered. Set your multimeter to DC voltage and make sure the toy is powered on. When you press the appropriate button on the remote, the multimeter should show a positive value close to the supply voltage. More than likely, when you press a different button, the multimeter will show the same value, only negative. This demonstrates that everything is working properly and that you have located the correct remote buttons.
Next, attach the positive test lead to one of the motor wires and the negative lead to the negative side of the battery pack. Press one of the two buttons that you used earlier. If this produces a significant positive voltage, record which button was pressed and which wire was activated. If there is no result, try the other button.
Hopefully, by now, you have identified the behavior of one of your output wires. It should either go "high" (you get a positive voltage) or "low" (you get a zero voltage) when the corresponding button is pressed. In my case, OUT 1 goes low when pressed. Make sure that this wire is only activated by one of the two buttons. Otherwise, there will be interference and your outlet will not work correctly. Additionally, you should check the other motor wire and button to make sure that they have the same behavior as the first pair.
Step 4: Design the Latching Circuit
Before we jump into the details of this circuit, I feel the need to share a word of warning: I am not an electrical engineer. I developed this circuit using information that I gleaned from books, the internet, and way too much trial and error. Although it has worked consistently for me, it is probably not optimized for this application. Furthermore, I would appreciate any feedback from more knowledgeable users in order to improve the design.
If you'd like to play around with the circuit prior to building it, you can check out my Circuit Simulation. It's not entirely accurate, due to the nature of the simulator, however, it does illustrate the behavior of the latching circuit. Feel free to press the buttons and play around with it if you want.
The basis of the circuit is the two-transistor configuration in the upper-right part of the schematic. By connecting the base of each transistor to the collector of the other, a latching effect is produced. This means that when the circuit is "turned on" for a brief moment, it will remain on until power is diverted elsewhere (which happens when the off button is pressed). If you are interested in this type of circuit, you might want to check out this video from the EEV Blog, illustrating how to create a soft-latching power switch.
Even if you don't change my circuit design, I recommend that you assemble it on a breadboard before making a permanent version. It is a great way to catch mistakes early on and will help you understand how the circuit operates so that you can troubleshoot it later, if necessary.
The observant reader may notice that there are two different circuit diagrams shown above. Since certain R/C toys have different behavior than others, the latching circuit must be changed to accommodate. This is where the testing you did in the previous step becomes useful. If your motor wires went LOW when a remote button was pressed, you will need to use Circuit 1 (first image). If your motor wires went HIGH when a button was pressed, you should use Circuit 2 (second image).
Step 5: Etch the Board
Now that you've tested out your latching circuit, it's time to etch a PCB! If you're thinking, "That seems like a lot of work for this project," you may want to assemble it on perfboard instead. It is a perfectly reasonable alternative, and, in fact, it is what I used for my first prototype of this project. However, since I had never etched a board before, I decided to learn how to do it for round two. There is a lot of information about the topic on the web, so you might want to look up "PCB etching toner transfer method" or check out this instructable if you're not familiar with the process. I'm going to give a overview of how I did it, but a more in-depth tutorial might be helpful.
Step 6: Assemble the Circuit Board
With your new board etched, you can now begin soldering everything together. Use the diagram in the previous step as a reference. If you are creating Circuit 1, you will need to use "ON 1" and "OFF 1" in the diagram. You will also need to attach a 1N4001 diode to "OFF 1", even though it isn't shown in that diagram. If you are creating Circuit 2, you will need to use "ON 2" and "OFF 2". In this case, you should attach the diode to "ON 2". (If you are unsure about where something goes, refer to the main schematics in Step 4.)
Although the soldering is pretty straightforward, be very careful not to accidentally merge the traces. They are a little too close together on this board because I had no prior experience in PCB design. Next time, I will be sure to spread them out more. Also, notice that the LED is mounted on the underside of the board. This is done so that it will fit through a hole in the outer casing later on.
When you have finished soldering, check for short circuits using the continuity setting on your multimeter. Test pairs of adjacent contacts that are not directly connected. If any pair shows approximately zero ohms of resistance you probably have a short circuit. Look closely at gap between the contacts and remove any particulates that you can see. Finally, provide power to both circuit boards and test it out. Fingers crossed!
Step 7: Disassemble the Wall Adapter
If you're like me, you probably have a bunch of these old wall adapters lying around. They are the devices that convert high voltage AC in your home to the low voltage DC for your appliances. Since our circuitry requires a power supply, and we are already plugging it into a wall outlet, they are the perfect choice for this project. Find one that has an output of about 9-12V DC. Any higher and the 5V regulator will get to hot. Any lower and you'll go below the minimum voltage of your relay coil.
In order to disassemble the thing, you'll probably want to use a hammer and a small flat-head screwdriver. I tapped the screwdriver through the seam in several places and wiggled it around to pry the two halves apart. If done carefully, this can be accomplished without damaging the internal circuitry. We will not be using outer casing, though, so feel free to tear it up if necessary. Alternatively, a hacksaw or dremel can be used for this task, although it may take a while to cut the entire seam.
Step 8: Make the Receptacle
Now is a good time to fashion the receptacle for your device. This is the inlet that will accept the prongs of a power cord. To build it, start with a three-prong to two-prong adapter, sometimes called a cheater plug. Remove the ground plug hole and any extraneous plastic with a dremel or a hacksaw. Your goal here is to make it as small as possible in order to maximize the space inside the project case. Additionally, you will need to trim the prongs so that only 1/8 inch remains.
The plug that I used had a groove in it that was just the right size to hold my fuse. I used this to my advantage and wired the fuse to the plug as shown. Note that the fuse is not polarized, so it can be attached in either direction. Also, if you have trouble soldering to the prongs, try prying apart the two halves of the prong and soldering your wire between them.
Step 9: Fabricate the Housing
This section will focus on how to create an enclosure using a large wall adapter. If you have chosen an alternate enclosure or plan to 3D print your own, feel free to skip ahead to the next step.
At this point, you are probably wondering how big your adapter really needs to be. The answer, I'm afraid, is not very straightforward. The size of the adapter (and really any enclosure that you use) will be greatly dependent upon the specific components you have chosen. In my first prototype of this project, I was able to use an adapter that was approximately 2" x 2.5" x 1.6". This was only possible because my R/C circuit board (taken from a micro R/C car) was extremely small. For the prototype shown here, however, I chose an adapter that was about 2.25" x 2.25" x 1.9". This was really the minimum size for my chosen components. I had to spend a significant amount of time just trying to make everything fit. I would therefore recommend that you err on the side of caution and select a case that may be larger than your needs.
When you have found an appropriate adapter, disassemble it as you did in Step 7. You might want to use a hacksaw or dremel this time, to avoid damaging the case. Next, mark the hole for the LED and the slots for the receptacle. To do this, take location measurements on the circuit board and the receptacle and transfer them to the inside of the case. Drill out the hole for the LED using a 1/8 or 3mm bit. Cut, grind, or even melt out the slots for the receptacle. I used a sharp knife to carve them away because it allowed me to carefully control their size. When you're finished, remove any burrs from the housing.
Step 10: Assemble the Pieces
Next, determine how you want to arrange the components inside of the housing. Once you know that everything is going to fit, wire the components together according to the diagram above. Place the latching circuit in the housing first, and make sure that LED fits through the hole you drilled. Secure it in place with hot glue. Do the same with the receptacle, making sure that the slots are properly aligned. Secure the remaining components, and liberally apply hot glue. You definitely want to cover the relay contacts, the receptacle wires, and the back of the prongs since these will all be carrying high voltage AC. Finally, make sure that no accidental connections are being made and temporarily the housing together with a bit of glue. I say temporarily because you don't want to close it all up, only to find out that you forgot to solder something.
Step 11: Test it Out
Now comes the moment of truth. Plug your circuit into a power strip or an extension cord (so you can easily cut the power if something goes wrong), and press the ON button. The indicator LED should light up and remain on. Press the OFF button and see if it goes off. Now plug an appliance into the receptacle and test it again. If everything is working, congratulations! Seal up the seam of the case with hot glue and you are finished. If it didn't work, don't despair. My prototypes failed more times than I can remember. Just keep working at it and you will eventually succeed!
Finally, if you would like to embellish your creation, now is the time to do it. I added a custom label to mine to make it look a bit more professional. Also, if you do make your own version of this project, please let me know. I'd love to see what tricks and tweaks you come up with.
Thanks for reading my first instructable. Happy making!
Step 12: Troubleshooting Guide
Problem: My motor output wires did not produce a clear result when performing the tests in Step 3.
Possible Solution: Provided that your toy is working properly and your setup is correct, this likely means that your toy is wired unusually. Try connecting the multimeter's positive test lead to the positive battery terminal, and its negative test lead to one of the motor wires. If the multimeter shows zero volts normally and a positive voltage when pressed, your output wire is going "low" when pressed. If it shows a positive voltage normally and zero volts when pressed, your output wire is going "high" when pressed.
Problem: When testing my latching circuit, the indicator light goes off when a remote button is pressed, but comes back on when the button is released (i.e. the circuit is not latching).
Possible Solution: Double check the orientation of the diode that is connected to a transistor. If the orientation is correct, your problem may be a short circuit (see below).
Problem: My circuit won't turn on or behaves improperly.
Possible Solution: Double check that all of the components are in the proper orientation. If they are, test to make sure that the LED is working by providing power to the end of the 560 ohm resistor and ground. If it doesn't light up, it may have been damaged while soldering. If it is working, your issue is likely a short circuit (see below).
Problem: I believe that I have a short circuit.
Possible Solution: Turn the circuit off immediately and examine the gaps between your solder points. Remove any particulates in the gaps and test again. If this was not successful, rinse the bottom of the board thoroughly under hot water. Dry it off completely and test again.