Being in the hacking business for some time now, I have accumulated a box of different lithium batteries. Most of them partially used, they usually came from the battery packs in which only one cell from the pack shows signs of permanent death rendering others cells in series unusable. Having this box of usable cells I was considering different alternatives of connecting them into bigger battery to create some stationary energy storage for renewable energy sources.
To use any battery efficiently two things are usually required; a dedicated charger and converter which will change battery floating voltage to suit final energy receiver. When bigger capacity batteries are required, the number of cells is increased and bigger charger and converter are fitted. This creates the problem of single point of failure when single cell in the battery fails.
This project aims to solve this problem by creating modular solution in which big capacity battery is created from number of small units which each contains its own charger, converter and battery monitor circuit. By using bi-directional topology, charger and output converter circuit can be implemented using the same power stage elements.
By using distributed approach to energy storage the whole system capacity does not have to be predefined and does not have to be reliant on every single part working. If the elements are design to gracefully fail the whole system can operate even with partial capacity.
To be able to connect multiple of energy storage units together they all have to match in output voltage. That calls for switch mode converter. By using bi-directional converter the power elements can double up for charger and output converter (see figure below). There is a number of designed switch mode controllers IC but none (very few) of them support bidirectional energy transfer. That is why I was forced to create custom controller which was problematic but in the end it lower the parts count since the microcontroller was already required for battery monitoring.
Ideal constant voltage source
The ideal desired characteristics of the designed power converter is to make the energy storage cell an ideal voltage source. The unit should source or sink current to keep the constant voltage at the output. Of course there are safety limits to maximal output and input currents so the controller should switch to constant current source when those are crossed.
Voltage controlled current source
There is a number of ways to create feedback loop for switch mode power converters, after considering alternatives and the available parts I decided to experiment with maximum inductor current limiting. I sketched an idea of using comparator with hysteresis to create unstable/oscilating bidirectional current limiting circuit which keeps the inductor current within predefined bounds. By injecting external offset it creates voltage controlled current source. See the figure bellow.
"Bang-bang" output voltage control
Having this concept of voltage controlled current source block I had to draw a rules for closing the feedback loop. I decided to go for simple and fast “bang-bang” controller to keep the output voltage and battery voltage within bounds. The controller in fast 50kHz loop executing simple code:
If((OutputVoltage<11.9V)&&(BatteryVoltage>2.8V)) //Output mode SourceMaximumCurrent(); Else if((OutputVoltage>12.1V)&&(BatteryVoltage<4.2V)) //Charging mode SinkMaximumCurrent(); Else KeepOutputCurrentZero();