Arduino Forum

Using Arduino => General Electronics => Topic started by: windu34 on Dec 02, 2015, 05:05 am

Title: Potentiometer Noise problem?
Post by: windu34 on Dec 02, 2015, 05:05 am
I am using potentiometers to control servos via the servo "knob" example. The servos seem to "jitter" slightly, yet constantly except at the end points. I believe the potentiometer is "fuzzy" because I read the analog values it sent through the serial monitor and it varied by about 10 when at the same position. Is there a way to code the jitter out or do I need better potentiometers? Thanks!
Title: Re: Potentiometer Noise problem?
Post by: larryd on Dec 02, 2015, 05:13 am
You could use the last reading only if it has changed by a certain defined amount.
Title: Re: Potentiometer Noise problem?
Post by: windu34 on Dec 02, 2015, 05:17 am
You could use the last reading only if it has changed by a certain defined amount.
The potentiometers are in a master arm config that controls a slave robotic arm. The position of the potentiometers will have to be able to be changed constantly and allow for precision adjustment of the servos
Title: Re: Potentiometer Noise problem?
Post by: septillion on Dec 02, 2015, 10:01 am
If it's that critical, get better pots...

Otherwise you can average the control over a couple of readings or a running average. The idea above is not bad as well.
Title: Re: Potentiometer Noise problem?
Post by: Paul__B on Dec 02, 2015, 11:45 am
Put a 47 µF capacitor from the potentiometer wiper to ground.

Also check what the servos do when you send a fixed mid-range pulse value from your sketch.
Title: Re: Potentiometer Noise problem?
Post by: Ho55 on Dec 02, 2015, 12:32 pm
The quality of the pots or wiring is not an issue, there will always be some noise, and always some sampling jitter in the ADC. You need to introduce filtering in to the system. Either in hardware by adding a RC filter, or in software for example a dead band.
Title: Re: Potentiometer Noise problem?
Post by: windu34 on Dec 02, 2015, 06:03 pm
If it's that critical, get better pots...

Otherwise you can average the control over a couple of readings or a running average. The idea above is not bad as well.
Can you recommend a brand or site or type?
Thanks