Author Topic: Decoding an IR remote RC2094501/B but getting random codes  (Read 4256 times)

0 Members and 2 Guests are viewing this topic.

Offline ClockwerkTopic starter

  • Newbie
  • Posts: 5
  • Country: ie
Hi everyone, this seems to be my first post here...

I am trying to decode an IR remote control that I have, however, unlike some other remotes that I own this one returns random codes every time I press a key. I am using Arduino for this project with a TSOP4838 38kHz from Vishay (here is the datasheet: https://www.vishay.com/docs/82459/tsop48.pdf). Unfortunately, I do not have an oscilloscope :-BROKE and I am still gathering knowledge on this matter.

  • The remote control seems to be a "Philips" based one, it reads RC2094501/B. And it is for a mediabox for an Internet company named UPC (now Virgin Media).
  • Most likely, the remote´s protocol is RC-MM, RC5 or RC6. I would say it is RC6 after some research but I do not really know.
  • I have tried some libraries like IRremote, IRLib and IRLib2 but it decodes the IR signal as UNKNOWN. Furthermore, it returns random values all the time pressing the same button.
  • The serial plotter on the Arduino IDE is not really helpful, but I can see the signal there at least.
  • The remote control needs to be paired with the mediabox, not sure if that matters for decoding but I doubt so.

This is the sample data captured pasted on pastebin as it is a bit large:  sample1 https://pastebin.com/wMa2AfAb sample2 https://pastebin.com/aBaRkABV  and this is the output of IRrecvDump https://pastebin.com/KTqG0aXj.

This is some information I gathered while trying to figure out things (no success yet |O):

https://www.sbprojects.net/knowledge/ir/rcmm.php
https://www.sbprojects.net/knowledge/ir/rc6.php
http://www.righto.com/2010/12/64-bit-rc6-codes-arduino-and-xbox.html
http://wiki.electronics-irc.net/Avr_rc5_remote_control
https://www.avrfreaks.net/projects/philips-rcmm-ir-receiver

I also watched "EEVblog #506 - IR Remote Control Arduino Protocol Tutorial" which is very inspiring but a bit hard to achieve with this remote and in my case specially with the tools I have.

If someone knows how to decode this remote... or if anyone can provide some guidance that would be really appreciated (perhaps this should be on the noobs forum), also I am trying to figure how to get the output from A0 on the Arduino and plot it in something I can zoom in, etc. So I have higher chances to see what is actually going on.

This is an image of the remote and the box:






« Last Edit: April 09, 2019, 11:40:33 pm by Clockwerk »
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2309
  • Country: ca
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #1 on: April 10, 2019, 01:15:25 pm »
You can view the output of the IR module with a sound card and any of many free oscilloscope software on a computer. After demodulation by the IR module, the remaining signal is just a series of pulses at a rate of a few hundred per second, easily within the audible range.

In my experience, IR modules are picky about noise. Put a small value resistor (10 to 100 ohms) in series with the power supply (Vcc), and a capacitor (1 to 100 uF) across the module's power pins (Vcc, GND). Also, the output of these is usually an open-collector type of active low digital output with only a weak pull-up. It may have trouble getting a clean output signal due to parasitic capacitance. Add a pull-up resistor to the output to help square it up: about 10k from the output to Vcc.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #2 on: April 10, 2019, 01:26:42 pm »
I just built an IR repeater and  shouldn't have been surprised that the receiver module puts out a lot of noise due to the AGC until it sees a real signal.  I have also seen some instability I assume was power supply related. You are blind without a scope.
 

Offline ClockwerkTopic starter

  • Newbie
  • Posts: 5
  • Country: ie
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #3 on: April 10, 2019, 10:36:22 pm »
You can view the output of the IR module with a sound card and any of many free oscilloscope software on a computer. After demodulation by the IR module, the remaining signal is just a series of pulses at a rate of a few hundred per second, easily within the audible range. In my experience, IR modules are picky about noise.

I found this Java tool "ProtocolAnalyzer" today, http://wiki.nethome.nu/doku.php/analyzer/start which turns out can decode RC/RC6 (I´m assuming that is the protocol the remote actually uses). I went so happy to try it... but nopes. It seems I cannot just feed the program with the A0 output of the arduino on ttyUSB0 (Linux user here). However, it seems to like some audio device instead.

And then your comment is very relevant with nice insights really. But, how do I view the output of A0 with my computer´s soundcard? should I save the analog output as .wav from the arduino or maybe use a wire with a jack and connect it to the IR and the computer ? I´m aware this is simple and obvious for many people, sorry about that.

Also, I have tried what you mention about smoothing the signal and I used a 100uF and 10uF cap with the 10K pullup resistor. Whereas I think that helps - and it is what is suggested on the datasheet - I still get random codes regardless of the button pressed or how many times. The source of power to the IR LED is the 5V from the Arduino.

I believe the comment from Seekonk goes on the line of what you said too. I would like to be even more sure but noise or power doesn´t seem to be the culprit here, though.

Here is how it looks like in the mini breadboard atm, and some short video where you can see how a SAMSUNG remote just works, but not the RC2094501/B remote.
« Last Edit: April 10, 2019, 11:02:45 pm by Clockwerk »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13156
  • Country: ch
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #4 on: April 10, 2019, 11:34:47 pm »
Googling the model number of the remote plus “IR codes” found a few discussions about this. Consensus is that it’s “RCMM with toggle bits”, whatever that means. Apparently most IR libraries and devices don’t know how to handle toggle bits.

https://www.computerbase.de/forum/threads/fernbedienungsprotokoll-herausfinden.1092274/
http://dangerousprototypes.com/forum/viewtopic.php?f=29&t=4191
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10385
  • Country: nz
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #5 on: April 11, 2019, 12:48:18 am »
Ya really need to get the signal onto a scope/screen and see if it's actually random between button presses or not.

My guess is that you're trying to analysis the signal using the wrong technique and therefor extracting data from a waveform property that is not relevant.
There are many different ways this could be happening, but as an example, maybe you are measuring the on-time of pulses and converting to binary bits when it's the off-time that carries the data.


« Last Edit: April 11, 2019, 12:50:14 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ClockwerkTopic starter

  • Newbie
  • Posts: 5
  • Country: ie
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #6 on: April 14, 2019, 08:50:15 pm »
update

Turns out I have BusPirate v3, and I learnt that there is this awesome library Sigrok that has PulseView which supports the BPv3. Unfortunately, it did not work very well, the support is buggy to say at least. Also, I am yet not sure how to export the analog capture from the Arduino into audio so I can try to import it with some other tool, I need to investigate the easier way to do that correctly.

Furthermore, I found this thread: https://github.com/markszabo/IRremoteESP8266/issues/21 where some people claim decoding successfully using a 38khz tsop38338, or even some 36Khz based ones on some RC-MM based devices.

So my next actions will likely be:

  • Buy some 36Khz based IR and maybe another 38Khz one, but the tsop38338 variant
  • Buy a cheap 24Mhz 8CH based logic analyser that works with Sigrok and Pulseview, that needs some learning but that´s also the purpose of all this
  • Maybe try some other library or device other than an Arduino, although that´s likely not the issue here

Still trying to figure out :-// , any advice or guidance is welcome.

@tooki

Thanks, I found mentions to that as well. Known "Philips" protocols are RC5 and RC6 but also the RC-MM (aka "Nokia32") could be what this remote is using... hard to tell. But after some more reading there are more chances of this using RC-MM with toggle bits. It would be ideal to be able to test with a library that implements it correctly.

@Psi

I think either the IR receiver should be 36Khz to actually work, or it is not RC protocol but RC-MM. And using an oscilloscope would be nice, sure.

So, I purchased a DSO138 (200KHz 1Msps) for like 14$ and I know it´s a toy and rather useless but I think for the purpose of displaying IR signals and learning the very basics it can be helpful.
« Last Edit: April 14, 2019, 08:54:54 pm by Clockwerk »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10385
  • Country: nz
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #7 on: April 15, 2019, 02:05:13 am »
You can view the raw data without needing an IC to receive the 36khz carrier.
With the carrier + signal together it looks like bursts of carrier with gaps of nothing.
And you can add a RC filter to smooth out the carrier if you want.

But yes, a little receiver IC that removes the carrier itself is easier to work with. Assuming it is intended for the same carrier freq your device is transmitting.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13156
  • Country: ch
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #8 on: April 15, 2019, 11:33:37 am »
@tooki

Thanks, I found mentions to that as well. Known "Philips" protocols are RC5 and RC6 but also the RC-MM (aka "Nokia32") could be what this remote is using... hard to tell. But after some more reading there are more chances of this using RC-MM with toggle bits. It would be ideal to be able to test with a library that implements it correctly.
Not sure why you're still unsure about what protocol it is. Others have studied this remote and determined what it is, as I already explained. And that libraries don't seem to handle the toggle bits correctly.

@Psi

I think either the IR receiver should be 36Khz to actually work, or it is not RC protocol but RC-MM. And using an oscilloscope would be nice, sure.
Whether it's RC5, RC6, or RCMM, it's 36KHz carrier according to the links you posted. So a 38KHz receiver module is not what you want, and is probably responsible for the random output from the IR libraries. (With the correct 36KHz receiver, you should get, for a given button, two possible codes, with one bit flipped.)
 

Offline ClockwerkTopic starter

  • Newbie
  • Posts: 5
  • Country: ie
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #9 on: April 16, 2019, 11:44:09 pm »
@tooki

You seem pretty confident that is RC-MM with toogle bits, and I believe you are correct, that will be good enough I guess. However, I thought my IR would have certain tolerance for 36khz or even 40khz... in any case, I will be ordering some 36khz IR receivers soon that on the Vishay website are marked as "rc-mm" compatible (short bursts iir).

Quote
(With the correct 36KHz receiver, you should get, for a given button, two possible codes, with one bit flipped.)

That´s what I´d expect after all the reading I have done so far. I will follow up on that, I appreciate that you insisted and clarified.
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1472
  • Country: us
  • Very dangerous - may attack at any time
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #10 on: April 17, 2019, 12:26:10 am »
The RCxx codes use Manchester coding, so they require IR receiver modules that have symmetrical carrier on/off response times for reliable decoding. Most other CIR protocols care mostly about the time between bursts so they will work with almost any decoder module even if it is quite asymmetrical and the wrong carrier frequency.
 
I created a simple way to do IR capture that provides both timing and carrier frequency information. The web page is here: http://compendiumarcana.com/irwidget/
There is also an AVR version here: https://forums.adafruit.com/viewtopic.php?t=4890
and a MSP430 version here: https://forum.43oh.com/topic/695-consumer-ir-cir-capture/

Currently working on a CH551 version.
 
The following users thanked this post: PeDre, mycroft, Clockwerk

Offline Samishkakumble

  • Newbie
  • Posts: 1
  • Country: in
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #11 on: April 30, 2019, 07:34:31 am »
Excellent post! I go valuable information here. Thanks for such an excellent piece of information!

Offline ClockwerkTopic starter

  • Newbie
  • Posts: 5
  • Country: ie
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #12 on: May 16, 2019, 10:11:07 pm »
update

I have acquired a cheap Sigrok compatible Logic Analyzer (24Mhz 8ch) and the DSO138 which I know are basically toys but can help a lot with low speed / basic signals like in this case. Whereas I still have to actually learn how to use them properly, I made some improvements on this matter. Turns out I could try with a TSOP38338 which shows some consistency and better results compared to the other IR receiver I was using (TSOP4838).

As per the datasheet, the best option would actually be the TSOP38336 which is 36Khz and specific for RCMM but I don´t have it yet to compare.

Nevertheless, this time capturing the data looks promising:



Zooming out and timing set



Any insights or comments about the above signal would be appreciated.


Note to @oPossum

Thanks for your valuable information, I was unaware you can use any led to actually receive. Also, I will borrow some TSOP98200 to play with following your post, as it makes more sense to play around when you don´t know frequencies or protocols. Nice job.
« Last Edit: May 18, 2019, 12:05:30 am by Clockwerk »
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Decoding an IR remote RC2094501/B but getting random codes
« Reply #13 on: May 16, 2019, 10:45:38 pm »
I faced a similar issue some time ago. I will share the basics in case it is of any help.

The IR carrier is detected by the receiver so the receiver outputs the modulating signal. It helps a lot to deal with the detected signal.

This I recorded by using the audio input to the computer. I recorded the data of each key several times and I found that the modulating signal carried 27 bits of 8.88 mS, about 240 mS total. As long as the key is pressed the same code is repeated at about 4 times per second.

First bit is always 1 (start)
Bits 2 and 3 always 01 except in a couple of keys.
Bits 4 and 5 alternate between 01 and 10 each time the same key is pressed.
Bits 6 to 15 always the same combination. I imagine identifies manufacturer and device
Bits 16 to 27 carry a different combination for each key but never carry more than two ones or two zeros consecutively

I assume there are many different systems but this might give some idea of the philosophy behind them.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf