Maker Pro
Maker Pro

My Li-Ion Battery Charger Circuit Is Not Working As Expected

DickA0537

Aug 19, 2020
7
Joined
Aug 19, 2020
Messages
7
Because of repeated failures of purchased chargers, I have been developing my own charger that I will know how to repair.


I have breadboarded a constant current charger and a constant voltage charger using an LM317 adjustable voltage regulator, following the simple designs in the ST data sheet: Figures 6 and 9 of https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.CD00000455.pdf


4p3WDG3fq9icLjRUUNsWYMjD9Wlu9lY-jucB_cD2aMYdbKCdbjicEmJHc7U_XG_HpsCiGrLM8D0YbV0lKDemvGguPeSBgP6lMi9sjW-Fs9ZDKPAOk9SY3uzsv_1kIy3IYBzzL_GD



NIQomqTQyIxEb9kTWJw-zoL_yPST1hfsMMy_mir6uMcccanlSEaq_fpMGGG3QIDK8zdgu7XmU_BOMhPE78B87g0uOL1dqUAG4eizHM-G7uVGZTV8YyzsBB_l6SFXXQHH9oKFmR2Z



My constant current circuit works perfectly, charging up a discharged 2-cell, 600 mAhr, "9V' battery to 8.00V in 1.5 hours at 400 mA. Upon stopping the charger, the battery drops off to 7.75V and holds it. Input power is 12.5V, 1 Amp. R1 is 3 ohms, 0.5W. The LM371 has a TO-220 type heat sink screwed on; I used thermal compound for good heat transfer and the combination barely gets warm.


When I switch to my constant voltage circuit, which differs only in R2 and the resistor connections, I get no current at all.


I adjusted R2 in Figure 6 to achieve 8.00V output without the battery attached.

The voltage (Vref) between Adjust and Output is 1.25V as expected, but it does drop to 1.22V when the battery is attached. R1 is 240 ohms. R2 is 2200 ohms + 1 Kohm pot.


I don’t think it’s a faulty LM317 because I used the same one for the constant current breadboard. Also, I have tried another one. Otherwise it’s a very simple circuit (all the complexity is in the LM317).


Can anyone offer a suggestion as to why that circuit is not working? I’m at my wits end.


If I don’t get this solved I’m just going to use constant current charging and live with a little (~20%) less battery capacity. I will use an Arduino Nano or ATtiny microcontroller (uC) to read battery voltage to know when to stop charging. The uC will use a transistor switched relay to open the charge line. I’ve been thinking about getting away from the 9V style battery packaging and going back to packs with thermal signal if possible for safety reasons. The uC can implement that as well as other features like limiting charge time to one hour and sensing charge current.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
What is the (measured) current from the regulator into the battery with the constant voltage circuit?
Do you have an oscilloscope to look at teh waveform of the voltage? Sometimes an oscillating voltage is shown by an ordinary multimeter in DC setting as a meaningless voltage. The regulator may be oscillating to to a lack of stability, see below.

Also have a look at figure 7 in the ST datasheet. The basic circuit(s) shown in a datasheet are meant to demonstrate the principle of operation. They are not necessarily complete operating circuits. Figure 7 and the accompanying text for example show additional capacitors and diodes to improve stability.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
If as the title suggests, you should not be trying to charge Li-Ion batteries using constant current alone. The correct process uses constant current in the first stage of charging switching to constant voltage when the batteries terminal voltage is approached. This stops the cells from being overcharged with resultant catastrophic damage.
If you don't know what you are doing then leave it alone!!!
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
If you don't know what you are doing then leave it alone!!!
Come on, give Dick a chance.

I agree with the first part of your response, butone can learn from one's failures.
Here is an explanation of charging LI-ION batteries along with some very simple circuits.
Here is a much more elaborate one using an arduino.
Many more circuits can be found by googling, from rather simple ones to highly specialized ones using dedicated charger chips.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
I agree that one can learn from their failures but getting it wrong with Li-Po's can be catastrophic leading to fire and / or explosion.
You really do need to understand what you are doing. Hence my comment.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
The low cost chargers for my radio controlled model airplanes charge my 2-cells Li-PO batteries to 8.35V which is close to the 8.40V full charge voltage. The chargers are balanced to avoid a cell with a lower capacity from over-charging and exploding. When the 8.35V is reached the battery is far from a full charge and the charging continues until the charging current drops to a low amount then it disconnects the charging.

Your simple circuit does not balance-charge and does not charge to a full charge. It is dangerous because it is missing all these safety features.
 

DickA0537

Aug 19, 2020
7
Joined
Aug 19, 2020
Messages
7
Harald,

Thanks for the nice response.

Some further info. I tried a resistive (10 ohm) load with the 8.00V output setting.

The result was even more dramatic: instead of the expected 0.8 amp output, the voltage dropped to 2.9V so the current was 0.29 amp as would be expected.


Following your advice I pulled out the only oscilloscope I have, which is an inexpensive handheld unit that is actually quite nice considering its $25 price. I have hardly used it and am not proficient with it.


However, I managed to get some data. There is some low amplitude oscillation/ripple riding on the 2.9V: 20 mV peak to peak with some glitches at twice the amplitude. Frequency is less than 200 Hz.


To answer your questions:

The measured current into the battery was zero at 8.00V

I do have 0.1uF ceramic capacitors on the LM317 Input and Adj pins.
Otherwise, my circuit is exactly the same as Fig 6.

