bilbochris
Posts: 2
Joined: Sun Jan 21, 2018 2:06 pm

Using multiple servos from one GPIO power pin

Sun Jan 21, 2018 2:15 pm

Hi! First time poster here :)

I have a project where I will be controlling multiple servos from my Pi. I'm trying to figure out the best way to power these. Based on the assumption that only one servo will ever be active at any given point, can I use a single 5v GPIO pin to power the servos, all set up in parallel or should I use an external power source to do this?

I have this set up for just two servos and it seems to work, but I don't want to do any damage as I set up more and more (probably maximum of 6?). The control pins will all be different of course.

I have a power bank that outputs the 5v required so I could use this, but then I start running in to auto shutoff problems, and ideally I want to keep this as simple as possible without creating extra circuits to keep the power bank on at all times.

Thanks in advance!!

User avatar
Burngate
Posts: 6313
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Using multiple servos from one GPIO power pin

Sun Jan 21, 2018 6:22 pm

The short answer, is yes - if only one servo is ever going to be active, it shouldn't matter how many others are connected.

The 5v pins on the header are connected to, and get power from, the uUSB power socket through a fuse.
If your power supply can supply enough current for the Pi itself, anything attached to the USB ports, and your servos, and the polyfuse can carry it, you're ok.
If you try to take more current than the polyfuse can handle, it'll blow.
Similarly, if you try to take more than the supply wants to give, something will fail.

But you've proved that one servo won't kill your Pi, so connecting six similar ones should be ok

[rant]
But, please, can we stop calling the 5v pins (and the 3v3 pins, and the ground pins) GPIO pins. They're not. Yes they're header pins, and there are also GPIO pins on the header, but not all header pins carry GPIOs.
[/rant]

bilbochris
Posts: 2
Joined: Sun Jan 21, 2018 2:06 pm

Re: Using multiple servos from one GPIO power pin

Sun Jan 21, 2018 6:50 pm

Thanks a lot for the advice! Let's hope I'm right about servos not all running at once!

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Using multiple servos from one GPIO power pin

Sun Jan 21, 2018 11:53 pm

Although it will probably work it is bad practice to power noisy motors/servo from your RPi as the noise( voltage spikes) from the motors switching on and off can upset the RPi.

It is good practice to have separate power circuit for your servos :)

mattmiller
Posts: 2245
Joined: Thu Feb 05, 2015 11:25 pm

Re: Using multiple servos from one GPIO power pin

Sun Jan 21, 2018 11:58 pm

Note although you will only plan on moving one servo at once - I'll think you'll find that when you power up - all the servos will set themselves to a random position

This is likely to power cycle your Pi if running off same battery

If you manage to be lucky and get past that - its more than likely that your program will want to default the servos to a know position - this will have same effect :(

Use a separate battery for the servos

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Using multiple servos from one GPIO power pin

Mon Jan 22, 2018 7:26 am

I quite often use same battery (RC hobby LiPo as they will supply way more amps then needed) but always have a separate circuit for RPi and servos/motors. I will usually have 2 separate buck converters, 1 for the RPi and 1 for the servo or motors providing the battery that your using can supply the needed amps to run everything at once then you won't have a problem with the servos or motors upsetting the RPi fro power spikes/drains

Return to “Automation, sensing and robotics”