Hi
I have a project I want to be able to run using a 9V battery, or a 12V DC power adapter (the voltage is used for audio so I am thinking might as well get 12V instead of 9 from the DC supply).
I was thinking wiring these in parallel, i.e. battery negative to GND and battery positive to +12V in.
What will happen is someone leave a 9V battery connected but plugs in the power adapter?
Thanks
Simon
The battery will get hot, and possibly generate enough internal pressure to burst. It will invariably leak even if it doesn't burst.
Since a significant amount of current will be flowing through the battery, your power supply may also get hot and may not be able to maintain 12v on it's output. Bottom line is, don't do this.
Ha ha ok, it's pretty clear, thanks
How would you handle it in terms of design, then?
And if the DC is 9V?
Just put a diode in series with the 9V input. If you are worried about someone putting 12V on the 9V input, and 9V on the 12V input, then put a diode in series with the 12V input as well.
Oh yea I did not think about that! Well they both need reverse voltage protection, in case someone uses a wrong polarity supply or if someone puts the battery the wrong way, but I was thinking using only one diode connected to both the battery positive and the +12V.
But then with a diode on each input it will also protect the battery if someone decides to plug 12V while the battery is still on (the idea is to use either the battery or the 12V DC power supply), correct? Something like the attached diagram.
Yes, two diodes is ideal. If you use a Schottky diode, then the voltage drop will be lower than a silicon diode. If you don't mind surface mount parts, the BAT54C has two diodes in one package and should do the job.
https://www.diodes.com/assets/Datasheets/ds11005.pdf
Ok, great! The BAT54C looks good
Ok, great! The BAT54C looks good
You didn't mention the expected current draw of your device, make sure whatever diode you use is sufficiently rated. If you are powering this from a PP3 size 9v battery, then hopefully you'll be drawing somewhat less then the 200mA maximum of a BAT54C.
Most DC barrel jacks have a switched ground, much like in the schematic above. This switch is there for the purpose of switching between the battery and power supply.
Also i think a single diode in series with the battery will be good enough because the battery voltage will always be lower than the the power supply voltage. Unless you leave the power supply plugged in when it's off, that is.
But shottky diodes are cheap and 0.2V drop compared to 9 or 12V is nothing so you can use two to be 100% safe.
Thank you all for the help. I need the two diodes because I wanted reverse voltage protection, I just did not think it will help protecting the battery as well