MCU Interfaces

BSS138 Bidirectional I2C 3.3V to 5V Level Shifter

Bidirectional I2C bus voltage level translator interfacing 3.3V and 5V logic domains using two onsemi BSS138 N-channel MOSFETs with pull-up resistors and decoupled supplies.

Low-Voltage Supply (VDD1)
+3.3 V DC nominal (+1.65 V to +3.6 V operating range)
Components
8
Formulas
4
Gotchas
4
Open in Web CAD
Verified source

Schematic workbench

BSS138 Bidirectional I2C Level ShifterExported from CircuitBaseC1100nFC2100nFR110kR210kR310kR410kQ1BSS138Q2BSS138+3.3VGND+5.0VGND+3.3V+3.3V+5.0V+5.0VSDA (3.3V)+3.3VSDA (5V)SCL (3.3V)+3.3VSCL (5V)

Circuit overview

Low-Voltage Supply (VDD1)
+3.3 V DC nominal (+1.65 V to +3.6 V operating range)
Components
8
Formulas
4
Gotchas
4

Click any component in the schematic above to inspect its electrical ratings, function, and connections.

Circuit overview

This bidirectional logic level translator implements the classic NXP Semiconductors AN10441 / Philips Semiconductor AN97055 topology for bidirectional I2C bus translation between a 3.3V low-voltage domain (VDD1) and a 5.0V high-voltage domain (VDD2). The circuit supports both Serial Data (SDA) and Serial Clock (SCL) lines using two discrete N-channel enhancement-mode MOSFETs (Q1 and Q2, onsemi BSS138 in SOT-23). Both MOSFET gates are permanently tied to the lower power rail (+3.3V), while the sources face the 3.3V bus side and the drains face the 5.0V bus side. Discrete pull-up resistors (R1 through R4, 10 kΩ 1%) pull each bus line to its respective power rail in the idle state. The circuit operates autonomously across three states without any directional control signal: when the bus is idle, both sides pull high to their respective rails while VGS = 0V keeps the transistors in cutoff; when a 3.3V device pulls down, VGS rises to +3.3V (exceeding the 1.5V threshold) and turns the transistor on to drag the 5V line low; and when a 5V device pulls down, current flows forward through the transistor intrinsic body diode until the source falls below threshold, triggering full channel conduction to pull the 3.3V side down cleanly. Local 100 nF ceramic bypass capacitors C1 and C2 suppress rail ripple during simultaneous edge transitions.

Key Technical Specifications

Low-Voltage Supply (VDD1)+3.3 V DC nominal (+1.65 V to +3.6 V operating range)
High-Voltage Supply (VDD2)+5.0 V DC nominal (+2.7 V to +5.5 V operating range)
Supported Bus ProtocolsI2C Standard-mode (100 kHz), Fast-mode (400 kHz), SMBus, 1-Wire
Pull-Up Resistors (R1, R2, R3, R4)10 kΩ 1% standard (scale down to 2.2 kΩ for high bus capacitance)
MOSFET On-Resistance (RDS(on))≤ 3.5 Ω at VGS = 10 V, ≤ 6.0 Ω at VGS = 4.5 V (onsemi BSS138)
Gate Threshold Voltage (VGS(th))0.8 V minimum to 1.5 V maximum (onsemi BSS138)
Supply Decoupling (C1, C2)100 nF 25V X7R ceramic MLCC per supply domain
Low-Level Output Voltage (VOL)≤ 0.40 V (compliant with I2C Fast-mode specification)

Theory of Operation & Working Principle

01

Circuit Topology and Gate-Clamped Bias Architecture

The circuit operates as a two-channel bidirectional voltage level translator for the open-drain I2C serial bus, interfacing a lower-voltage system section (VDD1 = +3.3 V) with a higher-voltage section (VDD2 = +5.0 V). Each bus line (SDA and SCL) employs a single discrete N-channel enhancement-mode MOSFET (Q1 for SDA, Q2 for SCL). The gates of both MOSFETs are permanently connected to the lower supply voltage VDD1 (+3.3 V). The source terminals connect to the 3.3 V bus side, and the drain terminals connect to the 5.0 V bus side. Pull-up resistors R1 and R2 (10 kΩ) pull the 3.3 V lines to VDD1, while R3 and R4 (10 kΩ) pull the 5.0 V lines to VDD2. Decoupling capacitors C1 and C2 (100 nF X7R ceramic) provide low-impedance high-frequency bypass directly at each supply domain.

02

State 1: Idle and High-Impedance Bus Condition (Both Sides HIGH)

When no bus device (master or slave) is driving the bus, the open-drain lines on both sections are held HIGH by their respective pull-up resistors: the 3.3 V lines sit at +3.3 V and the 5.0 V lines sit at +5.0 V. For both transistors Q1 and Q2, the gate is at +3.3 V and the source is at +3.3 V, resulting in a gate-to-source voltage of exactly zero (VGS = VG - VS = 3.3V - 3.3V = 0 V). Because VGS is far below the threshold voltage (VGS(th) = 0.8\dots 1.5 V), the MOSFETs are completely pinched off in cutoff. The higher-voltage 5.0 V section is completely isolated from the lower-voltage 3.3 V section, preventing overvoltage stress or phantom leakage into 3.3 V microcontroller I/O pins.

03

State 2: Low-Voltage Device Driving Down (3.3V to 5V LOW Translation)

When an active device on the 3.3 V section asserts a logic LOW, it pulls the source of the MOSFET down toward ground (VS ≈ 0 V). Because the gate remains clamped at +3.3 V, the gate-to-source voltage abruptly rises to VGS = 3.3V - 0V = 3.3 V, well above the maximum threshold voltage of 1.5 V. The MOSFET turns fully ON, providing a low-resistance conduction channel (RDS(on) ≤ 6.0 Ω). Current from the 5.0 V pull-up resistor flows through the conducting channel to ground via the 3.3 V pull-down driver, pulling the drain (5.0 V bus line) down to a matching logic LOW state (VOL2 = VOL1 + Ipull-up · RDS(on) ≤ 0.4 V).

04

State 3: High-Voltage Device Driving Down (5V to 3.3V LOW Translation)

When an active device on the 5.0 V section asserts a logic LOW, it pulls the drain of the MOSFET down toward ground. Initially, the MOSFET channel is non-conducting. However, the intrinsic body diode of the N-channel MOSFET is oriented with its anode at the source (3.3 V side) and its cathode at the drain (5.0 V side). As the drain voltage drops below approximately 2.6 V, the body diode becomes forward-biased and begins conducting, pulling the source down via diode forward drop (VS = VD + VSD ≈ 0.7 V). As the source voltage drops below 3.3V - VGS(th) ≈ 1.8 V, VGS exceeds the threshold voltage, and the inversion channel turns ON. Once the channel conducts, it bypasses the forward diode drop, pulling the 3.3 V line cleanly down to a true logic LOW state matching the 5.0 V driver level.

05

State 4: Bus Release and Passive Pull-Up Rise Time Dynamics

When the active pull-down driver on either side releases the bus, both sides begin rising toward their respective supply rails. Initially, while the line voltage is below VDD1 - VGS(th), the conducting MOSFET keeps both sides tied together, rising in unison. Once the lower-voltage line exceeds VDD1 - VGS(th) ≈ 1.8 V, VGS falls below the threshold, and the MOSFET turns OFF. From that instant forward, the two bus sections rise independently: the 3.3 V section charges through R1/R2 with time constant \tau1 = Rp · Cb1, and the 5.0 V section charges through R3/R4 with time constant \tau2 = Rp · Cb2. This allows high-voltage bus capacitance to be electrically decoupled from the low-voltage bus section, improving overall signal integrity.

Design Equations & Calculations

Maximum Pull-Up Resistor for I2C Rise Time

Rp(max) = tr0.8473 · Cb

Calculates the maximum permissible pull-up resistance to satisfy I2C bus rise time requirements (tr <= 1000 ns for Standard-mode, tr <= 300 ns for Fast-mode) based on total capacitive bus load Cb.

SymbolParameterTypical value
Rp(max)Maximum pull-up resistance3.54kΩ
trMaximum allowable bus rise time300ns
CbTotal bus capacitance per line100pF

Minimum Pull-Up Resistor from Output Sink Limit

Rp(min) = VDD − VOLIOL

Calculates the lower limit on pull-up resistance to prevent exceeding the maximum open-drain driver sink capability (typically 3 mA for Standard and Fast-mode I2C devices).

SymbolParameterTypical value
Rp(min)Minimum pull-up resistance1.53kΩ
VDDBus supply rail voltage5.00V
VOLMaximum low-level output voltage0.40V
IOLMaximum open-drain sink current3.00mA

Low-Level Voltage During High-to-Low Translation

VOL1 = VOL2 + Ipull − up · RDS(on)

Calculates the actual low-level voltage delivered to the 3.3V bus side when a 5V master or slave drives the bus line low through the conducting MOSFET channel.

SymbolParameterTypical value
VOL1Output low voltage on 3.3V bus side0.12V
VOL2Driver low voltage on 5.0V bus side0.10V
Ipull − upPull-up current through 3.3V resistor0.32mA
RDS(on)MOSFET on-channel static resistance6.00Ω

Gate Overdrive Voltage Margin

VGS(drive) = VDD1 − Vin(LV) ≥ VGS(th)

Quantifies the gate-to-source overdrive voltage available to turn on the MOSFET channel when the low-voltage side pulls down to ground.

SymbolParameterTypical value
VGS(drive)Available gate-source overdrive3.30V
VDD1Low-voltage supply rail3.30V
Vin(LV)Low-voltage input drive level0.00V
VGS(th)MOSFET maximum threshold voltage1.50V

Bill of Materials (BOM)

Every part needed to build this circuit. Select a reference designator to inspect it on the schematic.

RefDesComponentValue / ratingPackageRole in circuitReference
N-Channel Logic-Level MOSFET

onsemi BSS138; 50V VDSS, 220mA ID, RDS(on) <= 3.5Ω at 10V, VGS(th) 0.8V to 1.5V

BSS138SOT-23 (TO-236AB)SDA Bidirectional Level ShifterN-Channel Logic-Level MOSFET pinout & datasheet
N-Channel Logic-Level MOSFET

onsemi BSS138; 50V VDSS, 220mA ID, RDS(on) <= 3.5Ω at 10V, VGS(th) 0.8V to 1.5V

BSS138SOT-23 (TO-236AB)SCL Bidirectional Level ShifterN-Channel Logic-Level MOSFET pinout & datasheet
SMD Chip Resistor

Yageo RC0805FR-0710KL; 10 kΩ 1% 1/8W thick film

10kΩ0805 SMDSDA 3.3V Pull-Up Resistor—
SMD Chip Resistor

Yageo RC0805FR-0710KL; 10 kΩ 1% 1/8W thick film

10kΩ0805 SMDSCL 3.3V Pull-Up Resistor—
SMD Chip Resistor

Yageo RC0805FR-0710KL; 10 kΩ 1% 1/8W thick film

10kΩ0805 SMDSDA 5.0V Pull-Up Resistor—
SMD Chip Resistor

Yageo RC0805FR-0710KL; 10 kΩ 1% 1/8W thick film

10kΩ0805 SMDSCL 5.0V Pull-Up Resistor—
Multilayer Ceramic Capacitor

Murata GRM21BR71E104KA01L; 100 nF 25V X7R ceramic 10%

100nF0805 SMD3.3V Supply Decoupling Capacitor—
Multilayer Ceramic Capacitor

Murata GRM21BR71E104KA01L; 100 nF 25V X7R ceramic 10%

100nF0805 SMD5.0V Supply Decoupling Capacitor—

Practical Applications & Target Domains

Interfacing 3.3V microcontrollers (ARM Cortex, ESP32, RP2040) with legacy 5.0V I2C peripherals and sensors
Bidirectional open-drain logic level translation for SMBus, PMBus, and 1-Wire communication links
Core translation circuit for modular breakout boards (SparkFun BOB-12009, Adafruit 757, Pololu 2595)
Galvanically referenced mixed-voltage bus isolation preventing 5.0V overvoltage stress on 3.3V silicon

Critical Design Traps & Engineering Gotchas

Traps found in real builds, with the fix for each.

Critical

Inverted Source-Drain Orientation and Body Diode Conduction

Connecting the MOSFET Drain to the lower-voltage 3.3V rail and Source to the higher-voltage 5.0V rail inverts the intrinsic substrate body diode. The body diode anode (now at 5V) permanently conducts forward into the 3.3V supply rail, causing severe transistor overheating and back-powering the 3.3V microcontroller rail to destructive overvoltage levels.

Mitigation

Always connect the MOSFET Source to the lower-voltage domain (3.3V) and the Drain to the higher-voltage domain (5.0V). Verify that the intrinsic body diode cathode faces the 5.0V side.

Warning

Excessive Bus Capacitance and Slow Rise Time Violations

Standard 10 kΩ pull-up resistors form an RC low-pass filter with bus parasitic capacitance (trace capacitance, cable length, device pin capacitances). When total bus capacitance exceeds 100 pF, the rise time exceeds the 300 ns maximum limit specified by the I2C Fast-mode standard (400 kHz), resulting in bus framing errors and missing ACK bits.

Mitigation

Calculate pull-up resistance using the rise time equation Rp <= tr / (0.8473 * Cb). For 400 kHz Fast-mode operation with multiple slaves, replace 10 kΩ pull-ups with 2.2 kΩ or 4.7 kΩ resistors.

Critical

Insufficient Gate Overdrive at Sub-3.3V Logic Levels

Attempting to use this discrete BSS138 circuit with ultra-low-voltage logic rails (1.8V or 1.2V) fails because the BSS138 gate threshold voltage VGS(th) can be as high as 1.5V. At VDD1 = 1.8V, the effective gate overdrive voltage (VGS - VGS(th)) is only 0.3V, causing high on-resistance (tens of ohms) that violates the I2C VOL maximum specification (0.4V).

Mitigation

For 1.8V to 3.3V or 1.8V to 5.0V level translation, select specialized sub-logic MOSFETs with guaranteed VGS(th) <= 0.8V and low RDS(on) at 1.8V gate drive (such as DMN2004K or SSM3K339R), or use dedicated auto-direction level translators (such as TI TXS0102).

Warning

Missing Common Ground Reference Between Power Domains

Operating the 3.3V and 5.0V sections from separate power supplies without bonding their 0V ground lines allows floating common-mode potential differences. Ground bounce and DC offsets shift the effective gate-source voltage VGS, causing spontaneous bus latch-up, false logic triggers, or gate oxide breakdown.

Mitigation

Ensure a solid, low-impedance ground return connects the ground planes of both the 3.3V and 5.0V systems directly adjacent to the level-shifter circuit.

Primary sources

Help keep this page accurate

Built, simulated or reviewed this circuit? Confirm it, or report a part, value or connection that is wrong.

Opens a public form on GitHub with this page already filled in; a free GitHub account is needed. How reports and confirmations work

HTML snippet

<iframe src="https://circuitbase.tech/embed/schematic/bss138-bidirectional-i2c-level-shifter?theme=paper" width="100%" height="500" frameborder="0" loading="lazy" style="border: 1px solid #e5e7eb; border-radius: 6px; max-width: 100%;" title="BSS138 Bidirectional I2C 3.3V to 5V Level Shifter — CircuitBase Interactive Schematic"></iframe>