Best options (batteries) for powering 12x SG90 servos and an Arduino Nano?

Hi all,

I'm v. new to electronics/hardware (I'm a software developer by day) and just started playing with Arduino recently. I'd like to build something like this and run it from a portable power source:

It uses 12 SG90 servos. I'd prefer to power everything from a single source to keep things simple, though I don't know if that's the best way (I see many questions from people asking how to use separate power supplies for the Arduino and servos/motors). I have some I/O shields that make it convenient for connecting the servos 3 pins to the Arduino but I don't know if having 12 of them connected like that is a good idea (the shield seems to be built to connect them like this?).

I also don't know which type of batteries (AAs, LiPos, 18650s, Powerbank?) would be best for this kind of thing (people seem to be using all of these, and I can't find any good comparisons/pros&cons). I do have a powerbank that I tried using for a project with 4 servos (since it seemed like it'd provide a reliable 5v) but it doesn't work - I think the issue is that it's only 1A (though I'm not totally sure - it worked for about 2 seconds, but now the Arduino just whines when I try connecting it - same thing on a second one, but a servo-less circuit seems to work).

So, what are good options for something like this? I believe the Arduino and servos all want 5v. The rated current for the servos is 220 ±50mA, stall 650 ±80mA.

As well as powering this specific project, I'm interested in doing the same for other projects (that may have fewer servos) so if any advice given would be less applicable for smaller projects, that'd be good to know too.

It's probably a good idea to power the Arduino separately from the servos. The Nano should work fine from 3 x AA alkaline cells (4.5v) or 4 x AA NiMh cells (4.8v) connected to the 5v pin. That way no voltage regulator is wasting energy.

The servos will also work on 4.5v or 4.8v but would probably work better on 6v - it depends on the performance you need.

You have not said how long you want to run the system from one set of batteries, nor have you given any indication of how much work the servos have to do - how often the move and what load is on them.

I suspect you would need to break the servos into groups (maybe 3 groups of 4) if you want to power then from AA cells and give each group its own battery back. You might get away with 2 groups of 6 servos if you use NiMh cells as they can deliver more amps.

Of course if you can deal with the size and weight of a small 6v lead-acid battery that would easily power all the servos.

Make sure that the GNDs for the servo power supplies are connected to the Arduino GND.

...R

Thanks for the info! Some additional questions below..

It's probably a good idea to power the Arduino separately from the servos. The Nano should work fine from 3 x AA alkaline cells (4.5v) or 4 x AA NiMh cells (4.8v) connected to the 5v pin. That way no voltage regulator is wasting energy.

What are the advantages of doing this over using the same source, and why would a regulator waste energy if both the Arduino and servos can run on the same voltage (this is all new territory to me so apologies if these are noob questions).

The servos will also work on 4.5v or 4.8v but would probably work better on 6v - it depends on the performance you need.

I don't really have any needs, this is all just a fun learning exercise. How can you tell that 6v would be best - is it just something you've learned from testing, or should there be something on the spec sheet to indicate the best voltage?

You have not said how long you want to run the system from one set of batteries, nor have you given any indication of how much work the servos have to do - how often the move and what load is on them.

In this project it's just a but of fun controlling the spider so the battery life is secondary to ease of setting it up (though if there implications to this other than the weight of higher capacity batteries, I'd be curious to know).

I suspect you would need to break the servos into groups (maybe 3 groups of 4) if you want to power then from AA cells and give each group its own battery back. You might get away with 2 groups of 6 servos if you use NiMh cells as they can deliver more amps.

Of course if you can deal with the size and weight of a small 6v lead-acid battery that would easily power all the servos.

I'm not fussed about using AAs, so if I can avoid splitting them up that'd be preferable (having multiple groups would mean potentially monitoring multiple sets of battery levels). I hadn't seen anyone suggest lead-acid batteries before. Might be a little heavy for a remote controlled spider though. What makes that a better choice than the others - just that it's already 6v? If I used something that wasn't (for ex., 2x 18650s would be 7.2V ish?) then what would be the best way to connect it to the servos? (presumably 7.2V would be fine connected to VIN on the Arduino, but I don't know if it's efficient or if using the same source would result in noise from the servos affecting the Arduino?)

