Power supply auto switch

Hi there,

I would like to simply isolate the VUSB supply of a USB input from an external power supply when both are plugged in together. A computers USB port doesn't have enough current to drive all the LED's in the circuit so it requires the External power supply to operate.

Basically i want to be able to have the arduino plugged in to the USB port for programming while at the same time have the external power supply plugged in to power the LED's. When it is running as a standalone device the External power supply needs to power the arduino as well.

At the moment i have a simple diode on the VUSB line that is then fed straight in to the 5V line.

Will this be okay? Or should i have some sort of auto detect/switch circuit to isolate VUSB while the external source is plugged in.

Thanks

Diode is absolutely fine :slight_smile:

Although it's a bit useless. You say you can't power it from USB because of the load. So if you know plug it in it will try to power everything an fail... You could connect +12V via a resistor to the Arduino in order for it to know it has the right power supply to go full load.

Thanks Septillion,

The idea is it will never be powered without an external supply. I was more worried abut how to isolate the VUSB when i plug it in for programming. So long as the diode is fine i'll run with that.

Still, that's a good idea. I'll monitor the 12V input through a voltage divider for full load. There will be plenty of spare pins on the mcu.

Thanks

If you really never power it with only USB, just don't connect VUSB at all :wink: