Pages: [1] 2   Go Down
Author Topic: Driving multiple LEDs with the Arudino and External Battery Pack  (Read 1481 times)
0 Members and 1 Guest are viewing this topic.
Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Biyaaaa!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys,

Just a quick warning: This will seem like a very basic question but I am really having a hard time understanding how to remedy it.  I have 14 LEDs that have the following specs:

Ultraviolet LEDs 5mm High Brightness
FW Current: 20mA
FQ Supply: 3.3V (typical), 4.0V (max)

I want each LED to be controllable by a pin on the Arduino (so they can do a chasing light pattern that gets faster and faster).  This also needs to be portable, so I need to power the Arduino with a battery pack.  Now, the basic question:

How much power will I need for this project? (Volts?) I know this is a super basic question but I am having trouble understanding. I know I need to do my basic electronics homework, but this is a rushed project.  I promise I will study afterwards. Thank you in advance.
Logged

Fennel Rye

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1254
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You will need to add up the current for the following:
1. the number of LEDs that will be on at the same time (say 3 for this example)
2. what the Arduino needs (no idea, but guess at 30mA)
3. Any other devices that will be running (seems none)

So (3*20)+30 = 90mA. You power supply must be able to supply 100mA.

You will need resistors to drop the voltage 'across' the LED to 3.3V. So if your Arduino is running at 5V, you need to drop 1.7V for the LED to see the right voltage across its terminals. Using Ohms law V=IR or R= V/I =1.7V/20mA = 85 Ohm. Pick something bigger like 120 and you will should be fine.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Biyaaaa!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Marco,

Perfect response. Thank you so much for making it so clear and understandable.  Really appreciate it!

Fennel Rye
Logged

Fennel Rye

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Biyaaaa!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a few more questions:

What I'm essentially building is a ring of these LEDs. There will be 14 of them in all. They will operate in a chasing lights fashion (one goes on, then the one next to it goes on asthe previous one shuts off). This will get faster and faster. Once it has reached a certain speed, 6 of the lights will remain on fading in and out (PWM outputs).  Does this mean that I should only have to provide enough mA for the LEDs that will be on at the same time, or is it better to provide enough for them all to be on at once (because they will be blinking on and off at a very rapid pace)? If it is better to provide enough for them all to be on at once, that will mean I need 310 mA? (14*20)+30 = 310mA.  Is this correct?  If so, how could I provide this amount of power using batteries?  I have several 9 volt adaptors and a 8 AA battery holder. Would either of these be an okay choice? I am having trouble getting an answer as to how to provide a needed amount of mA through battery packs.  Apologize for my n00bness.  Thanks in advance!
Logged

Fennel Rye

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1254
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, if you plan to have them all on at once you need to plan power enough for that.

The other consideration is how long you need to run this for? With 9V (square) batteries, you don't get much current.  At the very least you will need to investigate alternative battery technology. You may be better off using the rechargeable battery packs of the type used in RC cars - they can provide 1.2A for about 10 minutes when running a car.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Biyaaaa!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Marco,

It's a movie prop, so it'll be on an off several times, but never fully on for more than a few minutes.  Looks like you're right on about the RC batteries.  Those seem perfect.  They offer several different V's (6V, 7.2V, 9.6V). When looking for the right voltage, do you just make sure that it's enough for the LED with the highest FW supply?  So, since these are 3.3V LEDs, a 9.6V would be fine as long as I install the correct resistors to drop the voltage across the LEDs?  I see an RC battery at Radioshack that is 9.6V/800mAH, so does this mean that this battery would power my unit (if all LEDs were on, so 310mA) for approx. 2.5 hours (800mAH/310mA)?   Thanks again for your help, Marco.

Fennel Rye
Logged

Fennel Rye

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1254
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You should probably feed the 9.6V into a voltage regulator and get out a stable 5V output and build your circuits for 5V. This will make sure that the battery voltage can drop to about 7V before you see the effect on the display. Also remember that the Arduino does not take 9.6V. There are lots of circuits for chips like the 7805 which make building this power supply really easy.

800mAh does mean 800ma for 1 hour.

Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Biyaaaa!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
There are lots of circuits for chips like the 7805 which make building this power supply really easy.

Can you direct me to something like this that you are referring to? Thanks, Marco!
Logged

Fennel Rye

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1254
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

www.epanorama.net/circuits/psu_5v.html

The article states 100mA max but it can handle a lot more. Your input side is the battery.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1254
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a similar thread in the project guidance section on battery life. You may want to look at this article http://www.gammon.com.au/forum/?id=11497 referred to in that thread.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Biyaaaa!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome. Thanks, Marco! I've got some reading to do.
Logged

Fennel Rye

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

Is this thread on the same project?

http://arduino.cc/forum/index.php/topic,106844.msg802513.html#msg802513
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.

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1254
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like it!
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Biyaaaa!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

CrossRoads,

Ya, I apologize for it becoming two threads.  The one I posted over at the General Electronics board began as me trying to figure out how the Arduino handles various power supplies, so it was a different question.  Then, as people began to answer, I felt I needed to clarify and explain the project. Sorry if I made things confusing.
Logged

Fennel Rye

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

If I had better moderator know-how, I'd merge them, but that would be too confusing now I think.
Why don't you pick the one you want to stay with, add a note saying "see the other thread" and then Lock Topic.
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.

Pages: [1] 2   Go Up
Jump to: