AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Why a servo pulls a logic supply down from 5 V to 2 V

Servo and stepper motion Published 7 min read By AutomateDirectUSA engineering team

Short answer

The 5 V to 2 V collapse means the servo's motor current is flowing through the microcontroller's logic node. A PWM pin supplies milliamps; a servo at startup draws its stall current. Feed the servo power terminals from a supply sized for at least the stall current, and run only the command signal to the pin.

On this page
  1. Read the symptom before touching the code
  2. Likely causes, cheapest check first
  3. The arithmetic behind the sag
  4. Separate the power path from the signal path
  5. The decision for each wiring case
  6. Verify the fix under load
  7. Questions asked

A servo that drags a 5 V logic rail down to 2 V the moment power is applied is not a software fault: the motor's current is flowing through hardware meant for milliamps. A PWM output pin is a logic interface, while a small servo draws from its stall current upward the instant it starts to move, and the collapsed reading is that current multiplied by the resistance of the pin, the regulator and the wiring. The remedy is electrical, not in the code. Feed the servo's power terminals from a supply sized for at least its stall current, connect only the command signal to the pin, and tie the grounds at one point. The sections below read the symptom, list the causes in the order they are cheapest to check, work the arithmetic and end with the wiring decision for each case.

Read the symptom before touching the code #

A fall from 5 V to 2 V is 3 V gone — 60% of the rail — before the servo has finished its first move. No pulse-timing error produces that; only a load pulling more current than its source can deliver does. The textbook name for it is the loading effect, and it is a property of the wiring, not of the program.

Measure three places while the servo tries to move:

  • At the controller's supply input or regulator output — the logic rail.
  • At the servo's power terminals.
  • Between the controller ground and the servo's ground terminal — ground displacement.

Two reading rules apply. A meter on a PWM output shows the average of the pulse train, not its high level — the same effect behind why a stepper pulse output reads about 12 VDC on a meter — so confirm a collapsed high level with a scope before blaming the pin. And take a baseline first: disconnect the servo, confirm the rail holds its normal level and the pin's waveform is clean, then reconnect and watch which node falls first.

Likely causes, cheapest check first #

Work down the list; each item carries a confirming test.

  • Servo power taken from the logic rail or a pin. With the supply off, trace the servo's power lead. If it lands on the controller's supply pin, a board rail or any GPIO pin, motor current is flowing through logic hardware — the classic loading effect. Confirming test: power the servo from its own bench supply while the controller keeps its own; if the sag disappears, this was it.
  • Supply or regulator in current limit. Measure at the supply's output terminals and again at the servo's power terminals during a move. If both fall together, the source cannot deliver the stall current; if the supply holds and the servo terminals fall, the volts are being lost downstream in wiring and connectors.
  • Wiring, connector or ground-return resistance. Measure between the controller ground and the servo ground while the servo moves. Volts of displacement mean the motor's return current is flowing through a thin signal conductor; every lead and connector adds series resistance that the motor current multiplies into voltage loss.
  • A linear regulator overheating after seconds of load. If the rail holds at first and sinks later, compute the regulator's heat: power lost equals input volts minus output volts, times load current, so a part dropping 7 V while feeding 0.7 A dissipates about 4.9 W — more than a bare package survives without the heatsink its datasheet's thermal figures call for. Confirm with case temperature and the datasheet.
  • Controller brown-out resets. A program that restarts or a serial link that garbles when the servo moves is the microcontroller's brown-out detector reacting to the same sag. It is a consequence of the first two causes, not a separate fault; fix the power path and it disappears.

The arithmetic behind the sag #

The reported numbers are self-consistent, and rebuilding them shows exactly what has to change.

At the first instant of a move, a motor's back-EMF is zero, so winding current is limited only by winding resistance and the surge runs several times the running draw. Take an example surge of 1.0 A (an example input, chosen to match the symptom) and a total path resistance of 3.0 Ω — the pin's output resistance, board traces, leads and connectors in series. Ohm's law gives the loss:

V_drop = I × R = 1.0 A × 3.0 Ω = 3.0 V

and the node sits at 5.0 V - 3.0 V = 2.0 V. That is the observed collapse, reproduced from two example inputs. Halving the resistance halves the loss, and so does halving the current — but the durable fix is not shaving ohms; it is taking the motor current off that path entirely.

Set the pin's capability against that. One STM32 datasheet lists 25 mA as the absolute maximum per GPIO pin, the Raspberry Pi 3V3 supply was designed for roughly 3 mA per GPIO pin, and TI's MSP430 datasheet shows 0.6 V of output droop at just 6 mA. Take the ATmega32's own figure from the DC characteristics table of its datasheet — whatever it is, it is tens of milliamps against a start surge of amps, which is the same conclusion as in why a stepper motor will not turn from microcontroller pins alone.

Size the servo's own supply from its stall current. Suppose the datasheet gives 700 mA (an example input; take the real figure from the datasheet of the exact part, or from the short measurement described in the FAQ). The common rule of thumb is stall current plus roughly 20%: 700 mA × 1.2 = 840 mA, so a supply rated 1 A clears it with margin. The nameplate arithmetic is identical for a bigger axis, as worked through in DC servo motor power supply sizing from a nameplate.

Separate the power path from the signal path #

  1. De-energize and trace every conductor. Identify the servo's power, ground and signal wires and what each lands on. Safety note: work with the supply off, and when you measure motor current, put the meter in series on a range rated for that current — an ammeter connected across a supply is a short circuit.
  2. Feed the servo power terminals from their own supply, rated at least the stall current plus the margin above, shared with nothing else.
  3. Run only the signal to the pin. An integrated hobby servo such as the VS-2 carries power, ground and signal terminals; the PWM pin drives its documented signal input directly, and that input is a high-impedance logic load. Check the servo's documented input thresholds against the controller's output levels before relying on the direct connection.
  4. Tie the grounds at one point. Join the controller ground to the servo supply's ground with a real conductor, and let the motor's return current flow home through the supply return, not through the controller board's signal ground.
  5. Fit the decoupling the documentation calls for at the servo's power terminals and the controller's supply pins. Capacitance covers the first milliseconds of a start transient; it never substitutes for supply sizing.
  6. Re-energize and measure under load. Watch the minimum voltage at the servo's power terminals and at the controller's supply pins during a start from rest: both must stay inside their documented operating ranges, and the signal levels must stay inside the input's documented thresholds.

The decision for each wiring case #

  • Integrated servo with power, ground and signal terminals — the VS-2 case: give its power terminals a supply rated at least the stall current with margin, run the signal wire straight to the PWM pin, and join the grounds. No buffer and no transistor belongs in the signal path unless the servo's documentation calls for one.
  • Bare motor or actuator without an integrated driver: never on a pin, and no op-amp buffer will save it. Add a driver stage rated for the winding current and its inductive kickback; the pin drives the driver's input, and the motor supply feeds the driver's power side.
  • Rail still sags after the split: the supply is current-limited below the stall current, or the wiring and connectors are eating the volts. Measure supply output against the servo terminals during a start and repair whichever side loses the volts.

Verify the fix under load #

Run the axis under its real mechanical load, including starts from rest and moves against friction or gravity. Record the minimum voltage at the servo's power terminals and at the controller's supply pins, watch the controller for resets across a full shift of cycling, and run long enough to expose thermal sag — a rail that holds for the first minute and sinks later is the overheating-regulator cause above, not the wiring. When every minimum sits inside its documented range and the controller never browns out, the loading effect is gone.

Questions asked

Will an op-amp buffer between the pin and the servo stop the drop?

No. A buffer relieves signal loading but adds no motor power. The classic 741 op-amp, for instance, manages only about 25 mA of short-circuit output current, far below what a servo draws at start. If the servo has a proper signal input it needs no buffer at all; if the load is a bare winding it needs a driver stage and its own motor supply.

How do I find the stall current if the datasheet has no figure?

Measure it briefly. Power the servo from a supply with a current readout at its rated voltage, command a position, and hold the output horn still for a second or two, no longer, because a stalled servo converts its whole supply draw into heat in the winding. That reading is the locked-rotor current; size the supply at that value plus roughly 20%.

Why does the voltage recover when the servo sits idle?

An idle servo does not energize its motor, so the rail carries only logic loads and the reading returns to normal. The sag tracks motor current: it appears at the start of a move and under mechanical load, when back-EMF is low and the winding draws hardest. A sag that only shows while the servo moves confirms the load path and clears the program.

Does a large capacitor across the servo supply fix the sag?

Only for the first few milliseconds. Capacitance can carry a brief start transient and keep the controller from browning out, but it cannot sustain the continuous current a loaded or stalled servo draws. Size the supply for the stall current first, then fit whatever decoupling the controller and servo documentation specify at their supply pins.

Keep reading

  • Troubleshooting

    Weak torque and slow movement across multiple servo motors

    When several servos slow down and lose torque at the same time, the supply is the first suspect: voltage sag under combined load, not pulse timing. Measure the voltage at each servo's power connector while all axes move, remove any series power connections, and size the supply for the stall-level current the servos can demand together.

    Motors, gearboxes and drives sizing

  • Explainer

    DC servo motor power supply sizing from a nameplate

    Size a DC servo power supply from the nameplate's rated armature voltage and continuous current, never from the pulse amps or a software speed limit. A single-phase full-wave capacitor-input rectifier charges the bus to about RMS times 1.414, so a 1:1 120 VAC isolation transformer gives roughly 170 VDC, which PWM servo drives accept. Drives in parallel share one bus voltage; their continuous currents add.

    Motors, gearboxes and drives sizing

  • Selection guide

    Selecting a Servo Motor and Drive for a CNC Retrofit

    Size the axis before the motor: shaft torque and speed, reflected inertia, then one documented command architecture — step-and-direction position mode for most G-code retrofit controllers. Before buying, verify the pulse arithmetic: motor rpm times commanded pulses per revolution, divided by 60, must sit under both the controller's output ceiling and the drive's documented input limit.

    Servo and stepper motion