Author Topic: Adding Constant Current CC Feature to power supply.  (Read 4453 times)

0 Members and 1 Guest are viewing this topic.

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Adding Constant Current CC Feature to power supply.
« on: August 16, 2022, 05:16:52 pm »
hi, i have a 24v 3amp. power supply which uses tl431 and pc817 for voltage control. I added a trimpot and replaced output caps for output voltage adjustment from 15v-35v output. Now , i want to use this power supply as a lithium charger for my 18650 7s pack. For that i need to add a cheap and simple constant current feature. I have some lm358 and tl431 ICs laying around. IF these can be used in the circuit that would be great. I don't need an accurate current control, just need a simple and dirt cheap circuit for CC feature.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #1 on: August 16, 2022, 05:32:46 pm »
hi, i have a 24v 3amp. power supply which uses tl431 and pc817 for voltage control. I added a trimpot and replaced output caps for output voltage adjustment from 15v-35v output. Now , i want to use this power supply as a lithium charger for my 18650 7s pack. For that i need to add a cheap and simple constant current feature. I have some lm358 and tl431 ICs laying around. IF these can be used in the circuit that would be great. I don't need an accurate current control, just need a simple and dirt cheap circuit for CC feature.

Hello,

The current does not need to be constant just limited.  Limit the current to the cells to whatever they can take but no more.

If you show the schematic it would help to suggest the simplest method which can be as simple as a small bipolar transistor.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Adding Constant Current CC Feature to power supply.
« Reply #2 on: August 17, 2022, 03:15:32 am »
A current shunt resistor and error amplifier can drive the existing feedback point of the TL431 used for voltage control.
 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #3 on: August 17, 2022, 03:59:43 am »
The feedback circuit looks something like this
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #4 on: August 17, 2022, 05:20:19 am »
The feedback circuit looks something like this
(Attachment Link)


Hello again,

Ok that is one of the circuits similar to those used in modern regulated wall warts.  The voltage regulation should be checked over the required ambient temperature range.

One of the key points about these circuits centers on the opto isolator.  It's used to isolate the output from the input which is usually connected to the power line. That's to prevent a shock to ground from anyone touching one of the output leads including ground.  What this means is that any added circuit also has to be isolated.  That makes it harder to use an op amp which may be an overkill anyway for current limit for charging batteries of any type.  The key point about Li-ion cells is that the current can vary but the max voltage has to be carefully limited to around 4.20 volts for most cells although there are others that go up higher.  This is an important point though, the voltage cant go any higher than that, or at least shouldnt.

The simplest possible solution to a current limit suitable for charging cells is shown in the attachment.  I doubt you can get any simpler than that and still maintain the required isolation.
The current is set with that larger resistor RCL and that would be a power resistor.  Since the internal LED to most opto isolators has a forward voltage of about 1.2 volts (check that though) that means that if you use a 1.2 Ohm power resistor the current would be limited to 1 amp.  That's good for most cells but you should check that too some are just 700ma max.  To limit current to just 0.5 amps you would use a resistor of 2.4 Ohms.  To go to 2 amps (really have to check the data sheet on the cells though first) you would use a resistor of value 0.6 Ohms.
Those values are approximate because the internal LED voltage may be a little higher or even lower.
The resistor also has to be rated for the power level.  With  1 amp through a 1.2 Ohm resistor the power is 1.2 watts and you should use a value at least twice that to keep the temperature lower.  That would mean a resistor rated for 2.4 watts min or just throw a 3 to 5 watt resistor at it.  5 watt would be great.

Now because we are using a power resistor, that means it will be harder to adjust.  If you only need one current level output though this is not a problem, and if you need several fixed levels you can use several resistors and switch them in as needed with a set of switches, one for each resistor except the lowest current set resistor which can be soldered in directly, and there should be that one resistor soldered in because if it goes open the LED will blow out and there goes the current limit.

I mentioned using an op amp and that would be more difficult because there is no power supply for the output due to the isolation requirement.  You could add a power supply if you want as long as it is isolated.
Op amp circuits are a little more tricky too because they have unusual responses that often require compensation when used in a feedback loop.

In any case, you should test the circuit carefully no matter what you use.

Oh BTW a little theory...
The current limit opto has its output in parallel to the original opto.  That makes up an opto isolated "OR" gate.  Either opto LED conducting will cause the output to fall.  That means the current loop takes over when the current is too high, and the voltage loop controls the output when there is less current.
The accuracy of the current setting is subject to the opto internal LED forward voltage which can change with ambient temperature so if this was going to be used for something that needed very accurate and stable current set then it may not be good enough.  For charging cells it should be fine.

One other thing to mention though is that i read your first post again and i see that maybe you are charging 7 cells in series.  To do that you should be sure to have protected cells or else one or more could overcharge and cause big problems such as fire.  That's a very important point of course.


 
The following users thanked this post: Dinesh6252

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #5 on: August 17, 2022, 06:36:49 am »
Hey, thanks for a detailed yet simple explanation. I have a question will the output current vary with variation in voltage or will be stable at minimum 1A if a 1.2ohm resistor is used? Sorry if I am wrong but I think this circuit is more of a current regulator circuit  which will only regulate the output current and the extra power will be wasted through the power resistor in form of heat. Am I right?
 I think I need Constant Current source circuit which  can adjust (lower) the output voltage in order to output the SET current.  I have read online about LM358 op-amp CC circuit but failed to implement in my current power supply.

A guy at youtube showed this circuit but it didnt worked. (I am using 29 volts for the 7S pack)
1567753-0


And yes, I am using protected cells (BMS) with balancer.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3238
  • Country: gb
Re: Adding Constant Current CC Feature to power supply.
« Reply #6 on: August 17, 2022, 08:19:16 am »
I have a question will the output current vary with variation in voltage or will be stable at minimum 1A if a 1.2ohm resistor is used? Sorry if I am wrong but I think this circuit is more of a current regulator circuit  which will only regulate the output current

No, it's a current limiter circuit, it doesn't do anything until enough voltage is dropped over the sense resistor Rcl to forward bias the LED.  Since voltage feedback is taken after the sense resistor, the voltage drop across the resistor will be compensated whilst in constant voltage.

The difference between constant current and current limiting is the precision involved.  This will reduce the output voltage to reduce the current, but the actual current will vary a bit over temperature and probably also a little dependant on the output voltage.  Current limiting is fine for charging batteries provided it keeps the current below the maximum permitted.
« Last Edit: August 17, 2022, 08:24:48 am by mikerj »
 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #7 on: August 17, 2022, 09:55:09 am »
Have used a LM317 with a 1ohm resistor which regulates the output current to 1.25 A . The problem I am facing is the input voltage needs to be 1.5v more than the charger voltage otherwise output current will be around 100mA. For example If i need to charge the battery to 28v then the output voltage from the Power supply should be atleast 29.5v for a proper output current from the LM317. Moreover, the LM317 heats up substantially and the output current gets very low (0.1A) when battery voltage rises.


what will be the difference in the LM317 regulator and the circuit modification you provided?

 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #8 on: August 17, 2022, 12:02:37 pm »
Hey, thanks for a detailed yet simple explanation. I have a question will the output current vary with variation in voltage or will be stable at minimum 1A if a 1.2ohm resistor is used? Sorry if I am wrong but I think this circuit is more of a current regulator circuit  which will only regulate the output current and the extra power will be wasted through the power resistor in form of heat. Am I right?
 I think I need Constant Current source circuit which  can adjust (lower) the output voltage in order to output the SET current.  I have read online about LM358 op-amp CC circuit but failed to implement in my current power supply.

A guy at youtube showed this circuit but it didnt worked. (I am using 29 volts for the 7S pack)
(Attachment Link)


And yes, I am using protected cells (BMS) with balancer.

Hello again,

The main point about your original circuit is that you have no power supply to work with.  You cant use the Vcc buss because then you loose isolation.

The main point about the LM317 solution is it drops a lot of voltage, it will drop probably 2.5v or maybe even 3v.  You can check that though, and remember the package itself drops some voltage like 2v or something.

The circuit i gave you does not prevent voltage regulation.  The two opto's work as a logical "OR" gate, so if either of these conditions come up it will regulate:
1.  The voltage tries to go too high, the original opto takes over the feedback.
2.  The current tries to go too high, the added opto takes over the feedback.

So ONLY if the current tries to go too high does it kick in.  But of course when the current limit sets in it has to reduce voltage that's the way they all work.  The voltage will still make it up to the full voltage though once the cells charge significantly.  If they are low, the current limit will be limiting the current and the voltage may be (for one cell) 3.6 volts, and the current will be 1 amp nearly constant.  As they charge up to 4.10 volts, the voltage regulation will start to kick in a little and when they get up to 4.20 volts the voltage regulation will take over again.  That's exactly the way a charger should work.
So if you measure only 3.6v per cell when it is limiting current, that's the correct operation.
To adjust the voltage keep the output load only light like maybe 100 Ohms or something.
After adjustment you should be good to go using a 1.2 Ohm resistor and yes it will drop 1.2 volts but not more unless the LED is 1.3v or something like that.

Oh BTW, if you feel that 1.2v is too much to drop, we can stick in a small transistor and use the base emitter to sense the current.  That means you only loose 0.7v and you would use a 0.7 Ohm resistor for current sense instead of 1.2 Ohms.  I'll see if i can draw that up today.

An op amp circuit is an overkill real and means you need to add a power supply to make it work, unless you can guarantee that the output never goes short circuit and then you can use the output voltage itself.  However, doing it that way probably removes the short circuit protection because the op amp will have no power supply then.


« Last Edit: August 17, 2022, 12:08:43 pm by MrAl »
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #9 on: August 17, 2022, 07:52:51 pm »
Hello again,

Here are two circuits.

One is the original with the added opto but drawn more clear so you can see the right way to connect it.  Notice that the Vout has moved.  Vout Old is where the rectifiers typically connect, and Vout New is the actual new Vout to connect to the load.

The other is almost the same but uses a PNP transistor to sense current.  0.6 to 0.7 Ohms will provide 1 amp output current limit.

 
The following users thanked this post: Dinesh6252

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #10 on: August 20, 2022, 07:07:28 am »
Hello,  do the new circuit with PNP transistor need a power resistor or a simple 1/4,1/2 watt resistor can be used?

And what's the value of R7? I have a B772D transistor, if that can be used.
« Last Edit: August 20, 2022, 07:12:47 am by Dinesh6252 »
 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #11 on: August 20, 2022, 10:02:51 am »
Hello again,

Here are two circuits.

One is the original with the added opto but drawn more clear so you can see the right way to connect it.  Notice that the Vout has moved.  Vout Old is where the rectifiers typically connect, and Vout New is the actual new Vout to connect to the load.

The other is almost the same but uses a PNP transistor to sense current.  0.6 to 0.7 Ohms will provide 1 amp output current limit.

Sharing you the exact circuit design of my power supply. Where to put the transistor?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #12 on: August 21, 2022, 01:47:46 am »
Hello again,

Here are two circuits.

One is the original with the added opto but drawn more clear so you can see the right way to connect it.  Notice that the Vout has moved.  Vout Old is where the rectifiers typically connect, and Vout New is the actual new Vout to connect to the load.

The other is almost the same but uses a PNP transistor to sense current.  0.6 to 0.7 Ohms will provide 1 amp output current limit.

Sharing you the exact circuit design of my power supply. Where to put the transistor?


The base emitter resistor should be a power resistor, the one that drives the second opto LED can be 1/4 watt.

Looking at your drawing, is the output at the point right at the right side of that inductor?

LATER:
Assuming that is the output as it was, here is a drawing that makes the addition even simpler yet.  Note no second opto needed the feedback can be tapped into at the IC chip feedback node.
Note i need to know the value of R3 and the lower resistor also to set R7 value.
The 100 Ohm and R7 can be 1/4 watt, RCL has to be a power resistor.
If RCL is 0.6 to 0.7 Ohms (for 1 amp output) then it has to be rated for at least 2 watts but 5 watts is better.
Diode is any Si like 1N4002 or similar.
I'll check out your transistor to see if it will work. [looks like it should work]

« Last Edit: August 21, 2022, 02:44:47 am by MrAl »
 
The following users thanked this post: Dinesh6252

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #13 on: August 21, 2022, 04:41:33 am »
Hello again,

Here are two circuits.

One is the original with the added opto but drawn more clear so you can see the right way to connect it.  Notice that the Vout has moved.  Vout Old is where the rectifiers typically connect, and Vout New is the actual new Vout to connect to the load.

The other is almost the same but uses a PNP transistor to sense current.  0.6 to 0.7 Ohms will provide 1 amp output current limit.

Sharing you the exact circuit design of my power supply. Where to put the transistor?


The base emitter resistor should be a power resistor, the one that drives the second opto LED can be 1/4 watt.

Looking at your drawing, is the output at the point right at the right side of that inductor?

LATER:
Assuming that is the output as it was, here is a drawing that makes the addition even simpler yet.  Note no second opto needed the feedback can be tapped into at the IC chip feedback node.
Note i need to know the value of R3 and the lower resistor also to set R7 value.
The 100 Ohm and R7 can be 1/4 watt, RCL has to be a power resistor.
If RCL is 0.6 to 0.7 Ohms (for 1 amp output) then it has to be rated for at least 2 watts but 5 watts is better.
Diode is any Si like 1N4002 or similar.
I'll check out your transistor to see if it will work. [looks like it should work]

