# Constant current source problem

Discussion in 'Power Electronics' started by psoke0, Mar 31, 2017.

1. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
hi im new here and this is my first post here. i really need your help guys. i have 5,1 v dc supply and i want charge 3,7 v li-ion battery with constant current im using a lm358 as a comparator and 2 transistors i build the circuit with simulation program it is working there but when i building it it doesnt work in real word i will post a picture of circuit down below. here is the problem. when battery is at 3,7 v its will charging it with constant current and when its reaches 4,1 v the comparator will shut off the power. in real life its just gives really low current then expected. here is the smulation curcuit
first one is while charging with constant current. other one is when its reaches 4,08 v its cuts power. please share your ideas about why its not gives the current i want and why it is give so low current thank you

2. ### LesJones Well-Known Member

Jan 8, 2017
1,886
521
The way that you have done the voltage sensing relies on the input voltage being exactly 5.1 volts. Also when the cell is fully charged you only have about 1 volt across the constant current circuit and about 0.7 volts of that is across the current sense resistor which only leaves 0.3 volts between the emitter and collector of Q2.

Les.

3. ### LesJones Well-Known Member

Jan 8, 2017
1,886
521
The way that you have done the voltage sensing relies on the input voltage being exactly 5.1 volts. Also when the cell is fully charged you only have about 1 volt across the constant current circuit and about 0.7 volts of that is across the current sense resistor which only leaves 0.3 volts between the emitter and collector of Q2.

Les.

psoke0 likes this.
4. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
thank you for reply.i think about that too so for order i can maintain the constant current i want i have to put higher voltage in input or remove R1 or make it less or put a low collector emiter voltage transistor for this to work right ?

5. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
and also why is it gives low current when cell isnt fully charged cell is at 3,7 v but still not giving me the charging constant current i want why is that

6. ### crutschow Expert

Mar 14, 2008
20,805
5,915
Since my crystal ball is out for repair you will have to measure the voltage at all the nodes and post them here.

7. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
you mean voltage across battery and Q2 and R1 right ?

8. ### ian field AAC Fanatic!

Oct 27, 2012
6,365
1,156
Even without studying it properly - it just doesn't look right.

Exact full charge terminal voltage is far more important than accurately regulated constant current.

9. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
no load battery voltage is 3,8 v. power supply is 5,1 v voltage across cell is 3,88 v , voltage across Q2 is about 0,94 V . voltage across R1 is about 0,03 V.

edit: and also the current is battery getting charge is 0,04 amp

Last edited: Mar 31, 2017
10. ### LesJones Well-Known Member

Jan 8, 2017
1,886
521
You can't remove R1 as that is your current sense resistor. You could reduce it to 0.5 ohm to save a little voltage drop. You are comparing the voltage across R3 with the battery voltage. That voltage will be 5.1 volts - your 1.02 volts reference voltage = 4.08 volts. The lower right hand voltmeter should read LESS than 1.02 volts as that should be the voltage between the bottom of R1 and the collector of Q2. I think you should be using a proper voltage reference in place of R3 so the charging voltage does not depend on the input being EXACTLY 5.1 volts. I susspect on the circuit that you have built that the input voltage is dropping below 5.1 volts.

Edit. I have just read your post #9 Something is not right. You say that you have 5.1 volts input BUT your readings of the battery voltage (3.88), the collector emitter voltage of Q2 (0.94 volts.) and the voltage across R1 (0.03 volts ) only add up to 4.85 volts. It should add up to the input voltage. (5.1 volts)

Les.

Last edited: Mar 31, 2017
11. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
you are right maybe because im using on breadboard there is a resistance between connections. but i even build the circuit with soldering connections its just current rise up to 0,08 amp . and about the comparing. that is not important to me right now i need to fix the charging current problem

12. ### Dodgydave AAC Fanatic!

Jun 22, 2012
7,710
1,277
I think your op amp inverting/non-inverting are the wrong way round, usually the inverting pin goes to the feedback of the psu!

13. ### crutschow Expert

Mar 14, 2008
20,805
5,915
No.
I mean voltages at all the circuit nodes (any wire with a dot on the schematic plus the (+) input and output of IC1a).

14. ### ian field AAC Fanatic!

Oct 27, 2012
6,365
1,156
For about 3 - 4 years now I've been using a simple shunt regulator to charge an 18650 from a 5V supply.

The TL431 can be set to precisely the right voltage. When I switched to a parallel pair of cells, I needed more current - a transistor or MOSFET booster for the shunt regulator isn't difficult.

You can detect charge completed by sensing current in the shunt regulator - it doesn't draw any till the battery is full. You must make sure any sensing resistors are enclosed by the voltage feedback loop. A less accurate method is detecting temperature rise in the shunt regulator.

Its a bad idea to float charge lithium - but they do require a set duration "topping charge" - the data sheet states how long. The full signal needs to latch a bistable that sets off a delay timer - that in turn cuts off a series pass power management transistor to remove the charge current.

15. ### crutschow Expert

Mar 14, 2008
20,805
5,915
That's not used as an op amp in his circuit, it's used as a comparator.
And it's purpose is to cutoff the charge when the battery voltage reaches a set level.

16. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
yes but for this curcuit i needed doing this way for stop current flow to the battery when battery is at 4,10 v .

17. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
yes thank you this is batter explanation

18. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
guys forget about the cut off section. i need to charge cell with 5,1 v input and constant current about 700 mA i want build it with transistors please help me with low current problem i build this curuit without comparator and still i get really low constant current draw i even build the 1 transistor wirh resistor and zener diode configuration constant current source but thats gives me low current draw too. i used led instead of zener still same i used 2 normal diodes in series for give the constant voltage to the base of the transistor i played with the values but still getting the low current draw

19. ### LesJones Well-Known Member

Jan 8, 2017
1,886
521
Hi Dave,
I think the op amp inputs are the correct way round. As the battery voltage rises the + input (Battery -) becomes more negative so the op amp output becomes more negative reducing the current into the base of Q2 which will reduce the charge current.

psoke0,
Have you measured the 5.1 volts input when it is under load ?

Les.

20. ### psoke0 Thread Starter Member

Mar 31, 2017
73
0
no wait i will measure now

edit : i just measured it its 5,1 v with no load and 4,97 v underload

Last edited: Mar 31, 2017