Control AC Appliances with Your Television Remote

Hello & welcome back guys on another blog of entrench electronics. This time we are going to talk about your TV remote. Most of the buttons of our tv remote never use in the entire life of tv. So why not use them to control AC appliances with your television remote 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 tv remote and use it to make an outlet switch that can control your electronics on and off.


When you are done, you will be able to control lights, fans and many more things with your TV remote.


  • 1 x Arduino Uno R3 Board
  • 1 x Laptop or pc
  • 1 x Bread board full size
  • 1 x 6v relay
  • 1 x bulb
  • 1 x IR Receiver (TSOP 0038)
  • 1 x USB cable
  • Jumper wires

Connection Diagram





Please follow the above mention connection for arduino uno and bulb interfacing. Connect your bulb on pin 9 of arduino uno.

After completing the connections the next thing you need is that Arduino IR Library. So please connect click on the below mention link to download IR Library.


Arduino IR Library

    Click “Download ZIP” on the right side of the page and save the zip file. Then unzip it. Rename the folder “IRRemote” (unless that name is already being used).

Then copy the folder into your libraries directory of arduino IDE. The libraries directory should contain the folder “IRremote.” If for some reason you already have a folder with this name, then you may need to rename it. The IRremote folder should contain the files. A lot of problems experienced when uploaded in the code, are caused be the library not being loaded in the correct location.

UPDATE: In version 1.5.8 of the Arduino software, several of the default libraries were changed. This created duplicate IRremote libraries. So if you encounter errors, this is likely the source. I have attached a copy of the library with the file names changed to avoid the conflict. Just unzip it. Then copy the “Arduino-IRremote-master2” folder into the libraries folder in the Arduino program folder.

 Source code

#include <IRremote.h>
int bright;
int before;
int out=9; //connect your LED to pin 9 
int RECV_PIN = 11; //data out of IR receiver connects to pin 11
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
 irrecv.enableIRIn(); // start the receiver
 before=0; //LED is turned off
 bright=1275; //brightness value is at maximum (255)
void loop() 
 if (irrecv.decode(&results)) 
  if (results.value==0x01FE48B7)
  { //Code to turn the LED ON/OFF
   { // if the LED was turned off, then we turn it on 
    before=1; //LED is now turned on
    digitalWrite(out,LOW); //if the LED was turned on, then we turn it off

    It’s the time to test the code. Click the very first switch on/off button , the red color button with icon as shown below


 Now, as you can see when you press the button, you will find that you are controlling the bulb with the help of simple IR Remote.

!!!!!!!!!!!!!!!!!!!!Congratulations Enjoy!!!!!!!!!!!!!!!!!! 

Hope you guys like our tutorial. We will see you in the next tutorial with new programming and electronics concepts.

comments powered by Disqus

how can we help you?

Please leave your contact details, Our customer relationship manager will assist you.

get in contact
Be the Campus Ambassador of ELAN IIT Hyderabad!