BSS138 Discrete MOSFET Level Shifter

Bidirectional 4-Channel Level Shifter for I²C and One-Wire

BSS138-based 4-channel shifter boards are valued for their simplicity, low cost, and plug-and-play bidirectional open-drain compatibility, especially for I²C and other low- to medium-speed logic buses.

Typical Applications

These modules are commonly used for:

  • I²C and SMBus communications up to 400kHz
  • 1-Wire devices
  • Low- and moderate-speed digital signal level conversion (3.3V ↔ 5V, 1.8V ↔ 3.3V, etc.)
  • TTL serial interfacing
  • Simple GPIO logic translation

Do not use this level shifter for signals faster than 400kHz or those requiring tight timing (for such cases, use devices like the TXS0108):

  • SPI (Serial Peripheral Interface)
  • UART at high speed
  • WLED (programmable LED control)

WLED / WS2812 LED Strips

Popular addressable LED strips are a use case where selecting the appropriate level shifter is important. When such 5V strips are controlled by 3.3V microcontrollers, a level shifter is often needed.

You can get away with using a less suited level shifter (or none at all) when the wire connection to the strip is short, the ground line is separated, and/or the LED strip itself is short. However, once your setup becomes more extensive,

General purpose bidirectional shifters (like TXS0108E) or MOSFET-driven I2C-oriented shifters (like the one discussed here) present significant reliability and performance problems when used to drive addressable LED data lines. Those level shifters are designed for bidirectional, low-power data lines (like I²C or GPIO), but not for protocols requiring strong, fast, one-way signal edges such as NeoPixel/WS28xx LEDs.

For WLED/programmable LED, use level shifters based on chips like SN74AHCT125/245, SN74HCT14/04, or similar fast, unidirectional logic chips.

Overview

BSS138-based 4-channel shifter boards use discrete MOSFETs and are purposely designed for open-drain environments such as I²C and 1-Wire. They typically include built-in 10kΩ pullup resistors, making them ideal for I²C up to 400kHz.

MOSFET-Driven Logic

While this level shifter uses a BSS138 MOSFET, it is not intended for high-current switching. Its role is strictly for logic signal translation, not for driving loads or acting as a MOSFET gate driver.

Body Diode Effects

The use of a MOSFET produces both beneficial and undesirable effects:

  • Leakage Current:
    If only one side of the level shifter is powered, a leakage current can flow due to the MOSFET’s body diode. For example, powering only the low voltage side (while the high voltage side is off) lets current “leak” from low to high—this could unpredictably raise voltages on the unpowered side.
    • This is only an issue if one side is unpowered. If this is of particular concern, dedicated level shifter ICs such as the TXS0108 (not TXB0108) should be considered.
  • Voltage Crossing Support:
    The same body diode effect can actually help in cases where the low side voltage briefly exceeds the high side—such as on dynamically configured open-drain buses like I²C. Unlike IC-based level shifters, the MOSFET’s diode allows the protocol to continue working in this edge case, though this is more of an accidental advantage than a guaranteed feature.

Voltage Range

  • Supported Voltages:
    Functions with low-side voltages down to 1.8V and high-side voltages up to 10V, offering broad compatibility.
  • Voltage Crossing:
    For typical robust operation, the low side should remain below the high side. However, with open-drain protocols like I²C, voltage crossing (where the low side briefly exceeds the high side) is “unofficially” supported thanks to the MOSFET body diode—though this is not part of the standard specification and isn’t always reliable.

Materials

BSS138 Data Sheet

Slow Website?

This website is very fast, and pages should appear instantly. If this site is slow for you, then your routing may be messed up, and this issue does not only affect done.land, but potentially a few other websites and downloads as well. Here are simple steps to speed up your Internet experience and fix issues with slow websites and downloads..

Comments

Please do leave comments below. I am using utteran.ce, an open-source and ad-free light-weight commenting system.

Here is how your comments are stored

Whenever you leave a comment, a new github issue is created on your behalf.

  • All comments become trackable issues in the Github Issues section, and I (and you) can follow up on them.

  • There is no third-party provider, no disrupting ads, and everything remains transparent inside github.

Github Users Yes, Spammers No

To keep spammers out and comments attributable, all you do is log in using your (free) github account and grant utteranc.es the permission to submit issues on your behalf.

If you don’t have a github account yet, go get yourself one - it’s free and simple.

If for any reason you do not feel comfortable with letting the commenting system submit issues for you, then visit Github Issues directly, i.e. by clicking the red button Submit Issue at the bottom of each page, and submit your issue manually. You control everything.

Discussions

For chit-chat and quick questions, feel free to visit and participate in Discussions. They work much like classic forums or bulletin boards. Just keep in mind: your valued input isn’t equally well trackable there.

  Show on Github    Submit Issue

(content created Jul 20, 2025)