 |
Search Sci.Electronics.Basics |
|
 |
 |
|
|
|
 |
|
|
Sci.Electronics.Basics -> Transistor Current Question
There are 5 messages in this thread.
You are currently looking at messages 1 to 5.
|
|
|
Hello
I was hoping someone could explain how to do this calculation for me.
I've got 3 transistors and 5 RGB LEDs, and I need to use the
transistor to drive them, as my microcontroller can't source enough
current for all of them on one pin.
Because they're pins on RGB LEDs, and I need individual color control,
I can't put them in series, so I was going to use 3 resistors per RGB
LED, like so:
Vdd
----
| |
| |
\ / \ /
V V
--- ---
| |
/ /
\ \
/ /
\ \
| |
------
|
|/
IN/\/---|
|\>
|
|
___
_
(Only two LEDs shown because I'm terrible at ascii art. There are
actually 5.)
Since the green and blue have a Vf of 3.2, I'm guessing I'm going to
have to use a 5V power supply instead of a 3.3V one, because I can't
get a VCE small enough to drive them.
If I need to pass 20mA through each LED, with a voltage drop of 3.2,
can someone please explain how I calculate the two different resistors
(Base and on each LED) I need?
Thanks in advance!
|
|
|
|
Author: Tim WescottDate: 10:57 08-07-08
|
|
Elscimar@gmail.com wrote:
> Hello
>
> I was hoping someone could explain how to do this calculation for me.
> I've got 3 transistors and 5 RGB LEDs, and I need to use the
> transistor to drive them, as my microcontroller can't source enough
> current for all of them on one pin.
>
> Because they're pins on RGB LEDs, and I need individual color control,
> I can't put them in series, so I was going to use 3 resistors per RGB
> LED, like so:
>
> Vdd
> ----
> | |
> | |
> \ / \ /
> V V
> --- ---
> | |
> / /
> \ \
> / /
> \ \
> | |
> ------
> |
> |/
> IN/\/---|
> |\>
> |
> |
> ___
> _
>
> (Only two LEDs shown because I'm terrible at ascii art. There are
> actually 5.)
>
>
> Since the green and blue have a Vf of 3.2, I'm guessing I'm going to
> have to use a 5V power supply instead of a 3.3V one, because I can't
> get a VCE small enough to drive them.
>
> If I need to pass 20mA through each LED, with a voltage drop of 3.2,
> can someone please explain how I calculate the two different resistors
> (Base and on each LED) I need?
>
>
> Thanks in advance!
E = IR. Or, voltage equals current times resistance.
So you do a bit of algebra and you find that I = E/R, and R = E/I.
If you start with 5V and use up 3.2V in the LED, then you're left with
1.8V. So divide 1.8V by 20mA, and there's your resistance.
Then you need to go back to the LED datasheet and note the variation in
voltage over temperature, and any limits to current over temperature.
Then you need to chose the resistor so the LED is never getting too much
current, no matter what the part of your design temperature range you're
going to operate it in.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
|
|
|
|
Author: Bob MonsenDate: 12:10 08-07-08
|
|
"Tim Wescott" <tim@seemywebsite.com> wrote in message
news:xtOdnbTOweb9He7VnZ2dnUVZ_gSdnZ2d@web-ster.com...
> Elscimar@gmail.com wrote:
> E = IR. Or, voltage equals current times resistance.
>
> So you do a bit of algebra and you find that I = E/R, and R = E/I.
>
> If you start with 5V and use up 3.2V in the LED, then you're left with
> 1.8V. So divide 1.8V by 20mA, and there's your resistance.
>
> Then you need to go back to the LED datasheet and note the variation in
> voltage over temperature, and any limits to current over temperature. Then
> you need to chose the resistor so the LED is never getting too much
> current, no matter what the part of your design temperature range you're
> going to operate it in.
>
I agree with everything Tim said.
However, one important point that may help clarify things is that the
voltage across an LED is nearly constant. It goes up a tiny bit with
current, but not nearly as much as resistors. So, you can pretend that the
voltage is a constant, called Vf, or the forward voltage.
So, the entire voltage, (which in your case is 5V), must be the sum of the
voltage across the resistor, Vr, and the voltage across the LED, Vf. The
current is I. You want to find the resistance required for Vr. You know that
R = Vr / I. Since Vf is 'constant', then Vr = (5 - Vf). So,
R = (5 - Vf) / I
If you have a few resistors that are 'near' your final value, you can see
how much the Vf changes by measuring it as you swap out resistors.
Regards,
Bob Monsen
Again, Vf really isn't constant, but the difference in voltage for a small
increase in current is logarithmic, rather than linear. So, for a small
difference in current dI, the voltage change across a resistor is R*dI,
whereas the voltage change across an LED is C*ln(dI), where C is some
constant. You never really know the constant, through, so all you can do is
assume the change is small compared to the change across the resistor.
|
|
|
|
Author: Tim WescottDate: 12:47 08-07-08
|
|
Bob Monsen wrote:
> "Tim Wescott" <tim@seemywebsite.com> wrote in message
> news:xtOdnbTOweb9He7VnZ2dnUVZ_gSdnZ2d@web-ster.com...
>> Elscimar@gmail.com wrote:
>> E = IR. Or, voltage equals current times resistance.
>>
>> So you do a bit of algebra and you find that I = E/R, and R = E/I.
>>
>> If you start with 5V and use up 3.2V in the LED, then you're left with
>> 1.8V. So divide 1.8V by 20mA, and there's your resistance.
>>
>> Then you need to go back to the LED datasheet and note the variation
>> in voltage over temperature, and any limits to current over
>> temperature. Then you need to chose the resistor so the LED is never
>> getting too much current, no matter what the part of your design
>> temperature range you're going to operate it in.
>>
>
>
> I agree with everything Tim said.
>
> However, one important point that may help clarify things is that the
> voltage across an LED is nearly constant. It goes up a tiny bit with
> current, but not nearly as much as resistors. So, you can pretend that
> the voltage is a constant, called Vf, or the forward voltage.
>
> So, the entire voltage, (which in your case is 5V), must be the sum of
> the voltage across the resistor, Vr, and the voltage across the LED, Vf.
> The current is I. You want to find the resistance required for Vr. You
> know that R = Vr / I. Since Vf is 'constant', then Vr = (5 - Vf). So,
>
> R = (5 - Vf) / I
>
> If you have a few resistors that are 'near' your final value, you can
> see how much the Vf changes by measuring it as you swap out resistors.
>
> Regards,
> Bob Monsen
>
> Again, Vf really isn't constant, but the difference in voltage for a
> small increase in current is logarithmic, rather than linear. So, for a
> small difference in current dI, the voltage change across a resistor is
> R*dI, whereas the voltage change across an LED is C*ln(dI), where C is
> some constant. You never really know the constant, through, so all you
> can do is assume the change is small compared to the change across the
> resistor.
>
It doesn't change much with current, but it _does_ change with
temperature. If you're going to be using your device outdoors in all
weathers, you want to check the variation in diode voltage over temperature.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
|
|
|
|
Author: JamieDate: 20:00 08-07-08
|
|
Elscimar@gmail.com wrote:
> Hello
>
> I was hoping someone could explain how to do this calculation for me.
> I've got 3 transistors and 5 RGB LEDs, and I need to use the
> transistor to drive them, as my microcontroller can't source enough
> current for all of them on one pin.
>
> Because they're pins on RGB LEDs, and I need individual color control,
> I can't put them in series, so I was going to use 3 resistors per RGB
> LED, like so:
>
> Vdd
> ----
> | |
> | |
> \ / \ /
> V V
> --- ---
> | |
> / /
> \ \
> / /
> \ \
> | |
> ------
> |
> |/
> IN/\/---|
> |\>
> |
> |
> ___
> _
>
> (Only two LEDs shown because I'm terrible at ascii art. There are
> actually 5.)
>
>
> Since the green and blue have a Vf of 3.2, I'm guessing I'm going to
> have to use a 5V power supply instead of a 3.3V one, because I can't
> get a VCE small enough to drive them.
>
> If I need to pass 20mA through each LED, with a voltage drop of 3.2,
> can someone please explain how I calculate the two different resistors
> (Base and on each LED) I need?
>
>
> Thanks in advance!
Saturate the transistor.
Calculate the R for each LED for proper current load.
etc..
http://webpages.charter.net/jamie_5"
|
|
|
|
1 | |
|
|
|
Contact | Electronic Portal
|
|
|