Decoding an IR remote RC2094501/B but getting random codes  - Page 1
Forum section: electronics / projects

author: Clockwerk
author_rank: Newbie
timestamp: April 09, 2019, 11:27:22 pm
content: 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 aTSOP483838kHz from Vishay (here is the datasheet:https://www.vishay.com/docs/82459/tsop48.pdf). Unfortunately, I do not have an oscilloscopeand I am still gathering knowledge on this matter.The remote control seems to be a "Philips" based one, it readsRC2094501/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 thesample data capturedpasted on pastebin as it is a bit large: sample1https://pastebin.com/wMa2AfAbsample2https://pastebin.com/aBaRkABVand this is the output ofIRrecvDumphttps://pastebin.com/KTqG0aXj.This issome informationI gathered while trying to figure out things (no success yet):https://www.sbprojects.net/knowledge/ir/rcmm.phphttps://www.sbprojects.net/knowledge/ir/rc6.phphttp://www.righto.com/2010/12/64-bit-rc6-codes-arduino-and-xbox.htmlhttp://wiki.electronics-irc.net/Avr_rc5_remote_controlhttps://www.avrfreaks.net/projects/philips-rcmm-ir-receiverI 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 theremote and the box:

author: macboy
author_rank: Super Contributor
timestamp: April 10, 2019, 01:15:25 pm
content: 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.

author: Seekonk
author_rank: Super Contributor
timestamp: April 10, 2019, 01:26:42 pm
content: 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.

author: Clockwerk
author_rank: Newbie
timestamp: April 10, 2019, 10:36:22 pm
content: Quote from: macboy on April 10, 2019, 01:15:25 pmI found this Java tool "ProtocolAnalyzer" today,http://wiki.nethome.nu/doku.php/analyzer/startwhich 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 fromSeekonkgoes 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 likein the mini breadboard atm, and some short video where you can see how a SAMSUNG remote just works, but not the RC2094501/B remote.

author: tooki
author_rank: Super Contributor
timestamp: April 10, 2019, 11:34:47 pm
content: 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

author: Psi
author_rank: Super Contributor
timestamp: April 11, 2019, 12:48:18 am
content: 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.

author: Clockwerk
author_rank: Newbie
timestamp: April 14, 2019, 08:50:15 pm
content: updateTurns 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 isbuggyto 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/21where 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 variantBuy 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 thisMaybe try some other library or device other than an Arduino, although that´s likely not the issue hereStill trying to figure out, any advice or guidance is welcome.@tookiThanks, 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-MMwith toggle bits. It would be ideal to be able to test with a library that implements it correctly.@PsiI 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.

author: Psi
author_rank: Super Contributor
timestamp: April 15, 2019, 02:05:13 am
content: 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.

author: tooki
author_rank: Super Contributor
timestamp: April 15, 2019, 11:33:37 am
content: Quote from: Clockwerk on April 14, 2019, 08:50:15 pmNot 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.Quote from: Clockwerk on April 14, 2019, 08:50:15 pmWhether 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.)

author: Clockwerk
author_rank: Newbie
timestamp: April 16, 2019, 11:44:09 pm
content: @tookiYou 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).QuoteThat´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.

author: oPossum
author_rank: Super Contributor
timestamp: April 17, 2019, 12:26:10 am
content: 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=4890and a MSP430 version here:https://forum.43oh.com/topic/695-consumer-ir-cir-capture/Currently working on a CH551 version.

author: Samishkakumble
author_rank: Newbie
timestamp: April 30, 2019, 07:34:31 am
content: Excellent post! I go valuable information here. Thanks for such an excellent piece of information!

author: Clockwerk
author_rank: Newbie
timestamp: May 16, 2019, 10:11:07 pm
content: updateI 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 aTSOP38338which 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 setAny insights or comments about the above signal would be appreciated.Note to @oPossumThanks 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.

author: soldar
author_rank: Super Contributor
timestamp: May 16, 2019, 10:45:38 pm
content: 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 deviceBits 16 to 27 carry a different combination for each key but never carry more than two ones or two zeros consecutivelyI assume there are many different systems but this might give some idea of the philosophy behind them.