piclist 2008\07\15\160421a >
Thread: Servo control questions
www.piclist.com/techref/microchip/ios.htm?key=servo
face picon face BY : email (remove spam text)(Olin Lathrop)



threewheeler7 wrote:
> Hello i am working on a project that will control up to 6 analog R/C
> servos, 2-3 at the same time, i have a couple questions on how i
> would implement
> this on a PIC. first, as you may know rc servos are used with PWM, to
> control them, i need to know what is a good way to go about
> controlling more
> than 1 PWM output and still running the rest of the code.

If you only need two, then using two CCP modules is probably easiest.
Otherwise I would look into multiplexing the output of a single CCP module
used in one-shot mode and getting to each servo successively.  They'll be
fine as long as you get to each one every 20mS or so, which should allow you
to drive up to 10 from one CCP output with a little external multiplexing
hardware.

> i was thinking,
> keeping the off time the same for all the motors, and have a timer
> overflow
> interrupt, update each motors position(on time),

Doesn't sound like a good idea.  What if two servos need about the same
pulse time, then at least one of them will be off or jitter.

> also speed control is an issue, i would like to have
> positioning time slowed down a bit.

That's easy.  Low pass filter the incoming position requests, or never
change them by more than a fixed value each pulse until the pulse width
finally matches the requested value.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
<005301c8e6b6$3e1662f0$0300a8c0@main> 7bit

See also: www.piclist.com/techref/microchip/ios.htm?key=servo
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Servo control questions

month overview.

new search...