Page 1 of 1

Samsung AirCo, IRremote lib and Arduino

Posted: Fri Jun 17, 2016 11:22 am
by rubisco
Hi all,
[I've also posted to the arduino forum without luck, so far]

the aim is to control my Samsung AirCo with Arduino. I'm using an Arduino uno + TSOP4838 + IRremote library to decode the signal coming from the IR remote of the AirCo.
I did a test with the TV remote and the IRrecvDumpV2 sketch. It worked very well (E0E040BF (32 bits)). I can turn on/off my TV using a IR led.

Now, I know that IR codes from air conditioner are longer, so the first thing a I did was to increase the size of the buffer (RAWBUF) to 190. The output is this (edited, just relevant parts):

Encoding : SANYO
Code : FFFFFFFF (0 bits)
unsigned int rawData[115] = {500,550, 550,1500,...}

As you can see, the output is composed of 115 intervals (or at least this is what I think they are...).
1) Why do I read --> Code : FFFFFFFF (0 bits) ? Is it because I have more than 32 bits?

I tried to copy/paste the raw code in the Sendraw sketch of the IRremote lib. It doesn't work and I don't know why. I guess it has something to do with the lenght of the code and size of variables defined somewhere in the library.
I'm not a programmer so: does anyone ever faced a similar problem and maybe can give me a help?

Thanks a lot in advance to all the community!

Re: Samsung AirCo, IRremote lib and Arduino

Posted: Sun Jun 19, 2016 8:39 am
by AnalysIR
Encoding : SANYO
Code : FFFFFFFF (0 bits)
unsigned int rawData[115] = {500,550, 550,1500,...}

As you can see, the output is composed of 115 intervals (or at least this is what I think they are...).
1) Why do I read --> Code : FFFFFFFF (0 bits) ? Is it because I have more than 32 bits?
Irremote is not really designed to handle AC signals, so you can just ignore this for now.
I tried to copy/paste the raw code in the Sendraw sketch of the IRremote lib. It doesn't work and I don't know why. I guess it has something to do with the lenght of the code and size of variables defined somewhere in the library.
Try the sketch we have posted here, which is more accurate than IRremote & post the output here (I will be able to check the signal with AnalysIR):
https://www.analysir.com/blog/2014/03/1 ... s-arduino/

and once you get it working the following blog post may be of help
https://www.analysir.com/blog/2016/04/1 ... -irremote/

Re: Samsung AirCo, IRremote lib and Arduino

Posted: Mon Jun 20, 2016 8:07 am
by rubisco
Hi,
the sketch for recording long IR signal worked very well! I was able to record the following signal (I removed the "-") :

Raw: (347) 3028, 8972, 540, 584, 560, 1500, 568, 496, 536, 508, 572, 476, 568, 472, 544, 524, 544, 504, 568, 472, 544, 1512, 508, 536, 572, 476, 568, 1488, 564, 484, 568, 476, 568, 1488, 568, 1464, 548, 1512, 572, 1492, 568, 1464, 548, 500, 484, 584, 564, 476, 548, 496, 568, 476, 624, 476, 524, 540, 564, 480, 572, 472, 568, 476, 568, 496, 536, 536, 572, 476, 564, 476, 484, 584, 564, 480, 568, 472, 568, 476, 572, 500, 572, 468, 568, 476, 596, 472, 548, 496, 568, 476, 572, 496, 532, 512, 568, 476, 572, 524, 460, 584, 564, 480, 544, 496, 568, 480, 484, 1572, 568, 1520, 544, 1496, 556, 1496, 508, 2184, 3028, 8948, 568, 1488, 548, 500, 568, 500, 536, 532, 544, 500, 568, 476, 488, 580, 544, 500, 568, 476, 568, 1492, 568, 476, 568, 472, 548, 1512, 572, 472, 540, 1516, 576, 1464, 568, 1488, 548, 1512, 540, 1496, 572, 1488, 568, 476, 568, 480, 620, 472, 564, 480, 568, 476, 568, 476, 536, 532, 532, 512, 568, 524, 568, 476, 568, 476, 544, 524, 508, 536, 568, 472, 548, 496, 572, 500, 544, 496, 620, 476, 572, 476, 568, 472, 568, 480, 564, 504, 532, 508, 568, 528, 568, 476, 568, 480, 560, 504, 532, 512, 568, 472, 568, 476, 568, 504, 532, 508, 620, 476, 568, 472, 548, 496, 572, 500, 516, 1700, 3048, 8972, 572, 1464, 572, 480, 480, 608, 568, 476, 568, 476, 544, 524, 536, 508, 568, 472, 548, 496, 568, 1492, 568, 476, 568, 476, 572, 496, 532, 568, 568, 1464, 568, 1488, 548, 496, 572, 1488, 548, 1492, 508, 1576, 568, 1464, 572, 1488, 572, 1488, 568, 1492, 572, 1492, 540, 504, 532, 508, 568, 476, 568, 1492, 540, 1496, 568, 1492, 568, 476, 568, 476, 564, 500, 572, 476, 568, 472, 568, 1488, 576, 1460, 572, 1488, 548, 496, 568, 1492, 548, 496, 568, 476, 568, 500, 568, 1492, 544, 500, 544, 500, 620, 476, 568, 500, 532, 512, 540, 504, 568, 472, 568, 1492, 572, 1468, 480, 1628, 568, 1492, 520,

Then, as a simple test, I copy/pasted the sequence in the SendRaw sketch of IRremote and it worked perfectly! So: thanks a lot.
If I understand correctly, I will not be able to store more than one signal in the SRAM of my UNO. I will now try the sketch written in the post linked in your message.
By the way, my aim is to use the libraries from MySensors.org. I have a Raspberry Pi where I would like to install Home Assistant, then use my UNO as a gateway and an Arduino Nano as IR remote (control the AC with IR diode). Nano and UNO should communicate using NRFL2401+ transceiver. If you have suggestions or examples where I could find some advice, they're welcome.

Thanks a lot for your help, I'll get back to the forum as soon as I'll be able to test the flash sketch.