IR Receiver/Demodulator

Mar 17, 2010 106 Replies

I need to design an IR receiver which will demodulate IR input at a given carrier frequency (~32kHz) over distances of 60-80 feet. I am not transmitting data, simply pulses of varying length (20ms-80ms). These pulses occur at the rate of approximately 1Hz. It is important that the pulse length is preserved from transmitter to receiver. In other words, if I send a 20ms pulse I expect it to be within 5% on the receiving side. The sensor will be used outdoors so it must discriminate against ambient IR and other sources (street lights?). I'd like to have a fairly high Q such that 'normal household remotes' operating around 38kHz are significantly attenuated. Finally, given the device is battery powered (5V regulated) it should consume little power (sub 1mA if possible)



I've tried using a simple IR remote receiver module (Vishay PN TSOP85238TR). They work great indoors (~50') but are lousy outside (~8').



Now, I am not an analog guru which is why I am here to seek guidance. My initial thoughts were to amplify and filter (bandpass) using op-amps. However, I started googling to see what I could find on the subject and nearly everything I found was contrary to my initial thoughts. So, obviously I am not thinking correctly! :) However, the types of circuits I was finding are quite puzzling to me. For example, take this circuit:

formatting link
. Seems simple (based on component count) although I don't quite understand how the center frequency is set using the inductor and resistor. But why CD4069UB? I've never seen them used as linear amplifiers before. And 2H isn't really that practical eh?



Taking my requirements into account, what might be the best way to proceed?



--------------------------------------- Posted through

formatting link


That should be doable. You could use a 32kHz crystal to get an incredibly high Q at the receiver end. Or a low power CMOS PLL as the decoder tuned to roughly

32kHz. Changing the crystal on an MSF 60kHz decoder might work.

Have you tried changing the optics around it (and same for the transmitter). That is by far the easiest fix on a line of sight link. Even a simple lens hood with black internal walls may be enough to prevent the receiver being swamped by stray light.

LMV301 as the low power opamp and a 4046 to decode it afterwards. Someone might be able to suggest a cheaper lower power way.

FWIW my advice is sort out the optics first with your current system. Trying to see a tiny modulated AC signal sat on top of a huge variable baseline from ambient light will always be difficult.

Regards, Martin Brown

Google "lock in amplifier".

The 32 Khz watch crystals work just fine as both oscillators and filters, but you may have to "spoil" the Q a bit on the receive one to get the bandwidth up a bit and kill the ringing.

Watch crystal Qs are so high that one brought within 3 foot of one oscillating in the open air will start ringing. Besides the 32,768, they are available at 40 and 44 khz, which is why I suggest FSK.

Can you not do FSK? instead of AM, AM for 20-80 mS is not easy, as your receiver needs a reference to "slice" the leading and trailing edges of the pulse. 1 second is a long time for a AM receiver if it needs adaptive threshold of some sort.

Steve

And it seems like you may need a dose of "Hobbs Salts"

formatting link

Steve

Are you using the proper emitter one that is wavelength matched to you TSOP?

I agree about the optics but unless your building these in large quantity you likely don't have any optics.

You could try a light tube both at the transmitter and receiver.

Are you hammering the LED with it's max peak current are close to it? Keeping in mind max package power dissipation for your LED in the worst case ambient etc..

You can adjust the duty cycle to keep the average current to acceptable limits. Like 10% for the carrier modulated at 40% for continuous transmission at 1A pulses this would be about 40mA average current. You could reduce this further by using discontinuous transmission i.e transmit intermittently in bursts .

Even the shot noise of the background light will be a big problem. Sunlight is _very_ bright. Indoors is also getting much harder, due to the strong modulation of electronic-ballast fluorescent lights at harmonics of 40 kHz. The phosphor doesn't respond all that fast, but the emission lines do--there's crap out past 1 MHz.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal ElectroOptical Innovations 55 Orchard Rd Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net http://electrooptical.net

Wonder what 60Hz 'humm' has for a width?

You'll have to filter the line frequency out.

More power from your LED emitter?

>

The 'UB' part of the CD4069 stands for 'un-buffered'. In that configuration the have high gain and can be used in a linear mode. These are very often used as the inverting feedback amplifier in crystal oscillators.

You'd be better off IMO in using a high Q bandpass circuit made from two or more opamps. Google is your friend, here's an example:

formatting link

The higher the Q the better I think as you've got quite a lot of background noise.

Mark.

Trying to cheap out on a demanding photoreceiver design is not a very productive approach. To get good results you really have to do some calculations, I'm afraid.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal ElectroOptical Innovations 55 Orchard Rd Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net http://electrooptical.net

It's a bizarre circuit.

Some things that would help you:

  1. Maximize optical path gain, which means using lenses or equivalant to focus the transmitter and receiver at one another and exclude as much ambient light as possible from entering the receiver.

  1. Put a narrowband optical filter in front of the receiver to pass the optical signal and reject wideband ambient light.

  2. Dump the photodiode current into a tuned LC tank and amplify that with a very low-noise device, probably a jfet. The 4069 will be about the noisiest and least gain-predictable amplifier you can buy for a reasonable amount of money. An LC to ground allows a lot of ambient light signal to get dumped without saturating any amplifier stages.

  1. Increase transmit power.

  2. Buy Phil Hobbs' book

The problem with using a high-Q resonator is making sure it's on frequency, and not over-doing Q to the point that the data rate is compromised.

What's the application?

John

1b. Don't forget the simplest of all ambient light protectors: A piece of pipe in front of the photodiode.

CD4000 chips actually aren't all that bad as linear amps.

Yup. Consider pulsing where peak power can be a whole lot higher than CW, using the same IR emitter.

Crystals have already been mentioned. They are always on frequency but in really cold climates they might seize up.

I wonder if it couldn't be done via radio link.

Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.

On Wed, 17 Mar 2010 16:10:53 -0000, "markp" wrote: [snip]

[snip]

Half-assed. No! I'll take that back, it's FULL-assed :-)

See the various active filter discussions on the SED page of my website. ...Jim Thompson

-- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | The only thing bipartisan in this country is hypocrisy

I am using a LTE-5228A which has a peak at 940nm. The data sheet on the TSOP part appears to have a peak at roughly the same spot.

I am currently using a plastic fresnel lens in front of the device. However, the fresnel lens is being shared with another optical component which has been given 'optical priority'... meaning the other component is at the focal point so the TSOP device sits about .25" below. I could probably have (and should have) pushed that device up closer to the other device (within .100"). Perhaps I'll run some tests where I slide the fresnel lens down to see if the situation

I believe I am currently driving it past the datasheet spec. My transmitter is powered by a CR2032. I am utilizing a 1 ohm resistor in the path which theoretically results in a 1.8A current for up to 80ms. The datasheets states the maximum as 2A for 10uS. However, I am certain the small 7mil trace width on the transmitter PCB add a good bit of resistance to the path as well.

I am utilizing a 50% duty cycle. I had no idea I could get away with that. Definitely going to adjust the duty cycle downward.

--------------------------------------- Posted through

formatting link

This is being used as a dirt cheap remote control with 5 commands. Each command has a different pulse length.

--------------------------------------- Posted through

formatting link

Reducing the duty cycle of the 32 KHz drive will directly reduce equivalent transmit power. 50% is ideal; then drive it with all the current it can stand.

John

This sounds interesting to me. So, as I understand it with ambient light (DC) I'll have a low impedance path to ground. However, when I am wiggling close to the point of resonance I'll begin to see a voltage develop across the LC tank as the impedance increases. Correct?

How is the Q of the tuned circuit adjusted?

--------------------------------------- Posted through

formatting link

How much can your 32kHz vary? Modulation rate (pulse widths that need to be discerned)? ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The only thing bipartisan in this country is hypocrisy

wiggling

across

I wasn't exactly sure what you were specifically asking so hopefully the answer is in here somewhere... :)

First off, I am actually free to choose any carrier frequency I want. I chose

32kHz because it was lower than what most of the consumer remotes use (36-40kHz from what I can tell). Presumably that will make life easier on me. The transmitter is controlled by a dirt cheap microcontroller which utilizes a 8MHz RC oscillator as a time base. It's fairly easy to adjust the transmitter carrier. Given that it is RC based the timing can vary by a few percent with temperature. I've been doing some tests (heating up/freezing the transmitter) and can say that at the extremes I am within 3% of the base (room temperature). There will also be a variation from device to device of course. Although my testing of the variation is not complete, given the above, I'd like to have a 2kHz window or so.

--------------------------------------- Posted through

formatting link

2kHz may be a bit much for this application. Can't you use a watch crystal to get the uC stable? Modern ones have internal digital loops to give you 8MHz or thereabouts of clock.

Then use a watch crystal on the receive end as filter. Cheap, but may not work well in really frosty temps. And the crystals have to be very accurate because the bandwidth will be in the order of 10-20Hz. Anyhow, just as an idea to play with in case all else fails.

Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.

A bit much in the sense that it's not selective enough? Unfortunately the micro in this app has no such internal loop.

--------------------------------------- Posted through

formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required