Hi,  i only have 10 ohm and 0.1 ohm power cement resistor readily available. Can the circuit be modified for 1-2 amp output.

R3 is a 10k resistor and below that is a 10k pot for variable voltage.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #14 on: August 21, 2022, 09:25:39 am »
Hello again,

Here are two circuits.

One is the original with the added opto but drawn more clear so you can see the right way to connect it.  Notice that the Vout has moved.  Vout Old is where the rectifiers typically connect, and Vout New is the actual new Vout to connect to the load.

The other is almost the same but uses a PNP transistor to sense current.  0.6 to 0.7 Ohms will provide 1 amp output current limit.

Sharing you the exact circuit design of my power supply. Where to put the transistor?


The base emitter resistor should be a power resistor, the one that drives the second opto LED can be 1/4 watt.

Looking at your drawing, is the output at the point right at the right side of that inductor?

LATER:
Assuming that is the output as it was, here is a drawing that makes the addition even simpler yet.  Note no second opto needed the feedback can be tapped into at the IC chip feedback node.
Note i need to know the value of R3 and the lower resistor also to set R7 value.
The 100 Ohm and R7 can be 1/4 watt, RCL has to be a power resistor.
If RCL is 0.6 to 0.7 Ohms (for 1 amp output) then it has to be rated for at least 2 watts but 5 watts is better.
Diode is any Si like 1N4002 or similar.
I'll check out your transistor to see if it will work. [looks like it should work]

Hi,  i only have 10 ohm and 0.1 ohm power cement resistor readily available. Can the circuit be modified for 1-2 amp output.

R3 is a 10k resistor and below that is a 10k pot for variable voltage.


Hello again,

Oh well 10 Ohm is way too large and 0.1 Ohm is way too small.
The way this works is that the resistor RCL drops some voltage as the output current increases.  As the voltage across RCL raches near 0.6v the transistor begins to conduct emitter to collector and that drives the node between the two original feedback resistors as shown on the drawing.  In order to get to 0.6v and drop that much at 1 amp output, the resistor has to be sized according to Ohm's Law which says:
V=I*R
where I is the current and R is the resistance and V the voltage.
Solving for R we get:
R=V/I
and since we need 0.6v at 1 amp this is very simply:
R=0.6/1
which of course equals 0.6 Ohms, although something close to that would be good enough like 0.7 Ohms possibly even 0.5 Ohms for a little more current output.
But 10 Ohms and 0.1 Ohms is just too far off,  With 0.1 Ohms the current would not begin to limit until about 6 amps, and with 10 Ohms the current would limit around 60 milliamps.
Even 1 Ohm would allow 600 milliamps.

So as is, the circuit would not work with 0.1 Ohms or 10 Ohms.  I am not sure if we can do it that simply with either of those two.  I would suggest you fine a source for electronic parts if you want to build circuits yourself.
I dont know where you can get them in India but i know there are a lot of professors that teach there so they must be getting parts from somewhere.  You could check with one of the universities if you cant find any places else maybe they would give you one or charge a small fee.
There are online outlets like Mouser and Digikey but there are others too maybe you could check around the web.

In the mean time i will give that 0.1 Ohm some thought but the 10 Ohm passing 1 amp would dissipate 10 watts i doubt you want to use that.  The problem with a 0.1 Ohm is that we would have to incorporate a differential amplifier which would take another nearly identical transistor.

What other parts do you have on hand or can get if you need them?


 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #15 on: August 21, 2022, 10:18:19 am »
Hello again,

Here are two circuits.

One is the original with the added opto but drawn more clear so you can see the right way to connect it.  Notice that the Vout has moved.  Vout Old is where the rectifiers typically connect, and Vout New is the actual new Vout to connect to the load.

The other is almost the same but uses a PNP transistor to sense current.  0.6 to 0.7 Ohms will provide 1 amp output current limit.

Sharing you the exact circuit design of my power supply. Where to put the transistor?


The base emitter resistor should be a power resistor, the one that drives the second opto LED can be 1/4 watt.

Looking at your drawing, is the output at the point right at the right side of that inductor?

LATER:
Assuming that is the output as it was, here is a drawing that makes the addition even simpler yet.  Note no second opto needed the feedback can be tapped into at the IC chip feedback node.
Note i need to know the value of R3 and the lower resistor also to set R7 value.
The 100 Ohm and R7 can be 1/4 watt, RCL has to be a power resistor.
If RCL is 0.6 to 0.7 Ohms (for 1 amp output) then it has to be rated for at least 2 watts but 5 watts is better.
Diode is any Si like 1N4002 or similar.
I'll check out your transistor to see if it will work. [looks like it should work]

Hi,  i only have 10 ohm and 0.1 ohm power cement resistor readily available. Can the circuit be modified for 1-2 amp output.

R3 is a 10k resistor and below that is a 10k pot for variable voltage.


Hello again,

Oh well 10 Ohm is way too large and 0.1 Ohm is way too small.
The way this works is that the resistor RCL drops some voltage as the output current increases.  As the voltage across RCL raches near 0.6v the transistor begins to conduct emitter to collector and that drives the node between the two original feedback resistors as shown on the drawing.  In order to get to 0.6v and drop that much at 1 amp output, the resistor has to be sized according to Ohm's Law which says:
V=I*R
where I is the current and R is the resistance and V the voltage.
Solving for R we get:
R=V/I
and since we need 0.6v at 1 amp this is very simply:
R=0.6/1
which of course equals 0.6 Ohms, although something close to that would be good enough like 0.7 Ohms possibly even 0.5 Ohms for a little more current output.
But 10 Ohms and 0.1 Ohms is just too far off,  With 0.1 Ohms the current would not begin to limit until about 6 amps, and with 10 Ohms the current would limit around 60 milliamps.
Even 1 Ohm would allow 600 milliamps.

So as is, the circuit would not work with 0.1 Ohms or 10 Ohms.  I am not sure if we can do it that simply with either of those two.  I would suggest you fine a source for electronic parts if you want to build circuits yourself.
I dont know where you can get them in India but i know there are a lot of professors that teach there so they must be getting parts from somewhere.  You could check with one of the universities if you cant find any places else maybe they would give you one or charge a small fee.
There are online outlets like Mouser and Digikey but there are others too maybe you could check around the web.

In the mean time i will give that 0.1 Ohm some thought but the 10 Ohm passing 1 amp would dissipate 10 watts i doubt you want to use that.  The problem with a 0.1 Ohm is that we would have to incorporate a differential amplifier which would take another nearly identical transistor.

What other parts do you have on hand or can get if you need them?
.

I have many old circuit boards from which I can salvage transistors, I do have 2pcs. same  B772D PNP transistor. Have many type of power MOSFETS (N-channel). Working Telecom rectifiers of 48v output DC voltage and many other faulty equipments. One more thing I noticed  is you removed the second optocoupler for Current feedback in the last circuit. Will the circuit work without it?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #16 on: August 22, 2022, 06:52:38 am »

Quote
I have many old circuit boards from which I can salvage transistors, I do have 2pcs. same  B772D PNP transistor. Have many type of power MOSFETS (N-channel). Working Telecom rectifiers of 48v output DC voltage and many other faulty equipments. One more thing I noticed  is you removed the second optocoupler for Current feedback in the last circuit. Will the circuit work without it?

Yes the idea was to provide a second feedback path to the secondary side regulator IC itself rather than to the primary side of the transformer with the AC regulating chip.  That means it controls the secondary side regulator instead of the primary side AC regulator and the secondary side regulator controls the primary side regulator so it limits the current just the same.

I had contemplated using a custom differential amplifier made of transistors but it gets a little messy and you'd probably have to buy some parts anyway.
An op amp might be used but it would have to be a low voltage one im not sure if you have that either and not sure if you would get short circuit protection.  That's unless you can provide a second DC power supply such as a DC wall wart to provide the power for the op amp.  Then you can use a 0.1 Ohm resistor for current sense and it shouldnt get hot either.
They make special chips for sensing current but again you'd have to buy that.

There are a lot of options but they are all more involved than just getting a 0.6 Ohm power resistor :-)
However, see if you can use a second DC wall wart without too much trouble.  That opens the door to a lot of other options.
If you think you can guarantee that the battery voltage never drops below 5 volts an op amp may be an option too, but the voltage would have to always be present when charging.  A variation on this idea is to use two diodes and a second battery that could help provide power to the op amp in the event of a short circuit or very low output voltage.
Im not sure if you have any op amps though.
 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #17 on: August 22, 2022, 05:32:58 pm »

