Go Down

Topic: Servo speed control/variation smoothly with Arduino (Read 2 times) previous topic - next topic

Cylindric

Interesting.  Are you moving your camera one step, then stopping for a noticeable while, then another step, etc?  Or is it a smooth-but-slow pan?  I'm just curious if the momentum of the kit would keep it smooth enough, even at 1 degree steps.

Have you tried it?  I only ask, as the risk of prematurely 'optimising' the thing to milli-degree angles might not be necessary.
Current Projects: Rodentometer - Hamster Endurance Moni

Cylindric

Forgot to add, if it is, then you could experiment by sending your own pulses to the servo using your own timings.

Look in the Servo.cpp include to see how it's done.  Some scary timing considerations in there :)

Oh, or try the Servo.writeMicroseconds() instead.  That allows for fine-grained control, you just need to know your servo's parameters.
Current Projects: Rodentometer - Hamster Endurance Moni

digitAlex


Interesting.  Are you moving your camera one step, then stopping for a noticeable while, then another step, etc?  Or is it a smooth-but-slow pan?  I'm just curious if the momentum of the kit would keep it smooth enough, even at 1 degree steps.

Have you tried it?  I only ask, as the risk of prematurely 'optimising' the thing to milli-degree angles might not be necessary.


My need is to have a smooth-but-slow pan. The camera gimbal is a part of an hexacopter drone for aerial video. For pan rotation I modified a servo removing the potentiometer for a continous movement up to 360°, speed is controlled directly by the radio proportionally to the stick. But for tilt I can't do the same because I need to limit the maximum angle to 180°, so in this case I think that smooth-but-slow movement is the right solution.

I found this library: http://arduino.cc/forum/index.php/topic,61586.0.html
Does anyone tried it?

Cylindric

Not me, but check out the writeMicroseconds.  It would seem to offer the sub-degree rotation you require.
Current Projects: Rodentometer - Hamster Endurance Moni

Go Up