Let's Make Robots!

Electrical noise affecting Parallax Ping))) sensor

We're working on a "Start Here" robot (Picaxe 28x1 project board), but we fried the Sharp sensor (inserted the 3-pin connector backwards), so a Parallax Ping))) (from Radio Shack) was purchased in its place.  At least we have eyes again, but sometimes it's like Mr. Magoo driving around.

The sensor readings can be sporadic and erroneous - though the sensor seemed stable when tested alone.  (The servo also seems "jittery" during parts of a scan while stepping through servo positions.)  For now we just average a few readings and consider the phantom walls it sees as part of the bot's personality.  Before I go tracking down bugs in the code, can someone just verify for me that these sensors are prone to electrical noise from the motors?  We're out of town on vacation, so I really don't want to make another trip to Radio Shack for components or alternate power supplies, but will some capacitors "fix" the problems, or do I need to look at a separate/isolated power supply for the sensor.  How do I troubleshot the electronics here and how do I determine the appropriate capacitance values for electrical noise?

If an isolated power supply is the answer, could I just use a separate 5V supply on V2 of the project board to separate the motor voltages from the sensor supply or would there likely still be too much noise?

I'm sure I've left out some critical information from my posting - ask for clarification or just slap me if I'm missing the obvious.  I'll post photos/videos of the build when we get back home.

Thanks.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Basically you need noise filtering capacitors. Add a 100uF electrolytic capacitor and a 100nF monolithic capacitor in parallel across the sonar's power wires. Make sure the electrolytic is connected the right way around as it is polarised.

As the servos can generate a lot of noise it may help to add a 470uF electrolytic in parallel with your battery and 1x 100nF capacitor on the power connections to each servo.

Thank you both for your help & suggestions.

I played with the code tonight and learned how to use the serial terminal as a debug tool to watch the sonar output.  I also RTFM'd and using "servopos" rather than "servo" (Picaxe-speak) does improve performance - just as advertised.  I plan to add noise filtering caps in the next day or so, but I think I've found a couple of offending too-short software pauses which should give the bot better eyes.

Oddbot - are the capacitor sizes you proposed just typical values for this kind of application, or where they specifically calculated for this scenario?  That is, can I use these values as a starting point for future applications, or do I need to do the math each time?

http://letsmakerobots.com/node/25953#comment-66119

There are some suggestions in and around the above comment.