IR remote - Unable to understand codes

Hi Team,

I am a newbee and embarking on my first project- which is a simple IR reader and sender using Uno. I was able to connect the IR receiver and have been following this tutorial.I am using this receiver.

I am reading in from a LG smart TV remote using the above set up. Every time I am pressing power on key - multiple times - I am getting the below strings.

22:53:15.079 -> 3F6078DF 22:53:15.112 -> FFFFFFFF 22:53:15.223 -> 4946A41F 22:53:16.135 -> A4C53676 22:53:16.206 -> FFFFFFFF 22:53:16.312 -> 86713BBA 22:53:16.416 -> 32A13E37 22:53:17.116 -> 44581914 22:53:17.153 -> FFFFFFFF 22:53:17.291 -> 4ADE1511 22:53:17.824 -> C6FFACF9 22:53:17.934 -> 3801A089 22:53:18.039 -> 74B1BF0C 22:53:18.149 -> 85A03F67 22:53:18.254 -> 6BCF6DA4 22:53:19.590 -> 5EF9228A 22:53:19.663 -> 8FBA4897 22:53:19.771 -> 467AA64B 22:53:19.877 -> D882FBDE 22:53:19.986 -> 9F7F5BA

My concern is- as I am pressing just one button- should I not be getting just one consistent value? If not how will I map to another 'send' IR value?

Sorry it may be a dumb question- but am sure the forum members- will not let me give up :)

Any help will be much appreciated.

I just tried another remote- but same issue. Getting multiple values for same keys.

Share your hardware setup and code etc.

Did you try the standard IRremote library? It implements a couple of protocols, most probably also that of your TV remote.

The IRremote library comes with example sketches. Try File->Examples->IRremote->IRrecvDumpV2 to see what it says about your remote control signal.

Maybe you have interference? Compact fluorescent lamps are notorious for interfering with IR remote signals. Try shading the remote and receiver from outside light to see if that helps.

johnwasser: The IRremote library comes with example sketches. Try File->Examples->IRremote->IRrecvDumpV2 to see what it says about your remote control signal.

Maybe you have interference? Compact fluorescent lamps are notorious for interfering with IR remote signals. Try shading the remote and receiver from outside light to see if that helps.

Many thanks for guiding me to it. I switched off all lights and then reattempted using your suggested IRrecvDumpV2.

I got this for the same key. How do I read the below?

Many thanks again.

