11
\$\begingroup\$

There are two power supply sources in the following diagram - USB and 12V. Only one power supply can be connected at the same time. I am trying to disable power to FT232 whenever 12V is plugged in. In that case FT232 should not be powered, but MCU will be powered. However, when USB is connected, both FT232 and MCU should be powered. I tried to use Schottky diodes(BAT54C) but I'm not sure if this is correct way.

Also - would USB power harm voltage regulator in the second case?

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ I'm not certain, but simply changing how D1 is oriented would work, minus the diode forward voltage drop. Connect pin 2 of the diode to the regulator output, pin 1 to the USB VCC, and pin 3 goes to the MCU VCC and other parts. This way the MCU gets powered no matter what, while the FT232 is only powered by the USB power. The Diodes would provide reverse current protection so that the USB vcc never shows up on the regulator output, and the regulator never shows up on the usb vcc line. And only the higher voltage diode would show up on pin 3, even if you connect both usb and 12v jack. \$\endgroup\$ – Passerby Feb 6 '13 at 5:23
8
\$\begingroup\$

Your schematic seems to have a bug. If you apply +5V from USB, then D1 is reverse-biased, and μC wouldn't get +5V.

Here's what I can propose instead. Of course, this is just a rough diagram, which shows only power distribution.

enter image description here

FTDI chip is bus powered only always.
When +12V source is not present, the gates of Q17 and Q18 are pulled low and the +5V rail is powered from USB.
When +12V source is present, the gates of Q17 and Q18 are pulled high and the USB section is not self-powered from the +12V supply.

MOSFET body diodes are the reason for having two MOSFETs back-to-back instead of just one. This is to prevent the USB host from getting back-powered.

\$\endgroup\$
  • \$\begingroup\$ thanks. Having max 100-200mA load on MCU circuits, could you recommend me MOSFET body suitable for your solution? \$\endgroup\$ – Pablo Feb 6 '13 at 10:32
  • \$\begingroup\$ I don't see in the schematic how the USB 5V can power the MCU. Moreover, it still shows N MOSFETs instead of P MOSFETS. \$\endgroup\$ – igorsales Aug 29 '17 at 2:40
  • \$\begingroup\$ @igorsales It does not show N-MOS. \$\endgroup\$ – Asmyldof Aug 29 '17 at 9:15
  • \$\begingroup\$ @Asmyldof I'm sorry, my mistake. However, I still cannot follow how current flows from the USB 5V to U34 when 12V isn't applied. Would you mind explaining? Many thanks. \$\endgroup\$ – igorsales Aug 30 '17 at 0:45

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.