Pages: [1] 2 3 ... 5   Go Down
Author Topic: Externally powering LEDs so Arduino doesn't fry  (Read 5563 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I am making a type of LED arrangement almost like a display board with over 20 LEDs being used. My arduino gets very hot when i power 12 of them at once. Can someone draw me a setup on how I could hook up an external Power supply to power all of the LEDs while using the arduino as a switch? Thank you all!!!
Logged

Offline Offline
Faraday Member
**
Karma: 66
Posts: 2588
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It'd likely be easier to reduce/limit the current for each LED to 10 mA.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

20 LEDs isnt too many for the arduino to control, even at 20mA each, but it depends on how you plan on wiring things up. You can also take advantage of serial data transfer, to control many many LEDs, which includes 20. There are many methods of serializing and controlling the LEDs one way may be better than another way, depending on many factors.

If you multiplex 20 LEDs in a 4 x 5 matrix, you end up needing a total of 9 control lines, but you could multiplex in many ways. You could further reduce the control lines by charlieplexing the LEDs.

If dimming or brightness are important, you may want to consider taking advantage of PWM.

There are a lot of factors, based on only knowing that you want to control 20 LEDs, I'd say multiplex or charlieplex are the easiest options.

If using an external power supply is important, then using a constant current driver is maybe the best option.
Logged


Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5760
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

20 LEDs isnt too many for the arduino to control, even at 20mA each

My copy of the datasheet says maximum current allowed through the VCC or GND pin is 200mA...

20x20 is 400 - too much.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

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

Hello,
I am making a type of LED arrangement almost like a display board with over 20 LEDs being used. My arduino gets very hot when i power 12 of them at once. Can someone draw me a setup on how I could hook up an external Power supply to power all of the LEDs while using the arduino as a switch? Thank you all!!!

First we need to know if you need to be able to turn on and off each of the 20 leds independently of each other or do they all turn on and off together as a single unit? Or some situation between those two extremes?

Lefty
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

20 LEDs isnt too many for the arduino to control, even at 20mA each

My copy of the datasheet says maximum current allowed through the VCC or GND pin is 200mA...

20x20 is 400 - too much.


I cant find it right now, but Im fairly certain that the 5v line has a 500mA max because of the voltage on board voltage regulator. Each I/O pin is 40, and the 3.3 pin is 50mA. according to:
http://arduino.cc/en/Main/ArduinoBoardUno

but it doesnt list the 5v pins current max.

I looked in the datasheet thats linked on the same page, and it does list this:
DC Current VCC and GND Pins................................ 200.0 mA
on page 313, but I think thats the IC, not the arduino as a whole.
Logged


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

20 LEDs isnt too many for the arduino to control, even at 20mA each

My copy of the datasheet says maximum current allowed through the VCC or GND pin is 200mA...

20x20 is 400 - too much.


I cant find it right now, but Im fairly certain that the 5v line has a 500mA max because of the voltage on board voltage regulator. Each I/O pin is 40, and the 3.3 pin is 50mA. according to:
http://arduino.cc/en/Main/ArduinoBoardUno

but it doesnt list the 5v pins current max.

I looked in the datasheet thats linked on the same page, and it does list this:
DC Current VCC and GND Pins................................ 200.0 mA
on page 313, but I think thats the IC, not the arduino as a whole.


Yes the total +5vdc current available from the board is higher then 200ma, but it the things being powered are being controlled by digital output pins then their combined load current has to pass through the chips output pins thus the chip's lower total current limit takes precedence. That is unless one uses external switching transistors (or driver ICs) to control the current switching duties and the output pins only have to drive the transistor inputs.

Lefty
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, that does make me wonder how my units have survived the abuse I have been delivering to them.
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, that does make me wonder how my units have survived the abuse I have been delivering to them.
That has been puzzling us all.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would say that it was just the cheap knock off units, but the uno was running a cube drawing upto 360mA, so the original unit seems pretty sturdy too.
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Reliability and electronic life time is a statistical thing. If you over stress the components then that life time gets shortened no question about that. However, seeing that with a sample size of one is impossible no matter if it carries on working until hell freezes over or it goes fut tomorrow.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, technically just using the electronics shortens its life. so the only way to ultimately protect your electronics is to not ever use them.

Sample size has nothing to do with it. but if you say it can work until hell freezes over, then it sounds like specifications dont really matter.
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27434
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

VCC and AVCC can each support 200mA - so 400mA total.
The ports should then be limited to 300mA:
3. Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA.
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA.
If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current
greater than the listed test condition.

So at 360mA, you're pushing it some.
Best bet is to use a couple of external shift registers such as TPIC6B595 that can sink the higher current amounts.
78 cents from avnet.com
https://avnetexpress.avnet.com/store/em/EMController/Counter-Shift-Register/Texas-Instruments/TPIC6B595N/_/R-1750249/A-1750249/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1&page=1&rank=0
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.

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5760
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it sounds like specifications dont really matter.

You hear the words ... but you don't listen to them.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, technically just using the electronics shortens its life. so the only way to ultimately protect your electronics is to not ever use them.

Sample size has nothing to do with it. but if you say it can work until hell freezes over, then it sounds like specifications dont really matter.
Why do you persist in being so resistant to trying to understand this subject? Those two statements are totally wrong. You have been told many times but you think that you know best. Let me tell you now, you don't.
The human propensity for self delusion never ceases to amaze me.
Logged

Pages: [1] 2 3 ... 5   Go Up
Jump to: