Servo jitter using hservo command

Hi, after fixing my connection problems i can connect and program my new BasicAtom Pro 28 on BotBoard2.

I tried several little test programs and everything seems to work fine (playing sounds to the speaker, flashing LED´s, etc.)

But i have a problem controlling a servo.

My setup is as follows:

  • 6V NIMH pack on VS connector
  • jumper set at VS/VL
  • jumper set for LED´s and Speaker
  • jumper for connecting P0-P3 to VS
  • Servo Hitec HS-225 MG connected to P0

I load the following program (using IDE 8.0.1.7):

enablehservo
main
low P14
pause 3000
high P14
low P13
hservo [p0\0\0]
end

After Programming the yellow led light up.
After 3 seconds the green led comes on and the servo starts jittering heavily around the center position for about 2 seconds.
Then it stops jittering.

After switching off and on the power the servo moves fast to a position almost to the end (counterclockwise) and then (after 3 secs.) moves quickly to near the center position, heavily jittering.

Do i have to define some additional settings ?

I already read this: lynxmotion.net/viewtopic.php?t=4631&start=15

Any idea ?

Thanks,

kultakala

first observation is that the HS-255MG is an analog servo and for the first 3 seconds of having power applied there is no valid signal going to it. Having said that, diving for an end-stop is completely typical for an analog servo without a valid input signal.

second observation, sort of a question actually, is that if you actually end the program does the hservo command continue to produce output pulses? I don’t now the answer but if it doesn’t then, uh, see observation 1. You could try just making a loop at the end to hang the program up without actually ending it to see if there is a difference.

Just a hunch but are you powering the servo from 5vdc or VS? You may want to power the VL terminal with a 9vdc battery and remove the VS=VL jumper. This will isolate the servo power fro the logic power.

I powered the servo from VS… but with no extra VL power.
Both were powered by a 6V NIMH pack.
I do not have any 9V battery, but to test it i “tinkered” 6 eneloop accus together so i had almost 8 volt and connected them to the VL input.
And it worked!
The servo moves not as smooth as i thought it would but it is not jittering anymore.

So thanks a lot again!

:smiley:

Cheers,

kultakala