parikhjigish

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.

AndrewStone

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.

parikhjigish

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?

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.

parikhjigish

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?

AndrewStone

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

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.

parikhjigish

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..