I am working to design an infrared range finder that will measure distances under a meter. The accuracy doesn't have to be great. The goal is to use it to navigate a rover autonomously through a simple maze. I have worked on it for some time now with little luck.

I am starting to ask the question...is this even possible/practical?

I want to have an infrared LED that "bounces" light off of walls in the vehicle's path. A phototransistor (maybe photodarlington) will receive the reflected light. After filtering, amplifying, and peak detecting the signal, I will input the signal into the Arduino's ADC. Then based on the output (range data), I will program the microcontroller to control the motors of the rover (i.e. telling it to stop, execute turn, check path, start again).

It might work. If it is to run a maze the walls may reflect pretty well. I think what I would try is to get it working at short range then you can increase the power or the number of LEDs to increase the range.

Getting even a short range to work has been the most difficult problem. I am putting about 70 mA through the IR LED (I will eventually pulse it at 38 kHz) but the signal is to weak to be detected by the photodiode/bjt darlington pair. The BJT isn't even turning on.

Do you mean use a lens to gather the reflected light as it comes back to the receiver? I will try that, but first, I need to find out how to get the circuit working with direct transmission (i.e. emitter facing directly at receiver). Then I will work towards getting receiver to detected the light when it is reflected off an obstacle (wall).

AFAIK those Sharp devices have a number of IR sensors in a line and a lens, and the distance is detected by which sensors receive the IR. So suppose the IR LED is on the left of the lens, the further away the surface is, the further to the right the reflected light hits the line of sensors.

You need to modulate the IR LED so you can separate your signal from ambient IR.

I'm not sure the input circuit in the link is correct. What photo diode/transistor are you using?

PS. He is trying to measure amplitude and not time.

Click to expand...

ronv,

I am using the following components:

Emitter: SFH 4545 (940 nm)
Photodiode: BPV22F
Transistor: BC337

And yes, you are correct, I am trying to measure the amplitude of the voltage related to the intensity of the reflected signal. If I understand it correctly, I can correlate the intensity of the reflected wave to the distance since the intensity is inversely related to the squared distance.

Show us your circuit. Are you properly biased? Do you have a lot of background IR that will be difficult to differentiate from the Emitter? pulsing may make matters easier. also, using an OpAmp may be easier than a simple transistor circuit. You can set the threshhold voltage.

Also, your IR emitter has a very narrow emission pattern (10 degrees). You have to be very well alligned. Distance might be your friend here to make sure the small dot of light at 1 cm broadens to something that the receiver can actually see at a half meter.

That correlation holds only if everything in the robot's universe has the same reflectivity. The reason cars use ultrasonics for backup alarms is that a flat black bumper has the same audio reflectivity as a shiny chrome one.

That correlation holds only if everything in the robot's universe has the same reflectivity. The reason cars use ultrasonics for backup alarms is that a flat black bumper has the same audio reflectivity as a shiny chrome one.

ak

Click to expand...

Intensity is the way, and in maze robot competitions, the walls are consistant reflectivity. Most importantly, if a robot is designed correctly, the gap in a wall has no reflectivity.

DC reflective IR is only good for tiny ranges, an inch or two, and the output will depend on the surface colour and reflectivity and ANGLE relative to the emitter.

AC reflective IR can have a much larger range, but is more complex because you need to modulate the IR LED and use an AC amp after the IR sensor, followed by an AC->DC converter to give you a DC voltage based on range.

And even then it will still have all the bad issues like surface and angle dependencies.

If you want to detect things more than 2 inches away just use a Sharp GP2 style sensor.

If you use this method with multiple emitters, you can use this method to find distance to a wall. The method relies on the fact that the reflected light from most surfaces has its highest amplitude when the angle of the beam from the emitter to the reflecting surface with respect to a line perpendicular to the reflecting surface is complementary to a line drawn from the detector to the same spot on the reflecting surface (in short, when alpha1 = alpha 2). The smaller the angle, the greater the distance, so comparing the response to multiple emitters at different angles will tell your controller the distance.

A detector circuit and a block diagram of the signal processing circuit can be found in the patent at this link.

If you use this method with multiple emitters, you can use this method to find distance to a wall...

A detector circuit and a block diagram of the signal processing circuit can be found in the patent at this link.

Click to expand...

I'm puzzled by the Apple patent; it looks like just a claim that you can detect when a mouse has been lifted off a table by means of a reflective LED-sensor pair. I don't see how that's novel, but Apple can spend its money any way it likes.

However, I've heard of two ways to use the concept of "multiple emitters" to make a rangefinder. One is to have two LEDs at essentially the same position, but pointed in slightly different directions. Then any surface that light hits will be illuminated with different intensity from each of the LEDs, based on the fact that light will be most intense on the centerline of the LED but will fall off to the sides. The ratio between the two gives a clue to the angle of the emitting system (noting as The_RB said, that "output will depend on the surface colour and reflectivity and ANGLE relative to the emitter", but the ratio is what's important). A single detector then picks up the light coming from some selected angle, and you can calculate the range based on the length of the baseline between LEDs and detector, and the angles at the end of the baseline. It's trivial to separate the response from the two LEDs--just flash them alternately.

The other way to do it is to have the LEDs essentially along a single straight line running toward the target. So if one LED is 6 inches behind the other and the target is 12 inches from the front LED, it will be 18 inches from the other. Knowing that an inverse-square law applies to the light intensity at the target, you have a predictable ratio of intensity at the surface versus distance to the emitting device, and as above, you can flash the LEDs to get the two readings. Then just use a single detector to pick up the reflected light.

Could you use a receiver for a remote controller eg. TSOP38 or similar.
They are very sensitive, I can turn on a TV-set by pointing the remote controller to walls or ceiling.
You can also put more current through IR-leds by using narrow pulses.

The Sharp GP2 sensors use a single emitter pointing directly forward, and a lens with two receivers. Then it's "brain" decodes the distance based on the signal strength difference at the two receivers. They give the same distance reading on white paper as they do on black paper, which is 95% less reflective.

The smaller size GP2 sensors can be bought for under $10. They give a analogue voltage based on distance, but it is non-linear;