Those little IR receivers
LoopyByteloose
Posts: 12,537
I've been trying to get a universal remote to operate with Sony 12 bit code and a 37.9Khz IR receiver.
So far I am sinking in PDFs. And I must say it might be far easier to buy Parallax's proven IR remote with the right component.
The thing is that not all these tiny IR receivers do the same job. I had one labled N3 and the PDF for that claims that if it receives a pulse over 1.2ms long, it blocks reception for 4 times that. Needless to say that will never work with the Sony 12 bit code that starts with a 2.4 long pulse. Whatever follows is ignored. (Actually, Vishay mentions in the same document that the N3 is best suited for the Sony 12 bit, so I am quite confused)
So I went into what I happened to be able to buy locally.
I ended up with 4 different devices that all that the Pin 1 for Vout, Pin 2 for Ground, and Pin 3 for V+ and all will operate at 5 volts.
But the documentation is quite different.
A. PIC-26043SM Seems to only want pulses between 400uS and 800uS - no good for Sony, have tested.
B. PIC-37043TM2 Documentation is a bit vague about limits on pulse width, will have to test
C. FM-6038LM-5CN Claims to work with all three Sony formats, but less happy with Sony 12bit
D. FM-8038lm-5DN Claims only to work with Sony 12bit format, and not at its best.
I also have a Vishay PDF about that N3 device and it seems that the N1, or N7 marked ones will work with Sony, but not the N3. (correction, the Vishay document claims the N3 is best for Sony 12bit).
There are an awful lot of different IR receivers out there and that seem to buffer the incoming signal with a variety of schemes that ignore various remotes. To make matters more difficult, all of these that I have on hand look the same once removed from their little packages that indicate which is which - no marking in most cases.
This has been an old project that I got stuck on because I obviously didn't dig deep enough for the right info. The 'myth' is that all these IR receivers can work if they are close to the right modulated frequency. It just ain't so. They have logic inside that is doing some rather mysterious things. If you don't believe me, you can read my growing library of PDFs for them.
So far I am sinking in PDFs. And I must say it might be far easier to buy Parallax's proven IR remote with the right component.
The thing is that not all these tiny IR receivers do the same job. I had one labled N3 and the PDF for that claims that if it receives a pulse over 1.2ms long, it blocks reception for 4 times that. Needless to say that will never work with the Sony 12 bit code that starts with a 2.4 long pulse. Whatever follows is ignored. (Actually, Vishay mentions in the same document that the N3 is best suited for the Sony 12 bit, so I am quite confused)
So I went into what I happened to be able to buy locally.
I ended up with 4 different devices that all that the Pin 1 for Vout, Pin 2 for Ground, and Pin 3 for V+ and all will operate at 5 volts.
But the documentation is quite different.
A. PIC-26043SM Seems to only want pulses between 400uS and 800uS - no good for Sony, have tested.
B. PIC-37043TM2 Documentation is a bit vague about limits on pulse width, will have to test
C. FM-6038LM-5CN Claims to work with all three Sony formats, but less happy with Sony 12bit
D. FM-8038lm-5DN Claims only to work with Sony 12bit format, and not at its best.
I also have a Vishay PDF about that N3 device and it seems that the N1, or N7 marked ones will work with Sony, but not the N3. (correction, the Vishay document claims the N3 is best for Sony 12bit).
There are an awful lot of different IR receivers out there and that seem to buffer the incoming signal with a variety of schemes that ignore various remotes. To make matters more difficult, all of these that I have on hand look the same once removed from their little packages that indicate which is which - no marking in most cases.
This has been an old project that I got stuck on because I obviously didn't dig deep enough for the right info. The 'myth' is that all these IR receivers can work if they are close to the right modulated frequency. It just ain't so. They have logic inside that is doing some rather mysterious things. If you don't believe me, you can read my growing library of PDFs for them.
Comments
-- Gordon
I have been trying to implement Parallax's code for a BS2 and cannot seem to get a good solution. I now see that one PDF does recommend a 10K pullup resistor to the data line. I have already added .1uf and 10uf filtering of the power as suggested.
I mentioned the N3 in the Vishay document was no good, but a re-read actually shows it on a chart to be optimal for Sony 12bit. I guess I am getting a bit bleary eyed and muddle minded by all these PDFs and having not been able to get the remote to produce any reliable results on the BS2 homework board.
I have been reading at Linux's LIRC site and built a tiny serial port device that should also test these IR receivers. They list quite a few as no good and seem to think it is an issue. I now have 3 devices that should operated with Sony 12bit, so I will continue to try to get something.
It certainly doesn't help that there are 3 different options for pin allocation. Without keeping my old IR receivers well documented, they are rather useless trash.
And of course, it could be that universal programmable remote that I have is just no good. If only the instructions were not in Chinese.
I just went to Radio Shack last night to buy two new, standard modules so I knew "exactly" what I had. Naturally they only had two, and they were wildly dissimilar, although in identical blister packages with the same part number.
Apparently the "Shack" still sells whatever they get their hands on, not exactly mil spec stuff. Seconds, overruns, whatever.
12-bit SIRC is what you're looking for -- seems logical as SIRC stands for Sony Infrared Remote Control. Don't know where you got the idea it's related to IrDA. There are tons of Web pages that describe the protocols, in the various bit lengths.
I'm not sure of the usefulness of testing old receivers from the junk bin, as new ones cost less than a soda at McDonald's. The newer ones have better performance, though you do have to tailor their use. As nearly all remotes mimic other protocols, if a receiver isn't well suited for one, just try another code setting on the remote. Maybe there are BS2 examples of decoding RC5 or something?
-- Gordon
Hey wait, all McDonald's sodas are a buck now. But Radio Shlock charges $4.19 for an IR receiver! http://www.radioshack.com/product/index.jsp?productId=2049727
But yes, 99-cents on Ebay: http://www.ebay.com/itm/IR-Receiver-Module-38-kHz-TSOP4838-FREE-SHIPPING-/260837712263?pt=LH_DefaultDomain_0&hash=item3cbb23a187
Just saw these, different form factor, 10x $5.57: http://www.ebay.com/itm/10-x-Reception-Distance-15-18M-Infrared-IR-Receiver-Modules-PIC-0038N-/180925978382?pt=LH_DefaultDomain_0&hash=item2a2007570e
http://www.mouser.com/ProductDetail/Vishay-Semiconductors/TSOP4838/?qs=yGXpg7PJZCjhoGceAOFssk1x7usw5mNL
Seventy-seven cents each for 10, and while you pay shipping, you'll get them faster, and you know they'll be prime.
-- Gordon
http://propellerpowered.com/shop/?page_id=464
Jeff
Sorry, but those abbreviations are confusing. IRDA uses SIR and FIR protocols. The SIR is the standard data rate, FIR is the faster data rate. Your mention of SIRC was close enough to get confused.
I see from reading on the web that many newbies cannot see the difference between IRDA and IR remote control. This is important.
@Erco
This IR receivers are indeed optimized for different codes these days as the PDFs will indicate. There may be a 'universal receiver', but that is not generalized case.
Radio Shack has a very long tradition of procurment of parts that are not fully documented and that they don't fully understand how to procure in order to satify customer needs. There are no Radio Shack's in Taiwan, so it is not an issue with me. But they still hold on to the attitude of Tandy Leather Company (which bought Radio Shack back when Allied Radio was the best mail order parts house in the USA). The Tandy Leather Company attittude is that they really don't need to keep up with what the industry and hobbyist are doing in order to maintain their retail presence. This has been an error that has come back regardingto haunt them again and again.
~~~~~~~
What is really the problem?
I re-read the Parallax IR remote presentation again and it seems that there are several software tricks that are required to get the Sony 12bit code to be readable in the BS2 due to its slower speed. Mainly, the code just reads 7 bits and not the full 12bit (which I was trying to get with modified code). Even using the VCR codes does NOT bother to detect the last 5 bits as that time is needed to migrate data into the DEBUG display.
So having added a 10k pull up resistor and having added .1uf and 10uf filter caps to the power -- I will return to the original bare-bones code and see if this is all about not understanding how to program the remote. I have 5 Sony choices on the remote, but documents don't clarify which is the 12 bit Sony.
From there, I can play with the remote AND the three IR receivers that supposedly do work with Sony code.
I am just surprised that this is taking me 20 or more hours when it was supposed to be a simple bench test.
Linux's LIRC support a wide variety of remotes and provides details of the code required by such with a large data base. It is good, but I suspect that the BS2 may only handle Sony 12 bit as other codes are longer and at different rates. Using a Propeller, I imagine I could do any code I wanted. But this is a Homework board project for a student.
1. For the BS2, you have to rely on the specific code as ONLY 7 bits are processed due to limitations of the uC in PBASIC.
2. My Chinese was just not good enough to follow programing directions for the universal remote. I change my proceedure by one detail and the first Sony code seems to be the Sony 12bit.:thumb::thumb:
So, I am now good to move on with this project :thumb:
Thanks to all. I will report back if I do discover exotic IR receiver quirks.
This was all about not programing the IR remote correctly due to poor vision confusing the characters for "power on" with the characters for "TV".
Seems that the sensors I have work fine with Sony 12bit. I should just get a new pair of glasses and accept the reality that I now need bifocals.
There is a certain amount of irony in the fact that I have to struggle in a 2nd language for this hobby. We have a lot of other people that do as well.
So it is wisest to create a dongle for the IR remote that can be reconfigured rather than soldering a 3 pin socket and finding it not appropriate for whatever is available. These may be more important if you want to fool around with codes other than Sony.
Besides, there is a real advantage in creating a dongle that can be located where the IR receiver can do its best reception. The board can be hidden inside the chassis and just the sensor exposed to 360 degree reception.
30 kHz TSOP34830
33 kHz TSOP34833
36 kHz TSOP34836
38 kHz TSOP34838 *Most common*
40 kHz TSOP34840
56 kHz TSOP34856
But there is one which will receive a wide range of frequencies...
30 kHz to 50 kHz TSOP98238
http://en.wikipedia.org/wiki/Consumer_IR
http://www.sbprojects.com/knowledge/ir/sirc.php
So far, I have experiences at least one switch in the pin outs of IR receivers that are available locally - Vss and Vdd were switched.
I am uncertain that a wide range receiver is a good thing as it allows for more interference. Ideally, I don't want the remote control for my robot to mess with my air conditioner or TV. So far, the Sony 12bit TV code is okay for that.
http://www.ebay.com/itm/10-x-Reception-Distance-15-18M-Infrared-IR-Receiver-Modules-PIC-0038N-/170893650857
Part is called PIC-0038n, couldn't find any reference to it on the web. Pins are, in order, starting from the flat side: signal out, ground, V+. Not continuous signal (drats, that's what I'm after these days) but they work fine for receiving standard Sony SIRC IR codes on 38 kHz. FYI.
Years ago, I decided to save shipping an buy a parallel LCD locally. Everything 'seemed' the same, but I immediately destroyed it as the Vdd and Vss were inverted.
The reality is that there are almost no reliable standards of pin outs as the manufacturers are willing to accomodate the big buyers with anything they want.
By the way...
I am enjoying using an universal remove and ir sensor with Sony 12 bit. Even the BS2 will receive and decode this and can directly drive 240VAC solid-state relays all the way to 30amps.
I'm waiting on some from Ebay China to test to make specific recommendations. Meantime, I have determined that Radio Shack part 276-640 ($4) works, but only if it comes with a metal frame around it. Looks like they are switching to a black epoxy part (no metal frame) which does NOT work in this application. It works fine to receive Sony IR signals, but not a 556 signal. FYI.
http://www.radioshack.com/product/index.jsp?productId=2049727 The part illustrated is the one that works.
I know this is an old post but I found a lot of useful wisdom from erco. The RS part (276-640) I recently purchased is deplorable compared to a prime Vishay part from a real distributor. But fiddling with it did teach me an interesting lesson about continuous signalling. Apparently the RS part I have derives its AGC signal from measuring the duty cycle of the demodulated data. If it sees a high duty cycle (anything around 50%) it starts cranking the gain down until it chokes off reception entirely. But if I maintain a duty cycle around 20 or 30%, it's happy as a clam, indefinitely.
OTOH, it is a vastly inferior part compared to a legitimate Vishay TSOP38238 from Mouser ... inferior in practically every metric you care to name. I mean if RS is going to purchase Chinese knock-offs, at least they could have purchased the good Chinese knock-offs.
Mouser now tags TSOP98238 Lifecycle: Obsolete
However Vishay do have some active parts designed for Code Learning, and those trade off some operate distance for broader bandwidth.
These have much faster Rx responses, and will track the carrier frequency, which means they can be used for Serial Data transmission too.
These parts are Code Learning, 20~60KHz, 5m distance
TSMP77000
TSMP6000
Per my post at http://forums.parallax.com/discussion/142217/ir-receivers-hoarding-time/p1 , I use the continuous-signal compatible TSSP4038 receivers a lot. I often swag relative distance with these. As opposed to the usual off-center-frequency sweep (like 34-42 KHz), I keep 38 kHz and vary the PWM, which dramatically reduces the sensitivity of these fixed-gain (non AGC) modules.
There are a lot of subtle variations among these identical-looking IR modules. They all have lots of internal circuitry, amps & filters & such. Some are optimized for sunny locations, some for noisy environments, etc. I find that nearly all of them are suitable for receiving standard IR signals (Sony SIRC and RC5 protocol). Further, even most non-continuous-signal compatible types (including the one Parallax sells and includes with BoeBot & such) can receive a simple continuously-modulated 38 KHz signal. That is, a signal produced by a 556 dual timer. One timer generates the 38 kHz carrier which is modulated at a 50% duty cycle by the other timer, but the modulation must be in a narrow range suitable to the IR receiver. I use the attached design for simple IR beacons, which emit a steady modulated signal most receivers can detect. Further, multiple beacons can have unique modulation frequencies within the acceptable range and a robot/micro can discriminate between beacons by counting pulses.
Edit: I have never used (nor seen an IR receiver module that requires) a pull up resistor, filter/decoupling caps, nor series resistor to the micro input.
KEYES has an Arduino remote with IR sensor that are sold together and use a 32bit code, not the Sony 12 bit code.
The Sony 12 bit code is almost a necessity with the BasicStamp, but the Propeller has IR code in OBEX that handles the KEYE 32bit code very nicely and you have an much cleaner remote control that doesn't have a ton of extra TV and VCR related buttons.
I too had a Sony 12bit on a Universal Remote rolling bot via BasicStamp that I set up for one of my younger students. No encoders, and it worked fine until the student destroyed the litium ion batteries by running them too low.
IR remotes work great for indoors use in one room with direct line of sight.
Also amazing range outdoors at night!
Thanks for providing that link again (to the TSSP4038). I remember reading that post but could not find it when I went to look for it last week. Alas, your prediction was correct. It is no longer available. So I don't have it to compare against the various receivers I do have. OTOH the 5mm LED-shaped "PIC-0038n" that you referenced in 2012 arrived today and seems to work great.
Anyway, yes, it seems conclusive that the Vishay TSOP38238 can receive continuous data so long as the IR illumination is reasonably strong and the duty cycle is within the "right" range which, atm, would seem to have to be determined empirically. I need to do the same testing with the various Chinese IR receivers that have just arrived.
BTW, the Propeller makes a pretty great tool to drive IR LEDs for such testing. There are almost too many good ways to accomplish it. The most obvious is to use one of the counters of one of the cogs to create a 38 kHz signal to drive the anode continuously, and then use code in the same cog to create data pulses to drive the cathode. It gives tremendous flexibility to vary practically every parameter, on-the-fly. (And of course another cog can be tied to the IR receiver to decode or analyze the signalling and report the results via PST to the laptop/desktop computer. Even if you're going to use a PIC [or even a 556] in the final product, the Prop shines as a test vehicle!)
http://www.mouser.com/ProductDetail/Vishay/TSSP4038/?qs=lgjwDzixuo3Ja5hn%2bEmOdw==&gclid=Cj0KEQiAjpGyBRDgrtLqzbHayb8BEiQANZauh_Zr2s3Z6hlzWg6O2rdMbdTXrnjfBL6TXgX3NLGlssAaAgRH8P8HAQ