Shop OBEX P1 Docs P2 Docs Learn Events
Ideas to increase range of IR proximity detection — Parallax Forums

Ideas to increase range of IR proximity detection

PeteD032PeteD032 Posts: 2
edited 2008-12-09 23:48 in BASIC Stamp
Hi all,

I'd like to hear your ideas for increasing the range of proximity detection sensor that uses an IR LED & the Parallax IR detector.

I am using a Radio Shack high-output IR LED, a Parallax 40kHz IR detector [noparse][[/noparse]350-00014], and a BS2P24 micro. The LED is mounted directly above the detector so that it shines in the same "line" as the detector. When an object comes near, it reflects the IR from the LED back to the detector.

According to its datasheet, the IR LED 276-0143 operates at 940nm wavelength and outputs 16mW @ 100mA.

The IR LED is connected, in series with a 470 ohm resistor, to an output pin in the BS2p. It is controlled using the FREQOUT command [noparse][[/noparse]FREQOUT, pin, 1, 37500].

The IR detector is connected to an input pin on the BS2p and is read using the IN command.

This system can detect an object at a range of about 6 inches from the LED/detector, but beyond that it doesn't "see" anything.

I'd really like to increase this detection range to about 9 or 12 inches.

Do you have any ideas or suggestions for how I could do this ?

Thanks!

-- Pete

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-12-05 15:24
    You could drop the value of the 470 ohm resistor -- if the IR-LED drops 1.4 volts (you should measure this -- just turn it 'on' with the 470 ohm and see how much voltage drops across the LED) then the equation is:
    V = IR. I = V/R. R = V/I
    (5-1.4)/100 mA == 36 ohms. That's right, *36* ohms. THAT'LL be a bright LED. Use 50 ohms if you're scared.

    Another 'classic' way of doing this is to use 2 IR-LED's in parallel, each with their own current limiting resistor.
  • MSDTechMSDTech Posts: 342
    edited 2008-12-05 20:54
    If you do drop the value of the resistor, be careful driving it with one of the pins of the BS2! The pins on the BS2 are only rated to source 20ma and sink 25ma. Each of the two sets of pin banks can only support sourcing 40ma and sinking 50ma. At 100ma, this LED would easily burn out a pin.
  • parskoparsko Posts: 501
    edited 2008-12-06 16:27
    www.parallax.com/Portals/0/Downloads/docs/books/edu/Roboticsv2_2.pdf

    Pg 249, Chapter 7. Pg 253 specifically is good. Everything you need to know should be there. We can pick this conversation up in carpool...

    -Parsko
  • Rick BrooksRick Brooks Posts: 67
    edited 2008-12-06 22:45
    Pete,

    To get around the current limit of the Stamp pins, use a MOSFET to switch current to the IR LED.· Driving the standard Parallax IR LED at about 1 amp will give a range of about 6 to 7 feet with the Parallax IR detector.· Using FREQOUT period of 1 with a BS2SX and taking a new reading every 15 to 20 msec, results in a very low duty cycle for the IR LED.

    A schematic of my sumo robot sensors (adjustable limit up to about three feet) can be seen on http://brooksbots.com/Excuse%20II.htm·click on the schematic about a third of the way down the page.

    ···· Rick Brooks
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-06 22:54
    Another option is to use a 555 timer to drive the IR LED with the Stamp controlling the timer. There's a schematic in "IR Remote for the BoeBot" (pg 191).
  • $WMc%$WMc% Posts: 1,884
    edited 2008-12-06 22:59
    Parabolic reflection

    Works great for Pin type flash lites.As well as IR RX and TX

    ______$WMc%____MerryXmas

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there
  • PeteD032PeteD032 Posts: 2
    edited 2008-12-09 17:08
    Hi all,

    Thanks for your quick and interesting replies.

    I was able to use the simplest method - reducing the value of the resistor on the IR LED.

    When I went from ~470ohms to ~220ohms, the system got a lot of false-positive readings: the LED was too bright.

    So, I increased the resistor to ~300ohms and it works well in the range that I'm looking for (~9")

    Thanks for the help!

    -- Pete
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-12-09 17:51
    D'oh! Sorry, I entirely forgot the current limitation on the BS2 pins. Yup, 100 mA (continuous) would burn out the pin, not to mention over-heat the chip.

    At 300 ohms, you're doing (V = IR, 3.6/300 == 0.12, 12 milli-amps? That's not very much, so it won't damage the pin, but glad it's working for you.)

    Things like this are why there exist "Darlington Arrays".
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-12-09 17:59
    Oh, and note you can "detune" the range a bit, if instead of using "FREQOUT IR_Pin, 1, 38750", you use "FREQOUT IR_Pin, 1, 30000".

    Somebody once discovered that using FREQOUT values away from the "ideal" of 38700, you produce a signal that becomes harder and harder to detect by the IR-Detector, and thus requires a reflecting object to be closer and closer before it's detected. Through experimentation, you can even identify a few (maybe 3 or 4) "ranges", each resulting from a particular FREQOUT value.
  • Rick BrooksRick Brooks Posts: 67
    edited 2008-12-09 23:48
    You can "tune" the range as well as "detune".· I've found that each IR LED and IR detector pair has a few frequencies that maximize range.

    If you are using the BS2, the distance is rather erratic from one frequency to the next (1 Hz steps).· I use BS2SX and the distance response is much less erratic.

    The frequency for the maximum range of the five sensors on the last sumo robot that I built varied from a low of 37,315 Hz to a high of 38,835 Hz.

    Yes, I do spend too much time on this stuff.

    ········ Rick
Sign In or Register to comment.