Introduction: Self-learning IR Remote Controlled Switch

Picture of Self-learning IR Remote Controlled Switch

Hi, an idea came to my mind to control LED/relays connected to Arduino instantly with any remote available. How you will use this is only up to your imagination and what is the upsize of this project? You don't need to modify the code at all! Connect the part, upload the code and you are set!

What we need:

  • Any Arduino board (I use UNO clone from eBay) - $3.22
  • IR receiver (I use TSOP34840 but any similar should do) - $1
  • LED/relay/ is up to you what you will use this with :)
  • Wires
  • Any IR remote control to test your result with

Let's begin...

Step 1: Conecting the Parts and the Code

Picture of Conecting the Parts and the Code

Connecting the part will not get any easier than this.

TSOP -> Arduino

VCC - 3.3 or 5V depending on model, some have 3-6V, some only 5V)


OUT - pin 11

If you are using LED for testing, connect it to GND and pin 13 (I know I don't, but you should use resistor to avoid damaging the LED).

Now lets upload the code...

This code is made to "upload and run". There are no modifications you need to make (if you use the same pins as in the "#define" part of the code...).
Once the board boots up with this program it waits until the first IR code is received and then is using this IR code to turn ON/OFF the LED/relay. To change the controlling IR code simply reset the board, feed it new IR code and you are all set. With enough imagination and some basic skills, you can control lights in your living room separately only with your TV remote (lets face it, you don't even know what all the buttons on your remote do, so why not give them some purpose :) )


FuatA3 (author)2016-08-11

Thank you sharing, code is very good working..
I sorry, for my bad english

Abbas Rajput (author)2016-05-12

Where is the code you are talking about ?

Step 2, *.ino file


You have to download the ino file on the end of this instructable and open it in Arduino IDE...or just simply edit the file.

About This Instructable




Bio: Technology geek, love discovering new possibilities...
More by PraetorianCZ:Vigenere Cipher With ArduinoTerraControl V3.0 - ESP8266 + BLYNKMotion Detector With Blynk Notifications (WeMos D1 Mini + HC-SR04)
Add instructable to: