Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Iron Man on January 30, 2009, 04:46:28 PM

Title: Explanation of Axon and 29 servos
Post by: Iron Man on January 30, 2009, 04:46:28 PM
I was reading the specs on the axon it says that you have up to 29 servos

but only 9 pwms

how are the other 20 servos controlled?
Title: Re: Explanation of Axon and 29 servos
Post by: Canabots on January 30, 2009, 05:07:33 PM
Servos aren't only controlled using PWM. They can also be controlled using delayed high/low pulses as a loop:

start loop
servo_output = 1
delay for 1.5 ms
servo_output = 0
delay for 18 ms
end loop

Does this help as an explanation?

Canabots
Title: Re: Explanation of Axon and 29 servos
Post by: Iron Man on January 30, 2009, 05:14:09 PM
mmmmm i c

i thought that might have been a possibility, but i wasn't sure that would be accurate enough.
Title: Re: Explanation of Axon and 29 servos
Post by: izua on January 30, 2009, 09:19:29 PM
You can't use delays to control several servos at once.It can be done, sure, but you'll need a smarter algorithm, like SSC-32 uses.
Title: Re: Explanation of Axon and 29 servos
Post by: Admin on January 31, 2009, 07:32:08 AM
You can't use delays to control several servos at once.It can be done, sure, but you'll need a smarter algorithm, like SSC-32 uses.
Yea you can :P

Lets say you have 30 servos. Each servo on average will waste 1.5ms as a delay. And lets say the rest of your program uses another 10ms. That means 55ms passes between each command sent to a servo.

No problem!

It is however very wasteful in processing cycles, so that's when you use interrupts. In theory you can control dozens of servos in under 3ms if you use interrupts. But interrupts are hard to debug if a problem comes up, so I don't encourage beginners to use them.