PWM for 14 Servos using UNO

Hi, I am planning to buy an arduino uC. [My budget is very limited so my first preference is UNO]

I want to know if it is feasible to control 14 (or at least 12) Servos simultaneously using PWM on Arduino UNO?

My main concern is the "unnecessary delays" - i.e. I want to pulse each servo after every 20ms (but would my programming/instruction delays cause the loop to exceed 20ms?)

..and what (other) problems I could face? - are there any examples of 14 servo robot/tutorial/source-code for UNO?

Thanks !


Additional details if required:
8 High torque servos (that I want to keep tight - 20ms exact)
4 Continuous rotation servos (wheels)
2 Micro-servo low torque
Max number of servos controlled at a time would be 8.

I want to know if it is feasible to control 14 (or at least 12) Servos simultaneously using PWM on Arduino UNO?

I'd go for PPM, not PWM
At least 12 is supported by the servo library.

@AWOL: Thanks.. but I am still confused..
Is it feasible to control 14 Servos using PWM on Arduino UNO?
btw, I will be using 8 x Cirrus CS601 servos - they can support PWM right?

Can anyone provide a link with a project already done on UNO using multiple servos?

Thanks

Is it feasible to control 14 Servos using PWM on Arduino UNO?
btw, I will be using 8 x Cirrus CS601 servos - they can support PWM right?

Servos use PPM, so if you have to ask the question about using PWM with the servos, the answer probably is that it will be difficult for you to do.

Hasan999:
@AWOL: Thanks.. but I am still confused..
Is it feasible to control 14 Servos using PWM on Arduino UNO?
btw, I will be using 8 x Cirrus CS601 servos - they can support PWM right?

Hasan,

the Cirrus CS601 look like plain vanilla hobby servos for remote controls. The best way to drive them with the Arduino is to use the Servo library already included in the distribution. Forget about all those acronyms.

By default the Servo library can drive up to 12 servos per 16bit timer, which for the Uno means, you can control 12 servos without any trouble. The Arduino Mega can drive up to 48 servos.

If you modify the Servo library, you might be able to drive also 14 servos, although the refresh time might get a too long for some servo models. It's a matter ot testing it out if it works well enough in your setup. Given your level of experience, I would advise against trying this, it will only lead to heartache and pain.

One more thing, don't forget to provide a separate power supply for all your servos. The voltage regulator on the Arduino won't be able to deliver enough current for them.

Korman

Thanks a lot Korman ! ..also for the 'direct battery supply' advice :slight_smile:

In order to make it 12 servos, I am planning to use 10 PWMs for 10 Servos, but 2 specific PWM signals to drive the remaining 4 servos, because (out of 14) there are 2 servos that will always have the same orientation as another 2 servos. i.e. I will be connecting one PWM signal wire from a pin, with the yellow (signal) wires of two different servos (twice).

Please correct me if I am wrong

@Viewers: Please help me find some existing examples of robots using 10+ servos on UNO - Thanks !

Thanks

Hasan999:
Thanks a lot Korman ! ..also for the 'direct battery supply' advice :slight_smile:

In order to make it 12 servos, I am planning to use 10 PWMs for 10 Servos, but 2 specific PWM signals to drive the remaining 4 servos, because (out of 14) there are 2 servos that will always have the same orientation as another 2 servos. i.e. I will be connecting one PWM signal wire from a pin, with the yellow (signal) wires of two different servos (twice).

Please correct me if I am wrong

Yes, you are totally wrong and you really should stop using acronyms you don't understand. To repeat for the uninitiated:

On the Arduino you control hobby servos only with the Servo library and you never, never use the hardware PWM on them. It simply wont work otherwise.

So please, forget about PWM or PPM when speaking about those hobby servos of yours. It'll create only confusion in your mind.

Also, drive all your servos with the Servo library, you don't have the knowledge to drive servos with your own code directly. If you need more than 12 servos, get an Arduino Mega.

As to the example, use Google and look for Arduino and Hexapod robot. They use lots of servos, usually 2 per leg for a total of 12.

Korman