22:14:18.349 -> Encoding : UNKNOWN 22:14:18.387 -> Code : 66598666 (32 bits) 22:14:18.420 -> Timing[93]: 22:14:18.420 -> + 300, - 450 + 300, - 450 + 200, - 450 + 300, - 450 22:14:18.492 -> + 250, - 400 + 300, - 400 + 300, - 450 + 250, - 400 22:14:18.559 -> + 300, - 500 + 200, - 400 + 300, - 450 + 250, - 400 22:14:18.661 -> + 250, -4800 + 200, -1650 + 100, -1300 + 200, - 650 22:14:18.730 -> + 150, -1300 + 200, -2200 + 50, - 750 + 200, - 700 22:14:18.803 -> + 50, -1100 + 250, -1250 + 150, -1650 + 150, -2200 22:14:18.874 -> + 200, -2200 + 200, - 600 + 200, -2200 + 300, -2150 22:14:18.943 -> + 150, -2100 + 100, - 650 + 200, -1300 + 100, - 700 22:14:19.015 -> + 200, -2250 + 150, -1650 + 50, -1300 + 200, - 700 22:14:19.085 -> + 150, -1100 + 200, -1300 + 50, -1650 + 150, -2250 22:14:19.152 -> + 200, - 750 + 50, - 450 + 50, - 800 + 200, -2200 22:14:19.224 -> + 100, -1650 + 100, -2250 + 200 22:14:19.293 -> unsigned int rawData[93] = {300,450, 300,450, 200,450, 300,450, 250,400, 300,400, 300,450, 250,400, 300,500, 200,400, 300,450, 250,400, 250,4800, 200,1650, 100,1300, 200,650, 150,1300, 200,2200, 50,750, 200,700, 50,1100, 250,1250, 150,1650, 150,2200, 200,2200, 200,600, 200,2200, 300,2150, 150,2100, 100,650, 200,1300, 100,700, 200,2250, 150,1650, 50,1300, 200,700, 150,1100, 200,1300, 50,1650, 150,2250, 200,750, 50,450, 50,800, 200,2200, 100,1650, 100,2250, 200}; // UNKNOWN 66598666 22:14:19.786 -> 22:14:27.480 -> Encoding : UNKNOWN 22:14:27.514 -> Code : 6D381225 (32 bits) 22:14:27.547 -> Timing[93]: 22:14:27.547 -> + 150, - 550 + 200, - 450 + 250, - 500 + 200, - 500 22:14:27.650 -> + 200, - 450 + 250, - 500 + 200, - 550 + 200, - 450 22:14:27.688 -> + 250, - 450 + 200, - 550 + 200, - 450 + 250, - 50 22:14:27.798 -> + 50, - 400 + 200, -4850 + 200, -2200 + 200, - 550 22:14:27.869 -> + 250, -1300 + 150, - 600 + 200, -2200 + 250, - 600 22:14:27.939 -> + 200, -1250 + 200, - 600 + 50, -1300 + 200, -2200 22:14:28.013 -> + 150, -1650 + 150, -2200 + 200, -1300 + 50, -1650 22:14:28.084 -> + 150, -2200 + 200, -2050 + 250, - 700 + 100, -1250 22:14:28.153 -> + 200, - 650 + 200, -2150 + 200, -2200 + 200, - 600 22:14:28.226 -> + 200, -1250 + 250, - 550 + 50, -1250 + 200, -2250 22:14:28.295 -> + 150, -1650 + 100, -1250 + 200, - 650 + 150, -2200 22:14:28.368 -> + 200, -2150 + 250, -2200 + 100 22:14:28.403 -> unsigned int rawData[93] = {150,550, 200,450, 250,500, 200,500, 200,450, 250,500, 200,550, 200,450, 250,450, 200,550, 200,450, 250,50, 50,400, 200,4850, 200,2200, 200,550, 250,1300, 150,600, 200,2200, 250,600, 200,1250, 200,600, 50,1300, 200,2200, 150,1650, 150,2200, 200,1300, 50,1650, 150,2200, 200,2050, 250,700, 100,1250, 200,650, 200,2150, 200,2200, 200,600, 200,1250, 250,550, 50,1250, 200,2250, 150,1650, 100,1250, 200,650, 150,2200, 200,2150, 250,2200, 100}; // UNKNOWN 6D381225 22:14:28.899 -> 22:14:30.000 -> Encoding : UNKNOWN 22:14:30.000 -> Code : 5E85A13C (32 bits) 22:14:30.037 -> Timing[95]: 22:14:30.070 -> + 250, - 450 + 200, - 550 + 200, - 450 + 250, - 450 22:14:30.139 -> + 250, - 500 + 200, - 500 + 200, - 500 + 200, - 500 22:14:30.209 -> + 200, - 500 + 200, - 500 + 250, - 450 + 200, -4900 22:14:30.277 -> + 150, -2200 + 200, -1300 + 50, - 700 + 250, - 700 22:14:30.345 -> + 50, -2200 + 200, -1300 + 150, - 600 + 250, -1100 22:14:30.418 -> + 200, - 600 + 200, -2150 + 200, -2250 + 200, -1650 22:14:30.488 -> + 100, - 450 + 50, - 750 + 250, -2200 + 100, -1650 22:14:30.559 -> + 100, -2150 + 150, -1250 + 200, - 600 + 200, -1300 22:14:30.633 -> + 200, -1650 + 50, - 450 + 50, -1650 + 250, -1250 22:14:30.708 -> + 200, - 600 + 200, -1100 + 200, - 650 + 100, -2250 22:14:30.778 -> + 200, -2150 + 100, - 50 + 100, - 600 + 150, -1300 22:14:30.845 -> + 200, -2200 + 50, -1650 + 200, -2200 + 200 22:14:30.917 -> unsigned int rawData[95] = {250,450, 200,550, 200,450, 250,450, 250,500, 200,500, 200,500, 200,500, 200,500, 200,500, 250,450, 200,4900, 150,2200, 200,1300, 50,700, 250,700, 50,2200, 200,1300, 150,600, 250,1100, 200,600, 200,2150, 200,2250, 200,1650, 100,450, 50,750, 250,2200, 100,1650, 100,2150, 150,1250, 200,600, 200,1300, 200,1650, 50,450, 50,1650, 250,1250, 200,600, 200,1100, 200,650, 100,2250, 200,2150, 100,50, 100,600, 150,1300, 200,2200, 50,1650, 200,2200, 200}; // UNKNOWN 5E85A13C 22:14:31.442 -> 22:14:32.348 -> Encoding : UNKNOWN 22:14:32.348 -> Code : 7845989D (32 bits) 22:14:32.383 -> Timing[91]: 22:14:32.419 -> + 200, - 500 + 200, - 550 + 200, - 450 + 200, - 550 22:14:32.487 -> + 200, - 450 + 250, - 500 + 200, - 500 + 200, - 450 22:14:32.561 -> + 250, - 500 + 200, - 500 + 200, - 500 + 200, - 500 22:14:32.632 -> + 100, - 50 + 100, -4800 + 200, -2200 + 200, - 550 22:14:32.703 -> + 200, -1300 + 200, - 600 + 250, -2200 + 200, - 600 22:14:32.775 -> + 150, -1300 + 250, -1850 + 250, -2150 + 200, -1650 22:14:32.847 -> + 100, -2200 + 250, -1250 + 100, -1650 + 200, -2200 22:14:32.916 -> + 250, -2000 + 250, - 650 + 150, -1300 + 200, - 550 22:14:32.987 -> + 200, -2200 + 200, -2200 + 200, - 550 + 300, -1250 22:14:33.058 -> + 150, - 550 + 100, -1300 + 200, -2200 + 100, -1650 22:14:33.130 -> + 200, -1300 + 150, - 600 + 200, -2200 + 200, -2200 22:14:33.198 -> + 150, -1650 + 200 22:14:33.232 -> unsigned int rawData[91] = {200,500, 200,550, 200,450, 200,550, 200,450, 250,500, 200,500, 200,450, 250,500, 200,500, 200,500, 200,500, 100,50, 100,4800, 200,2200, 200,550, 200,1300, 200,600, 250,2200, 200,600, 150,1300, 250,1850, 250,2150, 200,1650, 100,2200, 250,1250, 100,1650, 200,2200, 250,2000, 250,650, 150,1300, 200,550, 200,2200, 200,2200, 200,550, 300,1250, 150,550, 100,1300, 200,2200, 100,1650, 200,1300, 150,600, 200,2200, 200,2200, 150,1650, 200}; // UNKNOWN 7845989D 22:14:33.722 ->

