Shop OBEX P1 Docs P2 Docs Learn Events
How can I calculate distance via Infrared sensor? — Parallax Forums

How can I calculate distance via Infrared sensor?

hyonhyon Posts: 2
edited 2008-04-10 20:08 in BASIC Stamp
Hello.
I am using Boe-Bot robot and Gripper, and my scenario is detect object first, approach to the object, and grap it via gripper.
So, I think I need to use infrared sensor, but I think my robot should stop before the object.
How can I get this information from sensor?
Can I have exact distance between object and my robot?

Please give me a soltion.

Thank you in advance.
·

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-04-10 19:09
    There IS a way to 'detune' the IR output, by sending FREQOUT 38500, then FREQOUT 32000, then FREQOUT 28000.

    What happens is, the amount of IR light that actually matches the IR-Decoder's desired 38500 frequency becomes less and less, and thus the 'detect' range becomes less -- the reflected object has to be closer in order to reflect sufficient light. But this is a very rough approximation, which depends on the textrue and the color of the 'reflecting' surface.

    If you MUST have 'exact distances' (which I'm not convinced you do) you could add a 'ping' sensor -- those are accurate to 10' or so.
  • FranklinFranklin Posts: 4,747
    edited 2008-04-10 20:08
    You could also get one of the Sharp IR sensors to get the distance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.