0
$\begingroup$

First time asking a question on this Stackexchange, I hope I don't sound too dumb...

My daughter saw a documentary about robots and immediately asked me to build her a robotic arm. I found a nice one on Thingiverse: https://www.thingiverse.com/thing:2433

I'm done building it and I just finished wiring it up. I want to drive it from one of the Arduino Unos I have lying around at home. Starting the Sketch from the example found at Arduino.cc (https://www.arduino.cc/en/Tutorial/Knob) something unexpected happened when I connected just one of the DC servos it has (I haven't connected any other): as I plugged it on the board nearly ALL seven servos have begin to move erratically and for no reason at all. Not just the one I was trying to calibrate, but most of the. Even if the PWM cable of the motor was not even near to the Arduino pin.

The setup I have, is approximately the followingenter image description here

If someone could help me to understand what's missing, I would greatly appreciate it. Again, please be kind. I'm just a hobbyist trying to make my little girl happy.

Thanks in advance!

$\endgroup$
1
$\begingroup$

Short answer: your power supply is insufficient. You would be better off using a common wall wart charger.

If the servos are connected properly, they can move under three conditions: when they are first connected to power, when the power supply is insufficient, and when they are commanded to move. If you are using 4 AA batteries to control 6 or 7 standard servos, then I bet you don't have enough amps from those batteries.

When they are first connected (or re-connected) to power, they can move to the last position they were set at. Sometimes the servo head can be rotated (often accidentally) when the servo is off; so those heads will move back when they receive that power. They should stop once they have returned to that position. I'm not certain if they move to a location stored inside the servo's circuitry, or if that location is stored on the control board - it would make a difference, but either way this movement lasts maybe a tenth of a second so it's not really important.

Your case: BUT, when the power supply is insufficient, things can get weird - very weird. I've had servos jump up and down (when lifting a light load) as the batteries struggle to provide enough power. The servo was commanded to lift and did so for a bit, but then reached an angle where it didn't have sufficient torque, so the load fell instead, and this used the motor as a generator and pushed electricity back towards the batteries. After the load had fallen, less force was required to start the lift again and some of that returned power could be used, so the arm went up again - and the process repeated. AA batteries have decent amp-hours (which we incorrectly use to indicate total capacity), but really bad amperage (the actual flow rate of the energy). In fact, for usage at 1 amp, they absolutely suck. And with that many servos, you probably need 2 amps or more.

Otherwise, if the servos are moving on their own, then they are receiving a command from somewhere. It's possible/probable that they are not connected correctly, and thus are receiving signals when you don't think you are sending them. I think your diagram is correct - but keep in mind that the wiring color on these things isn't actually standardized (most of my servos are brown-red-orange, some are black-red-yellow, and some are black-red-white). It's easy to have something in backwards.

Fun fact: most wall wart chargers are 5v or 6v, and 2 amps. The specs should be printed somewhere on the charger. You can use one instead of (or in addition to) the batteries, at least if they are the same voltage. If you need more than that (and for an arm, you will), I suggest a dedicated power supply. You can get a 6V 10Amp (or 5Amp would be sufficient) supplies from Amazon/wherever fairly cheap. Or if you have a spare old computer sitting around, the computer's power supply has a +5V output with very good amperage if you want to use it.

Source: the chart on the lower-right of the first page of Duracell's AA datasheet: http://media.professional.duracell.com/downloads//datasheets/product/Ultra%20Power/Ultra-Power_AA_MX1500.pdf that shows that AA cells, at 1.5V and 1000 mA, have a service life of practically no time at all. At anything above 100 mA, they are incredibly ineffective. Alkaline cells simply don't have the chemistry to deliver high current and high voltages at the same time.

$\endgroup$
  • 1
    $\begingroup$ Many, many thanks for such an insightful answer. I really appreciate the tike it took you. The servos did move erratically without my input. As I upgraded the power input, everything went to normal. Thanks again. $\endgroup$ – Felix Hauser Dec 18 '17 at 8:26
0
$\begingroup$

I'm not sure what the design behavior is with no reference input, but that might be a contributing problem. The servo is expecting a pulse every 20ms. It might also be that your battery pack is dead. It might also be that they're wired incorrectly.

Please measure and report the voltage on the battery pack output while the servos are jittering. Please also take an actual picture of your setup and post the actual code you're using.

My guess is the battery pack is (near) dead and not supplying the correct voltage.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.