0
\$\begingroup\$

I'm planning to create a custom Arduino Uno shield for a test jig I'm making. The shield will have an external regulated 5V source, and I'm looking to use that to power the Arduino. I've read a few others posts and it seems that the best way will be to simply apply the Ext_5V to the +5V pin on the Arduino.

First Question: Is this a good plan, are there any additional factors to consider when supplying the Arduino through the +5V pin?

Second Question: I'd still like to be able to program and use the device just from USB and not have any issues, is there a circuit I could put on my shield to detect whether or not the USB is plugged in and powering the Arduino?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Should this be in Arduino.SE? \$\endgroup\$
    – Justme
    Commented Apr 3 at 20:43

1 Answer 1

0
\$\begingroup\$

AFAICT just feeding 5 volts into the +5V pin should be fine. I've done it before and haven't blown anything up yet.

The caveat is that if two power supplies are connected at the same time, and have slightly different voltages (e.g. the USB power supply is 4.993 volts and the external supply is 5.006 volts), the two supplies will "fight" each other and the higher voltage will back-feed into the lower-voltage supply, potentially damaging it.

The easiest way to prevent that is to just add a diode between the external 5V and the Arduino's 5V pin, pointing in the obvious direction to allow current to flow when the external supply is in use. Schottky diodes are best for this because of the low forward voltage drop. The Arduino already does this to protect both the external jack and the USB port (it also does double duty as reverse-polarity prevention).

\$\endgroup\$
6
  • \$\begingroup\$ Okay that makes sense, so if I put in a Schottky like this SchottkyDiode my supply voltage to the Arduino and its supporting circuitry would be ~4.8V.. would that cause any issues? \$\endgroup\$
    – bdmcnamara
    Commented Apr 3 at 20:53
  • \$\begingroup\$ If you can handle surface mount stuff, that would probably be adequate. I tend to stick with through hole stuff for my DIY projects / test jigs though because it's easier to solder by hand. The 1N5819 is a good Schottky for this kind of thing. \$\endgroup\$ Commented Apr 3 at 20:58
  • \$\begingroup\$ Fair enough, that sounds good. Thanks for the advice! \$\endgroup\$
    – bdmcnamara
    Commented Apr 3 at 21:00
  • \$\begingroup\$ Also, modern ATmega328s can run on 3.3 volts too, 5 volts was just more common when the original Arduino came out, so that's what was used. 4.8V should be fine -- and the advantage is that when the Arduino is plugged into USB, it will automatically stop drawing current from your external 4.8V because of the diode. \$\endgroup\$ Commented Apr 3 at 21:01
  • 1
    \$\begingroup\$ @dragoncoder047 Yes, the AVR Atmega328 is specified to work at 3.3 V, but not at the speed of 16 MHz that the Arduino normally runs at. 4.8 V would be fine though. \$\endgroup\$
    – StarCat
    Commented Apr 4 at 6:46

Your Answer

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

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