5

I am not sure if this will break my Pi, so I decided to double check

Servo connected to Arduino

In this image is a simple servo connection, I am still learning how servos work. I actually have two questions:

  • If I decided to change the positive voltage of the servo 5V to 9V and attach it to the negative of battery then link it to the ground, will the RPI break?
  • Is it possible just to connect the signal pin to the RPI and have the positive and negative wire powered by an external battery?
  • I have almost destroyed the RPi in multiple occasions, this will be a precaution. – Bob Wright Jul 26 '15 at 9:10
5

Servos can draw a lot of power so don't expect to be able to reliably power anything but a tiny 9g type servo from the Pi.

A servo has three wires, power (+ve), ground (-ve) and control.

You can connect the control wire directly to a Pi gpio. If you do you must also connect a Pi ground to the servo ground.

So you can connect a Pi 5V to servo power, a Pi ground to servo ground, and a Pi gpio to servo control.

You can alternatively connect an external power supply +ve to servo power, an external power supply -ve (ground) to servo ground, and a Pi gpio to servo control. In this case you must connect a Pi ground to the external power supply -ve (ground) or the servo ground (they are the same thing).

The external power supply +ve voltage is irrelevant (within reason, I wouldn't connect a 100V power supply for instance). 9V will be fine.


A video clip showing the Raspberry Pi providing control signals to battery powered servos. Note, the battery pack I was using will only provide enough servo power for a few minutes.

  • Is there some sort of limit on how much ground can the RPi take, current and voltages? – Bob Wright Jul 26 '15 at 9:42
  • 1
    The limit will be the Pi PCB tracks which I expect would blow up if you tried to pass 4 amps or so through them. That is a guess. However you can only supply a couple of amps through the Pi's microUSB so that probably won't become a problem. If you are using external servo power the only current flowing through the Pi ground will be the tiny amount (a few milliamps) for the return path of the gpio to servo control wire signal. – joan Jul 26 '15 at 9:48
  • @joan I would still worry about any flyback effects, so a flyback diode would be needed across the servo (+) and (-). Also, to go beyond "trusting" the control line amperage, I would put a 1K or 10K resistor on this line to reduce amps. – Phil B. Jul 26 '15 at 14:13
  • @PhilB. It wouldn't do any harm, however I have not heard of anyone using a flyback diode on a servo (nor for that matter have I ever bothered with a series resistor). – joan Jul 26 '15 at 14:43

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.