Pages: [1]   Go Down
Author Topic: How to provide external power for LED's in series?  (Read 1413 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

Have a beginner question. I want to build a 20 LED(2V) connected in series. Based on this (http://arduino.cc/forum/index.php/topic,63183.0.html) thread, I get the idea of using correct transistor. What I am still confused about is the power for such a circuit. Say I need 2x20 = 40V (plus some drop across resistors and transistor). How do I provide 40V on breadboard? Are there such Wall warts that can step down voltage to any number? Also as I understand I need to properly isolate this external supply from Arduino.(http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1231832186) Sounds right? Hope, I am able to ask my questions clearly. Also curious if breadboard strips can handle 40V?

Thanks everyone.
Logged

Boston, MA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You have identified yourself as a beginner so let me suggest you not build 20 LEDs in series.  Instead build 2 parallel sets of 10 series LEDs, both using the same Arduino IO to control their on/off state.  It looks exactly the same and that way you can use a cheap 24v wall wart transformer http://www.mpja.com/prodinfo.asp?number=18344+PD power supply. 

You need to connect the grounds of this supply and the Arduino's.  But not the +!  If you accidentally put the 24v coming out of this onto the Arduino's 5v you will burn out the cpu.  If you put it into Vin, you'll probably burn out the voltage regulator but I'm not sure because I haven't looked up the Arduino's specific regulator specs.

Cheers!
Andrew
Logged

http://www.toastedcircuits.com Lightuino LED driver: 16 sources, 70 sinks, remote controlled.  Also high powered LED drivers.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I am not supposed to plug this 24V Wall-wart in to Arduino, should I use connectors cables and directly put 24V on to breadboard supply rail that LED's are connected to?

Thanks.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26459
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

"directly put 24V on to breadboard supply rail that LED's are connected to"

Yes.
Make sure to connect the 24V ground to the arduino ground.
A simple transistor like 2N2222 can  then sink the 40mA of current needed to turn on the LEDs.
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone.

CrossRoads,

Had a follow-up transistor question. Based on this (http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf) I get that N2222 can provide 100mA max load current and that base max is 11mA. Now if my anticipated current draw is 40mA, then how much should the Base current adjusted to be in order to provide 40mA to the load? Is it simple math such as for 100mA load Base has to be at 11mA, then for 40mA how much? Also, current wise I may be okay but total 20 LED's will have power draw of 2V x 20mA(Per LED) x 20 LED = 800 mW where as 2N2222 has max Power Dissipation of 625mW in which case I need higher capacity transistor right? How/Where do I look for correct transistor size?

Thanks.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

TIP120?
Logged

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

Quote
Is it simple math such as for 100mA load Base has to be at 11mA, then for 40mA how much?
Yes base current times transistor gain equals collector current.
However the gain of a transistor is normally quoted over a range in the data sheet. Make sure you use the lowest value for your calculations. Also give it a bit of margin say 20% more than it needs.
You can't do any harm by supplying too much current (providing you don't exceed the transistor's maximum) but too little gives trouble in switching.

Quote
where as 2N2222 has max Power Dissipation of 625mW in which case I need higher capacity transistor right?
No the power in the load is not the power dissipated in the load switching circuit. The transistor will dissipate:-
Current times Vsat = watts.
Where Vsat is the voltage across the transistor when it is saturated (fully turned on), see the data sheet for this but it is in the region of 0.7 to 2 volts.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Mike,

Your last line got me little confused....If Saturation is within 0.7V to 2V, Arduino IO willwhich will go to the 2N2222 will provide 5V right? Do I need to do something special before connecting IO to 2N2222  to reduce it to less than 2V?
Logged

Boston, MA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes TIP120 is overkill at 60V and 5A but it will definitely work!  

WRT your question about base current.  The technical answer is to look up the graph of the "beta" of the transistor (often called hfe or DC current gain).  Multiple the beta (at your collector current) times the base current to get the load current.  However, this method is not generally recommended.  Historically transistor beta curves varied pretty widely per lot so you could not really base a commercial circuit on it.  But you can do this if you tested each transistor and eliminated out-of-spec ones (i.e. hand-picking).  Today things might be a little different; I've done a bit of hand-picking recently and it turned out that all the transistors were right on the money -- none need elimination.

But the real answer is to use a constant-current circuit.  This circuit uses feedback to control the current, so is immune to changes in beta and also LED voltage.

There are lots of choices, including DIY or my Lightuino LED driver board www.toastedcircuits.com, but fewer for high voltage or high current.  I recently posted a constant-current circuit for that here:  http://arduino.cc/forum/index.php/topic,62893.0.html

Or at 40mA you'd probably be fine with a current limiting resistor.

Cheers!
Andrew
Logged

http://www.toastedcircuits.com Lightuino LED driver: 16 sources, 70 sinks, remote controlled.  Also high powered LED drivers.

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

The saturation voltage is the voltage between the collector and emitter of a transistor when it is fully turned on. It is a characteristic of the transistor and nothing to do with the arduino. You look it up on the data sheet so you can see how much power you will burn in the transistor when you are switching 20mA.

There is nothing you need to do to the arduino output except limit the base current with a resistor.
Logged

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

Quote
and eliminated out-of-spec ones
The point of a spec is that all devices should be within it, it's like a contract with the manufacturers.
You can really on the lower figure to do calculations with.

In the bad old days some manufacturers sold their reject bins and they got back on the market but now when this happens they are not marked with the original part numbers.

Quote
Yes TIP120 is overkill at 60V and 5A but it will definitely work!   
The bigger the transistor the bigger is the Vsat so it could end up dissipating more power than the smaller transistor.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Mike and others for response. I think I am good to start now. I have the LED's/resistors/supply wall-wart/PN2222's and wires. One thing which I am not sure about is that, would it b okay to build about 150 LED sign-board on a styrofoam/Cardboard, or does it sound like disaster ? Since this will b a temporary one, I wanted to avoid building it on wood which will add time and cost to the project...Sorry this is perhaps not the best place to ask this question, I just did not know any other place to ask...Apologies..

Thanks.
Logged

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

Quote
would it b okay to build about 150 LED sign-board on a styrofoam/Cardboard
I can't see any reason why not.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26459
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

I'd go with holes punched in cardboard. Styrofoam will leave with that mess of little white pieces of stuff all over the place.
Plus its a great static electricity generator, not good for parts.
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]   Go Up
Jump to: