Battery charger circuit design

Thread Starter

Nikolas_

Joined May 30, 2020
8
Hey, so I am trying to design and build my own battery charger for 4 cell LiPos (including HV-LiPos with 4.35v/cell) but I don't have a lot of experience with circuit design.

I designed this circuit so that it can either supply a constant voltage or constant current to the battery with the other one being a backup.
I use OPAMP_current and OPAMP_voltage to control the corresponding mosfets, with the reference voltage being supplied by DACs which will be controlled by a microcontroller.
For measuring current I use a small resistor in series with the load and a current-sense-amplifier which amplifies the voltage drop across that resistor.
For measuring the battery voltage I use a voltage divider.
Since both measurements are sensitive to loads being applied to them I use additional opamps as voltage followers and read their outputs with the microcontrollers ADCs.
The 100ohm resistors across the inputs of the control opamps are there to limit the overshoot for example when the battery suddenly gets disconnected. (found that idea on the internet and it works in simulation, not sure if it's a good way to do that though)
Regarding balancing of the cells, I will probably just copy one of those balancing boards that you can get for a few bucks on ebay.

My question is, would this circuit work the way it is and if it would, are there any things missing that would improve reliability or are just good practice?

charger.png
Thank you,
Nikolas
 

ci139

Joined Jul 11, 2016
1,463
the DAC_voltage 3V basically forses the close by op Amp to 3V reference ... the 24.9:5.6 divider is pulled near 3V by R_damp (100Ω) ?
making it (Op Amp) much likely a comparator (or not working as what you intended to achieve)

MOS-Fet is very sensistive at it's linear region ( like the Darlington BjT pair) . . . it likely gonna oscillate if work at all (however the oscillation can be utilized for PWM/PPM with some adjustments . . . )

it's the first thing that i noticed

otherwise -- getting started is half way covered . . . keep it up!
 

Thread Starter

Nikolas_

Joined May 30, 2020
8
the DAC_voltage 3V basically forses the close by op Amp to 3V reference ... the 24.9:5.6 divider is pulled near 3V by R_damp (100Ω) ?
making it (Op Amp) much likely a comparator (or not working as what you intended to achieve)

MOS-Fet is very sensistive at it's linear region ( like the Darlington BjT pair) . . . it likely gonna oscillate if work at all (however the oscillation can be utilized for PWM/PPM with some adjustments . . . )

it's the first thing that i noticed

otherwise -- getting started is half way covered . . . keep it up!
Hey, thanks for the reply!
The DAC_voltage would not always be at 3v, it's controlled by the microcontroller and set so that the maximum output voltage of the circuit is set to \( Vout = \frac{DACvoltage} {\frac{5.6} {24.9+5.6}} \) (assuming that the maximum current, which is set by DAC_current, isn't exceeded)
Since the output of DAC_voltage should be the same as the output of the voltage divider I thought that R_damp would bring the voltage divider close to DAC_voltage so that the difference at the inputs of OPAMP_voltage is relatively small which would reduce the rate at which it tries to raise the voltage at the voltage divider (which it does by increasing the voltage to the gate of MOSFET_voltage).
The reason I want to limit the slew rate is to reduce overshoot when sudden changes are made to the system (for example battery gets unplugged)
At least that was my thought process.

As for the oscillation, is there any way to counter that in a circuit like this?
 

KeithWalker

Joined Jul 10, 2017
895
I am old-school (very old!) and found your diagram very difficult to understand. It is neither a complete circuit diagram nor a complete block diagram. It is in a convention I am unfamiliar with.
You are not monitoring the voltage across each cell so you will run the risk of damaging your batteries if the cells get out of balance.
Regards,
Keith
 

crutschow

Joined Mar 14, 2008
24,968
Typically a LiPos battery is initially charged with a constant-current, and then a constant-voltage to top off the charge (all while sensing the battery voltage).
Your circuit needs to do that.
Read this for more info.
 

Thread Starter

Nikolas_

Joined May 30, 2020
8
I am old-school (very old!) and found your diagram very difficult to understand. It is neither a complete circuit diagram nor a complete block diagram. It is in a convention I am unfamiliar with.
You are not monitoring the voltage across each cell so you will run the risk of damaging your batteries if the cells get out of balance.
Regards,
Keith
I made this circuit in a simulation software called Multisim.
I very rarely design circuits so I just selected the parts I wanted from the parts library and connected them without paying attention to any conventions.. sorry if it's in a confusing format as a result.

Considering the cell balancing, I mentioned above that I will probably use a generic LiPo balancing board/module from ebay. Something like a 4 cell variant of this. The microcontroller I want to use also has several ADC channels to monitor the cell voltage in case something goes wrong with the balancing.
The circuit above is just the power delivery section.
 

Thread Starter

Nikolas_

Joined May 30, 2020
8
Typically a LiPos battery is initially charged with a constant-current, and then a constant-voltage to top off the charge (all while sensing the battery voltage).
Your circuit needs to do that.
Read this for more info.
It does.
DAC_current is used to set the target current while DAC_voltage is set to (or slightly above) the voltage that is needed to create that current. Since DAC_current and DAC_voltage limit maximum current and maximum voltage and they are in series, the "weaker" one (in the beginning the current regulator -> CC mode) will determine the power delivered to the battery. The other one will act as a backup safety. At the end of the charge cycle the voltage regulation will be set to the battery target voltage and become the "weaker" one -> CV mode
 

ci139

