Go Down

Topic: Using Multiple Servos with Arduino (Read 28669 times) previous topic - next topic

zoomkat

Quote
like varistor..
Can you explain just what the "varistor" is?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

jack1992

Hello to everyone.I have 6 servos and Arduino Uno.The connection that i make is 3,5,6,9,10,11(all the PWM of Arduino).It will be a problem?Thanks in advance.

PaulS

Hello to everyone.I have 6 servos and Arduino Uno.The connection that i make is 3,5,6,9,10,11(all the PWM of Arduino).It will be a problem?Thanks in advance.
Servos are NOT driven using PWM (the way Arduino does it), so there is no need to use just PWM pins.

jack1992

Servos are NOT driven using PWM (the way Arduino does it), so there is no need to use just PWM pins.
ok thank you sir

redbird

I am trying to use 2 servos but it is not working. When I connect only one servo, it works properly. When I connect the second servo, both servos get very erratic and after a few movements they drive to a limit and stay there. If I disconnect one servo control wire, the remaining servo acts normally again.

I initially tried this on a Diecemilia and thought maybe it was caused by an old board. I swapped out for an Uno but get the same result.

Servos are powered by an external 5V power supply; ground of power supply connected to Uno and servos.

The code is as simple as I could get, just trying to get the system to work.

Code: [Select]
#include <Servo.h>

Servo sideservo, forwardservo;  // create servo object to control a servo

void setup() {
  sideservo.attach(9);
  forwardservo.attach(10); 
}

void loop() { // minimal movement to avoid damage to system
  sideservo.write(60);
  delay(1000);
  forwardservo.write(80);
  delay(1000);
  sideservo.write(90);
  delay(1000);
  forwardservo.write(100);
  delay(1000);
}


Any idea what is going on here?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy