Electrical – Can you get an infrared remote’s signal modulation with an Arduino

arduinofrequencyinfraredModulationremote

Let me preface that I am very much an electronics noob. I am decent with programming.

I have an RCA L40FHD41 HDTV that I bought in 2010. I have tried using many universal remote with this TV, but after trying hundreds of codes, nothing works. I bought a cheap replacement remote (RCA 276045 TV Remote Control) but it is hit and miss when it decides to actually work. I was hoping I could use an Arduino with an IR receiver to get all the IR codes for the remote when it is behaving, then try to make an Arduino IR transmitter to control the TV.

I had a piece of code that would basically take a raw IR input, and output it via an IR LED. To test, I pointed the IR LED at my PCs media remote receiver, and pressed some buttons on the PC media remote. That worked. But when I pointed the IR LED at the TV, and hit buttons on the TV remote, nothing happened. I think that the TV uses a difference modulation. I have read that most standard IR uses 38Khz. I want to find out what modulation the TV remote uses. Is there anyway to get that info using an Arduino and a IR receiver?

Edit: Someone said it might be a decode issue. That cannot be the case, cause I used another piece of example code to get the timings and HEX codes for all the buttons, and when I pressed the same button multiple times, it got the same results, consistently. Here is an example of the output of that piece of sample code:
POWER BUTTON

Code : 6A68351E (32 bits)

Timing[51]:

 +4050, -3400     + 800, -1650     + 800, -1600     + 850, -1600
 + 800, -1600     + 800, - 650     + 800, - 650     + 850, -1600
 + 800, - 650     + 800, -1650     + 750, - 700     + 750, -1650
 + 750, - 750     + 700, - 750     + 750, - 700     + 750, - 700
 + 750, - 750     + 700, -1700     + 700, -1700     + 700, - 750
 + 700, -1750     + 650, - 800     + 600, -1850     + 600, - 850
 + 600, -1800     + 600

unsigned int rawData[51] = {4050,3400, 800,1650, 800,1600, 850,1600, 800,1600, 800,650, 800,650, 850,1600, 800,650, 800,1650, 750,700, 750,1650, 750,750, 700,750, 750,700, 750,700, 750,750, 700,1700, 700,1700, 700,750, 700,1750, 650,800, 600,1850, 600,850, 600,1800, 600};

EDIT: I got a piece of code working to turn the TV on/off. Not sure what is different between the code that simply took a raw input and broadcast it.

Best Answer

You can't do it with a common IR receiver like TSOP4840 or CHQ0038 because those already have a demodulator built in (see the block diagram in the datasheet).

You need an AC coupled sensor like the TSMP58000.

The IRLib2 Arduino infrared library has an example sketch that determines the modulation frequency. The procedure is described in more detail in the manual.


By the way, in my opinion it's more likely that you have some timing, decoding or range problem than that the TV uses something other than 38 kHz. Do you have an oscilloscope/logic analyzer and a second IR receiver?