Hi,
I'm new to arduino so I'm thinking I must be missing something simple as I am trying to control my air conditioner using an arduino Uno. The air conditioner is a Vaillant climoair and has the remote code 090 on the universal remotes. I have spent hours trying to make it work but have got completely stuck.
So far I have
installed the z3t0-Arduino-IRremote-0d39873 library
removed the robotIRremote as is somehow conflicts with the above
edited IRremoteInt.h RAWBUF 101 to RAWBUF 200 for long remote codes
used IRrecvDumpV2 to capture the code
eg
Encoding : SANYO
Code : FFFFFFFF (0 bits)
Timing[193]:
- 550, - 600 + 500, - 650 + 400, - 700 + 450, - 650
- 450, - 700 + 450, - 600 + 450, - 650 + 500, - 650
- 450, - 650 + 450, - 700 + 450, - 650 + 450, - 700
- 400, - 600 + 500, - 600 + 450, - 700 + 400, - 700
- 450, - 650 + 500, - 650 + 450, - 700 + 400, - 650
- 450, - 700 + 450, - 650 + 450, - 650 + 450, - 650
- 500, -1700 + 450, - 650 + 500, - 650 + 450, - 600
- 550, - 550 + 450, - 650 + 450, - 650 + 450, - 650
- 500, - 650 + 450, - 650 + 450, - 650 + 450, - 600
- 450, - 650 + 450, - 650 + 450, - 650 + 550, - 600
- 500, - 600 + 550, - 550 + 550, - 600 + 500, - 600
- 550, - 550 + 550, - 500 + 600, - 500 + 500, - 650
- 550, - 550 + 500, - 600 + 500, - 600 + 450, - 600
- 500, - 600 + 450, - 650 + 500, - 600 + 500, - 600
- 500, - 550 + 600, -1550 + 600, - 500 + 600, - 550
- 500, - 550 + 550, - 550 + 550, - 500 + 650, - 450
- 500, - 600 + 500, - 650 + 500, - 550 + 500, - 600
- 550, - 500 + 550, - 550 + 550, - 600 + 450, - 700
- 500, -1650 + 550, - 600 + 500, - 600 + 600, -1550
- 550, - 600 + 500, -1700 + 550, - 550 + 550, - 550
- 550, -1650 + 550, - 450 + 600, -1600 + 600, - 500
- 550, - 600 + 450, -1750 + 450, - 600 + 550, -1650
- 550, -1650 + 500, - 600 + 500, - 650 + 450, - 650
- 500, -1650 + 500, - 650 + 500, -1650 + 500, -1650
- 500
unsigned int rawData[193] = {550,600, 500,650, 400,700, 450,650, 450,700, 450,600, 450,650, 500,650, 450,650, 450,700, 450,650, 450,700, 400,600, 500,600, 450,700, 400,700, 450,650, 500,650, 450,700, 400,650, 450,700, 450,650, 450,650, 450,650, 500,1700, 450,650, 500,650, 450,600, 550,550, 450,650, 450,650, 450,650, 500,650, 450,650, 450,650, 450,600, 450,650, 450,650, 450,650, 550,600, 500,600, 550,550, 550,600, 500,600, 550,550, 550,500, 600,500, 500,650, 550,550, 500,600, 500,600, 450,600, 500,600, 450,650, 500,600, 500,600, 500,550, 600,1550, 600,500, 600,550, 500,550, 550,550, 550,500, 650,450, 500,600, 500,650, 500,550, 500,600, 550,500, 550,550, 550,600, 450,700, 500,1650, 550,600, 500,600, 600,1550, 550,600, 500,1700, 550,550, 550,550, 550,1650, 550,450, 600,1600, 600,500, 550,600, 450,1750, 450,600, 550,1650, 550,1650, 500,600, 500,650, 450,650, 500,1650, 500,650, 500,1650, 500,1650, 500}; // SANYO FFFFFFFF
unsigned int data = 0xFFFFFFFF;
Then copies the rawData[193] and used the following code
#include "IRremote.h"
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
int khz=38; //NB Change this default value as neccessary to the correct modulation frequency
// ON and 2O C° with 1 FAN heat
unsigned heat[] = {550,600, 500,650, 400,700, 450,650, 450,700, 450,600, 450,650, 500,650, 450,650, 450,700, 450,650, 450,700, 400,600, 500,600, 450,700, 400,700, 450,650, 500,650, 450,700, 400,650, 450,700, 450,650, 450,650, 450,650, 500,1700, 450,650, 500,650, 450,600, 550,550, 450,650, 450,650, 450,650, 500,650, 450,650, 450,650, 450,600, 450,650, 450,650, 450,650, 550,600, 500,600, 550,550, 550,600, 500,600, 550,550, 550,500, 600,500, 500,650, 550,550, 500,600, 500,600, 450,600, 500,600, 450,650, 500,600, 500,600, 500,550, 600,1550, 600,500, 600,550, 500,550, 550,550, 550,500, 650,450, 500,600, 500,650, 500,550, 500,600, 550,500, 550,550, 550,600, 450,700, 500,1650, 550,600, 500,600, 600,1550, 550,600, 500,1700, 550,550, 550,550, 550,1650, 550,450, 600,1600, 600,500, 550,600, 450,1750, 450,600, 550,1650, 550,1650, 500,600, 500,650, 450,650, 500,1650, 500,650, 500,1650, 500,1650, 500};
// OFF the A/C
unsigned OFF[] = {550,600,550,500,600,550,600,500,600,500,500,650,450,650,450,650,600,550,500,600,450,600,500,600,500,600,500,650,500,600,550,550,550,550,600,500,600,500,600,500,600,500,600,500,600,500,550,550,500,1650,600,450,600,550,550,600,550,550,500,650,550,550,550,550,550,550,600,550,600,500,550,550,550,550,600,550,500,650,500,600,550,550,600,500,650,450,550,600,550,550,500,550,550,550,500,600,550,550,550,600,500,650,500,550,550,600,500,550,600,550,550,600,500,600,500,1700,500,600,550,600,500,550,550,600,500,600,550,550,550,650,450,600,500,650,450,650,500,550,500,650,500,600,500,650,500,1600,550,600,500,600,500,600,550,550,550,1600,550,550,550,550,550,1600,550,550,550,1650,500,600,500,650,500,1650,550,550,500,1650,550,1600,550,550,550,600,550,1650,500,600,450,650,450,1700,500,1650,550};
void loop() {
irsend.sendRaw(heat, sizeof(heat)/sizeof(int), khz);
delay(5000);
irsend.sendRaw(OFF, sizeof(OFF)/sizeof(int),khz);
delay(5000);
}
I have an IR led connect from pin 3 to 0v with a 220R resistor. Using a camera I can see the led does flash (not very brightly) but the AC doesn't respond, even when holding it close to the receiver.
I tried using a HG7881 to boost the output (as I had one) but not luck, maybe it isn't quick enough.
I tried changing the khz to 44
I then used the code from
to capture the signal. This seemed more temperamental, often picking up a code when there wasn't one and the codes were of differing lengths. I tried them anyway (removing the "-"s) but still no response.
I then found
Which I thought would solve the problem, ran the test example (called simple) which sends a load of different codes but still no response. I found this surprising as I have a different make of AC which uses the same remote codes so I assumed it is a popular one.
Any idea what I'm doing wrong? Any help would be greatly appreciated.
I have noticed that the captured code is never quite the same when I repeat the same function. I don't know how accurate it has to be but I have tried many so I would have thought at least one would have worked.
Thanks
JD