Batteries

Picking a power source for the robot was the next big challenge. We need to run quite power hungry motors and we're planning on using a Pi4 so we need a decent battery capacity.

A Bosch Power4All power tool battery.
A Bosch Power4All battery pack, this is the 4Ah battery pack.

The first idea that sprang to mind was power tool batteries, such as those used in my cordless drills. We've just replaced an ageing B&Q lithium battery powered lawnmower (I tore down the battery for it a few years ago here) with a new Bosch model which runs on a super-sized version of the drill battery. Lithium ion batteries are nice low-weight and have high capacity. Bare packs are available but often have either a low voltage (i.e. 3.7V nominal) which is no good for our 12V motors or challenging charging requirements which is why the drill battery with its standalone charger seemed so appealing.

A sketch of the power system.
Initial sketch ideas of the power supply system, it lays out the 12V and 5V power busses and guesses at the power consumption limits.

I did a rough sketch of the power system, we'd need to regulate down from the 18V nominal pack voltage to 12V for the motors and also 5V for the Pi and the other logic stuff on board. When I realised the surge currents involved I spotted an issue; these drill batteries have protection circuits in them. Most lithium packs you can buy do, they're included to protect the user against dangerous overheating. However, the protection circuits are typically pretty conservative, I can get the drill pack to cut out by stalling the drill, and the robot will have effectively 4 drill motors on board. That means if you stall the robot the battery pack may well turn itself off to prevent too much current being drawn. It might even do it when we start driving forwards and there's a sudden rush of current. What's worse, that would kill the Pi potentially corrupting the SD card as well!

I spent some time looking at other sources of lithium based battery packs. You can get un-protected cells and also packs aimed at remote control/drone applications but they're pretty expensive and/or checking the data sheets for them have fairly low peak current draw.

A small sealed lead-acid battery pack
The small sealed lead-acid battery pack we've selected as a compromise of size vs capacity.

In the end I chose a sealed lead acid battery pack. These have enourmous surge current capactiy (the one I picked can supply up to 32Amps continuously and 96Amps peak!). I already had a lead acid battery charger at home and these small packs aimed at backup power systems are pretty cheap. It also means we don't need to regulate the 12V for the motors, as long as our H-bridge circuits and associated parts are rated for up to 14.5V which the battery can reach when fully charged. It's worth noting that although this pack is about the same physical size as the Bosch lithium pack at the top, it's only half the charge capacity. That shows why lithium is so revolutionary for mobile devices, cars, etc.