7
\$\begingroup\$

So, please forgive me for the naiveté I'm most certainly going to exhibit here. I'm mostly a software guy, so this project is a little out of my comfort zone. Nevertheless:

Project

I have been given a Python script that sends commands to an Arduino board, which in turn runs a servo motor, turning a plate to which it is attached.

When I run this script, the plate is supposed to do 1 full rotation.

Problem

The motor doesn't turn. The script works, and the Arduino does get the proper commands, but the plate just sits. Here's the expected workflow:

  • Run script
  • Motor turns
  • Plate rotates 360 degrees

Here's the only workflow I can get to work:

  • Run script
  • Give plate a push
  • Motor turns
  • Plate rotates 360 degress

Background

There is nothing obstructing the motor or the plate. This exact setup has allegedly worked in the past. Because I've not had much experience with Arduinos and servos, I'm having a hard time pinpointing where to begin debugging this problem. Any help or suggestions would be most appreciated.

Hardware

Further Testing

About once out of every 5 times (20%), it will just work. No pushing or prodding; it just zips up to speed and rotates.

About once every 50 times (2%), it won't move at all, even with pushing. This, however, might be an issue with the script/Arduino communication.

\$\endgroup\$
  • \$\begingroup\$ Sounds like the servo has a hard time getting started. The start up current is likely to be much higher and you pushing it along helps it out. What is the PSU that you are using? Might it be under powered? \$\endgroup\$ – Kellenjb Mar 2 '12 at 17:10
  • \$\begingroup\$ @Kellenjb I've added the specific hardware. It looks like it should definitely be powerful enough to drive the plate. \$\endgroup\$ – Patrick Perini Mar 2 '12 at 17:47
  • \$\begingroup\$ Any chance you have a scope that you can put on the power lines to see what is happening to the voltage when it isn't moving? \$\endgroup\$ – Kellenjb Mar 2 '12 at 17:52
  • \$\begingroup\$ Not without dismantling some things that I don't have the authority to dismantle. Perhaps if I could assure my senior that it is a hardware problem, he would be willing to help out, but I would need to be sure first. \$\endgroup\$ – Patrick Perini Mar 2 '12 at 18:04
  • 1
    \$\begingroup\$ I don't see how this could possibly be a pure software problem. Pure software problems can rarely, if ever, be worked around by giving the hardware a nudge. \$\endgroup\$ – Ilmari Karonen Mar 4 '12 at 18:17
8
\$\begingroup\$

First, let me say that you didn't give enough information to say for certain what's causing the problem. Not a big deal, really, except that you have to understand that my answer may not be 100% correct.

The link to the Hobbico web site doesn't give much information about that servo. I "think" it says that it will pull 0.7 amps when running without a load. If this is the case, then you can assume that at startup or with a load (a.k.a. plate) it will consume more than 0.7 amps. This amount of current does not seem high to me, given the large size of the servo.

What we don't know is just how much more than 0.7 amps does the servo consume. A good guess is, "way more than 0.3 amps more". What this means is that you are likely drawing more current than what the 1 amp power supply can provide.

There are several things that could happen when the servo tries to consume more power than is available. Odds are that one or more of these things is happening:

  • Power Supply (PS) output dips, causing a loss of torque in the servo. This will make the servo stick until pushed.
  • PS output dips, causing the control electronics in the servo to reset.
  • PS output dips, causing the Arduino board to lock up or reset.
  • PS detects a fault and shuts off. It might turn back on immediately, or after a while, or not at all until it is unplugged and replugged.
  • PS gets damaged.

The simple way to see if any of this is happening is to put an o-scope on the output of the power supply. While you have the o-scope out, you might as well look at other signals, like the signals going to the servo. You could also try a different, more powerful, power supply but that is less informative.

\$\endgroup\$
6
\$\begingroup\$

Many years ago, I breadboarded a 555 circuit to control a Tower Hobbies standard servo. Under normal conditions, the servo drew about 250 mA in motion. When "buzzing" (unstable), it was drawing half-amp spikes and more.

What I learned: 1. Servos draw a lot of juice to turn the shaft through the gear train. I would never consider driving a standard servo from a power supply that could not deliver at least 1 amp continuous PER SERVO. 2. Servos put a LOT of trash onto their power supply leads. I would never consider driving a standard servo without putting roughly 250 uF across the supply leads, at EACH servo, to swamp out the trash (and supply startup inrush current).

The servos I've dealt with were happy with 5 V supplies.

Looking at the Hobbico datasheet, like the other guy said, your servo wants 700 mA (0.7 A) in continuous motion under no load. That's about three times what a standard servo wants. Your supply is rated for 1 A. My gut feeling is that your power supply is nowhere near stout enough to supply the servo's inrush current and keep the processor board happy. If your system will run off of a 5 V supply, I'd swap that 6 V, 1 A supply for a 5 V, 3 A linear supply. (Those used to be available for darned near free.) At the very least, I'd put several hundred uF across the servo power leads.

\$\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.