Quote
I have many old circuit boards from which I can salvage transistors, I do have 2pcs. same  B772D PNP transistor. Have many type of power MOSFETS (N-channel). Working Telecom rectifiers of 48v output DC voltage and many other faulty equipments. One more thing I noticed  is you removed the second optocoupler for Current feedback in the last circuit. Will the circuit work without it?

Yes the idea was to provide a second feedback path to the secondary side regulator IC itself rather than to the primary side of the transformer with the AC regulating chip.  That means it controls the secondary side regulator instead of the primary side AC regulator and the secondary side regulator controls the primary side regulator so it limits the current just the same.

I had contemplated using a custom differential amplifier made of transistors but it gets a little messy and you'd probably have to buy some parts anyway.
An op amp might be used but it would have to be a low voltage one im not sure if you have that either and not sure if you would get short circuit protection.  That's unless you can provide a second DC power supply such as a DC wall wart to provide the power for the op amp.  Then you can use a 0.1 Ohm resistor for current sense and it shouldnt get hot either.
They make special chips for sensing current but again you'd have to buy that.

There are a lot of options but they are all more involved than just getting a 0.6 Ohm power resistor :-)
However, see if you can use a second DC wall wart without too much trouble.  That opens the door to a lot of other options.
If you think you can guarantee that the battery voltage never drops below 5 volts an op amp may be an option too, but the voltage would have to always be present when charging.  A variation on this idea is to use two diodes and a second battery that could help provide power to the op amp in the event of a short circuit or very low output voltage.
Im not sure if you have any op amps though.

Ok then, I will find a 0.5, 0.6 power resistor. In the meantime, can you clarify:

a). Value of resistor R7?
b). Is the (100) resistor on the transistor base pin a 100ohm?
c). You didn't include the other Optocoupler at the transistor collector pin as used in previous circuits, or you forget to include one?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #18 on: August 22, 2022, 06:21:28 pm »

Quote
I have many old circuit boards from which I can salvage transistors, I do have 2pcs. same  B772D PNP transistor. Have many type of power MOSFETS (N-channel). Working Telecom rectifiers of 48v output DC voltage and many other faulty equipments. One more thing I noticed  is you removed the second optocoupler for Current feedback in the last circuit. Will the circuit work without it?

Yes the idea was to provide a second feedback path to the secondary side regulator IC itself rather than to the primary side of the transformer with the AC regulating chip.  That means it controls the secondary side regulator instead of the primary side AC regulator and the secondary side regulator controls the primary side regulator so it limits the current just the same.

I had contemplated using a custom differential amplifier made of transistors but it gets a little messy and you'd probably have to buy some parts anyway.
An op amp might be used but it would have to be a low voltage one im not sure if you have that either and not sure if you would get short circuit protection.  That's unless you can provide a second DC power supply such as a DC wall wart to provide the power for the op amp.  Then you can use a 0.1 Ohm resistor for current sense and it shouldnt get hot either.
They make special chips for sensing current but again you'd have to buy that.

There are a lot of options but they are all more involved than just getting a 0.6 Ohm power resistor :-)
However, see if you can use a second DC wall wart without too much trouble.  That opens the door to a lot of other options.
If you think you can guarantee that the battery voltage never drops below 5 volts an op amp may be an option too, but the voltage would have to always be present when charging.  A variation on this idea is to use two diodes and a second battery that could help provide power to the op amp in the event of a short circuit or very low output voltage.
Im not sure if you have any op amps though.

Ok then, I will find a 0.5, 0.6 power resistor. In the meantime, can you clarify:

a). Value of resistor R7?
b). Is the (100) resistor on the transistor base pin a 100ohm?
c). You didn't include the other Optocoupler at the transistor collector pin as used in previous circuits, or you forget to include one?

Hi,

R7 can be 1k but you can try higher too like 2.2k first.  You need to test it for current limit too before you use it.

Yes 100 Ohms 1/4 watt or 1/2 watt.

I thought i told you this new circuit doesnt need an extra opto because the feedback on the 431 chip is already isolated from the mains line.

Yeah 0.6, 0.7, even 1 Ohm will give you about 600ma.
« Last Edit: August 22, 2022, 06:27:23 pm by MrAl »
 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #19 on: August 27, 2022, 04:00:01 am »

Quote
I have many old circuit boards from which I can salvage transistors, I do have 2pcs. same  B772D PNP transistor. Have many type of power MOSFETS (N-channel). Working Telecom rectifiers of 48v output DC voltage and many other faulty equipments. One more thing I noticed  is you removed the second optocoupler for Current feedback in the last circuit. Will the circuit work without it?

