Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumWiring HardwareTroubleshooting › multiple servos

Page Index Toggle Pages: 1
multiple servos (Read 7222 times)
01/09/08 at 16:45:27

tomek   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 4
*
 
I'm using the standard servo library. everything goes well if I use up to 7 servos. However, when I connect the 8th one it goes crazy! all previous servos stay still and the 8th one starts to jump back and forth...

Any ideas what's wrong? Is it a bug of the servo library?

btw. I saw there are libraries for arduino to drive an unlimited number of servos. did anyone try these out on wiring?
 
IP Logged
 
Reply #1 - 01/09/08 at 17:21:40

Titus   Offline
Full Member
Wiring Soccer Robot!
Amsterdam

Posts: 176
***
 
What code are you using?
Could you explain how you connected them?
that will help us find the problem
 

Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
 
Reply #2 - 01/10/08 at 10:13:48

tomek   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 4
*
 
For testing I have used a modification of the standard servo example [code below]. If I leave out the line myservo8.attach(15); and further calls to myservo8 it all works fine. Otherwise the whole thing goes crazy. I power the servos separately with a 2A power supply, grounded to the wiring board. I've also tried adding pull-down resistors just in case, but it doesn't change anything.

here's the code:
#include <Servo.h>
Servo myservo1, myservo2, myservo3, myservo4, myservo5, myservo6, myservo7, myservo8;
int pos = 0;

void setup()
{
myservo1.attach(8);
myservo2.attach(9);
myservo3.attach(10);
myservo4.attach(11);
myservo5.attach(12);
myservo6.attach(13);
myservo7.attach(14);
myservo8.attach(15);
}

void loop()
{
  for(pos = 0; pos < 180; pos += 1)
  {                                 
    myservo1.write(pos);
    myservo2.write(pos);
    myservo3.write(pos);
    myservo4.write(pos);
    myservo5.write(pos);
    myservo6.write(pos);
    myservo7.write(pos);
    myservo8.write(pos);
    delay(15);               
  }
  for(pos = 180; pos>=1; pos-=1)
  {                               
    myservo1.write(pos);
    myservo2.write(pos);
    myservo3.write(pos);
    myservo4.write(pos);
    myservo5.write(pos);
    myservo6.write(pos);
    myservo7.write(pos);
    myservo8.write(pos);
    delay(15);
  }
}
 
IP Logged
 
Reply #3 - 01/15/08 at 20:34:11

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi, your code seems correct, the problem is in the Servo library, I´ve just include the fix for release with 0014. Thanks.
 
IP Logged
 
Reply #4 - 01/27/10 at 21:37:47

Yaco Roca   Offline
YaBB Newbies
Bogotá, Colombia

Posts: 1
*
 
Hi, do you need additional power if you have over 1 servo? I need to hook up 24 servos to one wiring board and have it on permanently.
 
IP Logged
 
Reply #5 - 01/28/10 at 01:20:35

Andy   Offline
YaBB Newbies
Terre Haute, Indiana

Posts: 45
*
 
Yaco Roca wrote on 01/27/10 at 21:37:47:
Hi, do you need additional power if you have over 1 servo? I need to hook up 24 servos to one wiring board and have it on permanently.


Absolutely, the wiring board is not designed to handle the requirements of 24 servos.  Depending on the servo and the torque requirements you are probably looking at > 10 amps@5v.
 
IP Logged
 
Reply #6 - 01/29/10 at 23:52:45

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Yes you can, the new servo library support 24 servos on the Wiring hardware. It is available form version 23, btw, version 0024 is already there.
 
IP Logged
 
Page Index Toggle Pages: 1