4

I'm replicating this level shifter by Sparkfun but they use a transistor that I don't have. Frankly, I know next to nothing about transistors so reading the specs is way over my head at this point.

I do have a "kit" that I bought that has a bunch of them that might be able to replace the BSS138. Here's the list of the transistors that I have. Can anyone suggest a replacement for the BSS138?

2N4401, 2N3904, PN2222, 8050, PN4393, J113, 2N3055, TIP41C, TIP31A, 2N5458, 2N3904, 2N3906, 2N5088, 2N4401, BC547.

EDIT: Commenters saying that none of these parts will work as they are not the right kind of component. Having said that, could you suggest a through hole part that would satisfy these requirements?

enter image description here

Julian
  • 293
  • 2
  • 4
  • 9
  • 1
    What you need is an NMOS. In your list of alternatives you have several NPN Bipolars which are a completely different kind of device. A simple google search and looking at datasheets will reveal what type each component is, we're not going to do that for you. – Bimpelrekkie Jun 23 '16 at 06:16
  • None of the listed parts will work. – user57037 Jun 23 '16 at 06:26
  • Because none is an NMOS. – Bimpelrekkie Jun 23 '16 at 06:27
  • @FakeMoustache I'm sorry I don't have an EE degree like you do; I just tinker with Arduino as a hobby so when I Google stuff like this, most of the time I can't make heads or tails of it. I just try to find help on forums or in here. No one is asking you to do anything for me (you didn't even need to answer). In fact if I did know the answer to this or knew how to look it up I wouldn't be asking, would I? But if being a snob makes you feel better then be my guest! – Julian Jun 23 '16 at 06:40
  • 2
    I could read a datasheet when I was 17, I didn't have an EE degree back then. It has nothing to do with snobbery but all with "give a man a fish and he'll eat for a day, learn a man to fish and he'll eat for the rest of his life". I gave you some hints so you can help yourself. Questions which can easily be answered by doing your own research (like this question) are not appreciated on this site. – Bimpelrekkie Jun 23 '16 at 06:52
  • 4
    And if you don't want to learn the difference between BSS138 and the other components, that is fine. But then do not ask if you can use any of those if you do not want to do the research. Then just use the BSS138. – Bimpelrekkie Jun 23 '16 at 06:56
  • 2
    @FakeMoustache "I gave you some hints"? Seriously? You only said "What you need is an NMOS" and Google shows me there are DOZENS, every single one with different specs. How am I supposed to know which one to choose when I can't even understand page 1 of the datasheet? That's the only thing you said, the rest was attitude. "Then just use the BSS138": you didn't even take the time to read my question and you are telling me to go read. Thank you. I'll be going my way now and not feeding more trolls since you seem to be well fed by now. – Julian Jun 23 '16 at 07:03
  • You asked if any of your suggested alternatives would be suitable. Now suddenly you want an alternative for the BSS138. That was not what you asked. And if you did, that would be off-topic anyway. – Bimpelrekkie Jun 23 '16 at 07:10
  • There are very few through-hole MOSFETs, and there are almost none with a threshold voltage low enough for a level shifter. Try finding a ZVNL120A. It would be a better idea to solder a BSS138 onto a SOT-23 breakout board. – CL. Jun 23 '16 at 07:37
  • 4
    This is a switching application, so your key specifications are Rds(on) vs. Vgs, VBRDSS, and Vgs(th). A quick search in distribution for through hole parts yields a few that may work in this particular application (with slightly higher losses): BS170 and BS270 might work. – Peter Smith Jun 23 '16 at 08:22

5 Answers5

9

See here -> Digikey has the BSS138 and they can be obtained from them relatively quickly.
They do not seem to have through hole versions.
Once you play a little you will find that the SOT23 smd pkg is not too hard to hand solder - and you can add wire leads if needed.

That level shifter circuit is trickier and more critical of part characteristics than most simple circuits are.
The BSS138 is an "N Channel MOSFFET". It has a much lower turn on voltage (Vgson) than most similar MOSFETs and this is important in this circuit.

Alternative parts in through hole are available but they are less liable to be available to you than a BSS138. eg see Digikey for TN0702 or maybe the LP0701 - but BSS138 is available from the same supplier. If you can learn to handle the SOT23 pkg a lot more parts will be usable.

