The main goal of this project is to control a servo motor with an Arduino.

I have a 12V 5Ah power supply connected to the Arduino. The servo is connected to 5V and GND on the Arduino.

When using this setup with the Arduino connected via USB, everything works fine. As soon as I disconnect the USB and use the power supply, the servo starts to randomly move.

After searching a bit on the web, I think a solution would be to have a dedicated circuit to power the servo motor and the Arduino.


Power Supply --> Voltage Regulator (5V) --> Servo Motor

Power Supply --> Arduino (12V)


This guy on YouTube


Would this work?

Would a simple parallel connection from the power supply to the voltage regulator and Arduino be enough or more components needed?

  • \$\begingroup\$ I do not believe your problem is power but rather EMI with common mode noise on the Servo PW data line. USB earth ground may be eliminating this problem for you. WHen running off a battery you need to show us your schema and layout with cables so we can advise how to reduce EMI. Or try a 470 Ohm load resistor with RF cap \$\endgroup\$ Commented May 28, 2019 at 18:29
  • \$\begingroup\$ @SunnyskyguyEE75 if the servo is powered by the Arduino's onboard 5V regulator then that is the problem. The servo draws 1.5A at stall (even higher when reversing!) and the Arduino's 5V regulator is only good for 1A at best. \$\endgroup\$ Commented May 29, 2019 at 0:13
  • \$\begingroup\$ The arduino's regulator is a linear type, unless they've changed it recently; using a power supply closer to the lower end of its input rating will waste less energy. \$\endgroup\$
    – Hearth
    Commented May 29, 2019 at 0:15
  • \$\begingroup\$ @BruceAbbott I agree, but the Op said it worked (?) with USB connected which cannot supply the power unless it is a 2.4A Hub charger A separate 6V regulator may be an improvement but not the cause of an idle random seek. Since the servo control works down to 3V \$\endgroup\$ Commented May 29, 2019 at 0:16
  • \$\begingroup\$ OP didn't say what the USB was connected to, but clearly it must have been strong enough or else it would not have worked. Powerful servos draw high peak current even with light loads bhabbott.net.nz/Servo.html \$\endgroup\$ Commented May 29, 2019 at 0:28

2 Answers 2


You can get good regulators for this from RC plane sources. It may be called a "battery eliminator circuit" or BEC. Just get one that's rated for more than 12V (or 4 LiPo cells).

Connect the grounds so that the Arduino and the BEC input go to the battery connector separately, and try to make the signal wire from the Arduino travel with the servo ground (even if that's not how it's shown in the schematic).


simulate this circuit – Schematic created using CircuitLab


The 6 V servo uses 500~2500 μs pulses to control a rotary angle but is powered by 5 V.

The "Neutral" position = 1500 μsec a repetitive pulse.
The no-load current spec. is 160 mA and the stall current is 1.2 A both @ 4.8 V
This servo can work with both 5 V and 3.3 V servo signals.

It only works OK with Arduino 5V which is regulated from 12V 5 Ah battery but only with USB connected ... to Laptop floating {?} or tower {?} with earth ground.

The failure is when the USB is disconnected from Arduino.
The result is random servo seeks instead of idle.

If I understand your description, it always uses your battery power and Arduino regulator. It is just the USB data interface and ground that is disconnected.

  • This is symptomatic of noise interference on the servo pulse control signal and or shared ground return. The servo cable is only 30 cm (12") long.

    • It may be a result of noisy servo control signals.
    • It may be radiated crosstalk or conducted noise.
    • It may be from additional cable length to ground and signal wires.
    • It may be from insufficient low ESR capacitor decoupling near the connection on the DC-Gnd .. maybe 1mF will help..
    • It may be insufficient motor current from Arduino 5V reg rated for 1A but does not explain noise from USB disconnect.
    • It may be from worn capacitor decoupling inside the servo. ( if old)
    • The DC servo motor is brush-type, which is notorious for conducting and radiating more EMI.
    • The signal drive cable can be extended but only with isolated grounds and twisted pair for power and control so they do not share ground current.

When the cable signals shared noisy supply/ground return current, this common-mode noise can cause higher impedance control signals >> 1000 Ohms @ 1MHz that are unbalanced to be susceptible to noise pulses. This is why the cable is short.

Verify some of the listed causes above by ;

  • Connect earth ground to USB gnd or battery power as an experiment.
  • add low ESR 10~1000 uF e-cap to 5V bus near servo connector.
  • add 10 nF cap across Cmd to ground line, try smaller values if that works.
  • if cables are used change to twisted pairs or STP cable and good grounds.

Report back results.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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