Author Topic: Drive LED from mcp23008. BJT vs Mosfet  (Read 3634 times)

0 Members and 1 Guest are viewing this topic.

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Drive LED from mcp23008. BJT vs Mosfet
« on: March 26, 2019, 08:29:14 pm »
Hi.
Perhaps this was a question for another board, but I need a beginner answer here.
Let's suppose that I wanted to drive an LED from one of the GPIO of an mcp23008 chip.
The chip itself uses 5V as Vcc, while the led is on 12V.
I could switch the LED using a mosfet (2n7000 for example) or a bjt (eg, 2n2222). I usually find mosfets way easier to understand and I usually go right to them. Are there any advantages of using a bjt, instead?
I know I may be asking much but the real solution is not as important to me as the why, since I think this will make me understand better BJTs.

Cheers
 

Offline viperidae

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: nz
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #1 on: March 26, 2019, 08:40:25 pm »
A big difference between a FET and a BJT is the FET is voltage driven and the BJT is current driven.
The resistance of the FET changes with the voltage applied to the gate.
The current that can pass from collector to emitter changes with the current flowing from base to emitter.

I'm also a bit of a novice myself but I my understanding is that in the context of low voltage stuff mosfets are better for on/off switches and bjts are better for linear control/amplifiers.
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #2 on: March 26, 2019, 08:44:20 pm »
A big difference between a FET and a BJT is the FET is voltage driven and the BJT is current driven.
The resistance of the FET changes with the voltage applied to the gate.
The current that can pass from collector to emitter changes with the current flowing from base to emitter.

I'm also a bit of a novice myself but I my understanding is that in the context of low voltage stuff mosfets are better for on/off switches and bjts are better for linear control/amplifiers.
Thanks for the quick reply. So, as long as I dimension the led resistor correctly, the fet should be the easier choice, right?
 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #3 on: March 28, 2019, 09:36:34 am »
The mcp23008 has a maximum of 25mA sink/source capability. Since a BJT is current controlled as mentioned, this limits the maximum current you can feed the LED (assuming a single transistor).

Another issue with the BJT is that it will have a limit to how low the collector-emitter voltage will go (collector-emitter saturation voltage), typically around 0.6V. If you have a high current LED this means the transistor will dissipate a lot of power. If you have a 12V supply then your LED will get more like 11.4V.

So for cases like this usually a MOSFET is a better fit. One thing to watch out for is to pick one which has a gate threshold voltage significantly below 5V, in my experience no more than around half the drive voltage seems to be a good heuristic. And of course check its on resistance R_DS(on), the 2n7000 you linked to has quite high on resistance and thus can't handle much current before hitting the power limit, this is reflected in the safe operating area (SOA) graph. But you should be able to find others with significantly less on resistance.
 
The following users thanked this post: Moriambar

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16615
  • Country: us
  • DavidH
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #4 on: March 28, 2019, 06:57:55 pm »
A big difference between a FET and a BJT is the FET is voltage driven and the BJT is current driven.

Bipolar transistors are really voltage driven.  When doing small signal analysis, the transconductance (voltage in current out) at room temperature is very reliably the collector current divided by 0.026.  The base current is treated as a parasitic effect and the current gain (hfe or beta) is mostly irrelevant except in saturated switching applications.

Another issue with the BJT is that it will have a limit to how low the collector-emitter voltage will go (collector-emitter saturation voltage), typically around 0.6V. If you have a high current LED this means the transistor will dissipate a lot of power. If you have a 12V supply then your LED will get more like 11.4V.

Bipolar transistor collector-emitter saturation voltage is much lower than 0.6 volts.  The reason it seems high is that bipolar transistors have higher transconductance and can sustain a higher current density than MOSFETs which results in a smaller die size and higher bulk resistances.  (1) When the die sizes are equal, the saturation voltage is competitive.  (2) Losses in saturation for both devices are rarely an issue.

The above points to the major advantage of bipolar transistors.  For a given current rating, they can have a smaller die and that combined with easier fabrication makes them less expensive.  However in practice these days, both transistor types are cost competitive so the price difference is rarely a factor.

(1) Higher transconductance and smaller dies also mean better high frequency performance.

(2) This is why bipolar integrated regulators have not been replaced by integrated CMOS devices.  The CMOS output transistors are so large for the same dropout voltage that the chips are just too expensive to be competitive except when quiescent current must be as low as possible
 
The following users thanked this post: Moriambar

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #5 on: March 28, 2019, 11:43:02 pm »
Bipolar transistor collector-emitter saturation voltage is much lower than 0.6 volts.

I should have checked more thoroughly, for some reason the 0.6V figure had gotten stuck and the first datasheet I pulled up (BC337) had 0.6V as well. My bad  |O

But AFAIK higher current capability is associated with higher saturation voltage, and given the LED was 12V I assumed it was a fairly high current thing.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #6 on: March 29, 2019, 01:17:24 am »
Yes, the collector-emitter saturation voltage of a bC337 transistor is 0.7V max, but only if it is almost overloaded with a collector current of 500mA.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16615
  • Country: us
  • DavidH
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #7 on: March 30, 2019, 01:13:19 am »
The BC337 is designed specifically for audio and not saturated switching unlike the similar 2N4401 which uses a different process.  On Semiconductor shows a 50 millivolt Vce(sat) at a forced beta of 10 up to 100 milliamps.  Even at a forced beta of 100, it is still below 200 millivolts.

A modern saturated switching transistor under the same conditions would be more like 15 millivolts maximum or 0.15 ohms.  The best similar MOSFET I could find is 0.3 ohms and costs more than twice as much.

 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #8 on: March 30, 2019, 11:57:54 am »
The BC337 is designed specifically for audio and not saturated switching unlike the similar 2N4401 which uses a different process. 

On Semi says linear and switching for the BC337, copy/pasta error? https://www.onsemi.com/PowerSolutions/product.do?id=BC337
Checking further I see other manufacturers specifies it as an audio output driver.

On Semiconductor shows a 50 millivolt Vce(sat) at a forced beta of 10 up to 100 milliamps.  Even at a forced beta of 100, it is still below 200 millivolts.

A modern saturated switching transistor under the same conditions would be more like 15 millivolts maximum or 0.15 ohms.  The best similar MOSFET I could find is 0.3 ohms and costs more than twice as much.

I stand corrected. I looked at the max Vce(sat), I see the curves show much lower typical values.

Though, as I said, given that the LED was 12V I assumed much more current than 100mA (more like a 10W LED).
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16615
  • Country: us
  • DavidH
Re: Drive LED from mcp23008. BJT vs Mosfet
« Reply #9 on: March 31, 2019, 09:34:00 am »
The comparison is difficult to make outside of specific applications.  I used TO-92 packages but checking SOT-23 devices now, MOSFETs have a general advantage in saturation voltage and price which I suspect has more to do with the economics of production than technology.  At 10 watts and 12 volts, the MOSFET has a clear advantage though because the base current of a bipolar transistor becomes excessive for a logic output.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf