# Should I add a resistor the the base...?

K

#### Kasterborus

Jan 1, 1970
0
I'm working with an RGB LED and an Arduino MPU. I wired the LED into 3
of the PWM outputs and with the correct resistor on each leg it gives
me a nice range of colors.

Now I want to drive 20 LEDS and so I added 3 heavy duty NPN
transistors and will be driving the LEDS through these.

My question is - should I wire the PWM output of the Arduino straight
to the base of the transistor, or would something like a 10K resistor
be a good idea to limit the current?

Dave

D

#### DJ Delorie

Jan 1, 1970
0
Kasterborus said:
My question is - should I wire the PWM output of the Arduino straight
to the base of the transistor, or would something like a 10K resistor
be a good idea to limit the current?

NPN transistors are current multipliers, so you can do the math
and figure it out. Example:

Need: 20 mA
hFE: 100 (this is the current multiplier number)
base current = 0.02 / 100 = 0.0002 (0.2mA)

Vbe: 0.7 V
Voh: 3.2 V
Vres = 3.2 - 0.7 = 2.5 V

Res = Vres / Ibase = 2.5 / 0.0002 = 12.5k (or less, for wiggle room)

You'll have to fill in your own numbers, of course. Note that you can
buy transistors with the resistors built-in, comes in handy. Also, if
you replace the NPN with an N-MOSFET you don't need the resistors.
For your usage, they're pretty much interchangeable.

Also, keep in mind that more transistors means more base current (if
you wire them all to the same output pin), so either use one resistor
per transistor (best) or one smaller resistor (not as good, in case
the transistors aren't matched closely).

K

#### Kasterborus

Jan 1, 1970
0
Thanks - that explains a lot!

P

#### Paul E. Schoen

Jan 1, 1970
0
BobW said:
John,

Have you ever come across a so-called logic-level fet that has a Vgs(max)
of 1V -- even if Rds(on) is fairly big (several ohms would be okay).

I've used fets that meet TTL levels, but none that will work with FPGA
outputs in banks that have their Vcco set to 1.2V (or lower).

Thanks.
Bob
There is the FDC604P, with a typical threshold of 0.75 volts and maximum
1.5. It's a P-channel, 20V, 5.5 amps, in an SSOT-6 package. For N-channel,
try FDC637AN, 0.82 V typical Vg, 20V, 6.2A. It has an LTSpice model in the
library. Or FDR6580, or FDR844, or FDS6064. The last part has a typical
threshold of 0.6V.

http://www.fairchildsemi.com/ds/FD/FDS6064N3.pdf

Check the product selector guide for 1.8V characterized parts:

http://www.fairchildsemi.com/collateral/psg04_discrete.pdf#page=18

Another possibility is to use a small pullup resistor on the FPGA output to
a slightly higher voltage (maybe about one diode drop, or 1.2 + 0.6 =
1.8V). It should not do any damage, and the output might be soft enough to
be pulled a little above the supply rail. Otherwise, you could use a diode
and a pullup on the gate to get a level shift that will drive a more usual
gate.

Paul

Replies
1
Views
78
Replies
14
Views
476
Replies
4
Views
627
Replies
10
Views
464
Replies
2
Views
547