Other than an output capacitor to get rid of ripple, which might eliminate the “ripple” I see, the text really doesn’t say that the added components avoid oscillations that could cause what I’m seeing.
I did mount R1 vertically at the Adj and Output pins as recommended by the text, and I put the R2 ground wire next to the battery ground as also recommended.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Would be a good start to show what YOU have connected, a circuit, some photos rather than an extract from another source.
 

DickA0537

Aug 19, 2020
7
Joined
Aug 19, 2020
Messages
7
Audioguru,

From my radio controlled flying days I’m familiar with Li-Poly packs that bring out the necessary connection for balanced charging. Lately I have been more involved with remote controlled cars and robots using Li-Ion batteries in the same packaging as standard alkaline 9v batteries. I really don’t know how the question of balancing is handled in these 2-cell packages which only have the same two clip-on terminals as the common alkaline battery.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
I have never seen a 9V Li-PO in an ordinary 9V Alkaline package. I guess the weakest cell will become over-voltage when charged without balancing then the metal case absorbs the shock of an explosion or holds in the resulting fire.
 

Ylli

Jun 19, 2018
401
Joined
Jun 19, 2018
Messages
401
I have never seen a 9V Li-PO in an ordinary 9V Alkaline package. I guess the weakest cell will become over-voltage when charged without balancing then the metal case absorbs the shock of an explosion or holds in the resulting fire.
Me neither, so I looked. Found this one: https://www.aliexpress.com/item/899929942.html .

I suspect the battery management electronics (balancing, overvoltage/undervoltage protect) is internal to the battery.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Tests for that Chinese "9V" Li-Ion battery say and show it was pretty good (were they paid so say that?). It had over-voltage and low voltage protection cutoffs.
Some tests were 6 years ago. Is the battery the same today??
A test of the Soshine battery charger showed that the test guy pulled on its mains cord and broke it!

I would like to try some but they are too dangerous for them to be shipped to me.
 

DickA0537

Aug 19, 2020
7
Joined
Aug 19, 2020
Messages
7
In case anybody's wondering I'm awaiting LM317s from DigiKey. They are due Friday (8/28).
I'm convinced my ebay LM317s are faulty.
Will let you know if that's the case.
 

DickA0537

Aug 19, 2020
7
Joined
Aug 19, 2020
Messages
7
I got the new LM317s from DigiKey and guess what? The circuit still didn't charge a battery.
So the problem had to be a poor breadboard connection, a wiring error (despite many, many careful checks), a faulty component (potentiometer, resistor , or capacitor), or a circuit behavior (oscillation?).

So I ordered some new breadboards on Amazon Prime, and when they arrived I decided to hook up the simplest circuit possible: the data sheet Fig 6 comprising only one LM317 and two resistors (substituting one for the potentiometer). Can't get simpler than that.

Guess what? The circuit finally worked! So I put the potentiometer and capacitors back in, and it still worked. I cranked the voltage up to 8.00V without a battery, then added a battery and successfully charged it. I was able to charge both a discharged and a charged battery with steady 8.00V output.

So now I am debating whether to stick with the original constant-voltage charger, with over-current protection, or switch to a constant-current /constant-voltage design, with maximum safety features. I really don't care if the former takes longer to charge and it does have inherent safety. But the latter is a more interesting project.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
DO NOT use a solderless breadboard. Its contacts are cheap and very poor quality. Did the poor quality breadboard produce some smoke?
Instead, solder the parts close together on stripboard or a pcb.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
I got the new LM317s from DigiKey and guess what? The circuit still didn't charge a battery.
So the problem had to be a poor breadboard connection, a wiring error (despite many, many careful checks), a faulty component (potentiometer, resistor , or capacitor), or a circuit behavior (oscillation?).

So I ordered some new breadboards on Amazon Prime, and when they arrived I decided to hook up the simplest circuit possible: the data sheet Fig 6 comprising only one LM317 and two resistors (substituting one for the potentiometer). Can't get simpler than that.

Guess what? The circuit finally worked! So I put the potentiometer and capacitors back in, and it still worked. I cranked the voltage up to 8.00V without a battery, then added a battery and successfully charged it. I was able to charge both a discharged and a charged battery with steady 8.00V output.

So now I am debating whether to stick with the original constant-voltage charger, with over-current protection, or switch to a constant-current /constant-voltage design, with maximum safety features. I really don't care if the former takes longer to charge and it does have inherent safety. But the latter is a more interesting project.

There is an alternative here.......
Save a lot of work.....
https://www.ebay.com.au/itm/1S-3-7V...m2cc44b8210:g:6x0AAOSwfDhZgxLf&frcectupt=true
 

DickA0537

Aug 19, 2020
7
Joined
Aug 19, 2020
Messages
7
Bertus,

Thanks for the info. His description would have been very useful when I first started my project. His design is basically what I have been breadboarding, but I really like the idea of designing the shunt for the diode and transistor voltage drop, if they are a relatively fixed value. I'll look into this.

I'll have to admit that I don't understand why he calls this a constant current source until the battery voltage rises to the regulated value. The shunt certainly restricts current to a constant value in the early phases of charging a discharged battery, but doesn't the current begin backing off as the battery voltage rises? In fact, after the initial fast runup to the 7.0V level, my simple 8.00V constant voltage charger circuit shows current steadily dropping as the battery voltage climbs to the 8.00V level. An explanation from someone would be appreciated.
 
Top