Just another IR Receiver question

Hi all,

Well, I'm trying to understand how decode the signal of my SONY RM-LJ304 Decoder Remote device.
Let's start with the setup.

I've a breadboard with an arduino NANO, one IR Receiver 1838T, an IR LED and a 150 Ohm resistor configured as follow:

arduino D11 ---> 1838T left PIN
arduino GND ---> 1838T right PIN
arduino +5V ---> 1838T center PIN

arduino GND ---> IR LED short leg (-)
arduino D03 ---> 150Ohm resistor --> IR LED long leg (+)

The setup above is used to load the decoder sketch as well as to test the sending codes taken from the decoder sketch.

As decoder sketch I'm using this library: GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols and this example: https://github.com/z3t0/Arduino-IRremote/blob/master/examples/IRrecvDumpV2/IRrecvDumpV2.ino

What happens When I start it?

Well, first of all, a working example is the Volume + or -.
I start opening the sketch and trying to press the volume (+) long time.
Decoding a known signal I obtain:

Encoding  : UNKNOWN
Code      : 1C0DAFD3 (32 bits)
Timing[25]: 
     +2800, - 150     +1050, - 150     +1650, - 100     +1050, - 150
     +1050, - 150     +1600, - 200     +1000, - 150     +1000, - 200
     +1000, - 200     +1000, - 200     +1000, - 200     + 950, - 200
     +1600
unsigned int  rawData[25] = {2800,150, 1050,150, 1650,100, 1050,150, 1050,150, 1600,200, 1000,150, 1000,200, 1000,200, 1000,200, 1000,200, 950,200, 1600};  // UNKNOWN 1C0DAFD3

Encoding  : SONY
Code      : 481 (12 bits)
Timing[25]: 
     +2350, - 600     + 600, - 600     +1200, - 550     + 650, - 550
     + 700, - 500     +1250, - 550     + 650, - 500     + 650, - 550
     + 600, - 600     + 600, - 600     + 600, - 600     + 550, - 600
     +1200
unsigned int  rawData[25] = {2350,600, 600,600, 1200,550, 650,550, 700,500, 1250,550, 650,500, 650,550, 600,600, 600,600, 600,600, 550,600, 1200};  // SONY 481
unsigned int  data = 0x481;

Encoding  : SONY
Code      : 481 (12 bits)
Timing[25]: 
     +2400, - 600     + 600, - 600     +1150, - 600     + 600, - 600
     + 600, - 600     +1200, - 550     + 650, - 550     + 650, - 550
     + 600, - 600     + 600, - 600     + 550, - 600     + 600, - 600
     +1200
unsigned int  rawData[25] = {2400,600, 600,600, 1150,600, 600,600, 600,600, 1200,550, 650,550, 650,550, 600,600, 600,600, 550,600, 600,600, 1200};  // SONY 481
unsigned int  data = 0x481;

Encoding  : SONY
Code      : 481 (12 bits)
Timing[25]: 
     +2400, - 550     + 600, - 600     +1200, - 600     + 650, - 550
     + 650, - 500     +1250, - 550     + 650, - 550     + 650, - 550
     + 600, - 550     + 600, - 600     + 600, - 600     + 600, - 600
     +1200
unsigned int  rawData[25] = {2400,550, 600,600, 1200,600, 650,550, 650,500, 1250,550, 650,550, 650,550, 600,550, 600,600, 600,600, 600,600, 1200};  // SONY 481
unsigned int  data = 0x481;

Encoding  : SONY
Code      : 481 (12 bits)
Timing[25]: 
     +2350, - 600     + 600, - 600     +1200, - 600     + 650, - 500
     + 700, - 500     +1250, - 550     + 650, - 550     + 600, - 550
     + 650, - 550     + 600, - 600     + 600, - 600     + 600, - 550
     +1200
unsigned int  rawData[25] = {2350,600, 600,600, 1200,600, 650,500, 700,500, 1250,550, 650,550, 600,550, 650,550, 600,600, 600,600, 600,550, 1200};  // SONY 481
unsigned int  data = 0x481;

Encoding  : SONY
Code      : 481 (12 bits)
Timing[25]: 
     +2400, - 600     + 600, - 600     +1200, - 550     + 700, - 500
     + 600, - 600     +1250, - 500     + 650, - 550     + 600, - 600
     + 600, - 600     + 600, - 600     + 550, - 600     + 600, - 600
     +1200
unsigned int  rawData[25] = {2400,600, 600,600, 1200,550, 700,500, 600,600, 1250,500, 650,550, 600,600, 600,600, 600,600, 550,600, 600,600, 1200};  // SONY 481
unsigned int  data = 0x481;

First a not known signal, then a stable signal, which is 0x481.

Using this signal into a sending sketch it works! Like this:

void loop() {
        Serial.println("VOL+");
	for (int i = 0; i < 3; i++) {
		irsend.sendSony(0xa90, 12);
		delay(40);
	}
	delay(5000); //5 second delay between each signal burst
}

Until here ALL OK!!!
It works for Volume (+) and (-), but if I try other signals, no way.
In example I try to press long the POWER button:

Encoding  : UNKNOWN
Code      : 25332375 (32 bits)
Timing[25]: 
     +2850, - 150     +1650, - 100     +1100, - 100     +1600, - 200
     +1000, - 200     +1600, - 150     +1000, - 200     +1000, - 200
     +1000, - 200     +1000, - 150     +1000, - 200     +1000, - 200
     +1600
