Most of the buttons on a remote control are never used. So why not use them to control appliances and other electronics around your house. In this project, I am going to show you how to use an Arduino to decode the signal from your remote and use it to make an outlet switch that can turn your electronics on and off.

When you are done, you will be able to control lights, fans and even your coffee maker with your TV remote.

Step 1: Materials

Here are the materials and tools that you will need for this project:

Arduino Microcontroller
AC Power Adapter For the Arduino
38 kHz Infrared Receiver Module  (Radio Shack part# 276-640)
Green LED
Momentary Pushbutton Switch
Two 100 ohm Resistors
10 kohm Resistor
5V Relay or Relay Shield
Printed Circuit Board
Plastic Project Housing
Extension Cord

Wire Strippers
Soldering Iron and Solder
Drill and Bit Set
Sharp Knife
Hot Glue Gun
<p>Hi, I would like to make a setup where I have a stationary bike and when I stop pedaling, the TV would turn off. Any idea how to do this? I assume using a photoeye, and arduino, and a IR signal would work. Would just like it that if I stop pedaling an IR Signal would be sent to the TV to turn it off. Any ideas would be much appreciated.</p>
<p>I actually made a system with that in mind. Check out this instructable <a href="https://www.instructables.com/id/System-For-Automatically-Limiting-TV-Time/step1/Watch-the-Video/">https://www.instructables.com/id/System-For-Automat...</a></p>
<p>sir can i ask, in your schematic i tried to do the same project as you did, but i did not get any lights turned on, so my question is. Does the relay does not have any suppy? Like 5v from the arduino or from the battery? Hope you'ld answer, it'll be very much appreciated btw. My relay is 5VDC and 10 A 250 DC </p>
<p>First you want to test the part of the circuit that comes before the relay. You can do this by replacing the relay with an LED and a resistor. If the LED lights up, then you know that the rest of the circuit is working and the relay is getting power. If all that is working, then you want to make sure that the relay is getting enough power. Some relays require more current than the digital pins can output (about 20 mA). Then check all the connections with the appliance that you want to power.</p>
<p>thank you for answering sir, I tried what you said that I should try first an LED and a resistor and it did light up. But my problem is the relay the relay only requires only 5VDC input. The mA that the relay can handle printed in it is erased. My question is that, can i use a transistor for pin2 ? So that i could supply 5V to the relay to switch on? I'll connect 1 of the pins of transistor to 5V of the arduino, then GND for the other pin, and then i would connect the coils of the relay to the 5v and GND of the transistor. BTW im using a BC548 transistor. Hope you would answer. Very well appreciated your first answer sir thanks.</p>
<p>Yeah. You can use a transistor to activate the relay.</p>
<p>hallo , ik am a beginner and am really interested in making this project .. u did amazing ! please can u help me get the links from where i can but all the tools please ? because i want to use exactly as the tools u used to avoid any problems or errors on the way . am from belgium by the way . hope to hear from u soon . thanks </p>
<p>Unfortunately, I don't know exact part numbers for most of the parts. I just used whatever spare parts that I had lying around my workshop. But they should be generic enough that you can use anything similar and it should work. The only thing that you probably want to look carefully for is the 38 kHz Infrared Receiver Module. I purchased it from Radio Shack (part# 276-640). But You should be able to get it from other online suppliers such as <a href="http://www.mouser.com/ProductDetail/Vishay-Semiconductors/TSDP34338/?qs=sGAEpiMZZMvAL21a%2fDhxMomB1eLIFXVsm0RMwxYslh0S82seMnBFZg%3d%3d">http://www.mouser.com/ProductDetail/Vishay-Semicon...</a></p>
How much cost and time will it consume??
The most expensive part would be the Arduino. I couldn't give you a detailed list of part prices because I used parts that I already had. I built it in about 10 hours.
<p>Many Thanks for this project&lt; I really liked &amp; i make one like this &amp; it's work properly.</p><p>But I need some note how to store two button to used,</p><p>Please can you help me to do this.</p><p>Best Regards.</p>
<p>Mostly you just need another variable to store the second code. Add a second relay</p><p> Duplicate and sections of code that you want to reuse. Just be sure give all the new stuff unique variable names.</p>
<p>Can you post a picture or schematic of how the extension cord is connected. Thanks great project</p>
<p>Take an extension cord. Cut and strip off the insulation of one wire. Connect one of the cut wires to the normally open terminal of the wire and the other cut wire to the common terminal of the relay.</p>
<p>Thanks for the quick reply, I appreciate it. I would still like a picture if you have the chance. Thanks in advance</p>
<p>Thanks, your instructables is well explained.</p>
<p>hello, what kind of diode you used, and how connected the relay, know very little electronica, why I ask the question</p>
<p>Almost any diode will work. It is connected to the relay with the anode connected to the coil pin that is also connected to ground.</p>
<p>Hi, can i use this?</p>
<p>That looks like a low power diode. You want you diode to be able to handle at least 0.5 amps.</p>
<p>How can i use it for long time , i mean how to store the remote code permanently?</p>
<p>The coding would be basically the same. You just need multiple variables for the different appliance codes.</p>
The easiest way to make the code permanent is to manually write it into the code. That way it will always be there even after the power is disconnected.
<p>Is there is any other idea to store IR code in an EEPROM?</p>
<p>Sorry, but I don't really know how you would do that.</p>
<p>IN CIRCCUIT above if i want to add more appliance to be controlled by my remote but but with different buttons of remote what to do?</p>
If you want to set up multiple appliances, you need to set up multiple variables to store the different IR code values. If you have a lot of appiances, I would recommend not using a programming button to store the signal values, but instead hard coding the values for each button on the remote.
<p>can u provide programming to to set up multiple appliances..........</p>
It seems difficult for me to replace the switches with the remote controlled circuit, please can you show me a simple circuit that controls a curtain using remote control circuit described above. This is my college project, i designed a manual circuit and am failing to replace with a remote control circuit on the manual switches. please help me with your circuit to control curtain using a remote. thanks in advance.
Any time that you are having trouble with a project, the best thing to do is to break it down into steps. Your first step was getting it to work with manual switches. Next, set it up with relays so that the switch on the relay replaces the manual switch. Then once you are able to control the system with relays, then hook the relays up to an Arduino so that the Arduino controls the relays. Then once you have that working, you can connect the IR sensor and add the code for the IR receiver that I use in this project. This will allow you to control it with a remote. <br /><br />Build everything one step at a time and get each subsection working before adding more.
The lecturer requires us not to use the micro controller
<p>If you can't use a microcontroller, that makes it a little more difficult. In that case, my best suggestion would be to use two separate IR receivers to control the opening and closing. Put one receiver on the one side of the window and put the other receiver on the opposite side. Connect these to a transistor <a href="https://www.google.com/imgres?imgurl=http://modularcircuits.com/blog/wp-content/uploads/2011/10/image7.png&imgrefurl=http://www.modularcircuits.com/blog/articles/h-bridge-secrets/h-bridges-the-basics/&h=264&w=270&tbnid=RbrWHL7MUJB8-M:&tbnh=160&tbnw=163&docid=JtBHZv-zAzCcNM&itg=1&usg=__TaFJk6kOm8ZebkuknMxCyGgDWS8=&sa=X&ved=0ahUKEwidgrrPmqXKAhVGzz4KHQ7LCSAQ9QEIIzAA" target="_blank">H-bridge</a>. </p><p>For more information check out this article: <a href="https://en.wikipedia.org/wiki/H_bridge">https://en.wikipedia.org/wiki/H_bridge</a></p><p>The transistors can act like switches. When the receiver detects a signal from the remote, it will activate two of the transistors and cause the motor to turn one way. Then you put the remote at the other receiver, it will activate the other two transistors and the motor will turn the opposite way. </p><p>Just remember to set it up so that you don't accidentally activate both receivers at the same time. </p>
<p>Good day, I would like to ask if it is possible to create a TV remote out from an arduino?</p>
<p>Of course. Check out this project: <a href="http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html">http://www.righto.com/2009/08/multi-protocol-infra...</a></p><p>The author of the IRRemote library set up everything for working with remotes and arduinos.</p>
<p>I need to control my curtain using a TV remote, I have a simple circuit that uses switches . I need to replace manual switch with a remote controlled switch. Suggest for me what do please</p>
You could just use the circuit described in this Instructable and connect it to the switch with relays.
Thanks alot brother but still have a problem because my circuit has two switches, one switch turns the motor clockwise and the other switch turns the motor anticlockwise to control the curtain. So which switch should be replaced with the remote controlled circuit, or i request to suggest a circuit to control a curtain by a remote. Thanks in advance
<p>This circuit is able to control multiple relays (each with a different signal). So use two relays. One relay will replace each switch. You will just have to adjust the code so that you have two IR signals.</p>
<p>that was so cool and easy project for arduino beginners.... </p>
I am glad you liked it. I have a number of other beginner level Arduino projects that you can check out if you are interested.
<p>Sir Good day! Can i use any TV or DVD remote Control? Tnx in advance :)</p>
Any system with a standard IR protocol should work.
<p>can i add more ? how can i do this?</p>
<p>I am not really sure what you are asking.</p>
<p>For some unknown reason to me, it is trying to read from the RobotIRlibrary when i try and compile it. These are the errors I am getting:</p><p>Arduino: 1.6.5 (Windows 7), Board: &quot;Arduino Uno&quot;</p><p>Build options changed, rebuilding all</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:1: error: missing terminating &quot; character</p><p>int RECV_PIN = TDK2&quot;; // the pin the IR receiver is connected to</p><p>^</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TDK2' was not declared in this scope</p><p>int RECV_PIN = TDK2&quot;; // the pin the IR receiver is connected to</p><p>^</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp: In function 'void beginIRremote()':</p><p>sir the same problem is occuring to me</p><p>what to do please suggest</p>
Use the library folder that I have attached in the the instructable.
<p>when i bulid the circuit and pressed the remote keys</p><p>nothing appears in the serial display on my pc</p><p>now what to do please suggest</p>
<p>For some unknown reason to me, it is trying to read from the RobotIRlibrary when i try and compile it. These are the errors I am getting:</p><p>Arduino: 1.6.5 (Windows 7), Board: &quot;Arduino Uno&quot;</p><p>Build options changed, rebuilding all</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:1: error: missing terminating &quot; character</p><p> int RECV_PIN = TDK2&quot;; // the pin the IR receiver is connected to</p><p> ^</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TDK2' was not declared in this scope</p><p> int RECV_PIN = TDK2&quot;; // the pin the IR receiver is connected to</p><p> ^</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp: In function 'void beginIRremote()':</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:10:2: error: 'irrecv' was not declared in this scope</p><p> irrecv.enableIRIn(); // Start the receiver</p><p> ^</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp: In function 'bool IRrecived()':</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:14:9: error: 'irrecv' was not declared in this scope</p><p> return irrecv.decode(&amp;results);</p><p> ^</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp: In function 'void resumeIRremote()':</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:18:5: error: 'irrecv' was not declared in this scope</p><p> irrecv.resume(); // resume receiver</p><p> ^</p><p>Error compiling.</p><p> This report would have more information with</p><p> &quot;Show verbose output during compilation&quot;</p><p> enabled in File &gt; Preferences.</p>
<p>This problem is caused by there being two library files with the same name (see step 2). You can solve this by renaming one of the folders and changing the library call command. You can download the attached zip file for an example. </p>
<p>Thank you for your quick reply but what do you mean by changing the library call command?</p><p>Thanks,</p><p>Make-o-Saurus</p>

About This Instructable




Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:How to Make a Festivus Pole Add Wings to an Infant's Halloween Costume Bubble Bath That Never Runs Out Of Bubbles 
Add instructable to: