Infrared LED / detector design

Hello. It's been a while since I've posted. I'm working on an Ir LED / detector for a small robot platform I've made. I'm just having fun really, and learning!

I've read a considerable amount about this and I'm not getting concrete facts (or at least what I want to hear)

I purchased a Ir emitter and detector matched pair from Radio Shack Model: 276-142. I've not found a real datasheet for these, which seems to be a common problem.

What I do know from bench testing is the detector triggers from the emitter pulses all the way from DC to 30kHz and probably higher frequency than that. I just tested to 30kHz.

I drove the emitter at 1.3V, 86mA 50% duty cycle squarewave pulse. The detected distance was about 6" I also drove the emitter at 1.3V 100mA, the detected distance was about 36"

From my reading, modulating the emitter at some frequency is useful for eliminating false triggers from ambient Ir sources. I understand that.

What I need help on is tuning the detector to that frequency. How is this done??? The detector is a phototransistor. Having no datasheet isn't helping any. Currently the detector is seeing the emitter and pulses just fine, but it also sees any other sources as well (halogen recessed lighting in particular!).

Thank you

Reply to
Matt
Loading thread data ...

On a sunny day (Fri, 19 Feb 2010 08:03:18 -0800 (PST)) it happened Matt wrote in :

Moduklate a carrier. For example FM. That gives you 2 (two) advantages, the 2 are:

1) You can detect for presence / non precense of the carrier (signal good). 2) Your system does not respond to other signals so much. 3) You can use a bandpass filter in the receiver. 4) Use a packet system, that allows you to comunicate with more then one robot device. 5) Forget about IR and go to 430 MHz radio modules, because IR sucks. I have tried both.
Reply to
Jan Panteltje

Yea? Thank you, I should have mentioned it's not for data transmission. Sorry about that.

My idea is an array or Ir units (maybe 3 or 4) around the bot to be used for navigation.

Reply to
Matt

On a sunny day (Fri, 19 Feb 2010 09:19:20 -0800 (PST)) it happened Matt wrote in :

Well I do no see how that should work, how does it work? But you can modulate the LEDs with for example a 74HC4046 chip. use the VCO in the transmitter for frequency shift for example. And you can use same chip in the receiver as PLL for either analog demodulation (in case you wanted to transfer sound for example), or digital demodulation. By assigning different frequencies for each transmitter you could perhaps create some sense of direction in the robot. Or use GPS :-)

Reply to
Jan Panteltje

The idea is pretty simple...... I think..... :)

The robot runs around in the house...... If is gets close to the left wall (like in a hallway) the left Ir emitter/detector sees the reflection and the robot veers slightly right.

At the moment I'd like to only run two tx/rx pairs for left and right to get me down a hallway and make some simple decisions to move about. There are a lot of holes in this theory, but the Ir parts are cheap, and I'm having a little fun in the process.

Supposedly I can tune the detector by adjusting RL, but that's off a datasheet from another part.

Radio Shack sucks. No datasheet, How can they justify this!?

Reply to
Matt

On a sunny day (Fri, 19 Feb 2010 09:57:53 -0800 (PST)) it happened Matt wrote in :

Sound like that could work.

I dunno, without datasheet it is hard to tell what is in there.

Does it not have a part number, and did you google for it?

Reply to
Jan Panteltje

Readymade IR receiver modules like those used for TV remote controls are widely available. Digikey has a wide range to choose from at ~$1 US. They are tuned to standard frequencies like 38kHz and 56kHz (and others). To distinguish between left and right without having to code the pulses, use two Tx/Rx pairs operating at different frequencies.

Reply to
pimpom

It sounds like you'd like to do some synchronous detection of the IR. Chop the IR at some frequency and then pick out that same frequency in the detected IR. The phase shifts should be small and can probably be ignored. Which makes things easier. One way to do this would be to have the same square wave that turns the IR on and off also switch the gain of an amplifier looking at the detector signal. The gain should switch from +1 to -1. Then a bit of low pass filtering and you are done. For the background IR the signal first gets added and then subtracted. But your copped transmitter only adds to the signal..

Is this what you are trying to do?

George H.

Reply to
George Herold

use two Tx/Rx pairs operating at different frequencies.

Actually that's a good idea. I hadn't thought of that, but I'm pretty sure it would have been an issue and reason for revision #1 !!

Yep, that's pretty much it. I was actually stuck on only picking the modulated signal up. The detector and emitter would be phase shifted and I thought it'd never work. Then I read up on Phase Lock Loop stuff and my brain started hurting...... I'm not sure I can handle PLL. It sounds like I have a lot of bench testing to do with chopper circuits..... either that or get an order together for Jameco with the tuned Ir detectors.

Or make sure the robot only runs in the dark. HA!

Man, this got complicated fast! I had no idea.

Reply to
Matt

FWIW, I did search for quite some time for a data sheet.

Radio Shack Model: 276-142

The only thing I found was people complaining there was no datasheet available and a TXT document with the specs I already have. 1.3V -

1.7V 150mA max continuous current, 930nm etc. etc. etc.

And radio shack's web site only has the basic specs listed above.

Reply to
Matt

On a sunny day (Fri, 19 Feb 2010 13:06:07 -0800 (PST)) it happened Matt wrote in :

OK, that is just an (any?) IR LED and photo transistor.

You could use a 74HC4046 or even a 555 timer to pulse the LED at some frequency. To detect it, you need an amplifier of sorts, some transistors (or opamp) and capacitors and resistors can make a nice bandpass filter. Applictation notes of opamp circuits is a place to look. If you use any of the above chips, a simple opamp like the LM324 can work on 5V single supply, and be used to make a good filter, plus peak detector (so you get DC to switch something).

Sort of like this: IR light 555 timer --- LED -----> [ ] Wall [ ] DC

Reply to
Jan Panteltje

You can use a PLL chip to do a much better detector than just trying to look at it yourself. The PLL will eliminate noise and concentrate on just the frequency you care about.

Get an LM567, which is a PLL that is designed to do lock on a particular frequency (they call it a 'tone detector'). You use a resistor and capacitor to set the frequency, f = 1 / (1.1 * R * C). When it sees that frequency on its input, it pulls the output low.

So, set up your receiver so its output is input through a cap into the LM567, and use the output signal to turn the follower (which must be pulled up to Vcc).

Then, use a microcontroller or timer chip (555?) to make your transmitter output at the frequency you set for the lock frequency of the LM567.

Calibrate the thing against a typical wall. Make sure the output of the transmitter is completely blocked from the input, and use a pot to adjust the amplitude of the receiver output so it just makes the LM567 pull down at the maximum distance you want it to detect at.

The other way to do is to use a sharp IR sensor, which does all of this for you, at a price. See the IR sensor section at

formatting link
for more info.

Regards, Bob Monsen

Reply to
Bob Monsen

First I had no idea there were PLL IC's available. Wow. I'll look into it.

Second, the reason I'm building this from components is the Sharp sensors I found were $30 a piece, times probably four is WAY too much. Spark fun has em' for $14. Pretty tempting.

Thank you all. I'd like the challenge of building a system from components so I may do that..... at least until I get discouraged :) I'll learn a lot though.

I think I've got enough from your advice to research and build something. Thank you again.

P.S. The brains of this will be the Parallax BS2. I'm having a ball with it. I'm made several kinds of bots with it. It sure is a lot more capable than the Atmel I used to use!

I'll fire up the oscilliscope and play some more.

Reply to
Matt

, use two Tx/Rx pairs operating

e
o

Well if you don't mind spending a few bucks you can buy 'lockin' chips. The AD620 does the switching for you if you feed it the square wave and signal. There's probably more clever ways to do this.

Really, sounds like fun, you've already got the robot moving around?

George H.

Reply to
George Herold

Does the emitter have some built in resistor? If not, you should be driving it with current, not voltage.

If you meditate on how a communications system works, the fundamentals are based on a priori knowledge of the signal. Thus if you send a chopped signal, you have a priori knowledge of that frequency. I'm more of a linear person, so I would AM the current going to the emitter. I suppose chopping is just as good since either method will give a strong signal at the fundamental frequency. Pick a frequency not likely to occur in real life. That is, you wouldn't want the detector to be triggered by a flashing computer display.

Say you pick 50kHz. Your receiver, after some signal conditioning, could be feed to a switched cap filter bandpass. Low pass filter off the clock feed through, and AC couple to remove offset. Now from this point, you have two choices. You could drive an energy detector circuit, or do an envelope detector. That is rectify, low pass filter, and then the output is a signal relative to the strength of IR detected.

Use a different frequency for left and right.

Reply to
miso

es, use two Tx/Rx pairs operating

n

be

to

e

ld

Cool. Yea, the robot is moving around now. It's pretty stupid though. It drives forward until it runs into a wall. I have limit switches on the nose to detect an impact. Then it rolls back and away from the limit switch about 90 degrees and rolls forward again........ pretty entertaining actually! I put 3" rubber knobby tires on the back and a

2" rubber swivel caster on the nose. It's driven by some modified RC servos for continuous rotation. It runs on hard floor and carpet, so I was pleased with that...... all built on a 3/4" MDF plank for now.

I found four devices in some junk I have. I can't find any information on them or any information on the components on the board. It looks like an Ir receiver, probably tuned to a frequency because there's a three pin connector off the board labeled with Vcc, GND, and SIGNAL. The numbers off the unit are EUR-411 (probably means nothing) and UR41PB9A. The component I think is the Ir detector has 302 45 and a 14- pin IC #5021S....... I can't find a thing on these. I hooked them up to 3.3VDC and then 5VDC. The output is about 1V level voltage no matter what the emitter modulated frequency is. I've tried DC to about

75kHz square wave.
Reply to
Matt

Very good. I can't find the LM567, LM567c, LM565 PLL devices or any PLL devices locally. I may try the choppers today...... just for kicks,

I will definitely use different freq for left and right. That's an excellent suggestion. I'm also going to run a freq that's not a multiple of 60Hz just to be safe.

Oh, and yea the emitter is current limited. Right now it's running off a Freq generator, 1.3VDC (not 1.3V p-p) square wave, current limited to about 40mA...... I'll eventually run it off 5VDC and pick a current limiting resistor to match.

Reply to
Matt

I don't think they make the old XR-2211, which was a classic tone decode chip.

I think you should consider my AM demod scheme. It sounds complicated, but you can get a linear estimate of the reflected signal, not a go/no- go detection of the carrier. Locking on a signal sounds good, but all that means is you have a means to detect when the light of known (a priori) modulation is being reflected, but not how much light is being reflected, which is related to the distance to the object somewhat. [Reflected light also depends on the color of the wall, how shiny it is, etc.] A PLL scheme can lock on a signal in the mud, but you probably don't want that kind of sensitivity. Rather, you just want to know if you are near an object, so the more linear approach like AM demod seems more appropriate to me. If you were building a communications systems, then the PLL would make more sense.

Reply to
miso

Then don't lock on, but lock-in :-)

Synchronous detection is really simple to setup and a simple on/off modulation scheme will provide the OP the distance information he needs, with excellent distance detection range.

Oh, I just read your post and see it's what you've said.

And if the uC has an ADC and it's not too heavily loaded, then you can just choose a low enough chopping frequency and have almost all that done in SW.

--
Thanks,
Fred.
Reply to
Fred Bartoli
[...]

Sharp offers a wide variety of IR-based sensors, and the price varies with the features. I did a quick check at Digi-Key

formatting link
and found modules with prices from $3 to $40 under "Sensors - Optical - Distance Measuring".

This one just tells you whether there is an obstacle roughly 5cm away or not:

$3.41 GP2Y0D805Z0F Fixed-distance detector And this one:

$10.93 GP2Y0A02YK0F Distance-Measuring Sensor

returns a voltage in the range 0-3V (roughly) indicating how far the detected object is.

If you look over the various datsheets (far right column in the Digi-Key listings) you can get some idea of how they work and which one(s) would be appropriate for your design.

As with all IR measurements, your results will vary according to the IR reflective properties of the object and the amount of IR "noise" in your environment. Sunlight, for example, contains enough IR to completely swamp many IR devices.

If you'd rather roll your own, there's an article on p.32 of the February 2010 issue of SERVO magazine called "The CheapBot Smart Proximity Detector" that uses a microprocessor, two IR LEDs and one IR receiver module to determine approximate distance to objects the robot is approaching (or being approached by: your feet, pets, small children, etc.).

On Digi-Key, these TV remote control receiver/demodulator chips are filed under "Sensors - Optical - Photo Detectors - Remote Receiver", like this one:

$1.31 Vishay TSOP321xx, 323xx series

They are avalilable to respond to various IR "carrier frequencies", e.g. for the Vishay a TSOP32140 expects a modulated 40kHz carrier. Again, to educate yourself on their performance and how they work, review a datasheet or three.

[...]

That's the spirit. Nothing like the warm glow of a burning 'scope and the smell of escaping Magic Smoke to make one's day.

Frank McKenney

-- If teachers now lack the knowledge they need to teach reading and other subjects well, it is not because they are innately incompetent but because they have been trained under faulty romantic ideas about the nature of reading and the worthlessness of "mere iformation". -- E.D. Hirsch, Jr./The Knowledge Deficit

--
Frank McKenney, McKenney Associates
Richmond, Virginia / (804) 320-4887
Munged E-mail: frank uscore mckenney ayut mined spring dawt cahm (y'all)
Reply to
Frnak McKenney

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.