Go Down

Topic: Powering Arduino via PSU but with USB sometimes (Read 1 time) previous topic - next topic

Fexduino

Dec 01, 2014, 03:52 pm Last Edit: Dec 01, 2014, 07:45 pm by Fexduino
Hello,


I have a little circuit for my Arduino project that basically works with and without a USB connection. The Arduino can be powered through the 12v input I run through my PCB (regulated to 5v) but it also needs a USB connection.

Right now I am powering my LEDs and sensors with the 12v line and powering the Arduino using USB. However, when I turn off the PC or unplug the USB cable the Arduino won't run until I connect the regulated voltage to the VCC pin.

I want a solution where I don't have a change my PCB :)

Is it possible to power the Arduino via external PSU with the USB connected to the PC? I want the Arduino to stay on when I turn off the PC or unplug the USB cord.

Can I simply connect both at the same time? Eg plugin the USB and also connect 5v to the VCC, will those currents mess each other up?

I am an electronics noob so please be thorough in your explaination but as always many many thanks.

guix

#1
Dec 01, 2014, 04:29 pm Last Edit: Dec 01, 2014, 04:32 pm by guix
I do it without problems on my Arduino Megas.

IIRC the source will be selected automatically: if the external power supply's voltage is lower than 7V, it will use USB, otherwise it will use the external power supply.

This may not be the same for other arduinos than the Mega!

And what do you mean "with Serial" ?

Fexduino

Thanks for the reply, guess I will give this a go. I am using Arduino Leonardo (Sparkfun version Pro Micro) boards. Would you happen to have some documentation for this feature you describe ??

CrossRoads

Look at the Product page for the board you are using.
Most (but not Promini or Nano if I recall) have op-amp as a comparator driving a FET.
When Vin/2 is > 3.3V, Vin is used.
Otherwise Vusb is used if it' available.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Fexduino

Thank you, that sounds about the information I am looking for. I am learning new stuff every day.

Paul__B

However, when I turn off the PC or unplug the USB cable the Arduino won't run until I connect the regulated voltage to the VCC pin.
Yes, well obviously it will not run if you are not supplying power to it.   ;D


Is it possible to power the Arduino via external PSU with the USB connected to the PC? I want the Arduino to stay on when I turn off the PC or unplug the USB cord.
Yes, that is exactly what you need to do.  No problems at all.  The Pro Micro has automatic switching to derive its Vcc (but that schematic appears to be botched).

Go Up