I'm trying to control an LED strip by means of a Raspberry Pi, replicating what is done here: http://popoklopsi.github.io/RaspberryPi-LedStrip/#/

It recommends using the IRLZ34N transistor between the Pi and the lead for each color in the strip.

However, in my lab we have about a dozen different transistors - none of which are the IRLZ34N. I do not have enough background knowledge to determine which other ones may be used interchangeably here. The Pi GPIO pin output is 3.3V, and the LED strip takes 12V, and will consume approx 32W when all LEDs are lit.

On the bench I see MJE3055T, MPF102, TIP31A/32A/102/120, among others (but the aforementioned appear to have similar form-factor to the IRLZ34N). Are any of these interchangeable?


2 Answers 2


Your LED strip runs at \$I_{LED} = 32W/12V = 2.7A\$. This is the current running through the transistor.

The MPF102 is an N-channel JFET that is not meant to drive a lot of current (datasheet specs 20mA at \$V_{GS} = 0V\$).

The MJE3055T and TIP31A are both bipolar power NPN transistors. You can approximate them as current controlled current sources; their current amplification, \$h_{FE}\$, is less than 100. This means that your base current \$I_B\$ will have to be more than \$I_{LED}/100 = 27mA\$. Your rPi GPIOs will probably not be able to run that amount of current (typical is 4mA for GPIOs).

The TIP102 and TIP120 are both NPN Darlington transistors. Their \$h_{FE}\$ are well over 1000, so you will not have problems driving the transistors. The high gain comes at a price, though: the collector-emitter voltage \$V_{CE}\$ is at least 0.7V; at your 2.7A it will be just under 1V (see Fig. 6 in the datasheet). This means that the power dissipated in the transistor will be \$1V \times 2.7A = 2.7W\$. Looking at the transistor's thermal resistance \$R_{thj-amb}\$, the junction temperature will be at \$2.7W * 62.5^{\circ}C/W = 170^{\circ}C\$ above ambient temperature. This exceeds the maximum allowed junction temperature of \$T_J = 150^{\circ}C\$. Without a heat sink, this transistor will not work either.

If you decide on trying either of the NPN transistors (Darlington or not), be sure to use a base current limiting resistor between your GPIO and the transistor base. To limit the current at 4mA, you would choose \$R_B = (3.3V-0.7)/4mA = 650\Omega\$. Of course you do not need exactly this resistance. A 1kΩ or 470Ω resistor would do the job as well.


No. Just because its in a TO-220 package doesn't mean you can swap it out. The IRLZ34N is an inexpensive 55V 30A N-channel MOSFET with a logic-level gate (that's important!). 46m\$\Omega\$ Rds(on) with a 5V drive (also important). Edit: As passerby says the Rpi is 3.3V and that part is only guaranteed at 4V. It would be better to use a MOSFET with guaranteed performance at 3.3V. Certainly that's what we'd do in a professional design.

The parts you have in TO-220 are all really old bipolar parts and would need a more complex circuit to work (and would get relatively hot).

  • \$\begingroup\$ The RPI is 3.3V logic. \$\endgroup\$
    – Passerby
    Commented Jun 17, 2015 at 0:28
  • \$\begingroup\$ @Passerby Good point, edited accordingly. \$\endgroup\$ Commented Jun 17, 2015 at 0:37
  • \$\begingroup\$ Came across this post with a similar application in mind. You edited your post to "guaranteed performance at 3.3V". By that, do you mean that the I_D=30A current is not allowed for the V_GS=3.3V gate voltage? Does the ideal MOSFET for a situation reach saturation at the supplied gate voltage (3.3V in this case) or does its I_D vs G_GS curve just cover the desired current? Thanks for the great answer. \$\endgroup\$
    – mDroidd
    Commented Apr 29, 2018 at 17:54
  • 1
    \$\begingroup\$ @mDroidd The Rds(on) of the MOSFET is not guaranteed at 3.3V Vgs. It is guaranteed <60m\$\Omega\$ at 4V Vgs & Tj = 25'C. It will be higher with the MOSFET hot and will be higher at 3.3V (and of course if it is passing a lot of current that Rds(on) will cause more heating and cause it to go even higher. If you look at the left part of figure 1/2 and apply the typical characteristics to the guaranteed limit at 4.0V, it appears that 2:1 should cover it (so perhaps 300-400m\$\Omega\$ at 150'C, but extrapolation requires caution. A saving grace is that Vgs(th) drops with temperature. Fig1 vs.2 \$\endgroup\$ Commented Apr 29, 2018 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.