4
\$\begingroup\$

I'm trying to build a CoffeeBot from MAKE magazine, and I had a question about one of the components. The circuit is pretty simple; it uses an Arduino to control a gear motor via a MOSFET transistor. The Arduino is using a digital pin which I believe is capable of PWM, but in the code provided it merely turns ON/OFF.

So my question is about the MOSFET. I understand the basics of transistors, but why this particular part? The part listed is a 12N10L Logic Level MOSFET. What makes a MOSFET in this instance better than a regular NPN transistor? Is it the current that it can handle? Or is it somehow better at high frequency switching, were I to use PWM to control speed?

Also, if it is the current/heat capabilities of the part that makes it ideal for this job, what advantages would it have over something like a TIP31 or a TIP120 transistor?

Edit: People have rightly noted that I forgot an important detail, the current required by the motor. This is a small gear motor GM8 that seems to stall out at 400mA. Does that change the issues with the TIP120?

\$\endgroup\$
0

3 Answers 3

5
\$\begingroup\$

Two reasons:

  1. In a BJT, the current that must pass through the base is related to the current that flows from collector to emitter, by the DC gain of the device. The GPIO pin on the Arduino would need to supply this base current.
  2. In either device, thermal power i.e. heat generated at the switching device is related to the current through it, thus: P = V x I = I^2 x R where V is the voltage Vcesat between Collector and emitter for the BJT, or in the MOSFET case R is the Rdson.

The TIP31 mentioned, has a DC gain of as low as 10 at 3 Ampere load, and 25 at 1 Ampere. This means to drive just 1 Ampere through your motor, a base current of 40 mA is needed, which is the maximum rated current for any GPIO on the AVR chips used in most Arduino boards. In practice, devices should never be operated at maximum rated values, so the TIP31 is not an option.

The TIP120 has a better DC current gain, so base current wouldn't be such a problem. However, it has a Vcesat of 2 Volts at 3 Amperes and 4 Volts at 5 Amperes. This means between 6 Watts and 20 Watts of heat will be generated at the BJT for such currents. Not nice.

The MOSFET, on the other hand, has a rated Rdson of 0.12 Ohms with gate at 5 Volts. So heat generated would be around 120 milliWatts at 1 Ampere, 1.08 W at 3 Amps, and 3 W at 5 Amperes load current. Much cooler than the BJT, though one would still use a heat sink at 3 Amps and up. Gate current is also not an issue, since MOSFETs being voltage driven devices, pass negligible current at the gate anyway, except a small amount instantaneously at turn-on, to charge the gate capacitance.

The question does not specify current needed by the motor, but there are many super-cheap logic level MOSFETs available that show excellent low Rdson characteristics even at gate voltages as low as 2.5 Volts.

A fine and really inexpensive such MOSFET is the IRLML2502, sold for under 25 cents, which you could consider in place of the specified MOSFET, if the load voltage and current specifications are met: Under 0.08 Ohms Rdson for merely 2.5 Volt gate voltage, and good for up to 3.4 Amps without any trouble.

\$\endgroup\$
3
  • \$\begingroup\$ Wow, great info, thanks! I updated my question with the motor stall current of 400mA. Does this make the TIP120 more feasible? Also, is MOSFET better/worse than a BJT for PWM speed control? \$\endgroup\$ May 22, 2013 at 14:48
  • \$\begingroup\$ @LoveMeSomeCode The TIP120 would work for 400 mA. It would still dissipate around 0.8 Watts as heat, compared to the IRLML2502 with under 0.013 Watts. Therefore I would definitely go for the MOSFET instead of a BJT for this application. Neither is necessarily better or worse for the kind of PWM frequencies you are working with. The FET is better in terms of wasted power and generated heat, that's all. For extremely high frequencies, the MOSFET will face gate charge time issues. \$\endgroup\$ May 22, 2013 at 15:14
  • \$\begingroup\$ In response to a now deleted remark on my answer: The limiting conditions for both BJTs are already addressed, if you read carefully: (1) Vce(sat) is very much taken into account in the TIP120 discussion, since that is the limiting factor, (2) The minimum base current to achieve saturation with just 1 Ampere load current is taken into account for the TIP31, where that is the limiting factor. Evidently there's no point discussing other factors in either of those cases, since the limiting parameter already precludes their use. \$\endgroup\$ May 22, 2013 at 17:39
3
\$\begingroup\$
  • The maximum rating for your 12N10L is: N-Channel MOSFET I(D,max) = 12A;
  • The maximum rating for your TIP31 is: NPN BJT I(C,max) = 5A;
  • The maximum rating for your TIP120 is: NPN Darlington BJT I(C,max) = 8A.

Assuming that the motor current is well within those specs and the switching frequency is low, any of these transistors should work just fine for the output stage. There is an important difference though between a BJT and a MOSFET, namely:

  • A MOSFET is voltage driven;
  • A BJT is current driven.

To fully drive the BJT however, you need to drive it with a base current. This base current is proportional to the collector current as follows: \$I_C=I_V×h_{FE}\$. Refer to the datasheet to find the transistor's current gain (hFE):

  • TIP31: 10 < hFE < 50 You need to design with worst case parameters, which is 10 in this case. This means that when you want to drive this transistor, for every amp in the collector, you need 100mA in the base. If your controller can source 10mA from a logic pin, your transistor can only sink 0.01× 10 = 100mA. That is probably a bit less than you had hoped for.
  • TIP120: The same goes for this transistor. According to the datasheet, the current gain hFE = 1000. This is a much better spec: for every mA into the base, you get a maximum 1A into collector. This is a pretty useful situation,so what is 'wrong' with this transistor in this particular application? Look at the datasheet for VCE,sat spec'd at up to 4V! This means that when the transistor collector is sinking 5A (datasheet), the voltage across the collector-emiter junction can be as high as 4V! When trying to drive a motor from 5V only 1V is left for the motor. On top of that, let's calculate the transistor's dissipated power in that situation: P = U × I = 4V × 5A = 20W. This implies a huge heatsink!

To fully drive the MOSFET, it suffices to apply a 5V voltage to the gate and apart from the challenge of charging the gate-source capacity that isn't all too difficult and usually easy to drive directly from a microcontroller pin. According to the datasheet, the Drain to Source resistance can drop to as low 0.12Ω. Calculating dissipated power for a 5A load: P = I2 × R = 52 × 0.12 = 25 × 0.12 = 3W. That means heatsink required, but a smallish one compared to the TIP120 option.

\$\endgroup\$
1
\$\begingroup\$

The 12N10L MOSFET shown is specifically designed to be turned on by logic level voltages i.e. 5V. and takes virtually no input current (acting as a small capacitor). The drain-source resistance is extremely low (0.12 ohms) and is rated at 100V 12A. No junction transistor comes close to these specs. As an added bonus it has an internal diode to protect it from back emf making it suitable for switching inductive loads such as motors.

If the motor took a current of 1 amp the amount of power dissipated in the device would only be 120mW - cool running without a heat sink.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ It is not good practice to rely on the internal diode unless the datasheet explicitly states the diode is rated for that. Apparently the datasheet does spec the diode, so for this particular transistor there shouldn't be a problem. \$\endgroup\$
    – jippie
    May 22, 2013 at 6:47
  • \$\begingroup\$ So when you say it's specifically designed to be turned on by logic level voltages, does that imply it's better/worse for PWM? \$\endgroup\$ May 22, 2013 at 14:32

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