Electronic – Battery charging and discharging problem

battery-chargingcomparatorhysteresis

I have designed a battery charging and discharging circuit. The main purpose of this circuit is to charge the battery and then discharge, one operation at a time. I have also added a hysteresis of 3.4V and 4V.

Battery voltage is compared with the set hysteresis voltage and when the battery voltage reaches 4V, the charging is then stopped and then the battery is discharged to load; this is controlled by MOSFEST as a switch. When the battery voltage reaches 3.4V the switch is then turned off and then charge the battery.

It works in the simulation and it also works when I use power supply as a battery. The problem is when I connect the real battery the following things happens,

  1. When the battery is charging and its voltage is around 3.97 the discharging takes place. At this point it is charging as well as discharging, why doesn't it reach it 4V?

  2. Then I checked the output of the comparator which controls the switch, then I noticed that the output of the comparator is going crazy on and off (5V and 0V).

Why is the hysteresis not working and is there any way I can solve this?

this is my schematic
enter image description here

this is the new schematic, easier to understand 🙂
enter image description here

Best Answer

The comparator and battery charger (LTC4071) are making decisions independently of each other. The battery charger is looking for the battery to reach 4.0, 4.1, or 4.2V, depending on how you jumper the ADJ pin. However that only sets the voltage limit, it never stops trying to charge the battery. According to the data sheet page 10, "The LTC4071 does not have a discrete charge termination." The usage scenario being that it always tries to put current into the battery and the battery limits its own current when the charger goes into voltage-limit mode, then the current slowly reduces to nearly zero as the battery gets really full, at which point it's receiving a "float" charge. There is the HBO pin which shows when the battery is at voltage limit, but this isn't the same as the charger turning itself off.

Meanwhile the comparator is looking for the battery to reach 4.0V. I'm not sure why it's oscillating but possibly you're overloading what the charger can pass through since the load is in parallel to the battery, and the charger has to provide for them both. Or overloading the input source, whatever it is, solar panel or wall adapter? Or the load is so huge that it is actually pulling down the small battery to below the low-battery threshold. You don't state whether other parts of the circuit are also oscillating.

What you might want is a setup where the battery charger turns itself off when done and signals the load to turn on, and the load in turn signals the charger to start charging when it turns itself off. Since your battery charger IC doesn't have an enable pin and doesn't turn itself off, you might have to rig something up with FETs to gate power into or out of the charger, or swap the charger IC to something more appropriate. Is the goal to test battery cycle life, or specifically this circuit also?