1
\$\begingroup\$

This is my take on an automatic source selector between USB and a 12Vdc wall supply. There is something similiar in this post. The problem I have is the Voltage drop across the diode on the USB 5V.

In my version below, the idea is that the FET will keep the VUSB off while the 12V is present and the body diode of the FET will act as blocking diode. If the 12V is disconnected, the 47k pull down resistor will switch the FET on and this will also result in a lower V drop across the FET.

my version

Anybody have any suggestions? Will this work?

\$\endgroup\$
  • \$\begingroup\$ Not a bad approach overall, however the VCC_5V generated by the regulator will back-feed the USB_5V through the body diode of Q4. This can be addressed by putting two P-channel MOSFETs back-to-back. Have a look at this diagram. \$\endgroup\$ – Nick Alexeev Oct 16 '14 at 20:54
  • 2
    \$\begingroup\$ Isn't Q4 backwards? \$\endgroup\$ – Dan Laks Oct 16 '14 at 20:55
  • \$\begingroup\$ maybe this is an application where the base of the transistor (Q10) will be over-voltage affected? And yes it seems Q4 is backwards. \$\endgroup\$ – KyranF Oct 16 '14 at 21:18
  • \$\begingroup\$ This is the normal way round for Q4 to be in this type of design, but only when the current that passes through it is then used to ensure Q4 is turned on. Only when +12V is present should Q4 be turned off preventing current from flowing into the USB. Normally an op-amp (powered from +5V) is used to make that decision instead of a simple transistor. \$\endgroup\$ – Majenko Oct 16 '14 at 23:07
  • \$\begingroup\$ This is the almost the same exact setup as the Arduino Uno and similar devices. They use a comparator instead of a transistor. See arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf. \$\endgroup\$ – Passerby Oct 16 '14 at 23:14
3
\$\begingroup\$

Your orientation of Q4 is correct for this style of circuit, but I'm not 100% happy with your BJT switching circuit.

Q4 should be off when +12V is present, and on when it isn't present. Normally an op-amp is used to compare the incoming voltage (divided down) to a known fixed value (say 3.3V from another regulator in your circuit), and if it's above the threshold then disable the USB's P-channel MOSFET. When the +12V isn't present the op-amp, powered by around 4.5V from the USB via the MOSFET's body diode would then turn the MOSFET on, bypassing the body diode.

Here's the Arduino schematic for the power segment that does exactly what you are after:

Arduino power supply

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.