Go Down

Topic: Ping sensor values get erratic at longer distances (Read 1 time) previous topic - next topic



i'm doing some simple PWM control of LEDs based on values coming in from a PING ultrasonic sensor. i have the delay in the code to try to clean up the values coming in, and at the closer distances (like under 20") it is pretty consistent. however, after that it seems to jump erratically from values like 30" to 120". anyone experienced this? just a ping flaw or is there a fix?

thank you!

Coding Badly

It's important to remember that the PING sensor works by emitting a sound pulse and measuring the time for an echo.  Any object on either side of the PING can potentially echo the sound.

What's the room like?  Large and empty?  Small and cluttered?  Outside?

Please post the Sketch.  Someone may spot a bug that's causing the problem.


Remember as you get further away the beam gets wider. Then as said before multiple reflections come into play.


Hi, I'm experiencing the exact same problem. Anything above 50 cm, and I get jump to the maximum value all the time (358 in my case). Under 50 cm it works very reliably it seems.

Is there a better way to measure long distances (to human body)? I know there are more accurate longer distance ultrasonic sensors, but the ones I know come with I2C interface...


i'm building a piece that is going to live in various places - the first is a gallery space but i won't know the precise layout / environment until i'm there and installing the piece. however - it should be fairly open and without much around. it seems like there's an issue with longer distances and this sensor. anyone tried alternate proximity detection like IR? i tested out my IR sensor recently and it seemed to get weird when too close.

Coding Badly

Jan 21, 2010, 06:55 am Last Edit: Jan 21, 2010, 06:55 am by bcook Reason: 1
A few notes about my experiences trying to detect humans with a PING...

Hopefully, something in there will help.

Go Up