How to auto disconnect a V-reg. from positive rail when external power is used?

Thread Starter

prometei

Joined Apr 13, 2008
98
Hi,

I have a 9V battery that goes to a 78L05 voltage regulator through a DC socket that disconnects the negative of the battery when a DC jack is inserted, i.e. external power is used, so it's a simple chain (see attachment).

So when you insert a DC jack the negative of the battery is disconnected from the circuit, but the positive output of the 78L05 is not, so I use a schottky diode between the positive output of the 78L05 and the positive wire from the DC socket.
Is there a simpler or better way to do this? Or method that won't have a voltage drop (created by the schottky)?

thanks

V-reg DC jack question.jpg
 

MrChips

Joined Oct 2, 2009
30,824
Barrel power jacks come with a switch.
Put the switch contacts on the +ve side of the battery.
When a DC adapter is plugged in, the battery +ve is disconnected from the input of the 78L05 and replaced with the DC adapter source.



 

Thread Starter

prometei

Joined Apr 13, 2008
98
So basically invert the polarity of the input, i.e. center will be ground. I guess this is why Roland musical equipment has the dc sockets with inverted polarity.

But if I want to have standard power jack polarity I'm going to have to use an electronic method.
Would it be a good solution to replace the schottky diode with p-chanel mosfet with the gate connected to the positive pin of the dc socket?
 

GopherT

Joined Nov 23, 2012
8,009
Is a 0.3V drop hurting your circuit? Or do you just feel like it might be hurting it?

If it is hurting your circuit, you can raise the voltage output of your 7805 by placing a diode between ground pin of 7805 and your circuit ground. Diode should be the same as your existing diode on the output of 7805.
 

Thread Starter

prometei

Joined Apr 13, 2008
98
Is a 0.3V drop hurting your circuit?
I don't think so. I just want to learn more about this topic, for future projects where this could be an issue and just for basic understanding.
My current project has an Atmega8a running at 16MHz (with less than 50mA consumption), and the data sheet states that the supply voltage at that frequency has to be between 4.5V and 5.5V, so 0.3V should not be an issue.
 

Thread Starter

prometei

Joined Apr 13, 2008
98
I've just rechecked my circuit on the prototype board and there is a mistake. The ground terminal of the 78L05 was incorrectly connected to the circuit ground after the DC jack, so when external power was used current flowed into the out pin of the regulator, that's why I put the schottky in there.
 
Top