Introduction: Arduino Supply With Smart Battery Management

Picture of Arduino Supply With Smart Battery Management

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

Picture of 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

Picture of 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'.

Have fun!

Comments

James Moxham (author)2017-08-23

Looking at the photo, seems all wired up ok. If it works on the bench supply but not the solar panel, I wonder if the panel is under sized? (340mA). The other thing - has a component got zapped? Is it working when back on the bench supply? If so what are the volts at the inputs and outputs of each module?

RossM90 made it! (author)2017-08-21

Hi James,

Thanks for sharing this project. I tried assembling it myself with components from amazon - I think they're the same.

I'm having an issue powering it from a solar panel however. The voltage supplied to the arduino varies wildly, from sub 7V all the way up to 38V; even though I set the step down converter to 7V when the controller was powered by the mains via usb. Are the step up and step down converters supposed to stick to an absolute output? Or do they just apply a fixed ratio to their input?

If it's the latter, I don't know how this setup can run from a solar panel as the voltage from the panel will always vary wildly with varying sunlight. And given the controller seems to prioritize the panel as a power supply over the battery it doesn't seem it likes the varying voltage - the led stays a constant red, I'm unsure what that means?

Do you have any advice? I'm working on this for a deadline I have on the 28th of August.

Many thanks, Ross

James Moxham (author)RossM902017-08-21

Something not right there! Yes, the outputs of all these regulators is supposed to be fixed. Set it to, say, 5V, and it will stay at 5V. For a step down converter, input could then vary 7V to 36V and the output will always be 5V.
I'm struggling to think of a fault that would cause a ratio of an input voltage. How big is the solar panel?

RossM90 (author)James Moxham2017-08-22

Hi James,

Thanks for getting back to me so quickly. I must admit this is my first soldering/arduino/electronics project of any kind so the odds of me making a silly mistake are high!
The panel I'm using is 12V (nominal), 340mA (max power). Designed to maintain a car battery's charge. It is contained in a frame which may have a small controller in it that is interfering with things - so I'll open it up and check.

Also, I read on a website that sells the battery charge controller that you must disconnect the load before charging the battery. This I didn't do and I think I may have damaged the controller - it now doesn't power the arduino when I plug in the battery.

And/or my lack of switches may be confusing/damaging the controller - I think I may install one to isolate the controller from both the step up and the step down transformer.

Thanks for your time. And greetings from Scotland!

Sparky8900 (author)2016-04-01

This looks like a very useful project. Good description.

Were you able to verify if the 'battery management module' provides any circuitry to disconnect the battery when it is nearly discharged? How do you protect against that happening? Thank you!

About This Instructable

2,203views

26favorites

License:

Bio: Dr James Moxham is a general medical practitioner in Blackwood, Australia. His interests include general family medicine, medical politics, microcontrollers and tending a rose garden ... More »
More by James Moxham:Arduino String Manipulation Using Minimal RamCharlieplex 30 Led BargraphArduino Dual 20x4 Display
Add instructable to: