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?
Greenonline
  • 2,969
  • 5
  • 27
  • 38
Bob Wright
  • 123
  • 1
  • 10

1 Answers1

6

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.

joan
  • 71,852
  • 5
  • 76
  • 108