loading
It is really easy to control an Arduino using an infrared remote. There is one particular remote that is available from multiple sources and is really quite cheap, they look and operate in a very similar way.

NEOMART Raspberry Pi HX1838 Infrared Remote Control Ir Receiver Module DIY Kit.  Amazon
Kootek Raspberry Pi Infrared Remote Control Ir Receiver Module DIY Kit. Amazon
KIT,IR REMOTE,IR RECIVER,ARDUI,COMPATIBLE  Jameco

The problem is that documentation seems to be scarce for these particular remotes. Here is how I figured out how to use them.
 

Step 1: Assemble Circuit

You will need one Arduino for this. I used a UNO, but just about any Arduino should work. First wire up the infrared receiver that came with your kit. There are 3 wires, PWR, GND, and SIG, I used port 11 for SIG. Note! some readers have reported that their sensor has different wiring, double check it yourself.

<p>Nice Abstract. </p>
Thanks a lot.... I have been breaking my head to understand IR buttons coding. Helped a lot.
<p>Mine too. This guy is so bad, he should atleast have decency to update his tutorial and mention about it. I fried mine also.</p>
<p>OK I have got this remote and it is the king of weird codes. Heres what I get when a press the power button and hold it for sometime-</p><p>C722B335</p><p>8651F175</p><p>D440F4BA</p><p>673D41A</p><p>D440F4BA</p><p>673D41A</p><p>C722B335</p><p>673D41A</p><p>C722B335</p><p>673D41A</p><p>D440F4BA</p><p>673D41A</p><p>C722B335</p><p>673D41A</p><p>Heres what i get when I press it shortly so that i get only one reading per press-</p><p>D440F4BA</p><p>EDB7BF84</p><p>C722B335</p><p>7B33B312</p><p>C722B335</p><p>EDB7BF84</p><p>D440F4BA</p><p>EDB7BF84</p><p>C722B335</p><p>8651F175</p><p>C722B335</p><p>EDB7BF84</p><p>D440F4BA</p><p>EDB7BF84</p><p>C722B335</p><p>EDB7BF84</p><p>C722B335</p><p>F8D5FDE7</p><p>D440F4BA</p><p>EDB7BF84</p><p>I have previously cloned Sony, Samsung and LG remotes, but this DTH remote is a b**ch. The company isn't international and I live in India, so I can't find a module for it. Any help would be welcome.</p><p>Thanks</p>
<p>YES. I also at times get these codes. I dont understand WHY. sometimes i get correct code and sometimes I get these codes. Such an un-reliable remote.</p>
<p>How can you take this and make it do something when you press a button. Such as Print a line or run a motor?</p>
<p>Yes I have programmed it to receive code from a Sony remote and move a servo</p>
Can you post that if pressed code?
Do you have a program to connect motors to arduino and control them using IR remote?
<p>my code for one led and remote control of MP3 player.</p>
<p>#include &lt;IRremote.h&gt; // libraria IR control remoto.</p><p>int RECV_PIN = 11;// pin donde recibiremos la se&ntilde;al</p><p>#define ON 0xFFA25D // direccion es FFA25D pero se le agrega el 0x </p><p>// porque asi se le dice al arduino que es HEXADECIMAL.</p><p>#define OFF 0xFF629D // tecla control stop</p><p>unsigned int led = 13;</p><p>boolean estado = false;</p><p>IRrecv irrecv(RECV_PIN); //</p><p>decode_results results;</p><p>// aca guardamos el dato que nos del el IR</p><p>void setup()</p><p>{</p><p> //Serial.begin(9600);</p><p> irrecv.enableIRIn(); // Inicia el IR in</p><p> pinMode(led,OUTPUT); // configuramos el led como salida</p><p>}</p><p>void loop() {</p><p> // si el IR recibe una se&ntilde;al se habilita la funcion.</p><p> if (irrecv.decode(&amp;results)) {</p><p>switch (results.value)</p><p>// si el resultado obtenido esta en el case se ejecuta</p><p>{</p><p> case ON:</p><p> // en el caso que sea la direccion 0xFFA25D</p><p> // se ejecuta lo siguient</p><p> if (estado ? false : true){</p><p> // si es estado del es false se ejecuta</p><p> // y se asigna al estado true. </p><p> estado = true;</p><p> digitalWrite(led,estado);</p><p> }else </p><p> {</p><p> //sino se le asigna false nuevamente para que el led</p><p> // permanezca apagado</p><p> estado = false;</p><p> digitalWrite(led,estado);</p><p> }</p><p> break;</p><p>}</p><p>delay(200); // 1/5 second delay for arbitrary clicks. Will implement debounce later.</p><p>irrecv.resume(); // Receive the next value</p><p> }</p><p>}</p>
<p>Hi I need to resolve is there who can help me</p><p>Thank you</p>
<p>you have open arduino librarys in your case, E:\arduino-nightly\libraries and delete this library (RobotIRremote). close arduino and open again &amp; Ready :) </p>
<p>Will any IRreceiver work with any remote? OR do I need a specific one? I've been trying to do this project, however my receiver and my remote don't seem to be working. Is there a way that my project could have failed?</p>
<p>work with any Remote control I tested the skecth but I have to delete de RobotIRemote (included as default ) <br>this is my code:<br>apagar = FFA25D</p><p>stop = FF629D</p><p>mute = FFE21D</p><p>mode = FF22DD</p><p>back-row = FF02FD</p><p>EQ = FFC23D</p><p>back = FFE01F</p><p>adelante = FFA857</p><p>play/stop = FF906F</p><p>vol+ = FF6897</p><p>vol- = FF9867</p><p>Numero 0 = FFB04F</p><p>Numero 1 = FF30CF</p><p>Numero 2 = FF18E7</p><p>Numero 3 = FF7A85</p><p>Numero 4 = FF10EF</p><p>Numero 5 = FF38C7</p><p>Numero 6 = FF5AA5</p><p>Numero 7 = FF42BD</p><p>Numero 8 = FF4AB5</p><p>Numero 9 = FF52A</p>
<p>PLEASE HELP THIS IS URGENT</p>
<p>Nope! As long as it is using the standard infrared remote wavelength (television, stereo, anything else pretty much), your Arduino should pick it up.</p>
<p>I'm getting a compiling error: 'TKD2 was not declared in this scope'. Anyone know how to fix this? Thanks</p>
<p>i am getting error while compiling the code, can anyone help me </p>
<p>It says &quot;#include &lt;IRemote.h&gt; but the &quot;r&quot; of &quot;remote&quot; is missing.</p><p>it must be: #include &lt;IRremote.h&gt;</p>
My IR receiver is dead : The +5V pin was on the right and the GND pin was in the middle...
<p>Check this before connecting anything to power and your arduino. As there have been a few who have blown their IR receivers. It shows the various pin sets for the different IR receivers. </p><p><a href="https://arduino-info.wikispaces.com/IR-RemoteControl" rel="nofollow">https://arduino-info.wikispaces.com/IR-RemoteContr...</a></p><p> Hope it helps you all prevent damage to your equipment.</p>
<p>Hello der. Found sumthng new for dis. Check it out.</p><p><a href="http://vaaiibhav.me/how-to-use-arduino-with-infrared-remote-control/" rel="nofollow">http://vaaiibhav.me/how-to-use-arduino-with-infrar...</a></p>
<p>1. Use this library instead!</p><p><a href="https://github.com/z3t0/Arduino-IRremote" rel="nofollow">https://github.com/z3t0/Arduino-IRremote</a></p><p>2. The code in the instructable is miswritten</p><p>#include &lt;IRemote.h&gt; -&gt; #include &lt;IRremote.h&gt;</p><p>3. and check the legs!</p><p><a href="https://arduino-info.wikispaces.com/file/view/IR-Receiver-AX-1838HS.pdf" rel="nofollow">https://arduino-info.wikispaces.com/file/view/IR-R...</a></p><p>Thanks for the instructable. It was fun to build.<br></p><p>#include &lt;IRemote.h&gt;</p>
<p>hi im new to all this and i just got a beginner kit and i put the IR project together, but i cant find a example or code to verify and upload can someone help me please?</p>
<p>hi im new to all this and i just got a beginner kit and i put the IR project together, but i cant find a example or code to verify and upload can someone help me please?</p>
<p>ADVICE, for those who burned the reciever is good to know that:<br> a) Is very important to check the datasheet of the component before adding power supply because some brands design ther reciver with different settigs<br> b) It probally burned because (this happened to me) the schematich that appears on this tutorial the VCC and GND are upsidedown<br> c) If one of your components heats up YOU MUST DISCONNECT IT INMEDIATLY<br> d) Even though Arduino is a microcontroller with a stable design, it's not inmune to <br> interference that's why one button can give you up to tow difference values</p>
<p>You killed my receciver it is so hot now!!!!!!!! I'm so angry</p>
<p>I think you've killed it by yourself... Same i did wrong the first time. Probably you have forgotten you're resistance. Didn't that wrong? Say it and I can maybe help you with a solution. Grz</p>
Step 1: Assemble Circuit<div>I just blew up my infrared transceiver, thanks a lot. The v+ is the right pin and gnd is the middle pin, great picture -.- ..l..</div>
<p>same here this needs to be fixed before he kills more peoples parts</p>
<p>He killed the only transceiver i've owned too -.-</p>
<p>It is not his fault that you didn't verify the pin layout before connecting. Why don't people want to accept responsibility for their own actions?</p>
<p>killed mine too :(</p>
<p>I agree, the diagram as it is now is incorrect. I lost a few parts following these instructions (didn't read the comments before atempting the project). </p>
<p>Me too.. T.T</p>
To anyone who now needs to replace this part or needs other components here you go.<br><br>https://www.wish.com/geek/m/c/559b70b41de0227a3a0ac94a
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p><p>Dont use this tutorial!!!!</p><p>It may kill your transceiver</p><p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>Arduino: 1.6.5 (Windows 8.1), Board: &quot;Arduino/Genuino Uno&quot;</p><p>C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope</p><p> int RECV_PIN = TKD2; // the pin the IR receiver is connected to</p><p> ^</p><p>Multiple libraries were found for &quot;IRremote.h&quot;</p><p> Used: C:\Program Files (x86)\Arduino\libraries\RobotIRremote</p><p> Not used: C:\Users\PRINCESS ANN ONG\Documents\Arduino\libraries\Arduino-IRremote-master</p><p>Multiple libraries were found for &quot;IRremoteInt.h&quot;</p><p> Used: C:\Users\PRINCESS ANN ONG\Documents\Arduino\libraries\Arduino-IRremote-master</p><p> Not used: C:\Program Files (x86)\Arduino\libraries\RobotIRremote</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>redefinition of void setup ()</p>
<p>Hi,</p><p>has anyone any idea how to resolve error - </p><p>\libraries\IRremote\IRremote.cpp:529: error: 'volatile struct irparams_t' has no member named 'rawlen'</p><p>Manythanks</p><p>D6</p>
<p>I keep getting FFFFFF on the serial monitor I am using samsung air conditioner remote control</p>
<p>As he says in the intsructable, it is a repeat command.</p>
<p>One thing I had to do was rename &quot;#include &lt;IRemote.h&gt;&quot; to IRremote.h in the sketch.</p>
<p>Good tutorial..Can it work with the IR receiver sensor KSM-803LM?</p>
<p>To all the comments about errors.</p><p>The sheriff libraries are outdated and &quot;CURRENTLY&quot; not working, but may eventually work again.</p><p>Most end up with a TDK error</p><p>or</p><p>varies commands are not recognized as types</p>
<p>I encountered TKD2 problem too. Removing the files - libraries\RobotIRremote\IRremoteTools.cpp and <br>libraries\RobotIRremote\IRremoteTools.h solved the problem. </p>
<p>thats not in my libraries folder... ummmmmm help</p>
<p>thanks, that did it!</p>

About This Instructable

245,361views

188favorites

License:

Bio: I am a full time software engineer and enjoy working on various projects in my spare time, especially Arduino, electronics, 3D printing and woodworking.
More by astrodan3:Arduino 6 wire Stepper Motor Tutorial  how to make vermicompost Arduino Infrared Remote tutorial 
Add instructable to: