Switch between voltage sources automatically and charge battery

Rtlane

Joined Dec 27, 2015
27
I am using a switchable dc jack to switch between dc power supply and battery. The problem im having is to be able to charge the battery with my 3s lipo charger. I drew a diagram to explain better. The dotted line is what im not sure about, cause if the dc jack is not plugged in, therefore the 2 bottom pins are closed, then the battery might ouput to its own charger. I know that a battery cant be charging and put out to a load at the same time, so would this circuit work or not? Any help would be greatly appreciated.

dl324

Joined Mar 30, 2015
12,238
The usual method is to use diodes.

What is the charger voltage?
Do you plan to have the charger connected continuously?
What is the current draw of the circuit?

Rtlane

Joined Dec 27, 2015
27
The usual method is to use diodes.

What is the charger voltage?
Do you plan to have the charger connected continuously?
What is the current draw of the circuit?
The charger voltage is 12v, need it to be powered when the 12v wall powersupply is plugged into the dc jack. Im going to size the power supply current rating to make sure when i get my supplies in the mail, but the charger will pull around 800mA, my circuit will pull around 1500-2000mA.

I want the battery to power my circuit when the wall power supply isnt plugged in. I want the battery to charge and the wall power supply to power my circuit when its plugged in.

Last edited by a moderator:

dl324

Joined Mar 30, 2015
12,238
Will your circuit be operating when the battery is being charged?
What is the battery voltage?

Rtlane

Joined Dec 27, 2015
27
Will your circuit be operating when the battery is being charged?
What is the battery voltage?
Yes it will be operating when the battery is charging. I want the circuit to be powered by the wall outlet while the battery is charging. The battery is 11.1v. The charger is designed to to charge it from voltage of 12v-15v.

dl324

Joined Mar 30, 2015
12,238
Are you planning to power your circuit from the battery while it's being charged? Or are you asking for a way for the charger connection to disconnect the battery?

Rtlane

Joined Dec 27, 2015
27
Are you planning to power your circuit from the battery while it's being charged? Or are you asking for a way for the charger connection to disconnect the battery?
No, i want my 12v wall outlet to power the circuit while the batteries charging. Wasnt sure if my diagram would work.

dl324

Joined Mar 30, 2015
12,238
What do you want to happen if power isn't being applied to the jack and the battery is being charged?

Rtlane

Joined Dec 27, 2015
27
What do you want to happen if power isn't being applied to the jack and the battery is being charged?
If power isnt being supplied to the jack, i want the battery to power the circuit.

dl324

Joined Mar 30, 2015
12,238
What if the battery is being charged?

ebeowulf17

Joined Aug 12, 2014
3,275
What if the battery is being charged?
Wouldn't charging automatically have to stop if there were no longer a power source available to the charger? I don't see where there is any option here. No external power means stop charging and power the circuit from the battery, right?

Rtlane

Joined Dec 27, 2015
27
What if the battery is being charged?
If the wall psu is plugged in i want:
-The wall psu to power the charger so the battery will charge and i dot NOT want the battery to power the circuit
-The wall psu to power the circuit

If the wall psu is Not plugged in i want:
-the battery to supply power to the circuit and thats it.

Wouldn't charging automatically have to stop if there were no longer a power source available to the charger? I don't see where there is any option here. No external power means stop charging and power the circuit from the battery, right?
Yes it will stop, but when there is nothing plugged in the jack, then the battery is feeding itself back into the charger, or maybe not. Thats what i wasnt sure about. The dotted line is the wiring im not sure about, cause when the jack is emply, then there is a current path from the battery to the batteries charger. I wasnt sure how this would react.

Last edited by a moderator:

dl324

Joined Mar 30, 2015
12,238
Thats what i wasnt sure about. The dotted line is the wiring im not sure about, cause when the jack is emply, then there is a current path from the battery to the batteries charger. I wasnt sure how this would react.
If nothing is connected to the power jack and the battery is being charged, the charger would also be powering your circuit. Since your circuit draws more current than the charger is rated to supply, it would be overloaded; and the voltage would be higher than the nominal 12V your circuit would see from the power jack or battery.

You would need a way of disconnecting the charger from the battery when power isn't being applied from the jack.

Can your circuit tolerate a diode drop in the supply voltage?

dl324

Joined Mar 30, 2015
12,238
Wouldn't charging automatically have to stop if there were no longer a power source available to the charger? I don't see where there is any option here. No external power means stop charging and power the circuit from the battery, right?
That's true, but this is a manual switch over, not a power fail switch over. To power the circuit from the battery, the plug needs to be removed from the power jack. When the plug is removed, it's still possible for the charger to be charging the battery and powering the circuit; but the charger isn't capable of doing both. It also isn't clear if the circuit will tolerate more than 12V.

Rtlane

Joined Dec 27, 2015
27
I wanted to avoid a voltage drop, but if its the best option, then im fine with a 0.3v diode drop

tcmtech

Joined Nov 4, 2013
2,867
If you are powering something off of a 11.1 lipo pack the odds are it's not the least bit voltage sensitive given that at full charge that 11.1 volt pack will be closer to 12.6 volts and when near dead it will be around 9 volts.

Add in the fact that very few 12 volt rated devices are fussy about their supply voltage having to stay extremely stable and close to 12 volts. Typically anything between 9 and 15 volts is good especially so if it's designed to run from a lipo pack and or wall power pack to begin with.

Personally I would just stick a few diodes in the system where needed and call it good enough until it starts giving actual problems from them.

Rtlane

Joined Dec 27, 2015
27
If you are powering something off of a 11.1 lipo pack the odds are it's not the least bit voltage sensitive given that at full charge that 11.1 volt pack will be closer to 12.6 volts and when near dead it will be around 9 volts.

Add in the fact that very few 12 volt rated devices are fussy about their supply voltage having to stay extremely stable and close to 12 volts. Typically anything between 9 and 15 volts is good especially so if it's designed to run from a lipo pack and or wall power pack to begin with.

Personally I would just stick a few diodes in the system where needed and call it good enough until it starts giving actual problems from them.
Makes sense thanks. How could i modify my circuit to use a diode? Im trying to figure it out and i understand how diodes work,but not sure how to go about it.

Also i dont have to used the dc jack switch if theres a better way.

Last edited by a moderator:

tcmtech

Joined Nov 4, 2013
2,867
There are a few ways you could wire it so I say there's your homework for tonight!

Get your pencil and paper out and start drawing up different circuits with one, two or three diodes to direct which way and where the power flows during different operations with or without the switch.

Rtlane

Joined Dec 27, 2015
27
There are a few ways you could wire it so I say there's your homework for tonight!

Get your pencil and paper out and start drawing up different circuits with one, two or three diodes to direct which way and where the power flows during different operations with or without the switch.
Will do. Thanks for ur help. Ill let u know what i come up with lol

Will this work if my wall psu voltage is higher than the battery? I try to figure out some other ways as well.

maybe put adiode in series with the charger to make sure its a lower voltage than 14v just in case

Attachments

• 839 KB Views: 40
Last edited by a moderator:

dl324

Joined Mar 30, 2015
12,238
You have more variables consider.

You have 3 different voltages to contend with. Your 12V adapter, your "12V" charger (which you've stated has a higher voltage), and the battery voltage. As you've wired them in your latest drawing, you have the charger and PSU fighting each other. You didn't have that problem in your original drawing because the jack was only allowing the adapter or battery/charger to be in-circuit. Your diagram isn't correct anyway. The charger would be across the battery terminals and with the diodes, there would be no conflict.

Then you need to deal with the situation where the PSU is off. Will you just unplug it from the outlet or will you physically disconnect it?

Finally, you need to address the situation where the charger is charging the battery and the circuit is being operated from the battery. The circuit draws more current than the charger can provide, so it can't charge the battery and power the circuit at the same time. It's also unclear whether your circuit would tolerate the charging voltage.