 # constant current constant voltage circuit help

I have made the circuit attached as someone suggested it and I understand it. But it doesn’t work?

Can someone please give me feedback if I understand this correctly. Resistors R8 and R9 are equal values and when the transistor is switched on then the R8 and R9 resistors are in parallel cause the resistance to drop. When the resistance drops the voltage out of the left LM317 drops.

When the transistor is off we have a higher resistance so the voltage outof the first LM317 is at maximum. Hence it can supply enough voltage for the second LM317 to feed a constant current to the battery.

When the transistor is on the second LM317 does not get enough voltage for a constant current source and will supply what it can depending on the voltage it gets. So if the transistor is on we have a constant voltage charge and when the transistor is off we have a constant current charge.

Now the problem is when the transistor is on I measure 14.2v on the output terminals to the battery but current does not flow into the battery. If I switch the transistor on and connect the battery directly to the constant voltage source (bypassing the second LM317) then current flows. Why is this? This is a continuation of this thread? http://forum.arduino.cc/index.php?topic=243781.0

Can't see why you've started a new thread.

And you've put the constant current after the constant voltage circuit, despite being told to put the constant current before the constant voltage.

MarkT: This is a continuation of this thread? http://forum.arduino.cc/index.php?topic=243781.0

Can't see why you've started a new thread.

And you've put the constant current after the constant voltage circuit, despite being told to put the constant current before the constant voltage.

Sorry I thought this is a new thread cause it is only dealing with this specific problem.

And yes I know someone told me to put the constant current first. And that's also all they told me? I don't understand how? Maybe if someone could explain why the constant current must go first then I will understand and say oh ok now I get it. Everyone is just telling me to do stuff without helping me learn why, if I make circuits like people suggest I will never understand what I'm doing I'll just do it. This is more of a learning experience for me. I don't even care about the charger I have one in my garage but I wana make one so I can understand.

So can you be so kind to explain why constant current must go before constant voltage and why it doesn't work when constant current is after constant voltage?

Remove R8, and place a 100 ohm resistor or lowish value between emitter and ground...

MarkT: This is a continuation of this thread? http://forum.arduino.cc/index.php?topic=243781.0 And you've put the constant current after the constant voltage circuit, despite being told to put the constant current before the constant voltage.

Care to elaborate?

Really you should be able to work this out.

Current in a series circuit is the same everywhere, so a current limiter can go anywhere.

Voltage in a series circuit is different for each node, so a constant voltage regulator must go right on the load to control its voltage.

You have to realise that every circuit using the LM317 drops some volts, so the "constant current" configuration will have a lower output voltage than input voltage.

Until the current limit is reached the "constant current" regulator part is simply trying to provide as much current as it can by turning its pass-transistor on fully, so its voltage drop will be a minimum, but that's likely to be about 1.5V or so which is significant if you are trying to charge a battery at 13.8V or whatever.

MarkT: This is a continuation of this thread? http://forum.arduino.cc/index.php?topic=243781.0

Can't see why you've started a new thread.

And you've put the constant current after the constant voltage circuit, despite being told to put the constant current before the constant voltage.

I vote we all get together and buy him one of these: http://www.ebay.com/itm/360933462578

It's be a lot cheaper/easier in the long term...

MarkT: Really you should be able to work this out.

Current in a series circuit is the same everywhere, so a current limiter can go anywhere.

Voltage in a series circuit is different for each node, so a constant voltage regulator must go right on the load to control its voltage.

You have to realise that every circuit using the LM317 drops some volts, so the "constant current" configuration will have a lower output voltage than input voltage.

Until the current limit is reached the "constant current" regulator part is simply trying to provide as much current as it can by turning its pass-transistor on fully, so its voltage drop will be a minimum, but that's likely to be about 1.5V or so which is significant if you are trying to charge a battery at 13.8V or whatever.

Thank you. Now that u mentioned that voltage in a series changes on each node it makes some what sense. Can u please explain what would happen if you put the constant voltage infront?

This is what I think will happen. Just so u can get an understanding of how I'm thinking. If the constant voltage is infront the whole series line current is regulated by the constant voltage source. How this is calculated I don't know? Actually I don't understand it at all really.

calvingloster:
Thank you. Now that u mentioned that voltage in a series changes on each node…

ie. Ohm’s law.

Do you own a multimeter? You seriously need to start using it.

OK - One more time. To charge a lead acid battery you need a current limiting power supply like a bench supply. You set the voltage to the maximum you want to charge to and set the current limit at the maximum current you want to charge with.

Then you connect the battery. Initially the voltage will drop as the current limiter kicks in and limits the maximum charging current. As the battery gets more and more charged the voltage has to increase to maintain that current. A point is reached when the output voltage is what you set it at. Then the current will start to drop as the battery further charges. Eventually the current drops to zero ( or very little ) and the voltage is what you set it at.

Can you not see that you need a current limiting power supply not the sort of thing you keep designing.

and I understand it. But it doesn't work

That is because in order to work 'physics' has to understand it.

Grumpy_Mike: OK - One more time. To charge a lead acid battery you need a current limiting power supply like a bench supply. You set the voltage to the maximum you want to charge to and set the current limit at the maximum current you want to charge with.

Then you connect the battery. Initially the voltage will drop as the current limiter kicks in and limits the maximum charging current. As the battery gets more and more charged the voltage has to increase to maintain that current. A point is reached when the output voltage is what you set it at. Then the current will start to drop as the battery further charges. Eventually the current drops to zero ( or very little ) and the voltage is what you set it at.

Can you not see that you need a current limiting power supply not the sort of thing you keep designing.

and I understand it. But it doesn't work

That is because in order to work 'physics' has to understand it.

Why will the thing I'm designing not work? I can charge at a constant current and then if I put the transistor on I charge at constant voltage. Just like how I am supposed to charge a lead acid battery. The only thing I have changed is now I put the constant current in front like someone mentioned. I've connected it to a battery and tested it and it works.

The bulk stage is is done with the transistor off. It charges at 250mA as I want it to. Then when the charging voltage reaches 14.1 volts I switch the transistor on, it then charges at a constant voltage of 14.1volts and the amps begin to drop slowly.

So please explain why u say this thing I'm making won't work cause ur statement makes no sense.

fungus:

MarkT: This is a continuation of this thread? http://forum.arduino.cc/index.php?topic=243781.0

Can't see why you've started a new thread.

And you've put the constant current after the constant voltage circuit, despite being told to put the constant current before the constant voltage.

I vote we all get together and buy him one of these: http://www.ebay.com/itm/360933462578

It's be a lot cheaper/easier in the long term...

I have a few of these and there's no current regulation so it has to be an external chip...

So please explain why u say this thing I'm making won't work

Because the first stage is only feeding a constant current through the load which is that transistor. Your voltage regulator is not a part of the current monitoring circuit and so takes no part in the constant current bit of the circuit.

Grumpy_Mike:

So please explain why u say this thing I’m making won’t work

Because the first stage is only feeding a constant current through the load which is that transistor. Your voltage regulator is not a part of the current monitoring circuit and so takes no part in the constant current bit of the circuit.

But ive tested this and it works? why does it work? im not trying to be funny but ive memasured volts and amps while connected to a battery. ive drawn two new schematics one for constant voltage and one for constant current.

I have taken two pictures, when the LED on the left is on it charges in constant current mode at 250mA. when the led on the right is on it charges constant voltage mode.

The multimeter is measuring amps, as you can see the current in constant current mode is 250mA and the current in the constant voltage mode is lower and drops as the battery reaches its full charge

One flaw is the design is that I don't see a series current limiting resistor either in the schematic drawing or the picture between the base of the transistor and the digital output pin . This will cause lots of distress on the output pin driving the transistor when set HIGH.

So according to my very poor knowledge this is how i understand a lead acid battery must be charged? the arduino switches the transistor on and off at the moment but i need to make it measure the charging voltage somehow with a voltage dividing circuit. i will also need to measure current as well in order to switch the charger off when it reaches a set low limit. where to measure the current is also a question.

i know i can measure voltage across a resistor to calculate current but which resister to measure is my problem. last time i tried measuring current through a resister i shorted stuff and blew up my ATMEGA328 chip. i am just totally confused with where to pu voltage dividing circuits and resisters to give the ATMEGA328 feedback on the charging

retrolefty: One flaw is the design is that I don't see a series current limiting resistor either in the schematic drawing or the picture between the base of the transistor and the digital output pin . This will cause lots of distress on the output pin driving the transistor when set HIGH.

Yes i have forgotten to draw them in. i currently have a 330ohm resister to the base. Are my drawings at least getting better?

calvingloster:

Grumpy_Mike:

So please explain why u say this thing I'm making won't work

Because the first stage is only feeding a constant current through the load which is that transistor. Your voltage regulator is not a part of the current monitoring circuit and so takes no part in the constant current bit of the circuit.

But ive tested this and it works? why does it work? im not trying to be funny but ive memasured volts and amps while connected to a battery. ive drawn two new schematics one for constant voltage and one for constant current.

Booth your schematics are current limited, the LM317 and the 5 ohm resistor limits to 250 mA. (Dot)

The first deliver a voltage depending on the 560 ohm and 12 kohms resistors (with digital low) The second deliver much lower voltage then you have two 12 kohms in parallell (with digital high)

You should only switch between 14,4 and 14,1 volt?

Pelle

Pelleplutt:

calvingloster:

Grumpy_Mike:

So please explain why u say this thing I’m making won’t work

Because the first stage is only feeding a constant current through the load which is that transistor. Your voltage regulator is not a part of the current monitoring circuit and so takes no part in the constant current bit of the circuit.

But ive tested this and it works? why does it work? im not trying to be funny but ive memasured volts and amps while connected to a battery. ive drawn two new schematics one for constant voltage and one for constant current.

Booth your schematics are current limited, the LM317 and the 5 ohm resistor limits to 250 mA. (Dot)

The first deliver a voltage depending on the 560 ohm and 12 kohms resistors (with digital low)
The second deliver much lower voltage then you have two 12 kohms in parallell (with digital high)

You should only switch between 14,4 and 14,1 volt?

Pelle

Well i have taken two photo’s and measured the voltage in both. in constant current mode, where the led on the left is on, transistor off, it supplies 28volts and this makes sense as it will supply as much volts as it can to generate 250mA of current, because the current is 0(disconnected) it will increase voltage till max which is 28 in this case.

The constant voltage mode(LED on right on) transistor on, supplies 14.8 volts which is also what i require. my resistors are abit out thats why , i think, i dont get exactly 14.1v. So to me this is completely correct and will work to charge a battery, if MR GRUMPY_MIKE can just reply and give me the bad news that im totally wrong and explain whats happening then kewl? untill then this thing works