Joined Jul 11, 2016
1,463
i don't know much abiout the Li-Fe-PO ... the Ni-MH has at it's discharged state quite high internal resistance so at the beginning it may develope over 2V terminal voltage then as the internal resistance lowers (battery gets more charged) ... and the terminal voltage drops below 1.6V and slowly rises to apx 1.7V (while getting fully charged) at trickle charge (low current) the voltage is about 1.5V

what i'm concerned about - is that the "idealized" charging curves might be a high time exception - you must know how your battery responds to input at various chemistry age SOC temperature . . .

it takes a lot of LAB time and/or reading the related documents ... before you can attempt to design a charger of your own and expect it being a success
 

KeithWalker

Joined Jul 10, 2017
895
It's not that difficult to charge Li-Po batteries. I charge all sizes of them using an old regulated bench power supply. First, I short the output terminals and adjust the current limit to suit the battery and then I set the open circuit voltage to the final charging voltage of 4.2V per cell.
The charge will start off in current limit. If the battery contains cells in series, I check the voltage across each cell once in a while to make sure they are reasonably equal. When the battery voltage reaches the pre-set voltage, the current gradually falls. I disconnect the charge at about 1/10th the current limit. It would be very easy to make it all automatic with an arduino.
Keith
 

sparky 1

Joined Nov 3, 2018
184
A good start.
An adc that records and gives graph of voltage over time will show the cycles of the various ion batteries. So the uController program can include conditioni g batteries that are drifting away from cycle. Thermal monitoring so an unattended charging makes allowance for chemistry sometimes has to cool. Efficiency and longevity of battery life trade off.
 
Last edited:

Thread Starter

Nikolas_

Joined May 30, 2020
8
Thanks for all the replies, really appreciate it.
I'm planning to charge only a very limited subset of LiPos (which I have a lot of experience with) with this and I'm pretty sure that if I can get the circuit to do what I want I will be able to charge them safely. (but of course I will never let them charge unattended)
The problem is the analog circuit design part because I have almost no experience with that.
Do you have any comments or suggestions for the circuit in my post?
 

ci139

Joined Jul 11, 2016
1,463
ok . . . how do the DAC1 DAC2 behave (simplified/basic/general description , however something else than "they change")
 

Thread Starter

Nikolas_

Joined May 30, 2020
8
They are both 12-bit and have a 3.3V supply and reference voltage.
DAC_current is used as a reference by OMAMP_current to compare it to the measured current (1V = 1A) and will initially be set to 0v. Since output voltage goes from 0 to Vref on the DACs, current can be set in 3.3/4096=0.8mA steps with a range of 0 to 3.3A.
DAC_voltage is used as a reference by OMAMP_voltage to compare it to the measured voltage (1V at the battery = 5.6/(5.6+24.9) V at the OPAMP). With 3.3V max from the DAC a max voltage of \( \frac{3.3} {\frac{5.6}{5.6+24.9}} = 17.97V \) could be set (though it will never be that high because the LiPos max out quite a bit lower). Voltage can be set in 17.97/4096=4.4mV steps and will initially also be set to 0.
When charging is started, DAC_current will slowly be increased to the maximum charging current set by the user. After that, DAC_voltage will slowly be increased until the voltage at the battery is high enough to allow for the set charging current to flow, though never higher than the voltage of a fully charged battery (can also calculate the initial internal resistance of the battery once charging current is reached by looking at the required voltage and put in a safety if it's too high).
As the battery gets fuller and the set voltage maxes out at the voltage of a full battery, the current will start to decrease until the battery is full.
If that answers your question, I have said most of this in previous replies, and if not, I'm not sure what you mean and you'll have to be more specific.
 

Thread Starter

Nikolas_

Joined May 30, 2020
8
Well I did just retype it all in that last message. It also was only 5 short messages to begin with and you even replied to 3 of those so I really don't know what you are complaining about...
 

ci139

Joined Jul 11, 2016
1,463
re-charger.gif
basically a good start (for the 1-st analog design) . . . but i guess you need to revise your topology
((( the current sense 10x (depending on what kind of sensing circuit you use) may require more stages than one ... = might add a lot of complexity )))

i have made (while ago) a Spice design of similar circuit
_________
Vdd
P-mos switched , filtered CV
floating LOAD
N-mos linear CC
GND
¯¯¯¯¯¯¯¯¯
but it assumed the load is always present + used high value capacitors to prevent (a floating load) CC to oscillate --e.g.-- a quite complex design
__________________________________________________________________
Update : since i don't feel at home about Li-Ion nor LiFePO
about Li-Ion (i guess) : Li-Ion Battery Charging Requires Accurate Voltage Sensing | Analog Devices
example topologies Li-Fe-PO : Selection Table for Buck-Boost Battery Chargers | Parametric Search | Analog Devices
at https://www.analog.com/en/products/lt1511.html#product-overview
.... https://www.analog.com/media/en/reference-design-documentation/design-notes/dn242f.pdf
.... https://www.analog.com/media/en/technical-documentation/application-notes/an84f.pdf Fig.226 Fig.238 ... Fig.241 , Fig.242
 
Last edited:

Thread Starter

Nikolas_

Joined May 30, 2020
8
Thank you for your notes!
Regarding the current sense, I plan to use an INA138 current shunt monitor (this one) which creates a current proportional to the voltage difference at the inputs which is then "converted" back to voltage with a resistor and the amplification is set by the resistor value. Unless I'm missing something (which is quite possible) I think it should be pretty simple.
About the mosfets, what exactly is Vx? And would it help if I use logic level mosfets?
 
Top