One of the essential properties of a mobile, Raspberry Pi-based robot is that it needs to run on battery power - trailing a power cord around is not much use.
The problem is that the Pi takes an appreciable amount of current (say 500mA, depending on activity and attached peripherals), and needs a pretty narrow input voltage range (5V +/- 0.25V, or so). Because battery voltage varies pretty wildly depending on the current charge level, running directly from a battery is not really sensible.
So, I set about looking into various options for converting standard battery voltages into something suitable for the Pi.
Using a linear regulator
The traditional approach, back when I was first tinkering with electronics about 30 years ago, would be to put together enough batteries to get a significantly higher voltage than 5V (say, 4x nonrechargeable AA to get 6V, or 6x rechargeable AA for 7.2V), and then run that through a linear regulator (e.g. 7805-series IC) to get a steady 5V.
There are 2 main problems with this approach.
- Linear regulators are inefficient, and effectively burn off the excess voltage as heat. That means that you're just wasting battery life, and also probably have to deal with dissipating that heat with a heatsink.
- The Pi draws quite a lot of current, so it would need quite a large regulator, along with a large heatsink.
Fortunately, there are much better approaches nowadays, in the form of switched-mode regulators, which are much much more efficient, even at high currents.
Continue reading "Running a Raspberry Pi from batteries"