Yes the idea was to provide a second feedback path to the secondary side regulator IC itself rather than to the primary side of the transformer with the AC regulating chip.  That means it controls the secondary side regulator instead of the primary side AC regulator and the secondary side regulator controls the primary side regulator so it limits the current just the same.

I had contemplated using a custom differential amplifier made of transistors but it gets a little messy and you'd probably have to buy some parts anyway.
An op amp might be used but it would have to be a low voltage one im not sure if you have that either and not sure if you would get short circuit protection.  That's unless you can provide a second DC power supply such as a DC wall wart to provide the power for the op amp.  Then you can use a 0.1 Ohm resistor for current sense and it shouldnt get hot either.
They make special chips for sensing current but again you'd have to buy that.

There are a lot of options but they are all more involved than just getting a 0.6 Ohm power resistor :-)
However, see if you can use a second DC wall wart without too much trouble.  That opens the door to a lot of other options.
If you think you can guarantee that the battery voltage never drops below 5 volts an op amp may be an option too, but the voltage would have to always be present when charging.  A variation on this idea is to use two diodes and a second battery that could help provide power to the op amp in the event of a short circuit or very low output voltage.
Im not sure if you have any op amps though.

Ok then, I will find a 0.5, 0.6 power resistor. In the meantime, can you clarify:

a). Value of resistor R7?
b). Is the (100) resistor on the transistor base pin a 100ohm?
c). You didn't include the other Optocoupler at the transistor collector pin as used in previous circuits, or you forget to include one?

Hi,

R7 can be 1k but you can try higher too like 2.2k first.  You need to test it for current limit too before you use it.

Yes 100 Ohms 1/4 watt or 1/2 watt.

I thought i told you this new circuit doesnt need an extra opto because the feedback on the 431 chip is already isolated from the mains line.

Yeah 0.6, 0.7, even 1 Ohm will give you about 600ma.

I have assembled the circuit and used a 0.5ohm resistor and 1k at R7, however I am getting only 600ma at output. How to increase the output? The circuit is fine now but charging takes much time for huge battery (100ah)
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #20 on: August 27, 2022, 07:10:40 am »

I have assembled the circuit and used a 0.5ohm resistor and 1k at R7, however I am getting only 600ma at output. How to increase the output? The circuit is fine now but charging takes much time for huge battery (100ah)

Hi,

0.5 Ohms would provide a bit over 1 amp but that's if everything is perfect.  Circuits are not always perfect because of various reasons including component variations.
If you need more current (like 1 amp) then you would have to decrease the 0.5 Ohm resistor.
If you are getting 600ma and you are sure you are getting that, then if you parallel another 0.5 Ohm resistor you would get twice that or 1.2 amps, roughly.

You will have to test it and check for heating in the transistor and resistors.  Keep in mind that if the transistor shorts collector to emitter there will be no current limit and no voltage regulation.  The voltage regulation is extremely important with these batteries because over charging could cause fire or explosion, and those kinds of fire are hard to put out.  I would recommend also having some containment and a fire blanket on hand.  You might be able to get a fire extinguisher but may not be able to find the right kind.

100AH battery is a pretty hefty size.  In theory at 1 amp that would take 100 hours to charge, which is more than 4 earth days.  It may be safer than high current though, but the other thing to check is that ti actually charges with as little as 1 amp.  It may take more because 1 amp is pretty low for a 100AH battery.  That would  be C/100 which could be too low to properly charge this battery.
But wow C/100 that must have cost quite a bit to purchase.
 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #21 on: August 27, 2022, 02:23:08 pm »

I have assembled the circuit and used a 0.5ohm resistor and 1k at R7, however I am getting only 600ma at output. How to increase the output? The circuit is fine now but charging takes much time for huge battery (100ah)
0.5 Ohms would provide a bit over 1 amp but that's if everything is perfect.  Circuits are not always perfect because of various reasons including component variations.
If you need more current (like 1 amp) then you would have to decrease the 0.5 Ohm resistor.
If you are getting 600ma and you are sure you are getting that, then if you parallel another 0.5 Ohm resistor you would get twice that or 1.2 amps, roughly.

You are absolutely correct, the 0.5ohm resistor showed as 0.9ohm when I checked it. Adding a 1ohm resistor in parallel resulted in an output current of approximately 1.14 amps.


