# Powering LEDs using transistors?

I'm using Teensy via USB power supply. I have 18 LEDs connected to WS2803 LED driver. Current for each LED is about 20mA. Now, since I got bunch of other stuff in my circuit, I don't have enough current to power up all. That is, I can light up all LEDs, but then my LCD module looses brightness/contrast rapidly. I tried to connect all LED anodes to separate power supply, and then everything worked, but, can I power those LEDs without using additional power supply? Is that even possible? I was thinking of using several (if neccessary) transistors with anodes connected to collector and then cathodes to WS2803. Base would be connected to +5V supply so collector current should be amplified, am I right?

18 LED at 20mA is 360mA. Then there is the current draw of your Teensy. Then there is the current draw of your LCD. I would bet you are over the USB limit. Just adding transistors to your project powered by the USB power supply won't help.

And about connecting the base to +5V... No that's not right.

Paulcet:
18 LED at 20mA is 360mA. Then there is the current draw of your Teensy. Then there is the current draw of your LCD. I would bet you are over the USB limit. Just adding transistors to your project powered by the USB power supply won't help.

I see. So, external power it is then.

Paulcet:
about connecting the base to +5V... No that's not right.

That was just a guess, transistors are still new to me.

You can power both the Teensy (if it is NOT a 3.0 or 3.1) from a separate power supply and power the LEDs from the same supply, but it should be capable of 5V at 1A or more.

The Teensy 3.0 and 3.1 are 3.3V, though. Which Teensy?

polymorph:
You can power both the Teensy (if it is NOT a 3.0 or 3.1) from a separate power supply and power the LEDs from the same supply, but it should be capable of 5V at 1A or more.

The Teensy 3.0 and 3.1 are 3.3V, though. Which Teensy?

That's what I was planning to do - connect Teensy to external source capable of 1A+, and leave everything else as is. It's Teensy 2.0++.

A transistor does not amplify current. It allows a small current in the base to control a much larger current in the collector / emitter. So the collector current follows the base current but it is larger. A transistor will therefore amplify a signal but not a current.

Grumpy_Mike:
A transistor does not amplify current.

Hm. Why is it used as LED driver then (p-channel FET), such as TPC6108)?

A transistor can control a large current with a small current, in the case of a bipolar transistor, or with a voltage and very little current, in the case of a MOSFET or JFET transistor.

polymorph:
A transistor can control a large current with a small current, in the case of a bipolar transistor, or with a voltage and very little current, in the case of a MOSFET or JFET transistor.

What is the usecase of MOSFET when it comes to LEDs then, if I can give a LED 20mA without it?

Transistor is useful when you want to control many LEDs at one time - such as 16 LEDs in one layer of a 4x4x4 cube.

kustom:
What is the usecase of MOSFET when it comes to LEDs then, if I can give a LED 20mA without it?

If that is all you want to do then it is absolutely no use, providing the total current you source is within the limits of the power supply pins on the chip, which stands at 200mA.
There are also restrictions on pins on some ports not supplying in total more than 100mA. See the data sheet for the processor (section 28) for the full story.

Grumpy_Mike:
If that is all you want to do then it is absolutely no use, providing the total current you source is within the limits of the power supply pins on the chip, which stands at 200mA.

But then those MOSFETs are amplifying current, aren't they?

Grumpy_Mike:
There are also restrictions on pins on some ports not supplying in total more than 100mA. See the data sheet for the processor (section 28) for the full story.

I'm well aware of that.

Grumpy_Mike might have thought that -you- thought that 20mA would go into a transistor from the power supply and magically 200mA would come out.

Think of mosfets and transistors like ordinary light switches. They don't actually SUPPLY the power to the device that they're controlling. They're just on/off switches. They're useful because they can do things like turn a 12v motor on/off using a 5v signal from an arduino. They're not the source of the power. They just turn it on and off.

JoshD:
Think of mosfets and transistors like ordinary light switches. They don't actually SUPPLY the power to the device that they're controlling. They're just on/off switches. They're useful because they can do things like turn a 12v motor on/off using a 5v signal from an arduino. They're not the source of the power. They just turn it on and off.

But that still doesn't make it clear to me. Consider this schematic:

http://www.thebox.myzen.co.uk/Hardware/Econo_Monome_files/8%20X%208%20LED%20Matrix.pdf

Decoder outputs are connected first to MOSFETs, and then to LEDs. If they're not source of power, why are they there?

The mosfets are there to control the current. Even though the voltages are all the same, the 74LS42 can only handle like 75ma of current. That's not enough for the LED's, so the 74LS42 is used to generate the on/off signal and the mosfet actually controls the flow of power. Without the mosfet, that amount of current being drawn through the IC would fry it.

JoshD:
The mosfets are there to control the current. Even though the voltages are all the same, the 74LS42 can only handle like 75ma of current. That's not enough for the LED's, so the 74LS42 is used to generate the on/off signal and the mosfet actually controls the flow of power. Without the mosfet, that amount of current being drawn through the IC would fry it.

Aha, that's finally making sense to me. Thanks! One more question though: in schematic I linked, is there a specific reason to use MOSFETs instead of standard biploar transistors? I assume it has to do with the current that decoder can supply per output (4-8mA) - is it too low to activate C-E current flow?

No it is not that. It is my circuit by the way.
You get less loss through FET than a transistor so the it is a bit more effecent. I also had the FETs on hand in a surface mount package and I did not have any surface mount PNP transistors that could handle the current.

Thank you all for answers, youâ€™re a helpful bunch