This is a battery supply for an arduino board or any electronics project. It uses a single 18650 lithium battery, a step down module, a charging and battery management module and a step up module. It can be charged from a wide voltage range up to 30V and from either mains or solar power. The battery is protected from under and over voltage.
The main advantage of using a single rechargeable battery rather than multiple batteries is long battery life. With a more conventional supply of four or five NiMH rechargeables one cell tends to go flat before the others and then goes into reverse voltage and greatly shortens the life of the battery pack.
The modules used are all under $2 each. An optional voltmeter module gives a rough indication of the state of charge.
Step 1: Schematic
The input voltage is stepped down to 5V with a switching regulator module. This runs cool and doesn't waste energy compared to using a linear regulator. Set the output to 5V before connecting anything else up.
The 5V then goes to a battery management module. These are available for $1 on ebay and there are several versions - choose the one that has 4 pads on the right side as there are some available that only have 2 pads. The separate pads for the battery means the battery can be disconnected by the module when it is under or over voltage.
The output from the battery is then stepped up to 7V. It could be set at 5V for running an arduino, but I have found it is better to step up to 7V and feed this into the VIN pin on the arduino and use the onboard linear regulator on the arduino board as this gives an exact 5V reference for reading analog voltages. Of course, you could set the output voltage right up to 30V if you needed to power something with a high voltage - these switching modules are very flexible.
An optional voltmeter displays the battery voltage. This does use a few tens of milliamps, and an alternative is an analog meter.
The battery is a genuine Panasonic 18650 lithium cell with 3400mAh. There are thousands of fake 18650 batteries on ebay, probably the vast majority of them. Search Google for "fake 18650" for some useful hints. I ended up buying local and paying a bit more but with the surety that if it didn't have the stated capacity I could get a refund. Pleasingly it all checked out and was worth the $13. (There are also many fake NiCad and NiMH batteries on ebay). In terms of genuine brands where a 2000mAh 1.2V NiMH (2.4Wh) might cost $5 and a 3400mAH 3.5V (11.9Wh) lithium might cost $13, I think the lithium comes out ahead.
Another trick is to put lithium cells in parallel for increased capacity.
Step 2: Modules
These are some screenshots of the modules. The stepup and stepdown modules look very similar and on the bench I got them muddled!. The step down module has a 50V capacitor on the input and the stepup module a 35V capacitor.
The battery management module has a linear regulator. It is possible to change the charging current by changing a resistor but the default is 1A. When the battery is nearly charged at 4.2V this isn't a problem, but if the battery is flat at around 3V, this is dropping 2V at 1A which is 2W and the board does get rather warm. I used hot melt glue to put the modules in a box but had to change to epoxy as the glue went soft with the heat. There could be an argument for putting this module on a small heatsink.
To find the modules search on ebay for 'step down module', 'step up module', 'usb 18650 lithium module' and '18650 panasonic'.