unsigned int  rawData[25] = {2850,150, 1650,100, 1100,100, 1600,200, 1000,200, 1600,150, 1000,200, 1000,200, 1000,200, 1000,150, 1000,200, 1000,200, 1600};  // UNKNOWN 25332375

Encoding  : SONY
Code      : 324 (15 bits)
Timing[31]: 
     +2600, - 400     + 700, - 500     + 650, - 550     + 600, - 550
     + 650, - 550     + 600, - 600     +1200, - 550     +1200, - 600
     + 600, - 600     + 600, - 550     +1200, - 600     + 600, - 600
     + 550, - 600     +1200, - 600     + 600, - 600     + 550
unsigned int  rawData[31] = {2600,400, 700,500, 650,550, 600,550, 650,550, 600,600, 1200,550, 1200,600, 600,600, 600,550, 1200,600, 600,600, 550,600, 1200,600, 600,600, 550};  // SONY 324
unsigned int  data = 0x324;

(324 repeated one more time)

Encoding  : UNKNOWN
Code      : A362C734 (32 bits)
Timing[31]: 
     +2700, - 300     + 700, - 450     + 700, - 550     + 600, - 550
     + 600, - 600     + 600, - 600     +1150, - 600     +1200, - 600
     + 600, - 600     + 600, - 550     +1200, - 600     + 600, - 600
     + 550, - 600     +1200, - 600     + 600, - 600     + 550
unsigned int  rawData[31] = {2700,300, 700,450, 700,550, 600,550, 600,600, 600,600, 1150,600, 1200,600, 600,600, 600,550, 1200,600, 600,600, 550,600, 1200,600, 600,600, 550};  // UNKNOWN A362C734

Encoding  : SONY
Code      : 324 (15 bits)
Timing[31]: 
     +2600, - 350     + 700, - 500     + 650, - 550     + 600, - 600
     + 600, - 600     + 600, - 550     +1200, - 600     +1200, - 550
     + 600, - 600     + 600, - 600     +1200, - 550     + 600, - 600
     + 600, - 600     +1200, - 550     + 600, - 600     + 600
unsigned int  rawData[31] = {2600,350, 700,500, 650,550, 600,600, 600,600, 600,550, 1200,600, 1200,550, 600,600, 600,600, 1200,550, 600,600, 600,600, 1200,550, 600,600, 600};  // SONY 324
unsigned int  data = 0x324;

(324 repeated other 2 times)

Encoding  : UNKNOWN
Code      : A362C734 (32 bits)
Timing[31]: 
     +2650, - 300     + 750, - 450     + 650, - 550     + 650, - 550
     + 600, - 600     + 600, - 550     +1200, - 600     +1200, - 600
     + 550, - 600     + 600, - 600     +1200, - 600     + 550, - 600
     + 600, - 600     +1200, - 600     + 550, - 600     + 600
unsigned int  rawData[31] = {2650,300, 750,450, 650,550, 650,550, 600,600, 600,550, 1200,600, 1200,600, 550,600, 600,600, 1200,600, 550,600, 600,600, 1200,600, 550,600, 600};  // UNKNOWN A362C734

Encoding  : SONY
Code      : 324 (15 bits)

(324 repeated two times)

After some seconds it doesn't log anymore.
A second try gives me:

Encoding  : UNKNOWN
Code      : FF3B2B52 (32 bits)
Timing[25]: 
     +2800, - 150     +1700, -  50     +1100, - 150     +1600, - 200
     +1000, - 150     +1600, - 200     +1000, - 200     +1000, - 200
     + 950, - 250     + 950, - 200     +1000, - 200     +1000, - 200
     +1600
unsigned int  rawData[25] = {2800,150, 1700,50, 1100,150, 1600,200, 1000,150, 1600,200, 1000,200, 1000,200, 950,250, 950,200, 1000,200, 1000,200, 1600};  // UNKNOWN FF3B2B52

Encoding  : SONY
Code      : 324 (15 bits)

(324 repeated 2 times)

Encoding  : UNKNOWN
Code      : A362C734 (32 bits)
Timing[31]: 
     +2650, - 300     + 750, - 450     + 650, - 550     + 600, - 600
     + 600, - 600     + 600, - 550     +1200, - 600     +1200, - 600
     + 550, - 600     + 600, - 600     +1200, - 550     + 600, - 600
     + 600, - 600     +1200, - 550     + 600, - 600     + 600
unsigned int  rawData[31] = {2650,300, 750,450, 650,550, 600,600, 600,600, 600,550, 1200,600, 1200,600, 550,600, 600,600, 1200,550, 600,600, 600,600, 1200,550, 600,600, 600};  // UNKNOWN A362C734

Encoding  : SONY
Code      : 324 (15 bits)

(0x324 repeated other 6 times)

What should I use???
Seems like 0x324 is a pause or signal, because it appears offen on different buttons.

Strange is, if I press POWER only once, the code changes every time, but the decoder turns OFF immediatly.

Any help is really appreciated!!

Thanks,

Simon

Either you are using an outdated library version, or your RC uses non-standard codes. You can use the sendRaw() methods to send all commands, regardless of any specific protocol.

I would try the original "IRremote by shirriff" library installed by Library Manager. The library you chose seems to be a derivative. What remote control are you using?

Thanks for the suggesions. I'm trying to decode a Philips remote (ampli).
I'll try the other library in case and make again some tests RAW.

Simon