Page 1 of 1

BSS138L

Posted: Wed Jun 26, 2024 9:06 am
by ag123
stumbled across a nice n channel mosfet BSS138L
https://www.onsemi.com/products/discret ... ts/bss138l

The thing I liked about this transistor is the low gate threshold voltage
https://www.onsemi.com/download/data-sh ... 138l-d.pdf
Vgs(th) 0.8 low norm1.25v high 1.5v

they make perfect level shifters or mosfet drivers
turns out this is an example use
https://www.adafruit.com/product/757
https://www.digikey.sg/en/blog/logic-le ... ing-basics

Re: BSS138L

Posted: Thu Jun 27, 2024 11:33 am
by STM32ardui
It's good, that MOSFET comes in such a small package. Otherwise you may be harmed by stumbling :mrgreen:

Hmm ... last time I bought such level shifters must be before corona, when I used Arduino UNO with 5 V and displays etc. having 3,3 V. So I guess, they must be on market for a lot of years. For beginners your hint can be useful and not off-topic.

Re: BSS138L

Posted: Thu Jun 27, 2024 12:21 pm
by ag123
the other one of my favourite 'level shifter' is actually 74lvc1g17
https://www.nexperia.com/products/a...e ... C1G17.html
https://assets.nexperia.com/documents/d ... VC1G17.pdf
https://www.ti.com/product/SN74LVC1G17
https://www.ti.com/lit/ds/symlink/sn74lvc1g17.pdf
apparently Ti has a better part

and 74LVC1G14 inverting
https://www.nexperia.com/products/a...- ... C1G14.html
https://assets.nexperia.com/documents/d ... VC1G14.pdf
https://www.ti.com/product/SN74LVC1G14
https://www.ti.com/lit/ds/symlink/sn74lvc1g14.pdf
TI parts seemed to have a lower trigger threshold.

The good thing about the LVC is that it is a full cmos gate hence push-pull, possibly much faster than using a mosfet and a pull up resistor.
It'd seemed it is possible to use the 74lvc to convert from 5v to 3.3v and vice versa

Re: BSS138L

Posted: Thu Jun 27, 2024 12:40 pm
by ag123
BSS138L is a good logic level mosfet in itself given its low Vth threshold voltage to switch on, and 200 mA drive is plenty
https://www.onsemi.com/download/data-sh ... 138l-d.pdf
A key is this will work on a 3.3v device, many logic level mosfets can't do such low voltages.

for a long time if I need to drive 100s of mA from a gpio pin, normally I'd resort to BJT transistors, e.g. 2n2222
https://www.onsemi.com/pdf/datasheet/p2n2222a-d.pdf
as base turn on is normally diode voltages 0.6v, and the drive current is simply beta / hfe(amplification) x Ibase
lets assume beta / hfe = 150
so to get say about 200 mA over the transistor, a rough estimate for a resistor at the pin would be (3.3v - 0.7v) * 150 / 0.2 ~ 2k ohm
but that hfe can vary between transistor to transistor (specs say 50-375), but I'd guess values between 2k-5k would be ok and gives a fair drive.

but with BSS138L, I'd guess one can simply connect the pin to the gate
but that may drive too much currents in the mosfet, hence pull up resistaor at the drain may be needed to limit that.
the other thing is the rather low on resistance, which is probably a good thing drive motors etc.
BJT often have a rather high Vce (sat) which could be like 0.5-1.5v

Re: BSS138L

Posted: Thu Jun 27, 2024 3:37 pm
by STM32ardui
ag123 wrote: Thu Jun 27, 2024 12:40 pm the other thing is the rather low on resistance, which is probably a good thing drive motors etc.
I don't think, it's so easy ...

IDS = 0,2 A max.
So UDS <= 1,75 V or the BSS138 will be outside SOA (safe operation area).

Datasheet gives you 2 values for RDSon:
  UGS = 5 V        RDSon = 2,78 ... 3,50 Ω
  UGS = 2,75 V   RDSon = 3,78 ... 10 Ω
In the second line worst case PD = 0,2² x 10 = 0,4 W is above max. power dissipation

Datasheet of your favourite STM32F411 says:
  VOH = VDD - 0,4 V for CMOS-port and I = 8 mA
  VOH > 2,4 V for TTL-port (?) and I = 8 mA

A BSS138 will not need 8 mA, so VOH may be higher.
But datasheet gives no values of RDSon for 3,0 V or 3,3 V etc.

Re: BSS138L

Posted: Thu Jun 27, 2024 4:19 pm
by ag123
STM32ardui wrote: Thu Jun 27, 2024 3:37 pm But datasheet gives no values of RDSon for 3,0 V or 3,3 V etc.
if you look at figure 1 and figure 2 on page 3
https://www.onsemi.com/download/data-sh ... 138l-d.pdf
it'd give some idea about what is feasible

Apparently, Rds(on) is not a constant as well. From figure 1, for Vgs = 3v, Vds = 1v, that gives an Id = 0.3A around there.
working Rds(on) = Ids / Id = 1 / 0.3 ~ about 3.33 ohms
but that for practical purpose it is dissipating 1v x 0.3 a = 0.3 watts, this could be 'too hot' unless perhaps doing PWM or find a way to 'heat sink' it, for sot23 that's difficult (perhaps feasible to use bigger copper connecting traces and solder blobs etc, that would work as a heat sink of sorts).
a strange feeling is that I think bss138l would survive 0.3 watts with fat connecting copper traces and more solder, that works like a heat sink.

But for that matter, it may be sufficient to drive tiny/small motors like the 130 motor (but with a small torque)
https://www.aliexpress.com/w/wholesale-130-motor.html
or leds e.g. 7 segment common cathode, but limit that as well

for that matter there are even more curious mosfets out there in the market
check out AO3400 (n channel) Id 5 amps !
https://www.aosmd.com/sites/default/fil ... AO3400.pdf
check out AO3401 (p channel) Id -4 amps !
https://www.aosmd.com/sites/default/fil ... AO3401.pdf
and they sport the same sot23 footprint as do BSS138L
those huge amps are curious at best, but that the AO34xx mosfets do show very low Rds(on) in their specs.