# Powering microcontroller by bypassing ldo regulator

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:

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).

• Where does Vout go? If it's supplying the 3v3 net, you just created an oscillator with an inverter and an LDO. – Nick Johnson Jul 2 '15 at 10:36
• @NickJohnson Alternative part use. It is not to be snubbed at. ^.^ – Asmyldof Jul 2 '15 at 10:49
• 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. – Bimpelrekkie Jul 2 '15 at 10:51
• You haven't specified which you want to have priority, either: the 5V USB supply, or the 3v3? – Nick Johnson Jul 2 '15 at 10:53
• What is VOUT value? – Umar Jul 2 '15 at 12:03

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.

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

• 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? – ja2142 Jul 1 at 19:20

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.

• Using a switch is not an option, as it would complicate the design. – Malfunction Jul 3 '15 at 10:40
• 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. – Bimpelrekkie Jul 3 '15 at 12:40
• Vbus = Vin which connecte to both Vin & enable of your LDO, I don t see how it would complicate the design. – MathieuL Jul 3 '15 at 14:51
• 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. – Malfunction Jul 3 '15 at 15:15