Servo contoller

I am using the 8 servo controller with the Parallax basic stamp 2.
When ever I send a command that turns on the servos like
SEROUT 0, 84, [128, 1, 2, 1, 30] the servos are fisrt turned on and with a sudden fast move they are sent to their neutral positions. Finally they are moved to the position that I requested in my code. This only happens the fist time the servos are turned on. THe set position commands sent after this work normal.

I would like to avoid this sudden reaction.
Am I missing on something or doing something wrong.
Any help ?



The behavior you are seeing happens when the servo speed is set to something other than 0, meaning that the servo controller is trying to make a servo move slower than its full speed. This speed reduction is accomplished by gradually changing the pulse width sent to the servo. For example, if a servo is at position 10 (in some arbitrary unit), and you send a request to move to position 20, the servo controller sends out 10, 11, 12, … 18, 19, 20.

The problem with the first position command you send is that the servo controller has no “current position” from which to gradually move toward the new position. So, if you send a command to go to position 20, the servo controller starts at neutral, which we’ll call 15, and moves from there: 15, 16, 17, 18, 19, 20. The servos thus jump to neutral and gradually move to position 20.

To avoid this effect, you can send the first position command to go to 20 (or whatever your first position is). The servo controller (and servo) will immediately go to position 20. Then, you can set the speed to whatever you need, and all subsequent movement will be at the speed you set (the same behavior you are seeing now).

We have had requests in the past to make our servo controller capable of moving slowly to the first position. However, this is not possible because the servo controller does not know the position of a servo when your system powers up. There will always be some first position that the servo controller sends out, and if the servo is not there already, the servo will jump to the position. What you can do to limit any initial kick from your servos is to go to known, power-down positions before turning off your system. Then, on power up, send commands to move the servos to the same power-down positions. The servos will then get back to life without a jolt, and any subsequent movements can be done slowly.

- Jan