Pages: [1]   Go Down
Author Topic: powering Arduino from external 5Volt power source  (Read 1392 times)
0 Members and 1 Guest are viewing this topic.
Berkshire, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 120
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

what is the proper way to power an Arduino (Duemillanove in this case) from an external 5Volt power source?

I have a project where I have a 5Volt 8x64 LED display matrix that drawn more current than the 5V regulator on the Arduino can handle. So I have an external switch mode 5Volt 5Amp power supply and connected it directly to the 5Volt and GND pins on the Arduino and to the LED matrix.

It does work fine this way when it is running stand-alone. My concerns are when I connect the Arduino to the computer via USB to upload new sketches and diag prints on the serial port.

- When I power up the project with the external source and at a later time connect the USB cable to the computer the Arduino sometimes resets, sometimes hangs and generally does weird things.
- When I connect USB *before* the external power source, the Arduino is trying to power the LED matrix from the USB 5Volt
- I'm also concerned I might damage something on the USB port on the computer
Logged

Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

Halifax, Canada
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Don't anthropomorphize computers. They hate that.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My guess is that you are maxing-out the capacity of the output pins on the board. The digital pins on the Duemilanove only deliver about 40mA. Most designers will place a separate LED driver board between the Arduino and the LED array.

The page "Arduino: What Adapter?" may help answer your question.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The problem is that the 5V pin/node is connected to the USB's 5V pin.  Your external supply and your USB supply are being connected together at the same time.  This is not a good idea.  You are right to be concerned about damaging something on the USB host.  There really isn't a good way to prevent this, other than don't connect the two at the same time.  Which makes debugging through serial difficult.

The ideal connection would be through the VIN/DC Barrel jack for the Arduino.  However, you need at least 7V there. 

One option would be to use a FTDI breakout board.  It can be powered by USB and connected to only the TX/RX lines of your Arduino.


Quote
My guess is that you are maxing-out the capacity of the output pins on the board.
There is nothing in the original post to suggest this is the case.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

CO, USA
Offline Offline
God Member
*****
Karma: 4
Posts: 710
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This sounds like what's been discussed:
http://www.david-laserscanner.com/forum/viewtopic.php?f=9&t=2261
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284034373

I'm not knowledgeable enough to know whether it'd work, but I was wondering about cutting the USB power pin, and reconnecting it with a diode to prevent current flow. Probably there's a good reason to not do that.
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Exactly justjed. I saw the same while developing my last project - had to disconnect external power to duemilanove prior to connecting USB cable to be able to download new sketch.
I also installed prominis in sockets so I could remove them from the project board for programming.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
reconnecting it with a diode to prevent current flow. Probably there's a good reason to not do that.

This is a hairy area.  The diode is going to drop 0.7v.  So 5v - 0.7v is 4.3v.  And I am assuming a nominal 5v.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 441
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

4.3V is acceptable for running at 16 MHz if the external power happened to be removed, say for downloading a new sketch.
Might have a problem if trying to supply external circuit that needed 5v, or if analog/digital was counting on 5V from USB.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One simple method to utilize external regulated +5vdc for an Arduino board is to take a spare USB cable and lop off the PC end, ID the the + and - power wires and wire that to your external PS. You can then power the board by plugging it into the Arduino USB connector. No fuss, no mess.

If you wish and your PS has greater then 500ma capacity, you can also use your external power supplies +5vdc terminal to run seperate power wires to external components and not worry about exceeding the 500ma polyfuse rating.

Lefty

Logged

CO, USA
Offline Offline
God Member
*****
Karma: 4
Posts: 710
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
reconnecting it with a diode to prevent current flow. Probably there's a good reason to not do that.

This is a hairy area.  The diode is going to drop 0.7v.  So 5v - 0.7v is 4.3v.  And I am assuming a nominal 5v.

Ah, thanks for pointing that out.

So, the upshot is that if you're going to use an Arduino in a context where you're collecting data, and show up once a day or week or something, and plug in a laptop to retrieve the data, and you can't pull external power before doing so, you can't use the USB port for that. At least if you're using the Duemilanove or any model with the same power select logic (and haven't replaced the MOSFET). Am I understanding this correctly?

I have a Belkin powered USB hub, and now I'm wondering whether it has the same problem -- obviously there's no comm involved, but something like a bus reset if I happen to be using it unpowered, and then connect the external power.
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Berkshire, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 120
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ooooops, for some reason I did not get notified about the replies in this thread. Just now I checked back here because I have another project with the same problem. Only now, half a year later, I've seen all your replies. ;-)

So as I understand it the easiest way is to cut the 5V line from USB and power the Arduino via it's 5V pin. The only (?) drawback is that I would lose the ability to power the Arduino from USB but would still be able to communicate over USB? I could live with that.
Logged

Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

Pages: [1]   Go Up
Jump to: