charging batteries with fixed voltage regulator and opamp

Thread Starter

testuserabcdef

Joined Jul 12, 2016
127
circuit.png
This is another attempt at building my own battery charger and I want to run this design by the community before implementing.

Here's how I officially assign the parts:

G2 is a 9 or 12 volt solar panel that has a 20 to 100ma rating. C1 and C2 are 22uF each.
R4 is possibly 10K, but I might need to change it.
R1 and R2 is the op-amp's voltage divider. R5 is the output current limiting resistor. I might make it 1 watt 50 ohms. D2 is actually a 1N4007, not 1N4148. I might also make D1 1N4007 as well.

The opamp shown is LM358 but I might need to change it.

Here's why I think the design works but I post it here so I can be corrected if I'm wrong and/or missing something.

I configure R1/R2 such that R1 is a very low value and R2 is a very high value. This sets the voltage that I want the battery to end up with in the end.

When solar panel is next to full light the target voltage appears at the +ve pin of an op-amp.

Since fixed voltage regulators work best when its GND pin is connected to actual GND, I connected the GND pin to R4, a pull-up resistor that sets the GND pin to a high voltage level if the transistor doesn't turn on. This means that if the NPN's base is low, then the regulator shuts off and charging doesn't happen. This is why I connect -ve input to the battery being charged through the resistor R5. I'm considering connecting the -ve pin directly to the battery itself.

There will also be times where the solar panel does not receive light and that the battery is fully charged. Would my design work in all cases or could my design be improved?

The opamp shown here is LM358 but its bad for gain. Is there a substitute opamp I can use that's commonly available suitable for this purpose?
 

Ylli

Joined Nov 13, 2015
933
1. You need a voltage reference. Allowing the output of the solar cell to determine the reference is going to end up either overcharging or undercharging the battery.

2. Do you know what happens when you remove the ground from a 7808? the output doesn't drop to zero, it will go to the highest it can based on input voltage and regulator drop out. The 7808 is *trying* to maintain 8 volts between the output pin and the ground terminal.
 

Thread Starter

testuserabcdef

Joined Jul 12, 2016
127
1. You need a voltage reference. Allowing the output of the solar cell to determine the reference is going to end up either overcharging or undercharging the battery.
Undercharge is not a concern to me if the battery is already charged, and how would the battery be over-charged?

2. Do you know what happens when you remove the ground from a 7808? the output doesn't drop to zero, it will go to the highest it can based on input voltage and regulator drop out. The 7808 is *trying* to maintain 8 volts between the output pin and the ground terminal.
I guess that's why people use the LM317 instead. I wanted to use the 7808 to avoid the need of a second voltage divider but I guess I don't really have a choice?

So basically, I'll need to replace 7808 with LM317 and add a pull-down resistor to make a voltage divider?
 

Ylli

Joined Nov 13, 2015
933
Your 'full charge' voltage would be the value of the solar cell output scaled by the resistive divider. On a bright sunny day, your 'reference voltage' may go a bit higher than you want.

AN LM317 will behave just like the 7808 - except it will try to keep the output pin 1.25 volts above the ground pin.
 

Thread Starter

testuserabcdef

Joined Jul 12, 2016
127
Your 'full charge' voltage would be the value of the solar cell output scaled by the resistive divider. On a bright sunny day, your 'reference voltage' may go a bit higher than you want.

AN LM317 will behave just like the 7808 - except it will try to keep the output pin 1.25 volts above the ground pin.
I don't get it. How can reference voltage go a bit higher? Is it because of some special property of solar panels that I need to be aware of?

So If I use LM317 then the worst case scenario is that the output to the battery being charged is 1.25V when the opamp tries to shut the regulator off?

and would any op-amp work for this application or are there some kinds I should avoid?
 

Ylli

Joined Nov 13, 2015
933
I'm not an expert on solar panels, but I believe you will find the the output voltage will go up with increased illumination.

The way you have the circuit configured, you can not turn the regulator off. When that transistor is turned off, the regulator goes to full on.
 

Thread Starter

