Author Topic: Charging a Lifepo4 with an Lm2596 module  (Read 2101 times)

0 Members and 1 Guest are viewing this topic.

Offline Tj80Topic starter

  • Newbie
  • Posts: 5
  • Country: gb
Charging a Lifepo4 with an Lm2596 module
« on: August 15, 2020, 05:15:56 pm »
Hi,

I'm trying to build a project which includes a Lifepo4 battery to run a Wemos D1 Mini for many months using deep sleep. I also need a charger circuit to allow the battery to be charged when power is available.

I'm trying to use an LM2596 constant current module to do this, and although it charges the battery fine I am having trouble with the battery discharging through the LM2596 module at around 9mA when no power is being input.

I have tried putting a diode between the positive output of the LM2596 module and the battery positive and increasing the output voltage of the module to overcome the diode drop. This stops the discharge from the battery into the LM2596 module - but now the battery won't charge! Actually, it does charge - but only at 0.9mA compared to ~150mA at the current state of charge without the diode. I can't fathom out what's going on and why the simple addition of a forward biased diode is stopping the thing from working!

Any advice gratefully received!

Many thanks,
Tim
 

Offline bin_liu

  • Contributor
  • Posts: 38
  • Country: cn
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #1 on: August 17, 2020, 01:02:15 am »
LM2596 is constant voltage module,you need CC and CV circuits.
LM2596 can be completed with LM358. . .
 

Offline Tj80Topic starter

  • Newbie
  • Posts: 5
  • Country: gb
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #2 on: August 17, 2020, 08:39:19 am »
Hi,

Thanks for the reply. The module I'm using is one of the commonly available CC and CV ones - same as this:

https://www.ebay.co.uk/itm/292139967286

I have set a 500ma current limit and 3.6v constant voltage, this all works fine to charge the battery without the diode but not with.

I'm wondering if the forward biased resistance of the diode is high enough to affect it?

Many thanks,
Tim
 

Offline bin_liu

  • Contributor
  • Posts: 38
  • Country: cn
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #3 on: August 18, 2020, 12:54:50 am »
The voltage setting is wrong. When the battery is not connected, it should be 4.2V. If a diode is connected to the output, must be 4.2V+VF.
« Last Edit: August 18, 2020, 12:57:18 am by bin_liu »
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9159
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #4 on: August 18, 2020, 01:27:13 am »
The voltage setting is wrong. When the battery is not connected, it should be 4.2V. If a diode is connected to the output, must be 4.2V+VF.
LiFePO4 is only 3.6V fully charged. I actually recommend 3.45V since the extra charge you can get going to 3.6V is especially small with LiFePO4 but keeping the charge voltage lower increases service lifetime.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Tj80Topic starter

  • Newbie
  • Posts: 5
  • Country: gb
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #5 on: August 18, 2020, 02:33:42 pm »
Yes, it's 3.6v for the LiFePO4 cell (I'm using one of these instead of a Li-ion battery because I want to run the Wemos D1 Mini without a power-sapping voltage converter).  Agree on reducing the charge voltage, I was going to go for 3.5v but used 3.6 to get a higher charge rate while testing - interesting you suggest 3.45v, I may give that a try.

My next option is to use a simple relay to completely disconnect the battery from the LM2596 module unless the module itself is powered, but that feels like a horribly clunky solution!  It will also consume a bit more power, but at least it won't discharge the battery.

Many thanks,
Tim
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6948
  • Country: pl
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #6 on: August 18, 2020, 07:09:18 pm »
It doesn't work because it takes some voltage drop across the diode to force current through it. See "typical forward characteristic" in the datasheet, it's gonna be 0.6~0.8V for reasonable currents. And no, you can't increase LM2596 output by 0.6V because it will also be 0.4V for slightly lower current, which my still end up slowly overcharging the battery by 0.2V.

In theory you could take feedback to the LM2596 from behind the diode, maybe, but then the feedback divider would be discharging the battery so it's pointless.

Some kind of "ideal diode" circuit would help, if you can find one that has negligible leakage when off. I'm not familiar with those things.

A relay doesn't even look that bad at this point.
 
The following users thanked this post: Tj80

Offline Tj80Topic starter

  • Newbie
  • Posts: 5
  • Country: gb
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #7 on: August 18, 2020, 09:10:11 pm »
Interesting. Many thanks - relay it is then!

Cheers,
Tim
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3578
  • Country: nl
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #8 on: August 18, 2020, 11:40:22 pm »
The voltage drop over the diode is the most likely cause of your troubles.
The voltage to current curve is actually exponential, but for practical reasons it's usually taken as a constant 600mV voltage drop in forward direction (for silicon diodes) and some 300mV for Scottky diodes.

You can make an "ideal" diode with a mosFET. MosFet's do not have an inherent voltage drop, they have a (relatively constant) resistance when "on". The "on" resistance of a Mosfet can easily be as low as 10mOhm, even for small mosfets (SOT023 housing).

But in your case a simple mechanical relay seems a good solution.
The relay is then directly powered from your external power source, so the current drain won't be a big problem.

Also, think about any electronic component connected to the battery in your circuit.
Current leakage through an electrolytic capacitor can be 100uA, and can be bigger than the current of your uC in deep sleep.
 
The following users thanked this post: Tj80

Offline bin_liu

  • Contributor
  • Posts: 38
  • Country: cn
Re: Charging a Lifepo4 with an Lm2596 module
« Reply #9 on: August 19, 2020, 12:34:24 am »
I'm wrong.
mistake it is Li-ion. ;D
Lifepo4 OCV is 3.65V.after stopping charging.voltage will drop.is ~3.4V/CELL.
« Last Edit: August 25, 2020, 12:38:44 am by bin_liu »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf