0

Image of my setupI am making a simple bipedal robot. I have four 9g servos connected to my uno. Whenever I try to even do the simplest command, like move right foot 45 degrees it does not work properly. I have tried on my second Uno and i have the same result.

My program for testing the servos:

#include <Servo.h>
Servo myservo;
void setup(){
myservo.attach(6);
}
void loop(){
 myservo.write(45); 
}

Each servo wire is attached to a breadboard where they all share power and ground from the arduino. Each servo wire then has another wire going to pins 3,5,6 and 9.

Does anyone know what the problem is and what I can do? Thanks

asked Jul 12, 2016 at 10:01
3
  • 2
    Maybe it's your wiring. Maybe it's the servos. Maybe four servos are too many for a single Uno to power. Please show your schematic. Commented Jul 12, 2016 at 10:05
  • 2
    Powering one micro-servo through the +5V pin of the Uno should be OK, and I would expect the program you posted to work. Powering four of them may be too much, especially if they are somewhat loaded. Commented Jul 12, 2016 at 11:24
  • 1
    Please let us know how the +V and 0V connections to the servos are made. Ideally they should be connected to an external battery or something similar. Commented Jul 12, 2016 at 12:02

2 Answers 2

0

An Arduino is not capable of powering four servos. Power them externally, but make sure the ground of the Arduino and servos is connected.

answered Jul 12, 2016 at 10:16
13
  • This has done nothing. Also I believe an arduino can power four servos but I tested it anyway. Commented Jul 12, 2016 at 10:22
  • Could you share your current setup of the servos and the Arduino? Commented Jul 12, 2016 at 11:17
  • Have you even tried powering the servos externally? Commented Jul 12, 2016 at 11:59
  • 1
    I don't think this answer should have been marked down - the arduino's regulator really isn't suitable for directly supplying power to that many servos as Len has said, partly due to electrical noise etc. Commented Jul 12, 2016 at 12:00
  • 2
    I strongly advise against using the Arduino Uno to power your servos. The maximum current of the VCC and GND pins is 200 mA according to their official documentation. You can go over a bit, but 500 mA? That's just asking for a failure in your Arduino device. Power the servos from an external power source, connect the grounds of the servos and the Arduino and you're good to go. Commented Jul 12, 2016 at 12:57
1

As others have said, the Arduino cannot drive 4 servos - my experience is that it can have problems powering one if you try to move it too often due to the voltage drop caused by the high current consumption. When you move a servo the power consumption rises considerably. A large (220uF or more) capacitor near he servo can help, but even so, by far the best option is to supply the servos from a separate supply.

If the Uno resets when you try to move the servos (especially multiple times per second) then the power supply is most likely your culprit.

answered Apr 2, 2017 at 22:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.