1
\$\begingroup\$

I'm working on a circuit design with a microcontroller that runs on 3.3V. I'd like to be able to power it either through a 3.3v supply or a USB port. I'm using an spx3819 regulator.

What would be the best way to achieve this? What I have in mind so far is something like this:

schematic

Basically, the 3.3V signal is fed into an inverter, which disables the regulator. This 3.3v signal is also directly fed into the microcontroller (not shown in the schematic).

Is there any better way?

EDIT: The Vout is directly fed into the microcontroller. Vout is 3.3v. When high, the 3.3v source will disable the chip, regardless of the voltage at Vin (the enable pin disables the chip at < 0.4v).

\$\endgroup\$
13
  • 3
    \$\begingroup\$ Where does Vout go? If it's supplying the 3v3 net, you just created an oscillator with an inverter and an LDO. \$\endgroup\$ Jul 2, 2015 at 10:36
  • \$\begingroup\$ @NickJohnson Alternative part use. It is not to be snubbed at. ^.^ \$\endgroup\$
    – Asmyldof
    Jul 2, 2015 at 10:49
  • \$\begingroup\$ When supplied by 3.3 V, how does the 3.3 V get to the microcontroller ? You could use 2 diodes to solve this by combining the vout of the regulator with the external 3.3 V but you will get a small voltage drop (0.2 V when using shottky diodes) so the microC. would then be running at 3.1 V. \$\endgroup\$ Jul 2, 2015 at 10:51
  • \$\begingroup\$ You haven't specified which you want to have priority, either: the 5V USB supply, or the 3v3? \$\endgroup\$ Jul 2, 2015 at 10:53
  • \$\begingroup\$ What is VOUT value? \$\endgroup\$
    – User323693
    Jul 2, 2015 at 12:03

2 Answers 2

1
\$\begingroup\$

I know the answer is subjective.
I use this whenever there is a need to switch between two supplies with at least 1 V difference automatically. Here, assuming VIN_EXT is less than 5 V, the circuit will draw power from PC whenever USB power is available, else from VIN_EXT automatically.

schematic

simulate this circuit – Schematic created using CircuitLab

Major advantage here is that, drop across the FET will be just a few 10s of mV at max compared to diode drop of about 300 or 400 mV

\$\endgroup\$
7
  • \$\begingroup\$ This doesn't seem to be working when I try to simulate it and I don't see a way how it could. Can you elaborate on the design? \$\endgroup\$
    – ja2142
    Jul 1, 2019 at 19:20
  • \$\begingroup\$ @ja2142 the P Mosfets are basically just acting like diodes. Assume there is no USB power. \$\endgroup\$
    – User323693
    Jul 23, 2019 at 18:12
  • \$\begingroup\$ @ja2142 the P Mosfets are basically just acting like diodes. Assume there is no USB power. M1 body diode will conduct and soon after M1 turns on as VGS will b positive... when SUN power is introduced, M2 will power on as it is strongly biased than M1 thereby blocking M1... May I see your simulation once? \$\endgroup\$
    – User323693
    Jul 23, 2019 at 18:19
  • \$\begingroup\$ When I connect voltages to both VIN_EXT and usb 5v intput (eg 3V and 5V respectively) there is large current from USB to VIN_EXT. \$\endgroup\$
    – ja2142
    Jul 24, 2019 at 19:47
  • \$\begingroup\$ Please check the PMoS connection. The Source and drain pins might be swapped in your circuit \$\endgroup\$
    – User323693
    Jul 26, 2019 at 3:25
-1
\$\begingroup\$

A simple solution is just to use a switch, if you don't mind to flip the button. This image is taken from the Tiva C LaunchPad, a simple switch between the USB_VBus and the In Circuit Debug Interface.

enter image description here

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Using a switch is not an option, as it would complicate the design. \$\endgroup\$ Jul 3, 2015 at 10:40
  • \$\begingroup\$ Then use a relay, power the relay from Vin, if the Vin is off, let the relay connect the supply of the micro to the external 3.3 V supply. \$\endgroup\$ Jul 3, 2015 at 12:40
  • \$\begingroup\$ Vbus = Vin which connecte to both Vin & enable of your LDO, I don t see how it would complicate the design. \$\endgroup\$
    – MathieuL
    Jul 3, 2015 at 14:51
  • 1
    \$\begingroup\$ I honestly don't want to bother the user with any more switches, and since the final circuit will be used in a restricted, portable environment, relays are off the table. \$\endgroup\$ Jul 3, 2015 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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