Loading...
Pages: [1]   Go Down
Author Topic: PWM for 14 Servos using UNO  (Read 550 times)
0 Members and 1 Guest are viewing this topic.
Newcastle, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

 
« Last Edit: March 09, 2011, 02:36:41 pm by Hasan999 » Logged

Global Moderator
UK
Online Online
Brattain Member
*****
Karma: 143
Posts: 19366
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Pete, it's a fool looks for logic in the chambers of the human heart.

Newcastle, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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
Logged

0
Offline Offline
Tesla Member
***
Karma: 58
Posts: 6774
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
GOOGLE ADVANCED FORUM SEARCH BELOW!  
Go to:  http://www.google.com/advanced_search?hl=en
put in key search words,
use site or domain:  http://arduino.cc/forum
or in a google search box put key words site:http://arduino.cc/forum

Central Europe
Offline Offline
Edison Member
*
Karma: 5
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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
« Last Edit: March 10, 2011, 05:38:27 pm by Korman » Logged

Newcastle, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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
Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 5
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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
Logged

Pages: [1]   Go Up
Print
 
Jump to: