2

I'm trying to power an arduino and a few modules (RF receiver, two servos, and a laser diode) through one power supply.

I get jittery/unresponsive servos when hooked up in the following configuration:

  • power supply goes to usb breakout, joins with top + and - rails, powers everything (tried
  • all grounds go to top - rail
  • black/grey/white wires going off right side are power/ground for the servos
  • red, green, yellow wires going off left/top side are signals to the servos/laser
  • purple wire going off left/top is ground for the laser

circuit photo

If I remove the orange wire (usb breakout to + rail) and plug another power supply into the Arduino, the poor performance disappears and everything works nicely.

Since my power supply is 2.5A, I doubt that I don't have enough power for this setup. This leads me to believe that the Arduino/receiver side of the circuit is making the voltage unstable so the servos misbehave. Is there a way I can isolate these two parts of the circuit (diode, capacitor?) so that I can power the whole setup with one cable?

Components:

  • Arduino pro micro (5v)
  • RF Link Receiver (WRL-10532, 434 MHz)
  • Servo (ROB-09065, sub-micro)
  • Laser diode (5V, 20mA)
  • Micro USB breakout (1A)
  • USB Micro power supply (5.1V, 2.5A)
7
  • Sorry, that image does not show up. And when I follow its link, I'm required to log into google. If you save the image on your PC and then drag and drop it into the image field, the image will be uploaded correctly. – chrisl Mar 27 at 19:52
  • What USB breakout board do you have exactly? It might not be able to provide the needed current. – chrisl Mar 27 at 19:53
  • Interesting--I tested in incognito and the picture still loaded.. guess there's some interesting access caching going on. Should be visible now? – mirrorcoloured Mar 27 at 21:31
  • 1
    Good call--it looks like the breakout says 1A (edited it into the post). That still feels high enough for these components, but maybe they are trying to pull more than this? – mirrorcoloured Mar 27 at 21:38
  • Yes, I can see the image now. How are you powering the Arduino? I don't see a wire from the USB breakout Vcc to the red rail (where Vcc of the Arduino is connected) – chrisl Mar 27 at 22:18
2

You need to figure out your total current requirements. Don't guess, figure it out. What is the peak current draw of the servos? of the other components? Add everything up. If the total is within 20% of your power supply current, that may be the problem.

Also, servos tend to draw spikes of current. You might need to add a filter capacitor to the +5V rail on the Arduino to even out dips as the servos cause sags in current before the voltage regulator in your power supply can compensate. (Put the cap between +5V and ground right at the Arduino.)

2
  • Fair. I estimated 0.2 + 0.25 * 2 ≈ 0.7A peak, but I'll measure to confirm. I wasn't considering that large a margin either. I'll also try the filter capacitor. Thanks! – mirrorcoloured Mar 28 at 1:58
  • 1
    The closer you get to the power supply's limits, the more its voltage is likely to "bobble" as the load varies, and motors loads are usually quite "spiky". – Duncan C Mar 28 at 20:38
1

I too have found the servo driving of the Arduino ie UNO to be jittery. The problem is that the Arduino uses a timer, interrupts and software to terminate the pulse so if the processor is busy servicing another interrupt then the pulse gets extended by up to 10us. Modern servos, even the cheap ones, respond to this delay as if it were noise.

The servo library was dependent on clock frequency, and limited to pins 9 & 10, at one point in time, although that might have been fixed in updated versions. out of curiosity, what pins are you attaching your servos to? (9 or 10?)

you might try updating your version of the ardunio IDE/Libraries.

another thought, is that many servos are rated at 6V (not 5v), and while they will work, they may also be jittery. you might find it best to use a separate power supply. Be sure to connect the grounds of the Arduino and external power supply together.

From Servo.h:

...
    //attach(pin )  - Attaches a servo motor to an i/o pin.
    //attach(pin, min, max  ) - Attaches to a pin setting min and max values in microseconds
    //default min is 544, max is 2400
...

#define MIN_PULSE_WIDTH       544     // the shortest pulse sent to a servo  
#define MAX_PULSE_WIDTH      2400     // the longest pulse sent to a servo 
#define DEFAULT_PULSE_WIDTH  1500     // default pulse width when servo is attached
#define REFRESH_INTERVAL    20000     // minumim time to refresh servos in microseconds 
...

you might try tweaking the min, max, and default settings, or check your code against the settings provided by Servo.h.

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.