EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Controlling 16 RC servo motors simultaneously

Started by RC servo April 21, 2004
Is there any C code for ATMEL's AVR micro controllers to read servo motor
position data from a serialport and control 16 RC servo motors
simultaneously?



"RC servo" <RC Servo> wrote in message
news:408658dc$0$442$afc38c87@news.optusnet.com.au...
> Is there any C code for ATMEL's AVR micro controllers to read servo motor > position data from a serialport and control 16 RC servo motors > simultaneously? >
There is plenty of code out there for 8 channels. Why not use two AVRs? Peter --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/04
Thank you for the idea. Would you tell me where can I find C code for AVR to
drive 8 RC sermo motors?

> There is plenty of code out there for 8 channels. Why not use two AVRs? > > Peter
"RC servo" <aaa> wrote in message news:<40867284$0$16964$afc38c87@news.optusnet.com.au>...
> Thank you for the idea. Would you tell me where can I find C code for AVR to > drive 8 RC sermo motors?
Most AVRs include 8 A/D channels for reading the servo pos. However, you would need external D/A to drive the motors. Your C codes depend on your external hardware.
> > > There is plenty of code out there for 8 channels. Why not use two AVRs? > > > > Peter
"Edward Lee epl" <me@linnix.com> wrote in message
news:c6a6fa27.0404211206.8f7b765@posting.google.com...
> "RC servo" <aaa> wrote in message news:<40867284$0$16964$afc38c87@news.optusnet.com.au>... > > Thank you for the idea. Would you tell me where can I find C code for AVR to > > drive 8 RC sermo motors? > > Most AVRs include 8 A/D channels for reading the servo pos. However, > you would need external D/A to drive the motors. Your C codes depend > on your external hardware.
Actually you need digital signals to drive the RD servo. No need for a D/A at all. SioL
On 2004-04-21, Edward Lee  epl <me@linnix.com> wrote:
> "RC servo" <aaa> wrote in message news:<40867284$0$16964$afc38c87@news.optusnet.com.au>... >> Thank you for the idea. Would you tell me where can I find C code for AVR to >> drive 8 RC sermo motors? > > Most AVRs include 8 A/D channels for reading the servo pos. However, > you would need external D/A to drive the motors.
No, the servo-motors are controlled by a pulse train. You feed them a stream of pulses, where each pulse is between 1 and 2 ms wide, and the pulses repeat with about a 20ms period.
> Your C codes depend on your external hardware.
You don't need external hardware. You just need to generate digital pulses -- 5V logic levels should work fine. -- Grant Edwards grante Yow! After this, I'm going at to BURN some RUBBER!! visi.com
"RC servo" <aaa> wrote in message
news:40867284$0$16964$afc38c87@news.optusnet.com.au...
> Thank you for the idea. Would you tell me where can I find C code for AVR
to
> drive 8 RC sermo motors? > > > There is plenty of code out there for 8 channels. Why not use two AVRs? > > > > Peter > >
Have a look at the Dontronics web site at http://www.dontronics.com/8515.html. This example is an 8 channel RC servo driver but it's written in assembler. A little work would get that translated into C. Peter --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/04
The only one's I know of is using one of the  www.newmicros.com ISOPOD's or
ServoPod's.
They run upwards of 23 servos no problem. They have code examples too. You
use the serial port to program and you can send commands to it if you
program it so.

You could also do it using some of the AWC
http://www.al-williams.com/pak8.htm
PAK-8 pulse out co-processors too.


"RC servo" <RC Servo> wrote in message
news:408658dc$0$442$afc38c87@news.optusnet.com.au...
> Is there any C code for ATMEL's AVR micro controllers to read servo motor > position data from a serialport and control 16 RC servo motors > simultaneously? > > >
Have you tried asking this as www.avrfreaks.net?

"RC servo" <RC Servo> wrote in message
news:408658dc$0$442$afc38c87@news.optusnet.com.au...
> Is there any C code for ATMEL's AVR micro controllers to read servo motor > position data from a serialport and control 16 RC servo motors > simultaneously? > > >
> Have a look at the Dontronics web site at > http://www.dontronics.com/8515.html. > This example is an 8 channel RC servo driver but it's written in
assembler.
> A little work would get that translated into C.
It's easily extensible to 16 channels as is. The servo positions are stored as data in ram, and there are interrupt driven serial routines in the same package, so in the main loop it would be trivial to parse out some language like S1=128 and stick the appropriate value in ram for the next update.

Memfault Beyond the Launch