Go Down

Topic: Humanoid robot servo issues (Read 3937 times) previous topic - next topic

Bcarroll

Sep 07, 2012, 07:41 pm Last Edit: Sep 07, 2012, 08:22 pm by Bcarroll Reason: 1
I am attempting to build a humanoid style robot but am running into some issues with my servos.  The servos I am using are the cheapest I could find (EXI S1123).  I currently have 9 servos hooked up to my Arduino.  The servos and Arduino are powered by a shared AC/DC wall adapter (9v 2A), the servos are not using the power from the Arduino...  The power to the servos is connected through a 7805 voltage regulator.

I have some code to take input from serial and move each servo to the specified position.  The problem is that when I apply power, some of the servos buzz.  I am able to move 1 or 2 servos, but the others don't respond.  I do hear an audible click when I set the servo position though.  I read online somewhere that servos draw a considerable amount current when they are stalled or under a load.  Does the buzzing/clicking sound imply that the servos are stalled or under load or is something more simple going on here?

zoomkat

Quote
Does the buzzing/clicking sound imply that the servos are stalled or under load or is something more simple going on here?


Could be a lot of things. You would probably need a 7805 for each servo for adequate power (also you need closer to 6v than 5v for the servos to operate well). You may be using bad or inappropriate code to control the servos. You may have damaged your servos. I suggest you test the servos one at a time to see if each operates appropriately. Below is simple servo test code.

Code: [Select]

// zoomkat 10-22-11 serial servo test
// type servo position 0 to 180 in serial monitor
// or for writeMicroseconds, use a value like 1500
// for IDE 0022 and later
// Powering a servo from the arduino usually *DOES NOT WORK*.

String readString;
#include <Servo.h>
Servo myservo;  // create servo object to control a servo

void setup() {
  Serial.begin(9600);
  myservo.writeMicroseconds(1500); //set initial servo position if desired
  myservo.attach(7);  //the pin for the servo control
  Serial.println("servo-test-22-dual-input"); // so I can keep track of what is loaded
}

void loop() {
  while (Serial.available()) {
    char c = Serial.read();  //gets one byte from serial buffer
    readString += c; //makes the string readString
    delay(2);  //slow looping to allow buffer to fill with next character
  }

  if (readString.length() >0) {
    Serial.println(readString);  //so you can see the captured string
    int n = readString.toInt();  //convert readString into a number

    // auto select appropriate value, copied from someone elses code.
    if(n >= 500)
    {
      Serial.print("writing Microseconds: ");
      Serial.println(n);
      myservo.writeMicroseconds(n);
    }
    else
    {   
      Serial.print("writing Angle: ");
      Serial.println(n);
      myservo.write(n);
    }

    readString=""; //empty for next input
  }
}

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

PaulS

Quote
I currently have 9 servos hooked up to my Arduino.  The servos and Arduino are powered by a shared AC/DC wall adapter (9v 2A)

Depending on the servos, and the number that are moving/holding position at once, 2 A may not be anywhere near enough current.
The art of getting good answers lies in asking good questions.

goofballtech

In addition to the current. Building a humanoid robot means whatever servo's are at the base of its "appendages" need to have enough turning force to be able to support the weight of the appendiage which includes the weight of the servo mounted to the other joint.

ex: the shoulder need to be able to support the whole arm, including the weight of the elbow and wrist servos. With "the cheapest I could find" servos this may not be the case.

Bcarroll

I got a little further.  I hacked up an old ATX power supply and tried using the 5v line from one of the molex connectors.  I can get the left arm to move (shoulderX, shoulderY, elbow, wrist), but none of the others respond.  I think I will try the 5v line from the motherboard connector.  I think I read the molex connector has 5 amps, but the motherboard connector has much more available.

P.S. The servos and mounting hardware are very light weight, the whole thing weighs less than 1 pound.  For now I am only working with the upper body (arms and chest).

Far-seeker


I got a little further.  I hacked up an old ATX power supply and tried using the 5v line from one of the molex connectors.  I can get the left arm to move (shoulderX, shoulderY, elbow, wrist), but none of the others respond.  I think I will try the 5v line from the motherboard connector.  I think I read the molex connector has 5 amps, but the motherboard connector has much more available.

That sounds like a good next step.  As zoomkat mentioned, and unlike many other projects, the servos must act as an integral part of the physical structure.  It isn't unusual for each small servos to draw between 1 A to 2 A when most of them are supporting the weight of themselves and/or other servos.  So you'll want your power supply to provide a maximum about 2 A per servo, just to avoid the possibility of starvation if the majority of them are moving at the same time.  Depending on exactly how much current the 5 VDC line to the motherboard can supply, you may have to use the 5 VDC on the peripheral power cables (you called them molex connectors) for a couple of the servos. 

Another thing to keep in mind is because of the way current divides in parallel, you could tie all your 5 VDC from the peripheral power cables together and the current draw would be distrubuted approximately equally through each of the cables.  If you are planning to have the power return to PSU via those cables, remember to do this with the grounds as well.  For example, if you have four peripheral power cables you could have a total current of 18 A to the servos without drawing excessive current through any individual cable.

zoomkat

You should consider the operating voltage for your servos. 5v is only .2v above the minimum operating voltage for most hobby servos (4.8v). If you expect decent operation of the servos under load, you should consider using ~6v. Significant difference in performance.
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

Go Up