Electronic – Always on lifepo4 power supply – will this circuit work

battery-chargingpower supply

I'm building a music box based on a Raspberry Pi and a HifiBerry AMP2 amp. The amp unit takes 12-24V DC and supplies the Pi with 5V. I want to be able to power the amp/Pi by either a mains adapter (16V DC switching mains adapter), or LiFePO4 batteries built into the music box. I bought this cheap battery management module to experiment with:

enter image description here

The module has these connections: a 5-pin plug for monitoring/protection of the cells, a solder patch labelled C- (charging negative terminal?), a solder patch labelled P- (power out negative terminal?), and a solder patch labelled B- (battery negative terminal?).

The only usage documentation is a diagram on the unit indicating that B- should connect to the negative terminal of the first battery in the series and that P+ and C+ should connect to the positive terminal of the last battery.

So, first, am I right in thinking that this unit would normally charge from C- and C+ and that I should take power from P- and P+?

Second, will my proposed circuit below work as a power supply for my amp/pi, so that when the mains adapter is plugged in power will come from the adapter while allowing the batteries to charge, and when it's not charging the power will come from the batteries?
power supply circuit

The terminal blocks in my diagram represent the connectors on the module, the two diodes are 10SQ050 10A 50V Schottky with a specified voltage drop of around 0.5V and J1 is the power connector from the 16v supply.

The reason I'm using the two diodes and supplying power from C- and C+ is so that current won't be flowing through the BMS while the box is connected to the mains. Considering that the BMS will hold the batteries at a constant 3.7V once charged I'm hoping I can just leave the thing plugged in to mains without harm. Is that right?

Best Answer

There are two considerations with using these cells. One is keeping the cells in balance after repeated charges. The other is safety if the cell ever gets charged over voltage, shorted out, or whatever. (With LiFePo4 you are already on much better ground than with for instance LiPo, even so this has to be considered.)

You can buy cells with or without internal protection (basically a tiny PCB that goes open the moment bad things happen) and if you you get them with, that is already one major consideration less. In the RC world they typically buy these cells as a pack, and then they are charged together in bulk, with chargers that balance the cells during the charge process. Basically if one cell charges faster than the others, a transistor across it bleeds off current until the others catch up. There is no real alternative, as all cells get the same series current.

However, if you buy individual cells instead of a pack, and charge them individually, the whole problem is much simplified. Cells are kept in balance automatically, and if one ages faster than the rest you don't have to replace the whole pack. Also it is much easier for a single cell charger to ensure that its cell is never exposed to overvoltage. You pay a bit more up front for battery holders, chargers and so on, but there is less to go wrong.

Regarding the powering arrangement - I would do the diodes the other way around - a classic "diode or" arrangement:

schematic

simulate this circuit – Schematic created using CircuitLab

This so that everything has a common and unambiguous ground. Or - as you presumably know when you are plugged in - why not a chunky SPCO switch? then no diode losses or leakage at all.

Related Topic