Go Down

Topic: Servo Control (Read 4603 times) previous topic - next topic

zoomkat

People really need to do a reality check on servo based cam pan/tilt systems. Nobody can expect to get a $15 hobby servo pan/tilt to compare to a $1.5k servo pan/tilt, or a $150k professional cam conrol system. As to hobby servo based pan/tilt systems, the quality of operation depends a lot on the quality of design and control used in the construction.

http://www.servocity.com/html/pt-2100_pan__tilt_system.html
http://www.servocity.com/html/pan_tilt_roll___accessories.html
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

jraskell


I tired 1000 delay after the attach, I should do that after the command to, didn't try that.

I will try thanks.


You should try to make your code a little smarter about how much delay it needs.  All servos have an advertised speeds, typically in seconds per 60º (which has always seemed rather odd to me, but that's the standard).  A bit of quick math can give you a value of say, milliseconds per degree.

So say your servo takes 0.17 second to rotate 60 degrees (that's fairly typical for a hobby servo, not too fast, not too slow).  That is 170ms to rotate 60º or 170/60 = 2.83ms to rotate 1º.   Round that up to 3ms per degree.

As long as you keep track of your current position, and your target position, you can easily calculate how long it will take for your servo to move to the new position.

I'd also recommend handling the pan & tilt together.  That way it pans and tilts at the same time, one synchronous, smooth operation, as opposed to first panning, then tilting serially.

PaulS

Quote
which has always seemed rather odd to me, but that's the standard

Given the typical use for a hobby servo, such as steering a car, positioning a rudder, operating as a throttle, etc., 60 degrees is generally the full range that the servo needs to sweep. How much throttle travel do you have, and how much servo movement is required to make the throttle travel that far?

jraskell


Quote
which has always seemed rather odd to me, but that's the standard

Given the typical use for a hobby servo, such as steering a car, positioning a rudder, operating as a throttle, etc., 60 degrees is generally the full range that the servo needs to sweep. How much throttle travel do you have, and how much servo movement is required to make the throttle travel that far?


Well there you go.  Makes more sense knowing that.  Guess I've never used hobby servos in the manner they were designed for. :)

Go Up