As you venture into the world of Arduino, robotics, and automation, sooner or later you will have the need to power your Arduino from a battery.
Whether it’s because you’re building a robot, a quadcopter, or any other type of vehicle, or because you want to leave a monitor connected to record the temperature or electrical consumption, among many other examples, the truth is that you won’t always have a cable to power our Arduino. In these cases, and especially in the case of vehicles, we will need to provide batteries to our project.
On the other hand, our batteries should not only provide power to Arduino. In battery projects we must consider if they are suitable for powering the other components of our project, such as motors, servos, sensors.
We have a large number of options to power our projects with batteries. In this post, we will review the main ones, indicating the advantages and disadvantages of each, so that you can choose the one that best suits your project.
How to power Arduino?
Before looking at the options we have to power our project with batteries, let’s see, as a summary, the two main ways we can power Arduino.
In general, we can:
- Use the voltage regulator integrated on the board.
- Apply a regulated voltage directly to the nominal voltage of the board.
Using the voltage regulator
All Arduino boards have a voltage regulator. This regulator results in a small voltage drop, so we must provide a voltage of at least 6V. Below that voltage, Arduino is most likely to shut down.
On the other hand, the higher the voltage, the more heat the regulator must dissipate. It is not recommended to apply more than 12V to the regulator because it is an excessive effort. Providing more than 20V will immediately damage the regulator.
Applying a regulated voltage
We can also apply the nominal voltage (5V or 3.3V, depending on the model) directly to the board without using the regulator. That is, we can power by supplying 5V to the 5V pin of Arduino. For example, this is what we are doing when we power Arduino from USB.
In the case of applying the voltage directly, the power supply we use must be regulated to the nominal voltage with a high degree of precision. A variation or a voltage spike will damage Arduino, as we are not using the voltage regulator.
In summary, to power Arduino we can:
- Apply 6-12V to the jack connector available on Arduino UNO, Mega, among other models
- Apply 6-12V between the GND pin and the RAW pin (Vin pin on Arduino Mini)
- Power through USB
- Apply 5V (regulated and stable!) to the 5V pin (3.3V in certain models)
For more information on power limitations in Arduino, and entry points in the different models, see the post Arduino Pinout Diagram.
Options for powering Arduino with batteries
Now that we have seen the options we have to power Arduino, we can see the different solutions we have to power our projects with batteries.
A 9V battery
Using a 9V battery is one of the most common options, especially for beginners and small projects. The 9V voltage is suitable for powering Arduino.
They have the advantage of being easy to find and use. In addition, there are available cables and battery holders, which even include an Arduino-type jack connector, making them easy to use.
As disadvantages, 9V batteries have low energy density. A battery has a typical capacity of 500-600mAh. In addition, they provide a very low maximum current intensity, around 300mA, useful only for small projects.
On the other hand, 9V is an unsuitable voltage for most actuators. It is excessive for most DC motors and servos, while it is not enough for large brushless and stepper motors, which operate at 12V and also require much more intensity.
The price is low, but they have the great disadvantage of not being rechargeable devices, which, combined with their low charge, makes them not economically viable in the long term.
In summary, an option for small assemblies or simple tests, but it quickly falls short in features, so we will require superior options.
4 AA batteries of 1.5V
Using four AA batteries in series, providing a total of 6V, is another simple option widely used in small projects and beginner projects.
We can easily find battery holders, cables, and other solutions to incorporate four AA batteries as a power source in our projects.
AA batteries have the advantage of being easy to find. In addition, the 6V voltage is perfect for powering DC motors and servos.
The charge is higher than 9V batteries. Four conventional AA batteries provide 800-1500 mAh while, in the case of using alkaline AA batteries, the capacity is 1700-2800mAh.
The maximum intensity we can obtain exceeds 1A, and can reach up to 2A. But we must take into account that, due to the discharge curves, the amount of charge we can extract from the battery is reduced the faster we drain it.
The price of the batteries is cheap, but not being rechargeable in the long term makes it not economical.
In summary, another simple option, suitable for small projects and robots.
5 rechargeable AA batteries of 1.2V
Similar to the previous case, but this time with rechargeable batteries. We can use NiCd (obsolete) or NiMh batteries. The voltage is slightly lower, 1.2V per battery, so we will need 5 batteries to achieve 6V.
Similar to the previous options, we can easily find battery holders for 5 AA batteries, as well as all kinds of accessories and cables to connect to Arduino easily.
Rechargeable AA batteries are easy to find, but are more expensive than non-rechargeable batteries. In addition, we must add the need for a charger. Despite this, these additional costs are quickly recouped, making it more economical than constantly buying batteries.
The charge of rechargeable batteries is also somewhat lower than non-rechargeable ones. NiCd batteries have a charge of between 500-1000mAh. NiMh batteries have capacities of between 600-2500mAh.
The maximum intensity is similar, approximately 1A in a sustainable way, which is sufficient for small projects and robots.
Therefore, using 5 rechargeable NiMh batteries is the recommended option for small projects that do not require great electrical intensity or capacity, but that will be used frequently, making it cost-effective to use a rechargeable solution.
2 Lithium 18650 batteries of 3.7V
Lithium 18650 batteries are known for powering flashlights and handheld lasers. Although not as well known as a power solution for Arduino, they are actually a great option to consider.
Two lithium 18650 batteries connected in series provide 7.4-8.2V, which is a perfect voltage to power Arduino. We also find battery holders that allow these batteries to be easily incorporated into our projects.
Lithium 18650 batteries have the advantage of providing a high charging capacity. Batteries from top brands provide up to 4800mAh. (Chinese batteries offer much higher capacities, although they actually deliver between 1500-2500mAh).
They provide a discharge capacity of between 1C – 2C, depending on the model. This means a maximum intensity of up to 10A, although for safety reasons it is not advisable to drain more than 2-4A without being very sure of the quality and characteristics of your battery.
Of course, 18650 batteries are rechargeable. Although a special charger is required for 18650 batteries, they are cheap and quickly recouped.
As disadvantages, they are a somewhat more expensive option than the previous ones, especially if we buy good batteries (which is recommended). In addition, their handling must be more careful, since the incorrect use of lithium batteries can be dangerous, causing overheating or even fires.
On the other hand, the voltage is somewhat high for DC motors and servos, although we can reduce it by inserting a pair of diodes, which also serve as additional protection for the batteries.
In summary, a more advanced option than the previous ones interesting for medium-sized projects and robots, with greater capacity and current requirements.
USB battery banks of 5V
Using a USB battery, the ones used to extend the battery life of mobile phones, is an interesting option to incorporate into our projects.
They have the advantage of providing 5V regulated power, so we can power Arduino through the USB, without worrying about the need to regulate the voltage.
Many of these banks, in fact, incorporate a single 18650 lithium battery, plus a small circuit that elevates and regulates the voltage to 5V. In these cases, we can even replace one battery with another while using the same case, while we charge the discharged battery.
The 5V voltage is suitable for powering a wide variety of components, such as DC motors, servos, as well as a large number of devices (sensors, LED strips, displays…).
These banks are, of course, rechargeable. The energy capacity is high, and we can find banks of up to 17,000mAh (although again, don’t fully believe the capacities advertised).
As a disadvantage, it is a somewhat expensive option compared to other available options. In addition, the maximum intensity is reduced, typically less than 2A, making it unfeasible for large projects.
In summary, a USB battery bank is a good mobility solution, as a battery to carry around that allows us to carry out tests and assemblies easily (much better than a 9V battery).
It is even an option that we could consider in medium-sized projects and robots, as long as we can reuse and rotate the same battery between the different projects to take advantage of its cost.
Nickel-metal hydride (NiMh) batteries
This is the first “pro” solution that we propose. It is similar to the case of NiMh AA batteries, but integrated as a single battery of larger or smaller size, and with connectors.
NiMh batteries generally have 5 cells with a voltage of 6V, or 8 cells with a voltage of 9.6V. 5-cell 6V batteries are excellent for projects and robots with servos and DC motors.
NiMh batteries have medium-high energy density. We can find batteries with capacities from 300 to 5000mAh, with a moderate weight.
NiMh batteries can provide a considerable amount of energy. Depending on the quality of the model, they can provide between 3-4C, which can mean up to 15A for large batteries.
On the other hand, NiMh batteries are relatively expensive, and also require the use of a special charger, which is also expensive. The connections and cables required, for high currents, also increase the mounting costs.
NiMh batteries are suitable for medium and large projects that require a large capacity and medium currents, especially those that use servos (robotic arms, hexapods, bipedal robots), since the 6V voltage is ideal.
Lithium Polymer (Lipo) batteries
Lithium Polymer (Lipo) batteries are the most advanced option to power our projects.
Lipo batteries are available in various voltages, depending on the number of cells. Thus, 2-cell (2S) Lipo batteries provide 7.4V-8.4V, and 3-cell (3S) batteries provide 11.1-12.6V. Both voltages are suitable for powering an Arduino.
2S batteries (7.4-8.4V) can be used to power servos and DC motors, although it is a somewhat excessive voltage and should be reduced to 6-7V. 3S batteries (11.1-12.6V) are suitable for operating large stepper motors, and brushless motors.
Lipo batteries have the highest energy density of the options presented. We can find batteries with capacities from 500 to 5000mAh.
In addition, Lipo batteries have the advantage of providing huge currents. It is possible to find 20-25C batteries, which translates to discharge intensities of 50 to 100A, required by the largest motors.
Lipo batteries are also the most expensive option, although being rechargeable makes them cost-effective in the long term, especially when considering their electrical characteristics.
The greatest disadvantage of these batteries is the difficulty and care that must be taken in their use. Incorrect handling of a Lipo battery can be extremely dangerous due to the large amount of energy they store.
These batteries must be charged using special chargers, and should not be left unattended during the process. Even the storage of these batteries must be done under controlled conditions.
In summary, Lipo batteries are the most powerful solution for powering our projects, but the handling and charging requirements make them suitable only for advanced users and complex projects, such as large robots, quadcopters, and other large vehicles.
We have reviewed different ways to power Arduino with batteries. It is advisable to opt for a rechargeable solution because it is more economical in the long run.
To start, 5 mAh batteries are suitable for small robots and small projects. For intermediate assemblies, a combination of 18650 lithium batteries can be an interesting option. Larger assemblies will need NiMh batteries, for 6V assemblies (especially projects with servos) or Lipo, in 2S or 3S (stepper motors or brushless).
It may also be interesting to have a 5V bank as a portable option for in situ tests, or when we are away from home.
And finally, do not believe the capacities (mAh) indicated by manufacturers of unrecognized brands, because they are not even remotely close to reality. (Which does not mean that you shouldn’t buy them, just don’t believe the capacity they claim)
We now have most of the options to power our Arduino projects with batteries, and we can start using them in our robotics projects.