PING))) doesn't work while moving, even a little?
64mprice
Posts: 2
I'm trying to use a PING))) on a robot platform that can drive around and the PING))) is mounted on a pan-tilt servo pair. If there is even a slight amount of movement I usually don't receive a response, the pulseIn call times out and returns a 0. Is that expected? I'm using the Arduino example code at http://www.arduino.cc/en/Tutorial/Ping
Comments
moves the PING continuously and generates a nice onscreen DEBUG display. One of my favorite app notes.
So it seems to be something about the small servos that I bought from Sparkfun ( http://www.sparkfun.com/products/9065 )
When they are plugged in and trying to move, that's when the ultrasonic sensor seems to time out a lot. These servos have other problems where they don't have a full 180 degrees range of motion, sometimes become stuck in place until I physically nudge them, etc... After unplugging them the ultrasonic sensor seemed to work fine, and now I'm just moving the whole robot to sweep and it's good. Also I noticed that sometimes when getting close to the ultrasonic sensor, even when I'm not writing any new positions to the servos, one of them would twitch, so I think they have some kind of electronic interference problem or something, I'm not sure.
Either way, I'm pretty sure the ultrasonic sensor is good. Thanks again for the help.
Edit... if erco's suggestion above works, then you can more than likely use the Diode capacitor filter for a single supply.