Thanks again!

DanTup:
Thanks for the info! Some additional questions below..
What are the advantages of doing this over using the same source, and why would a regulator waste energy

All voltage regulators waste energy. Using separate batteries for the Arduino means that if the servos draw too much current and briefly reduce the voltage they won't affect the Arduino. An Arduino will notice a drop in voltage that only lasts 62.5 nanosecs.

How can you tell that 6v would be best

The servo documentation will state the min and max voltages that they work at. Within that range a higher voltage means more current and more torque.

If I used something that wasn't (for ex., 2x 18650s would be 7.2V ish?) then what would be the best way to connect it to the servos? (presumably 7.2V would be fine connected to VIN on the Arduino, but I don't know if it's efficient or if using the same source would result in noise from the servos affecting the Arduino?)

If the 7.2v is outside the spec for the servos then you will need some means to reduce the voltage. That is why I suggested using batteries that deliver the correct voltage. Also note that a pair of fully charged LiPo cells will produce up to 8.4v. What I said about using a separate battery for the Arduino still applies.

You may get away with using the same battery for everything but in my experience if it does cause problems for the Arduino it can be difficult to debug because the symptoms often look like a software problem.

I have a project using about 10 servos (for turnouts on a model railway) and I am powering them from a 12v supply using the output from a 12v USB charger that I got cheaply. All seemed to be working fine until I tried to start the Arduino with all 10 servos connected. Everything went haywire. The problem was that the power supply could provide the startup current for 9 servos, but not for all ten. I solved the problem by using a second USB charger and powering half the servos from each. In my case I am happy powering the Arduino from the same source because {A} after the startup there is very little load on the servos and {B} the voltage won't drop as it would if they were powered directly from a battery. (My battery is a 200Ah lead acid battery :slight_smile: )

...R

All voltage regulators waste energy. Using separate batteries for the Arduino means that if the servos draw too much current and briefly reduce the voltage they won't affect the Arduino. An Arduino will notice a drop in voltage that only lasts 62.5 nanosecs.

Right, got it. Separate batteries probably would be easiest. Just for future reference - if I did want to power these from a single set of batteries, how would it be done in a way that would prevent the servos affecting the power to the Arduino?

The servo documentation will state the min and max voltages that they work at. Within that range a higher voltage means more current and more torque.

Aha, I found a new page that listed the voltage as 4.8v-6v for these servos (the original page I'd found didn't seem to list a max voltage). Makes sense now. Though would I need to worry about a 6V battery providing more than 6V?

Also note that a pair of fully charged LiPo cells will produce up to 8.4v

Right, so if my battery is not 6v, would something like LM2596s be the correct thing to use?

The problem was that the power supply could provide the startup current for 9 servos, but not for all ten

I think this may be the issue I was having with my 1A powerbank with 4 servos - sometimes it worked (maybe based on the servo position at startup?) and sometimes it just immediately stopped. It now seems obvious I should've tested it with 1/2/3 servos connected before I put everything in the case =D

Assuming the servos are powered with a 6V source, what would be a good way to power the Arduino? It has a fairly wide voltage range but I presume if it's given > 5v over VIN it'll waste some power. Is 4.5V (eg. 3xAA) an efficient way to power it, or would something like 18650s (and a LM2596?) be better?

Sorry for all the additional questions and thanks for your help!

I think I have provided as much useful info as I can based on my knowledge.

If you are using a voltage regulator you need to check the range of voltage at which it can work. Some of them need the input voltage to be considerably higher than the output voltage. Also the current they can provide without overheating may depend on the voltage drop.

If you are using a "high" supply voltage and if the Arduino power comes from that via a voltage regulator (either external or onboard) it will be reasonably immune to changes in the supply voltage. In effect that's how my system operates as what I refer to as 12v can actually vary between 11.5 and 14.8v.

...R

Understood - thanks for all the info, I have a much better idea of some possible options now :slight_smile:

Isn't the Petoi Cat robot directrly powering the Sg90 motors from a 7.2V+- Batteries
through the pca9685 - without a Voltage regulator ?