charging lipo batteries

Anything not related to STM32
ag123
Posts: 475
Joined: Thu Dec 19, 2019 5:30 am
Answers: 1

charging lipo batteries

Post by ag123 »

i stumbled into an interesting resource
panasonic lithium ion batteries
https://industrial.panasonic.com/ww/pro ... /NCA103450
what is interesting is the app note found on the related info links
https://industrial.panasonic.com/cdbs/w ... 000PE4.pdf
it seemed to be an interesting algorithm to charge a li-ion or lipo battery.
of course these days there are dedicated ics but i'm thinking if perhaps we can combine that with some solar cells and have stm32 switch a p-channel mosfet i(i'm not sure if a parallel capacitor is necessary) to maintain charging voltage during the day and double up as a normal charger if it is a real 5v power source

mrburnette
Posts: 262
Joined: Thu Dec 19, 2019 1:23 am
Answers: 1

Re: charging lipo batteries

Post by mrburnette »

LiON is good if a management IC is incorporated and such logic could be managed by a microcontroller if the uC is awaken periodically to monitor the remaining charge.

However, I have been using LiFePO4 for years and no overly complex charging regimen is required. They can be float-charged! This means one can use a DC-DC cheap boost (or buck) to get from solar cell to the 3.4'ish "perfect voltage" for battery charging.
https://www.powerstream.com/LLLF.htm

The 3.2 nominal terminal voltage is ideal for 3.3V microelectronics. At 3.4V, the cell is 96% - 99% charged and that voltage is safe for the STM32 uC which is rated <= 3.6V.
LiFePO4 charge percentages.jpg
LiFePO4 charge percentages.jpg (82.35 KiB) Viewed 532 times
https://www.powerstream.com/lithium-pho ... oltage.htm
LiFePO4.jpg
LiFePO4.jpg (49.15 KiB) Viewed 532 times

GonzoG
Posts: 43
Joined: Wed Jan 15, 2020 11:30 am
Answers: 3

Re: charging lipo batteries

Post by GonzoG »

Charging li-ion algorithm is pretty simple and you can find it on many web sites.

You could use STM32 as uC for a charger but you'll need few more elements. Li-ion batteries are charged using CC/CV method, so you need to control voltage and current.
But it's easier to use dedicated uC (eg. TP4056)

mrburnette
Posts: 262
Joined: Thu Dec 19, 2019 1:23 am
Answers: 1

Re: charging lipo batteries

Post by mrburnette »

GonzoG wrote:
Sat Oct 10, 2020 4:32 pm
Charging li-ion algorithm is pretty simple and you can find it on many web sites.
...
Yep, that is what ag123 was saying by giving the PDF documentation for the algorithm + flowchart. No doubt, it is straight-forward and the dedicated IC's are cheap, but my point is if your power requirements match what a LiFePO4 cell will provide, then there is no need for an algorithm ... just set the POT on a DC-DC buck/boost (around $1) to 3.45 and you are good to go... I have used this technique for years and the cells are still taking a charge.

Ray

ag123
Posts: 475
Joined: Thu Dec 19, 2019 5:30 am
Answers: 1

Re: charging lipo batteries

Post by ag123 »

Thanks Ray
I'd guess I'd check out LiFePO4 batteries sometime.
For now as I bought a couple of cheap18650 batteries (accordingly likely the worse in terms of safety) and
some solar cells, I think I'd hack something out with a mosfet and STM32 :D
Among the considerations there's 2 pieces of non linear stuff here. The solar cells can deliver some combination of peak power, but shorting it literally gives zero power since voltage is zero. While the lithium Ion battery needs an elaborate constant current - constant voltage charging scheme. STM32 can perhaps manage the battery and charging for part of time, and does other things e.g. monitor sensors, drive actuators other part of time

mrburnette
Posts: 262
Joined: Thu Dec 19, 2019 1:23 am
Answers: 1

Re: charging lipo batteries

Post by mrburnette »

ag123 wrote:
Sat Oct 17, 2020 7:25 pm
...
The solar cells can deliver some combination of peak power, but shorting it literally gives zero power since voltage is zero. While the lithium Ion battery needs an elaborate constant current - constant voltage charging scheme. STM32 can perhaps manage the battery and charging for part of time, and does other things e.g. monitor sensors, drive actuators other part of time
I^2 R ... pssst, the doped silicon has a resistance :shock:
Screenshot 2020-10-17 195800.jpg
Screenshot 2020-10-17 195800.jpg (68.67 KiB) Viewed 357 times

ag123
Posts: 475
Joined: Thu Dec 19, 2019 5:30 am
Answers: 1

Re: charging lipo batteries

Post by ag123 »

Yup, thanks Ray, saw a graph like such ;)
I'm thinking in terms of pulsing a P channel mosfet and charging the li-ion battery. STM32's adc can monitor voltages at the terminals. When the mosfet is off the input would be the open circuit voltage of the solar cells and the other end the residual voltage of the battery. Kind of a 'pwm'.
When the mosfet is on assuming a short circuit, the voltage would drop to the residual voltage of the battery. Below 4.2v, I can pretty much leave it to change. When it reaches 4.2v I can kind of 'pwm' it to mimic a reducing current charging say for an hour and finally off.
If it is dark, solar cells like diodes are naturally reverse biased hence back flow isn't an issue.

i'm thinking an n channel mosfet or even transistor in series with the solar cell at gnd may work too, just that there is the added complication of a 'non zero' gnd.

GonzoG
Posts: 43
Joined: Wed Jan 15, 2020 11:30 am
Answers: 3

Re: charging lipo batteries

Post by GonzoG »

ag123 wrote:
Sun Oct 18, 2020 7:44 am
Below 4.2v, I can pretty much leave it to change. When it reaches 4.2v I can kind of 'pwm' it to mimic a reducing current charging say for an hour and finally off.
I think you haven't read charging algorithm....

You need to limit voltage to 4.2V and reduce current when below 4.2V. When charging voltage reaches 4.2V current draw will slowly drop.
You cannot limit voltage using just a mosfet and low frequency PWM. You'll need high frequency PWM and LC filter.

ag123
Posts: 475
Joined: Thu Dec 19, 2019 5:30 am
Answers: 1

Re: charging lipo batteries

Post by ag123 »

i see, in that case my guess is that it may be possible with a parallel capacitor that would smooth out the voltage transitions with pwm so that an average voltage of 4.2v is maintained. the pwm duty cycle can probably be reduced as the variation about 4.2v approaches zero

cjcj1949
Posts: 1
Joined: Sun Oct 18, 2020 1:12 pm

Re: charging lipo batteries

Post by cjcj1949 »

Each lipo has a maximum charge current. 1c is often used as a sensible value. Higher charge currents tend to lower the lifetime. Also lipos have a shorter life when kept at higher voltages.They are usually stored at a storage voltage of 3.85 volts. They also last longer at lower temperatures, they also supply less current at lower temperatures. They can be made to burn if abused.

Post Reply

Return to “Off topic”