Shop OBEX P1 Docs P2 Docs Learn Events
PING sensor returning erratic values above certain distance — Parallax Forums

PING sensor returning erratic values above certain distance

Claudia BernettClaudia Bernett Posts: 3
edited 2010-01-22 18:30 in Accessories
hello,

i'm working on an art piece using the PING sensor with the ARDUINO, and i seem to be getting very erratic values above about 20" of distance. it jumps to very high values and back to the accurate reading at this point. can anyone recommend a solution? it basically becomes unusable after only about 20".

thanks.
claudia

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-21 05:04
    There's no way to recommend a solution without understanding the problem. Is it a programming error? Is there something about the acoustic environment where the PING operates that produces echos out around 20" that falsely triggers the PING? Could your PING sensor be faulty (possible, but unlikely - very much last choice for possibilities).

    Please describe your project in more detail. If you can include the part of your Arduino code that deals with the PING, that would help. Include a description of how you have the PING connected. Remember that the forum software gobbles extra spaces and generally messes up the formatting. Best is to use the "Post Reply" button so you get the Attachment Manager for including your code as an attachment.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-21 05:40
    Also, please describe the "target" you're trying to track. It could be that it's just too small to detect reliably beyond 20 inches.

    -Phil
  • Claudia BernettClaudia Bernett Posts: 3
    edited 2010-01-22 05:43
    hello!

    let me describe the project - the code is standard code developed to interface the ping with the arduino.

    i'm basically using the ping to detect the proximity of a person or people and brightening/dimming LEDs in response. since i posted this, i read that proximity sensors in general (IR, ultrasonic) have some trouble with detection of people (as opposed to walls or objects). is this true, and is there any way to optimize the experience or code to helpt his out?

    thanks so much for your help!
    claudia
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-22 06:04
    Claudia,

    Is the sensitivity (or lack thereof) a function of the target angle? The Pings have a fairly narrow acceptance cone, outside of which they're mostly blind. Also, do you have anything obscuring the tranducers?

    -Phil
  • John R.John R. Posts: 1,376
    edited 2010-01-22 18:05
    The Ping (or the I/R Sensors) need to get a relativley "clean" reflection.

    People usually have irregular shapes, and things like wrinkled clothes (and cloth itself) don't help in reflecting a clean ultrasonic echo.

    Same thing happens with I/R, but that can be compounded by the fact that any life form is also creating its own I/R emissions.

    Motion doesn't help make detection easier in this case either smile.gif

    Try having the human wear a nice "plasticized" apron or maybe a rain coat and pants. That might help the sound reflect better, and/or at least confirm the source of the problem.

    Better yet, at least for testing, try using a sheet of cardboard or something else big and flat. That would at least help you define the problem, and start to explore the limits.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-22 18:30
    Claudia,

    There was another project that used the Ping in a manner very similar to yours. It's described here:

    ····http://forums.parallax.com/showthread.php?p=873572

    There was no mention of distance issues, and the project is well-documented. Perhaps you can glean something from it.

    -Phil
Sign In or Register to comment.