Electronic – Current sensing for backup battery circuit with LiPo charger

battery-chargingboostlipoups

I'm trying to design a circuit that provides backup LiPo battery power to a +5v rail. The rail is sometimes powered by an external USB supply and sometimes not – I want my circuit to act as a power sink when the USB supply is present and act as a source when it is not. The main difficulty is that the USB supply and the load are joined together in an external system and cannot be separated – the only interface I have to this system is the +5v rail at point A in the schematic below:

enter image description here

This is the best solution, I can think of, but it is incomplete. My main questions are,

  1. Will the small resistance in series with the boost converter effectively prevent the battery discharging when Vusb is present?
  2. How can I obtain the active-low enable input (EN) for the battery charger, that is high when the boost converter is providing current and low otherwise?
  3. Can anyone suggest a better solution that charges/discharges a LiPo according to whether another power source is present or not, where the USB source and load are hardwired together and cannot be separated?

Best Answer

You need to sense if there is 5v on the USB rail, and know where that voltage is coming from. Here is my solution to your problem:

enter image description here

In summary, you need to provide a reference voltage using the Lipo battery. Compare this reference voltage to the USB 5v rail using an op amp to sense if there is 5v present on the rail. Also, use the output of the boost converter (before the diode) to sense if the boost converter is on. Feed the "boost converter on" signal and the "5v present" signal into a NAND gate to get an active low signal for the charger circuit. To enable the boost converter, feed the "5v present" signal into a not gate, and connect the output to the boost converter enable terminal.

The resistor dividers including R1, R2, R3, and R4, need to be set up so that the output voltage is 0.5v. (Or anything less than your reference voltage, the important part is that they are the same.)

Related Topic