Andrés Briano
Member
I have gone through many posts that claim to have servo jitter problems, and even though I did find some solutions, none seemed to work for me. My particular problem can be seen here.
My circuit is composed of:
-Picaxe 18X in a breadboard.
-A hacked 2 axis analogue joystick.
-2 Futaba S3003 servos.
-(I was wondering if adding capacitors somewhere would help my problem. My experiments turned out useless.)
The pots in the joystick get 5VDC and 0VDC in each end and each wiper is fed via 330 ohm R to 2 ADC pins. That value is mathematically translated to servo values in the code and then fed to the 2 servos. They have their own PS.
Here´s the code:
init:
servo 4,75
servo 5,75
main:
readadc 1,b1
readadc 0,b0
let b2=b0/2+75
let b3=b1/2+75
servopos 4,b2
servopos 5,b3
goto main
As far as I can tell, the jitter is caused by the instability of the ADC reading coming from the joystick, even when I don´t touch it. The best I can think of, is writing code to round up the values. According to the debug screen, my instability is smaller than value 5 (inside of the 0-255 range).
Any ideas, community? H-E-L-P!
My circuit is composed of:
-Picaxe 18X in a breadboard.
-A hacked 2 axis analogue joystick.
-2 Futaba S3003 servos.
-(I was wondering if adding capacitors somewhere would help my problem. My experiments turned out useless.)
The pots in the joystick get 5VDC and 0VDC in each end and each wiper is fed via 330 ohm R to 2 ADC pins. That value is mathematically translated to servo values in the code and then fed to the 2 servos. They have their own PS.
Here´s the code:
init:
servo 4,75
servo 5,75
main:
readadc 1,b1
readadc 0,b0
let b2=b0/2+75
let b3=b1/2+75
servopos 4,b2
servopos 5,b3
goto main
As far as I can tell, the jitter is caused by the instability of the ADC reading coming from the joystick, even when I don´t touch it. The best I can think of, is writing code to round up the values. According to the debug screen, my instability is smaller than value 5 (inside of the 0-255 range).
Any ideas, community? H-E-L-P!