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.
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!
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 ??
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.
Fexduino:
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
Fexduino:
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).