Go Down

Topic: Soft start and stop (Read 442 times) previous topic - next topic

ekscden

New to Arduino and loving it.  Has anyone tackled how to speed up and slow down a servo as it nears a certain position to give it a soft start/stop?  I've been running a loop to increase the delay as it passes a certain position.  Just wondered if this was the most efficient or if there is a fancy formula I'm not aware of.

retrolefty


New to Arduino and loving it.  Has anyone tackled how to speed up and slow down a servo as it nears a certain position to give it a soft start/stop?  I've been running a loop to increase the delay as it passes a certain position.  Just wondered if this was the most efficient or if there is a fancy formula I'm not aware of.


Not likely. The arduino cannot know the exact position of a servo while it's actually moving as there is no feedback of position given back to the arduino, and different servos move at different speeds and any specific servo's speed will be effected by the mechanical load that it is trying to move. So at best if you observe your specific servo's speed you could perhaps come up with a worst case speed for a give amount of commanded change of position and wait that long before issuing another position command.

Lefty

sbright33

This is possible.  First calculate the actual speed when going from end to end.  Then write a function to move 1 degree at a time less than that speed.  Move the first few degrees slower, then just under the max, then slower again.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Go Up