Shop OBEX P1 Docs P2 Docs Learn Events
How to measure distance with IR — Parallax Forums

How to measure distance with IR

HoffaHoffa Posts: 46
edited 2007-06-14 00:03 in Propeller 1
Hi

I´m trying to make my robot to be able to measure distance using IR. I know that ie. the robot kephera are able to do this and that it is done by measure the quality of the returning IR-signal. But I don´t know how to do this. Someone who have experience in this and knows what to do?

Comments

  • parts-man73parts-man73 Posts: 830
    edited 2007-06-11 21:53
    This subject is discussed in the education kit labs. See this http://forums.parallax.com/showthread.php?p=617192 for a list of all the labs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • HoffaHoffa Posts: 46
    edited 2007-06-12 06:39
    No, the method discussed in the education kit labs is not the same method I´m talking about. That method is about how to measure distance by testing different frequencies. What I want is to measure the quality of the returning IR light. This will firstly just demand one measurment and secondly be more exakt. I know that the robot khepera uses this method, but I can´t find any good HowTos on the internet. So I still wonder, has anyone used this method before?
  • StefanL38StefanL38 Posts: 2,292
    edited 2007-06-12 07:34
    hy

    i think there are minimum two factors for the quality of the returning light:

    1.) of course distance
    2.) the reflectionfactor of the surface where the IR-light is reflected

    So reflected light from a bright white surface will give an other quality
    as a surface in dark grey at the same distance


    one method to measure distancies with light is called triangulation

    i haven't found an english version of it at wikipedia

    here is a link to the german version

    http://de.wikipedia.org/wiki/Abstandsmessung_(optisch)#Lasertriangulation

    i think you can recognize the principle in the little picture
    but therefore you would need a CCD-Camera-chip
    that's pretty much effort

    if the khepera robot works only with the intensitiy of the reflected light i suggest it must be very tricky
    ore maybe it uses an array-line of receiving diodes as a "low-cost multipixel-sensor"

    what about ultrasonic distance measuring
    thats a lot of cheaper

    Stefan
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-12 13:00
    Hoffa,

    The method in the education lab sweeps intensity at a fixed 38khz modulation frequency, see page 29 (IR detection with NCO and duty sweep).

    Because of the problem of ambient light you will probably want to use a modulated light source, this means that the detector will tend to have a digital output, in those cases you have to use the point at which the power from the led is enough to trigger it, hence the use of a swept intensity.

    You could add a filter to a normal photo diode and transimpedance amplifier set at the modulation frequency, then rectify this and measure it with an ADC but I'm not sure I see the point. For the reasons Stefan highlights you will never get especially good results from intensity due to differing reflectivitys.

    Graham
  • rokickirokicki Posts: 1,000
    edited 2007-06-12 16:39
    For a robot I'm currently building I'm using QD1114 IR emitter/detector pairs as a floor sensor. I'm mounting
    them just above the floor. These are the same components as the QTI sensors (as a matter of fact I'm using
    the QTI kit but modifying the circuitry). I'm modulating the IR myself, and sensing current in the phototransistor
    using a small cap and resistor in an A/D configuration to measure current through the transistor. So essentially,
    the QD1114, a 120 ohm resistor to current limit the IR diode, a 1K resistor and a 10nf capacitor in the A/D
    configuration, with the photodiode current draining the capacitor to ground.

    One cool thing about this configuration is it keeps the C-E voltage on the phototransistor very close to constant,
    so the Miller capacitance is less of an issue and the phototransistor responds more quickly.

    Using this configuration I'll be able to raise the sensors off the floor a bit more and deal with much more
    varied surfaces than in the "normal" QTI configuration.

    A downside of using a fixed 1K resistor in the A/D circuit however is that in bright sunlight on a highly
    reflective surface the phototransistor gets swamped.

    But I would not say this is in any way a "distance" sensor, as usual, because the light reflected is the product
    of the reflectivity and the inverse distance squared (with an additional effect due to diffuse versus specular
    reflection).
  • TransistorToasterTransistorToaster Posts: 149
    edited 2007-06-13 23:39
    I remember looking at this a while ago. There's a module made by Sharp that uses triangulation. I'm not entirely positive, but I think this is it:
    www.philohome.com/sensors/gp2d12.htm

    I recall checking Wikipedia
    en.wikipedia.org/wiki/Autofocus

    and also going through the patent references found in
    electronics.howstuffworks.com/autofocus.htm

    I came across 3 distance measurement main techniques used on cameras which didn't rely on a CCD sensor for sharpness evaluation, which is the primary goal of imaging.
    1. Echo method with round trip time measurement. Hard to achieve well at small distances. You need a high bandwidth transmitter, high BW receptor plus a fast chronometer.
    2. Amount of light reflected back by a target
    3. Triangulation
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-14 00:03
    TransistorToaster,

    The sharp does indeed seem to use triangulation as the package contains a PSD (position sensitive detector), these rather handy devices have an output that changes with the position of the light on the sensor. You can also get 2-axis ones if you ever want to track a corner cube reflector with a laser or crazy stuff like that.

    I have a couple of the 8pin 102pixel linear arrays from Taos, I started writing some code up for it but got distracted by other projects, they are very simple and would make great laser range finders, I think it has been done actually in something like servo magazine but with a PIC.

    Graham
Sign In or Register to comment.