Pages: [1]   Go Down
Author Topic: Transistors and LEDs  (Read 896 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'd like to build a little circuit board with about 5 or 6 leds on it.

Each led would be driven from it's own pin on the arduino.

I'd like to supply the power to light the leds from an external power supply so I'm guessing I'll need to use transistors to switch the power.

Seeing as I have 5 or 6 leds, I thought rather than using 5 or 6 separate transistors on my little board it would be nice if I could find a single chip which contains the transistors.

Please could someone tell me if such a chip exists and if so what is it called ? If I can find out what I need to buy I can ebay it.

The leds will be 5v leds, do I even need transistors?

Thanks in advance, Rick.
Logged

Offline Offline
Edison Member
*
Karma: 64
Posts: 2464
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The leds will be 5v leds, do I even need transistors?

If that's so, they're LEDs with a built-in series resistor, so that when connected to 5V they'll draw 10mA or something.  Maybe link those.
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

There are a lot of LEDs out there, Im not sure what you have, but if you have some common 5mm or 3mm LEDs, they usually have a forward voltage around 2 or 3 volts, and run anywhere from 1 to 20 ma. Those LEDs you wont need any transistors, but you would need a small resistor on each LED that you want lit at the same time (if you only have one lit at a time, you could use only 1 resistor, unless they are more than one color, then you probably want more than 1 resistor.)

If your LEDs have built in resistors, then you probably wont need to add any resistors, but you may need transistors or a chip with many transistors (like a uln2003), if the LEDs draw a lot of current (like more than 20ma).
Logged


Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you really want a one chip solution, instead of a bunch of resistors (and transistors, depending on the LEDs) then you could use a constant current driver chip like the TLC5916 (up to 8 LEDs) or TLC5940 (up to 16 LEDs).

Good luck!
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Full Member
***
Karma: 1
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Someone must have said it before me, but ULN2003 can do up to 500mA :-)
Logged

Search for "mjkzz" on eBay :-)

Valencia, Spain
Online Online
Faraday Member
**
Karma: 144
Posts: 5340
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'd like to build a little circuit board with about 5 or 6 leds on it.

Each led would be driven from it's own pin on the arduino.

I'd like to supply the power to light the leds from an external power supply so I'm guessing I'll need to use transistors to switch the power.

If the LEDs are 20mA then you don't need the transistors, a resistor will do.

Seeing as I have 5 or 6 leds, I thought rather than using 5 or 6 separate transistors on my little board it would be nice if I could find a single chip which contains the transistors.

There's lots of LED driver chips available, the right one depends on what you're trying to do, eg. do you need brightness control?

Please could someone tell me if such a chip exists and if so what is it called ? If I can find out what I need to buy I can ebay it.

TPIC6B595 will give you switching but you still need a resistor for every LEDs.

TLC5940, TLC5916, etc. will regulate the current so you don't need a resistor, just the chip.

The leds will be 5v leds

That's unlikely. Usually they're 3.6 or 2.2V.
« Last Edit: March 27, 2013, 04:38:07 am by fungus » Logged

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

Offline Offline
Newbie
*
Karma: 1
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, thanks for the replies. ok, I was talking rubbish when I said they are 5v, having looked at them I have no idea what they are, I think their just old ones I have from somewhere, probably ebay.

I've got a project box with an LCD display that I'm using for a climate control and I want the leds to indicate extremes, ie temp over defined requirement or co2 level exceeded.

So, I'm going to have a few leds attached to pins, I'm guessing each will need a resistor, I was thinking I'd use an external power supply, I have a 9v psu powering my Arduino with a step down board (9v-5v) powering my LCD and some sensors so I thought I'd take a feed from that to power the leds save taking power from the Arduno.

What do you reckon, should I just buy a bunch of transistors to switch on my leds or is there a chip containing multiple transistors available, or maybe I don't even need transistors and I can just power them straight from the pins, using resistors of course smiley
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try a LED connected to an Arduino pin with something like a 560 Ohm resistor and see how it looks. You can user lower values for more brightness, but without knowing the exact specs of the LEDs I wouldn't go below 220 Ohms.

6 LEDs at 15 mA is only 120 mA so your power supply is probably fine.

I don't think you'd need to control the LEDs with transistors if they're generic 3mm or 5mm ones; if you have enough Arduino pins free then you should be fine driving them directly. You'd only need transistors to switch higher-current ones, or a bank of LEDs.

Good luck!
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Newbie
*
Karma: 1
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you, that's what I needed to hear smiley
Logged

Offline Offline
Faraday Member
**
Karma: 61
Posts: 2824
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With the TLC5940,   what is the voltage drop of the device when it is "on" ?

Suppose firstly, that i want to connect a 2V, 20 mA red LED and drive it with 5 voltage directly.
I can then determine that I want a resistor which will drop 3V at 20 mA,  therefore 150 ohm.

Suppose now, I want to turn the LED on and off using the TLC5940 between the LED and ground.
I still need a resistor,  apparently,  because otherwise the chip would generate too much heat.
But what value of resistor ?

If I connect the 5V supply to the resistor,  then the LED,  and then the IC in series to ground, then to
determine the optimum resistor,  I would need to know the voltage drop through the IC to
calculate ?

I've read the datasheet for the 5940 from end to end,  none the wiser on this question,   they must
be looking at it in a different paradigm from me.
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 144
Posts: 5340
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With the TLC5940,   what is the voltage drop of the device when it is "on" ?

The chip is a current driver so the drop is whatever is needed
for the chosen current. If the LED needs 3V and the power
supply is five volts, the drop will be 2V.

Suppose firstly, that i want to connect a 2V, 20 mA red LED and drive it with 5 voltage directly.
I can then determine that I want a resistor which will drop 3V at 20 mA,  therefore 150 ohm.

Suppose now, I want to turn the LED on and off using the TLC5940 between the LED and ground.
I still need a resistor,  apparently,  because otherwise the chip would generate too much heat.

You don't need resistors if the total power dissipated by the chip is less than about 1.5W.

For 5 or 6 LEDs at 20mA that isn't the case so you don't need resistors.
Logged

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

Pages: [1]   Go Up
Jump to: