Arduino really allows you to do many things concerning the Internet of things, just have a little 'desire and intuition to create any type of project.
In this post we will see how to remote control your air conditioner at home, through the Arduino, which is connected to the Internet. Yes, you just read that right!

Requirements hardware

• 1 x Arduino Uno + 1 x or 2 x Arduino Mega Arduino Uno
• IR receiver TSOP1738
• 1 x 330 Ohm resistor
• Some flexible cable

Requirements software

Library iRemote Arduino
Programs available in my Github repo

Step 1: How Does the System Work ?

As many will know , the mechanism of regulation of various settings between user and conditioner , is via a remote control , which is based on sending infrared signals . To investigate the function of these signals , I recommend you look at the post in reference to Chapter 10 of the Arduino design becomes simple (in Italian).
Obviously , the code of an air conditioner , vary depending on the model and according to the manufacturer. For this reason, as the first phase of the work , you must do the procedure that is called reverse engineering , that is to obtain the codes for your device , using the sensor TSOP1738 .
Once you have obtained the codes for your air conditioner, we're almost to complete "the work ." You need to use a small program that simplifies setting the code to insert into the Arduino , and you can send the various encodings . These codes can be set by the user through a simple web page , with or without protection.
As you have read in the " Hardware requirements " , I wrote that you need two Arduino , the main reason is that the sequences of bits to be sent to the air conditioners are too large to be contained in a single device , which among other things should also take care of the part of management commands that will be transmitted via the Internet.
In practice there will be a device that will take care of the part webserver and the other to send IR signals . The other reason that prompted me to do this project with two device , is that you can safely use Raspberry PI for the management of the webserver , so definitely improve the look and feel of the web page.
<p>Hi everyone I&acute;ve made it but not at all , i have found an issue when i try to send the signal to McQuay air conditioner doesn&acute;t work, I have tried everything as change the frequency, i have been searching on internet hex codes for Mc Quay brand but i haven&acute;t found them. Have someone found the same issue? because I used this instructable to control televisions , air conditioner (other brands),projectors and works. </p>
<p>I receive code but I cannot send any. I also bough this: <a href="https://www.aliexpress.com/item/5V-IR-Infrared-Remote-Decoder-Encoding-Transmitter-Receiver-Wireless-Module/32580582483.html?spm=2114.01010208.3.1.3ixAbz&ws_ab_test=searchweb0_0,searchweb201602_1_116_10065_117_10068_114_115_113_10000009_10084_10083_10080_10082_10081_10060_10062_10056_10055_10037_10054_10033_10059_10032_10099_10078_10079_10077_10000012_426_10103_10073_10102_10000015_10096_10052_10053_10107_10050_10106_10051,searchweb201603_3,afswitch_5,single_sort_0_default&btsid=9e4f2f4e-7c09-4545-9956-d75340b63535" rel="nofollow">https://www.aliexpress.com/item/5V-IR-Infrared-Rem...</a> but still no luck. I have been trying for weeks. I don't know what I am doing wrong.</p>
<p>Hello,</p><p>How should I fix the code to send only on/off signals? With them only 1 Uno will be enough I guess.</p>
<p>Many thanks <a href="https://www.instructables.com/member/Rossos" rel="nofollow">Rossos</a> for &quot;RAWBUF&quot; hint as for my A/C (Sharp) code length is (212) so I increased RAWBUF to 255 then got it worked.</p><p>Main thanks for auther jackbell16.</p>
<p>hi jackbell,</p><p>I'm trying to emulate your project. </p><p>I can successfully receive, record and then send the RAW data (my AC is Hitachi). </p><p>However, during the receive / record phase, I noticed that the RAW code changes EVERY time, even if the command is always the same (e.g. I switch on the AC with the same setting, and the code is everytime different).</p><p>I also tried to intercept wih another Arduino what the first Arduino is sending (I send the same string every 10 sec), and changes everytime....</p><p>Is it normal in your opinion? maybe there is some problem in the IR receiver?</p><p>thanks</p>
<p>Hi,</p><p>I&rsquo;m irinakim and I&rsquo;m work in the Wiznet.</p><p>Thank you for using our product.</p><p>We are collecting so much data using ourproduct.</p><p>And I will post the this project on our Web site.( <a href="http://wiznetmuseum.com/" rel="nofollow">http://wiznetmuseum.com</a>)</p><p>Can I post your product on our Web site?</p>
<p>Hello, very cool project!!</p><p>I have a problem sending the code with arduino uno.</p><p>With IRrecv Dump and the original remote control I get:</p><p>D010020A<br>Decoded NEC: D010020A (32 bits)<br>Raw (74): -7402 9000 -4350 750 -1500 750 -1550 750 -450 750 -1500 750 -450 750 -450 750 -450 700 -450 750 -450 750 -450 750 -450 700 -1550 750 -450 750 -450 750 -450 700 -450 750 -450 750 -450 700 -500 700 -500 700 -450 750 -450 700 -1600 700 -450 750 -450 700 -500 700 -500 700 -500 700 -1550 700 -500 700 -1600 700 -450 700 -500 700 -1600 700 -450 700 </p><p>Loading in other Arduino Uno this code:</p><p><a href="http://www.youtube.com/results?search_query=include" rel="nofollow">#include</a> &quot;IRremote.h&quot;</p><p>IRsend irsend;</p><p>void setup()<br>{</p><p>Serial.begin(9600);<br>}</p><p>void loop()<br>{<br>//Replace for your IR Code here. <br>irsend.sendNEC(0xD010020A, 32); //irsend.send(IRTYPE)(0x(IRCODE), (BITS)); <br>delay(10000);<br>}</p><p>And reading with IRrecvDump which sends the Arduino I get:</p><p>D010020A<br>Decoded NEC: D010020A (32 bits)<br>Raw (68): -6696 9100 -4350 700 -1550 700 -1550 650 -450 650 -1600 700 -450 650 -450 650 -450 650 -500 650 -450 650 -450 650 -500 650 -1550 700 -450 650 -450 650 -450 700 -450 650 -450 650 -450 700 -450 650 -450 650 -450 700 -450 650 -1600 650 -450 650 -450 650 -500 600 -500 650 -450 650 -1600 650 -450 650 -1600 650 -500 600 </p><p>I do not understand the difference Raw (74) and Raw (68)</p><p>The original remote control is NEC code. Disassemble and inside has the NEC chip.<br>It is an Air-conditioner, but the air conditioner unresponsive. The original remote control sends the code only once.</p><p>I forgot to say that the same code works correctly for samsung led tv. Of course, replacing void loop () with this:</p><p>void loop() {<br> delay(10000);<br> for (int i = 0; i &lt; 3; i++) {<br> irsend.sendSAMSUNG(0xE0E040BF, 32); //SAMSUNG TV LED on/off (capturado con IRrecvDumpV2.ino)<br> delay(40);<br> }<br> delay(10000);</p><p> <br>}</p><p> <br>Thanks and sorry for my English.</p>
Hi,<br>I've not clearly understand your problem. <br>If you want to make a kind of reverse engineering with your A/C, you need first to decode the signal and then try to send if everything works correctly. <br>If you use the RAW version, you need to ignore the first value of the array when you send it. I hope this info will help you in your project.
<p>I will test with senRAW. I tell you later.</p><p>Thanks again</p>
<p>Thank you very much for the comment.</p><p>I meant this</p>
<p>my A/C can't seem to detect the IR codes sent via TR LED can someone help ?</p>
<p>I've Made it! (sry no pictures)</p><p>One small remark: if you have Sony or some other R5/R6 protocol Infrared remote control, which apparently sends their signal 3 times instead of using checksum last bits, you may need to open up &lt;IRremote.h&gt; file manually and go all the way down and adjust the RAWBUF constant. By default it is 100, but my codes were of the size 182. I've set the constant to 192 (higher values were causing crashes on my Arduino Nano) and everything started working.</p>

About This Instructable




Bio: I'm an Arduino Maker, I like technology, playing tennis
More by jackbell16:How to let comunicate Arduino with KeyPad to DB MySQL. Arduino water system to wet your plant How to make an alarm system with Arduino 
Add instructable to: