Picture of Control Any Circuit With a TV Remote (and an Arduino)

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.
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Picture of 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
1-40 of 103Next »
KiranR33 days ago

How can i use it for long time , i mean how to store the remote code permanently?

DIY Hacks and How Tos (author)  KiranR33 days ago
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.

Is there is any other idea to store IR code in an EEPROM?

DIY Hacks and How Tos (author)  KiranR33 days ago

Sorry, but I don't really know how you would do that.

nikv19 days ago
How can I control multiple relays with multiple buttons? Also, how can I add a servo instead of a relay?
DIY Hacks and How Tos (author)  nikv19 days ago

You would need to change the code to set up a second array to store the second code. A servo could work just the same way. You just need to change the code to output a servo signal. You can find more information about that hereL

Thanks for such a quick reply, i guess i have some homework to do ;)

PiRaspBerry1 month ago
would it possible to have more outputs with more buttons on the remote?
Yes. You could set it to control as many appliances as you want.
thnx iam gonna make this tot control my hole room
midoaboud1 month ago

How can I simulate it on because i had some errors in code during simulation

Sorry. I am not familiar with 123d circuits

may you give me a useful link or similar simulation program to use it for arduino because such programs needs licence and for VBB it is hard to find serial number?....thanks in advance

Sir what would be the output for appliance? THANKS for your help
Sir could you guide me where to attach the extention cord? Thx

Take the extension cord. In the center cut the insulated strip that is holding the two wires together. Then cut one of the wires and strip the insulation off both of the cut ends. Solder these two wire ends to the relay on the circuit board. When the relay is turned on it will complete the circuit and turn on the appliance.

Is relay necassary If i just use it for 1 appliance ? Thankyou

Yes The relay is necessary because you are switching an AC appliance on and off.
Is relay necassary If i just use it for 1 appliance ? Thankyou

redatime2 months ago
In your picture with the breadboard which component is the black square at the top?
DIY Hacks and How Tos (author)  redatime2 months ago

That is a momentary switch. I use that switch with the breadboard because it was easier to connect that the switch that I used is the finished project.

redatime3 months ago

what arduino should be used?

DIY Hacks and How Tos (author)  redatime3 months ago
I used Arduino Uno but any board should work.

thanks a lot !

dath3 months ago

hii could you tell me how to connect the relay ,...


DIY Hacks and How Tos (author)  dath3 months ago

Take a power cord and cut one of the two wires. Strip the insulation on each side of the cut wire. Then connect these wires to relay's common and normally open terminals.

spike19983 months ago

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.

Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"

C:\Program Files (x86)\Arduino\libraries\RobotIRremote\IRremoteTools.cpp:5: error: 'TKD2' was not declared in this scope

what do i need to do about it

DIY Hacks and How Tos (author)  spike19983 months ago
At the bottom of step 2, I describe how to rename the library if this error occurs.
Eloisa CamelM3 months ago

finally, it worked! :) thank you..

splendid873 months ago

I have pressed the receiver button, and release it.

Then the red led on.

And i press my tv remote button but red led still on and in serial monitor didn't receive any code too.

Kindly remedy the problem!

Thanks in advance

DIY Hacks and How Tos (author)  splendid873 months ago
For whatever reason, the arduino is not sensing the signal from the remote. There could be a problem with one of the components. Or maybe something isn't hooked up properly. Or there could be interference from the light in the room.
Eloisa CamelM4 months ago

Sir can i use a relay module shield without an optocoupler?

Yes. You will just need to use really low power relay (less than 40 mA) or a power transistor because the Arduino is not able to output more than 40 mA through the output pins.

Hi sir, how do i know if a relay works on below 40mA? thanks for the help..

we have here a 12v 10a relay.. got trouble looking for the relay to use..

The relay will often say on the packaging what that coil requires to activate. If the relay coil requires 12 volts, it can not be activated directly from the Arduino. The Arduino can only output 5 volts. When in doubt be safe and use a power transistor to turn the relay on and off.

thank you sir.. i'll be using a 2n2222 npn transistor

shinystuff5 months ago

Very nice instructable! Worked the first time I tried it. But I have a found a serious flaw. If you disconnect the power it loses the memory of the selected button. I will try to make one of two things. Either I will simply look up the remote signature, or I will retweak the code to save the values in the EEPROM(but looking at the values I get from the remote, a simple 512 byte EEPROM won't handle the pressure :D ) Otherwise, yeah great instructable!

dj505Gaming6 months ago

I keep getting the error "C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5: error: 'TKD2' was not declared in this scope"

Using Arduino 1.5.4 with an Arduino Nano, wiring is correct. Any help?

Try renaming the IRREMOTE library. The newest Arduino has a built in IRRemote library so the name has two locations and it doesn't know where to go.

1-40 of 103Next »