I have a project to construct a simple to build, reprogrammable battery charger that will preferably avoid using any exotic parts. To do this, I have used the venerable TL494 chip because I was able to find some clear information on how to use it and it is super available and there are gazillions of clones of it. I realize it has some severe limitations. So I use the parts ATMEGA328P, TL494, and LM358, as these are all about as common as you can get. I know of commercial solutions like the LT3741:
https://www.analog.com/en/technical-articles/power-supply-ensures-safe-charging-of-surpercaps-and-liion-batteries.htmlbut these are quite expensive at $10 apiece.
The TL494 is commonly used for constant voltage supplies such as ATX power supplies. There are capacitors that hold the voltage of the output constant and so a buck converter with a reasonable switching frequency and with medium duty cycle can maintain a low-ripple variation at the output. Typically these supplies when they sense overcurrent pull the dead time control line high with a SCR to shut down the supply until a power cycle occurs and so a constant current mode is not used.
My device uses a buck converter to convert from +24 VDC or so (like a laptop power supply) to a lower voltage, from 4 to 14 VDC. If the buck converter is in constant voltage mode things are ok and the ripple is mostly dependent on the difference between the input and output voltages, with more ripple when the ratio of the voltages is higher. But if one wants to try to deliver a constant current there is a problem when there is a large capacitor at the output to reduce ripple because the capacitor causes a large lag in the response of the current at the output because the capacitor must be charged and discharged. When the current is too high the comparator is triggered and the duty cycle falls. The large capacitance puts a significant lag in the compensation loop and therefore the ripple can be quite large, about +/- 200 mV or so depending on the ratio of input and output voltages, and there is about a 4-20 kHz oscillation in the output voltage. I played around with the compensation on the voltage and current quite a bit and didn't see a huge difference.
The problem as I see it is that there is a fundamental issue with a constant voltage/constant current power supply, where a large capacitor at the output is needed to reduce ripple, but then prevents the constant current mode from regulating precisely. This must also be common to linear supplies as well. The LT3741 seems to solve this problem by switching rapidly (200 to 1000 kHz) and using a small capacitor (2 X 150 uF) at the output.
So now a few questions:
1. Does some voltage ripple at the output on the order of 100 to 200 mV hurt charging batteries? For example, a 4.2 V 1-cell or 12.6 V lithium iron battery with balancer?
2. Since there is a microcontroller monitoring the charging, the constant current mode is there mostly to prevent a short circuit or some problem with the battery resulting in excess power being delivered. It is also there so that in case the microcontroller crashes or otherwise fails to respond, the TL494 can independently prevent a short circuit from being a problem. But if the microcontroller responds reasonably fast, say within 10 to 100 ms, and dials back the voltage so that the constant voltage mode is restored, or just shuts the charge down, would that be fast enough to avoid a problem?
3. Is there some ingenious solution to this problem that I have missed in my internet searching? I wonder for example if extra capacitance should be switched in and out with a MOSFET or relay when entering constant voltage mode and disconnected using constant current mode?
Anyways I know that I was advised against using the TL494 but it works certainly as a constant voltage supply and kind-of as a constant current supply.
I have the schematic and a picture of the device below.