Buck converter with a simple CC mechanism - Page 1
Forum section: electronics / projects

author: bremenpl
author_rank: Newbie
timestamp: May 26, 2023, 12:33:16 pm
content: Hello there,I am in need of charging a 4S LiFePo4 string with adjustable current during runtime (i.e., via MCU's DAC output). I am trying to adjust the basic AP64501SP-13 buck converter circuit for that.https://www.diodes.com/part/view/AP64501/#tab-overviewBased on some ideas and information found on the web I was thinking of adding a voltage to current converter to feed it to the SS pin (attachment).But I am not sure how well will this design work (if even). Connecting to the FB pin instead of SS would break the CV loop that is needed as well (voltage divider to be fixed for 14.4 V float voltage). Dedicated charger with I2C/SMBUS communication that allow to set the charging current via digital communication are an overkill here.I would appreciate all help and suggestions.

author: robert.rozee
author_rank: Frequent Contributor
timestamp: May 26, 2023, 05:38:57 pm
content: i see the AP64501 has a 0.8v reference. here is a quick-and-dirty solution...from the 'typical application circuit' you posted:1. replace R1 with your string of 4 cells, which have a total maximum voltage at full-charge of 3.6 x 4 = 14.4 volts,2. change the value of R2 to be 0.8 / Ic, where Icis your desired charging current,3. place a large zener diode across the your batteries. it's voltage should somewhere around halfway between 13.2v and 14.4v.attach a thermistor to the zener diode, when it starts to warm up this is when you want to stop charging. alternatively, you could sense the battery voltage approaching 14.4v to stop charging. you want some hysteresis in here, start charging when the battery voltage drops below 12 volts (3.0 x 4) and stop charging when it approaches 14.4 volts (3.6 x 4).you may also want to add a diode in series with the battery to stop discharging when the charging portion is unpowered, although the AP64501may already take care of this. LiFePO4 cells are relatively robust when compared to the NMC et al (4.2v) technologies, but one shouldn't push it.cheers,rob :-)

author: dobsonr741
author_rank: Frequent Contributor
timestamp: May 26, 2023, 06:08:39 pm
content: The "What can go wrong?" is described here: Design Trade-offs for Switch-Mode Battery Chargershttps://www.ti.com/lit/ml/slyp089/slyp089.pdf

author: bremenpl
author_rank: Newbie
timestamp: May 27, 2023, 02:12:50 pm
content: Hi guys, thank you for the replies.Thing is I don't need a quick and dirty solution, but rather safe and robust one. The key here is to be able to control the charging current via DAC, while the CV can be fixed in HW to ~14.4 V.So far what I was doing, was to connect DAC to the FB pin via resistor. This way I did not control the current directly, but voltage instead. Then, knowong the current (measured elsewhere in the system), I could keep adjusting the DAC value (so buck converter output set voltage), untill I get a current thats close enough to what I need at the time. This worked, but gave a lot of rippless and deviations, since the control loop is slow- this is why I wanted to change the set point to current, instead of voltage.