I have assembled the circuit and used a 0.5ohm resistor and 1k at R7, however I am getting only 600ma at output. How to increase the output? The circuit is fine now but charging takes much time for huge battery (100ah)
Keep in mind that if the transistor shorts collector to emitter there will be no current limit and no voltage regulation.  The voltage regulation is extremely important with these batteries because over charging could cause fire or explosion, and those kinds of fire are hard to put out.

What can be done to add over-voltage protection?


I have assembled the circuit and used a 0.5ohm resistor and 1k at R7, however I am getting only 600ma at output. How to increase the output? The circuit is fine now but charging takes much time for huge battery (100ah)
100AH battery is a pretty hefty size.  In theory at 1 amp that would take 100 hours to charge, which is more than 4 earth days.  It may be safer than high current though, but the other thing to check is that ti actually charges with as little as 1 amp.  It may take more because 1 amp is pretty low for a 100AH battery.  That would  be C/100 which could be too low to properly charge this battery.
But wow C/100 that must have cost quite a bit to purchase.

Charge time is no problem since charger would be connected all the time. I got 4 of these batteries free of cost where I work since these were quite old.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #22 on: August 29, 2022, 04:31:26 pm »
Hello again,

Wow you got four 200AHr batteries for free?  As long as they still work that's a lucky break they are quite expensive.

Overvoltage Protection
The regulator chip handles the voltage regulation along with those two resistors.  If you want to use a second independent circuit then more parts will have to be added.  This would include a voltage reference IC chip, and a comparator and a few resistors.  The reference voltage connects to one pin of the comparator, the other input pin goes to a set of resistors that drop the output voltage down so it matches the reference voltage almost perfectly but will sense a voltage that is slightly higher than the output.  If the output goes too high, the comparator trips and its output goes to a low (or high) state.  That can be used to either:
*cut the voltage off
*just light an LED or buzz a buzzer.
*both of those above

So can you get a voltage reference IC chip somewhere?  You might get away with another 431 chip but a regular voltage reference IC is easier to use and you can get some really really stable types.
You also need a comparator such as the LM339 or equivalent (they make a 2 unit model also, that's a 4 unit model meaning there are 4 comparators in it.  A search would turn up these parts.  Obviously an 8 pin part will be smaller and easier to use.  I suggest getting all 'through hole' parts though unless you are very familiar with SMD soldering and probably have to make a circuit board that takes those parts too.

Oh there is also dedicated over voltage protection chips like the  NCP346.  You need some resistors and a power MOSFET to go with it.  That will cut the power if there is an over voltage. In fact, if you get the pdf data sheet on that chip it will show the entire circuit inside which has the comparator and reference.  It also shows how to connect it into your circuit.
« Last Edit: August 29, 2022, 05:16:22 pm by MrAl »
 

Offline Dinesh6252Topic starter

  • Contributor
  • Posts: 37
  • Country: 00
Re: Adding Constant Current CC Feature to power supply.
« Reply #23 on: August 29, 2022, 05:36:48 pm »
Wow you got four 200AHr batteries for free?
Four 100AHr batteries*. More specifically, these are 48P7S 18650 battery packs made by Panasonic.

The regulator chip handles the voltage regulation along with those two resistors.  If you want to use a second independent circuit then more parts will have to be added.  This would include a voltage reference IC chip, and a comparator and a few resistors.  The reference voltage connects to one pin of the comparator, the other input pin goes to a set of resistors that drop the output voltage down so it matches the reference voltage almost perfectly but will sense a voltage that is slightly higher than the output.  If the output goes too high, the comparator trips and its output goes to a low (or high) state.  That can be used to either:
*cut the voltage off
*just light an LED or buzz a buzzer.
*both of those above

So can you get a voltage reference IC chip somewhere?  You might get away with another 431 chip but a regular voltage reference IC is easier to use and you can get some really really stable types.
You also need a comparator such as the LM339 or equivalent (they make a 2 unit model also, that's a 4 unit model meaning there are 4 comparators in it.  A search would turn up these parts.  Obviously an 8 pin part will be smaller and easier to use.  I suggest getting all 'through hole' parts though unless you are very familiar with SMD soldering and probably have to make a circuit board that takes those parts too.
LM339N ICs are used on some of my old circuit boards. Can you recommend some popular regulator ICs? I'll search for them also.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1429
Re: Adding Constant Current CC Feature to power supply.
« Reply #24 on: August 29, 2022, 07:42:00 pm »
Hi,

LM317 very common TO220 1.5 amps. Small package TO92 100ma.
Should be ok for normal room temperatures or temperature as adjusted.

78xx series not good, like 7805. Too much variation in output voltage.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf