2

A Raspberry Pi's GPIO header includes power pins, and enough I/O pins to drive multiple servo motors.

When using this header's 5V supply to power servo motors directly (rather than using external power) it's very easy to place too much load on the PI, causing low-voltage conditions, freezes and restarts. (The most reliable way to power servos is indeed with a separate power supply.)

However for many users, especially with limited resources, the convenience and simplicity of powering and driving the servos directly from the Pi is huge.

What motors can typically be driven in this way before running into problems?

Daniele Procida
  • 425
  • 5
  • 17

2 Answers2

1

Where multiple motors are indicated as working reliably, this means that all motors were in operation at the same time, over an extended period of time.

Numbers indicate the largest number of motors that were tested simultaneously.

Reliable under all tested conditions

Power source: official Raspberry Pi PSU

  • TowerPro SG90 * 3
  • TowerPro SG92R * 3
  • Futaba S3001 * 2, TowerPro SG90 * 1
  • Etronix GS045 * 2, TowerPro SG90 * 1

Power source: OTG power supplied over USB

  • TowerPro SG90 * 3
  • TowerPro SG92R * 3
  • Etronix GS045 * 1

Not reliable

Power source: OTG power supplied over USB

Load causes restarts or freezes:

  • Etronix GS045 * 2
  • Etronix GS045 * 1, TowerPro SG90 * 1

(Please feel free to add data based on experience to this answer.)

Daniele Procida
  • 425
  • 5
  • 17
1

You can not power any servos from the Pis GPIO.

To attempt to do so will endanger and possibly destroy your Pi.

The Pi's GPIO can only supply about 20mA in current (far too little to power a servo) and should NEVER be directly connected to an inductive load like a motor.

You can't power a servo with a GPIO but you can supply the control signal from a GPIO (the control signal is the 50 Hz stream of pulses used to position the servo).

The Pi's expansion header has two 5V pins. These may be used to power a few servos depending on the following circumstances.

  1. The amount of spare power (current) available from the 5V pins. This might be nothing to a couple of amps depending on the Pi model and the power supply.
  2. The power requirement of the servos under no-load. See the servo datasheet.
  3. The power requirement of the servos under heavy load to stall conditions. See the servo datasheet but be aware this can easily be several amps.

If the 5V pins are overloaded the Pi will crash. This in itself is unlikely to damage the Pi but may corrupt the SD card.

joan
  • 71,852
  • 5
  • 76
  • 108