Dear All,
I've found this very nice document about battery management with a Buck DC-DC acting as a current-source and voltage source for charging a battery.
I'd like just to signal a probable mistake into the circuit behaviour on page 2 of the document. The U3 is a differential amplifier connected to amplify the voltage across the sensing resistor R5. Due to the connection of the differential amplifier U3 the output voltage is directly proportional to the current flow trough the sensing resistor and not, as written, inversely proportional. In this way when the current trough the resistor R5 take a value able to produce a output voltage greater than the reference voltage that is inside U1, the feedback loop reduce the U1 output voltage then the current trough the load and battery. When the current request from the load is lower than the programmed value (set by the value of R5) the U3 output voltage is lower than the voltage supplied from the resistor divider (R2 and R3) then the diode D2 will be inverse polarized hence not able to conduct. In this situation the current loop is not working and the feedback came directly from the resistor divider hence the regulator work as a voltage regulator.
Hoping to have explained in a clear manner the circuit behaviour your comments are welcome.
Best regards
Fabio