jackthom41:
Share your hardware setup and code etc.

I was using this code to begin with. My circuit and hardware is attached too for your perusal. I have tried both Pin 7 and 11. And also tried both power voltages and GND terminals.

I am powering it through my macbook.

#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
 Serial.begin(9600);
 irrecv.enableIRIn(); // Start the receiver
}

void loop() {
 if (irrecv.decode(&results)) {
   Serial.println(results.value, HEX);
   irrecv.resume(); // Receive the next value
 }
}

DrDiettrich: Did you try the standard IRremote library? It implements a couple of protocols, most probably also that of your TV remote.

Hi Dr. I think I did. My code and set up are below. My concern is as below- its says Encoding UNKNOWN.

It looks like noise or interference to me. Maybe a loose connection. Typically, pulse lengths will be between 500 and 2500 microseconds and, typically, there will be one value near the low end and one near the high end. The sample timer is 50 microseconds (you can see that all the pulse times are multiples of 50) so sometimes the pulse will show up 50 microseconds shorter or 50 microseconds longer (but not both).

Your data shows pulse lengths of 50, 100, 150, 200, 250, 300, 450, 500, 550, 600, 650, 1250, 1300, 1650, 1850, 2000, 2200, 2250... That is FAR too many pulse lengths for a typical IR encoding and the short pulses are too far outside the typical range.

OP’s setup.

ef8d8ffa4bb5ac063e1a1042d724cadfb7f0bbfe.jpg

johnwasser: It looks like noise or interference to me. Maybe a loose connection. Typically, pulse lengths will be between 500 and 2500 microseconds and, typically, there will be one value near the low end and one near the high end. The sample timer is 50 microseconds (you can see that all the pulse times are multiples of 50) so sometimes the pulse will show up 50 microseconds shorter or 50 microseconds longer (but not both).

Your data shows pulse lengths of 50, 100, 150, 200, 250, 300, 450, 500, 550, 600, 650, 1250, 1300, 1650, 1850, 2000, 2200, 2250... That is FAR too many pulse lengths for a typical IR encoding and the short pulses are too far outside the typical range.

Thanks John...so what are things I can try to isolate the problem? IR Interference is unlikely as I switched off the lights. Loose connection...I will wiggle it and see.

Any other steps you recommend.

Ashu_London: Thanks John...so what are things I can try to isolate the problem? IR Interference is unlikely as I switched off the lights. Loose connection...I will wiggle it and see.

Any other steps you recommend.

It could be a problem in the remote. Try a different remote to see if the signals from it make sense. It could be a faulty IR sensor. Can you get a different one? If you can find an old, dead, VCR or other piece of AV equipment you can desolder the sensor from that.

The carrier frequency may not match the receiver frequency. A scope could reveal more useful information.

Try swapping out the jumpers to the breadboard. Don't just move them around, take the current ones and put them aside and insert some new ones.