AC signal troubleshooting
Posted: Wed Nov 27, 2013 2:56 pm
One backer asked....
and then followed up with some data...I’m trying to decode the IR remote that my AC unit uses, I’ve hat little luck using IRremote or IRlib to record raw IR and play it back, its just not working, but I’ve verified I’m replicating the signal exactly, I suspect maybe its a different frequency than 38kHz… I’m not too sure where else to look, I’ve successfully mirrored back raw codes to my samsung TV for on and of, but this AC unit is stumping me.
Any pointers?
and for completeness the Arduino code to generate the above is1 (Heat On, 86, Fan Auto)
For IR Scope:
+8900 -4400 +700 -500 +650 -550 +650 -1600 +700 -1550 +700 -500 +700 -1550 +700 -500 +700 -500 +650 -550 +650 -1600 +700 -1550 +700 -1600 +650 -500 +700 -500 +700 -500 +650 -550 +650 -500 +700 -500 +700 -500 +650 -500 +700 -500 +700 -1600 +650 -1600 +700 -500 +650 -500 +700 -500 +700 -500 +650 -1600 +700 -1600 +650 -500 +700 -1600 +650 -500 +700 -500 +700 -1550 +700 -500 +700
For Arduino sketch:
unsigned int raw[74] = {8900,4400,700,500,650,550,650,1600,700,1550,700,500,700,1550,700,500,700,500,650,550,650,1600,700,1550,700,1600,650,500,700,500,700,500,650,550,650,500,700,500,700,500,650,500,700,500,700,1600,650,1600,700,500,650,500,700,500,700,500,650,1600,700,1600,650,500,700,1600,650,500,700,500,700,1550,700,500,700,};
irsend.sendRaw(raw,74,38);
2 Off
For IR Scope:
+8900 -4400 +650 -500 +700 -500 +700 -1550 +700 -500 +700 -500 +700 -1550 +700 -500 +700 -500 +650 -550 +650 -1600 +650 -1600 +700 -1600 +650 -500 +700 -500 +700 -500 +650 -550 +650 -500 +700 -500 +700 -500 +650 -500 +700 -500 +700 -1550 +700 -1600 +650 -550 +650 -500 +700 -500 +700 -500 +650 -1600 +700 -1550 +700 -500 +700 -1600 +650 -500 +700 -500 +700 -1550 +700 -500 +700
For Arduino sketch:
unsigned int raw[74] = {8900,4400,650,500,700,500,700,1550,700,500,700,500,700,1550,700,500,700,500,650,550,650,1600,650,1600,700,1600,650,500,700,500,700,500,650,550,650,500,700,500,700,500,650,500,700,500,700,1550,700,1600,650,550,650,500,700,500,700,500,650,1600,700,1550,700,500,700,1600,650,500,700,500,700,1550,700,500,700,};
irsend.sendRaw(raw,74,38);
Code: Select all
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
int c = 1;
void dump(decode_results *results) {
int count = results->rawlen;
Serial.println(c);
c++;
Serial.println("For IR Scope: ");
for (int i = 1; i < count; i++) {
if ((i % 2) == 1) {
Serial.print("+");
Serial.print(results->rawbuf[i]*USECPERTICK, DEC);
}
else {
Serial.print(-(int)results->rawbuf[i]*USECPERTICK, DEC);
}
Serial.print(" ");
}
Serial.println("");
Serial.println("For Arduino sketch: ");
Serial.print("unsigned int raw[");
Serial.print(count, DEC);
Serial.print("] = {");
for (int i = 1; i < count; i++) {
if ((i % 2) == 1) {
Serial.print(results->rawbuf[i]*USECPERTICK, DEC);
}
else {
Serial.print((int)results->rawbuf[i]*USECPERTICK, DEC);
}
Serial.print(",");
}
Serial.print("};");
Serial.println("");
Serial.print("irsend.sendRaw(raw,");
Serial.print(count, DEC);
Serial.print(",38);");
Serial.println("");
Serial.println("");
}
void loop() {
if (irrecv.decode(&results)) {
dump(&results);
irrecv.resume(); // Receive the next value
}
}