Introduction: 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/servo...it is up to you what you will use this with :)
- Any IR remote control to test your result with
Step 1: 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)
GND - GND
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 :) )
Participated in the
Sensors Contest 2016