testuserabcdef

Joined Jul 12, 2016
127
I'm not an expert on solar panels, but I believe you will find the the output voltage will go up with increased illumination.

The way you have the circuit configured, you can not turn the regulator off. When that transistor is turned off, the regulator goes to full on.
So in a basic 7808 setup, if the gnd pin is connected to supply through a resistor, it doesn't shut off?
 

hp1729

Joined Nov 23, 2015
2,304
View attachment 122818
This is another attempt at building my own battery charger and I want to run this design by the community before implementing.

Here's how I officially assign the parts:

G2 is a 9 or 12 volt solar panel that has a 20 to 100ma rating. C1 and C2 are 22uF each.
R4 is possibly 10K, but I might need to change it.
R1 and R2 is the op-amp's voltage divider. R5 is the output current limiting resistor. I might make it 1 watt 50 ohms. D2 is actually a 1N4007, not 1N4148. I might also make D1 1N4007 as well.

The opamp shown is LM358 but I might need to change it.

Here's why I think the design works but I post it here so I can be corrected if I'm wrong and/or missing something.

I configure R1/R2 such that R1 is a very low value and R2 is a very high value. This sets the voltage that I want the battery to end up with in the end.

When solar panel is next to full light the target voltage appears at the +ve pin of an op-amp.

Since fixed voltage regulators work best when its GND pin is connected to actual GND, I connected the GND pin to R4, a pull-up resistor that sets the GND pin to a high voltage level if the transistor doesn't turn on. This means that if the NPN's base is low, then the regulator shuts off and charging doesn't happen. This is why I connect -ve input to the battery being charged through the resistor R5. I'm considering connecting the -ve pin directly to the battery itself.

There will also be times where the solar panel does not receive light and that the battery is fully charged. Would my design work in all cases or could my design be improved?

The opamp shown here is LM358 but its bad for gain. Is there a substitute opamp I can use that's commonly available suitable for this purpose?
Using either theLM78xx or the LM317 you want to turn it off from the input, not remove the reference to ground. The attached uses a scheme as suggested but operation is a little different. In yours any time the battery voltage drops a little bit the charger kicks in, Not a bad idea. In the example battery voltage has to drop to a certain level before the charger kicks in and latches in a charging state until the battery is fully charged.
The regulator can be constant voltage or constant current.

Mine has the same flaw of not using a good voltage reference. That would be suggested when using a solar cell.
 

Attachments

Last edited:

ronv

Joined Nov 12, 2008
3,770
View attachment 122818
This is another attempt at building my own battery charger and I want to run this design by the community before implementing.

Here's how I officially assign the parts:

G2 is a 9 or 12 volt solar panel that has a 20 to 100ma rating. C1 and C2 are 22uF each.
R4 is possibly 10K, but I might need to change it.
R1 and R2 is the op-amp's voltage divider. R5 is the output current limiting resistor. I might make it 1 watt 50 ohms. D2 is actually a 1N4007, not 1N4148. I might also make D1 1N4007 as well.

The opamp shown is LM358 but I might need to change it.

Here's why I think the design works but I post it here so I can be corrected if I'm wrong and/or missing something.

I configure R1/R2 such that R1 is a very low value and R2 is a very high value. This sets the voltage that I want the battery to end up with in the end.

When solar panel is next to full light the target voltage appears at the +ve pin of an op-amp.

Since fixed voltage regulators work best when its GND pin is connected to actual GND, I connected the GND pin to R4, a pull-up resistor that sets the GND pin to a high voltage level if the transistor doesn't turn on. This means that if the NPN's base is low, then the regulator shuts off and charging doesn't happen. This is why I connect -ve input to the battery being charged through the resistor R5. I'm considering connecting the -ve pin directly to the battery itself.

There will also be times where the solar panel does not receive light and that the battery is fully charged. Would my design work in all cases or could my design be improved?

The opamp shown here is LM358 but its bad for gain. Is there a substitute opamp I can use that's commonly available suitable for this purpose?
What is the battery chemistry and voltage?
 
Top