3

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)

2 Answers2

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.)

Duncan C
  • 5,752
  • 3
  • 19
  • 30
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.

j0h
  • 902
  • 4
  • 13
  • 30