Russell McMahon
  • 150,303
  • 18
  • 213
  • 391
  • Although the BSS138 is preferable, the 2N7002 will work most of the time, definately suitable for tinkering/prototyping. – Caleb Reister Nov 26 '19 at 03:22
  • @CalebReister Care needs to be taken with this specific circuit. I have not gone back and looked at the specs of the two devices, but, from memory, in this circuit the Vgsth is quite crucial. Too high or too low causes problems. In many applications it's not too important how low the Vgsth value is and its upper limit depends on the supply voltage being used. This circuit is "a bit arcane" in how it works due to the bidirectional action. – Russell McMahon Nov 26 '19 at 04:31
5

I know the question was answered years ago, but I had a similar problem, a supplier (LCSC) didn't had the BSS138 as a "basic" component and I had to find an equivalent one that was "basic" to reduce assembly costs.

So, to make things easier for someone else who stumbles into this question...

For low (a few kHz to a few hundred kHz, "serial port" speeds) speeds, the 2N7000/2N7002 worked fine, and they're readily available both in SOT-23 packages with the same pinout as the BSS138 or in PTH TO-92 packages.

Flyingfenix
  • 151
  • 1
  • 2
  • 3
    2N7002 may be OK for 5V circuits but it is risky to use it for 3V circuits. The BSS138 is preferred for having lower Vgs(th). – user57037 Nov 25 '19 at 21:20
5

Adafruit covered this in The Great Search: BSS138 Dual N-Channel FET Alternative Replacement because BSS138 is in short supply currently (September 2021).

They showed an example of using the parametric search on the web page of a parts supplier (Digikey in this example but others have equally good parts search even if they don't sponsor Adafruit).

  • part status: active
  • FET type: dual n-channel (you want single N-channel)
  • Mounting type: surface mount
  • Package: SOT-363 (you probably want SOT-23?)

Choosing "View Similar" brings up 118 options

  • Stock: In Stock
  • Vgs(th)(max): anything <1.8V

They explain why parameters like Rds On aren't important in this application (logic level shifting).

They ended up with a short list from which they chose Nexperia's NX138BKSK

RedGrittyBrick
  • 14,710
  • 5
  • 39
  • 80
  • This is a very good reason to avoid the dual package which is only made by a small number of people. Always use the most generic part you can (unless you can't). Because part shortages happen from time to time and it can be frustrating and costly to deal with. – user57037 Sep 17 '21 at 20:56
3

I know it is an old question, but I want to point out that BJT transistor can work just fine except that it might not be as efficient or as fast as the low VG(th) MOSFET solution. It is useful if you don't have MOSFET handy (like what the OP had encountered) and need a quick solution. To prove that, you can either build it yourself a prototype or simulate it. I have created a circuit that runs under Falstad Circuit Simulator.

enter image description here

There are 2 switches on either sides. You can switch them on/off in real-time to see the effect. Watch the voltages on the voltmeters when you play around with the switches. It works because the BJT can operate not only in forward-active mode, but also in reverse-active mode.

When only SW1 is closed, the transistor will be in forward-active, i.e., the charges flow from collector to emitter (you can see this animated in the simulator). When only SW2 is closed, the transistor will be in reverse-active, i.e., the charges flow from emitter to collector.

In this configuration, the problem is normally that the low output voltage on the 3.3V leg may be a bit high. If that is the case, you either lower down the base resistor or increase the pull-up resistor on the 3.3V leg to keep it low. The reason is due to the current gain in reverse-active is much lower than the forward-active.

kaosad
  • 666
  • 2
  • 9
1

Just to add to the excellent accepted answer..

Have a look into IRLML2402, they have a low Vgs/th of 0.7V and are very fast.

For level shifting you want Vgs/th (threshold voltage) and on/off delay timings to be as small as possible, and Vgs and Vds max rating should be sufficiently high for your application.

rustyx
  • 193
  • 2
  • 9
  • 3
    That transistor has 3x the input capacitance of the BSS138. Have you ever actually tried switching it at 100 MHz? Because I am extremely skeptical that would work. Certainly not with an open collector arrangement. No open collector circuit will switch at logic levels at 100 MHz. – user57037 Nov 25 '19 at 21:23
  • 1
    No I have not, my hobby projects never needed that kind of speeds. For me though a few extra pF was a good tradeoff for a lower threshold voltage. – rustyx Nov 25 '19 at 23:17
  • 1
    Yes, it looks like it would work, but if anything I think the BSS138 would switch faster. – user57037 Nov 26 '19 at 00:33