ExpertInterfaces & Logic
Two-Channel BSS138 I²C Level Shifter
Build a bidirectional open-drain translator for SDA and SCL between 3.3 V and 5 V I²C buses using two BSS138 MOSFETs.
Parts from the database
- BSS138 × 2One N-channel MOSFET per bus line
Other supplies
- breadboardCommon build supply
- 3.3 V and 5 V logic supplies with common groundCommon build supply
- four 4.7 kΩ pull-upsCommon build supply
- I²C devices/test fixturesCommon build supply
- multimeterCommon build supply
Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.
Connections
- Check exact BSS138 package pinout. For each bus line, gate to 3.3 V, source to low-voltage bus, drain to 5 V bus.
- For SDA and SCL separately, add one pull-up to 3.3 V on low side and one to 5 V on high side. Share ground.
- Connect devices to their matching voltage side; use open-drain I²C, not push-pull outputs.
- Begin with slow I²C clock and short wiring.
Build steps
- With devices disconnected, verify each rail and idle line voltage.
- Attach I²C devices and scan/read in both directions.
- Check pull-up strength and total bus capacitance after devices are added.
- Keep 5 V SDA/SCL off the 3.3 V side except through the translator.
Software and firmware setup
This is a hardware-only circuit; no firmware is required.
Test your build
Both sides idle at their own rail and a low driven on either side propagates to the other.
Troubleshooting
- Line stuck low: check MOSFET orientation, shorts, and pull-ups.
- One direction only: verify gate at 3.3 V and source/drain sides.
- Fails at speed: shorten bus and reduce capacitance; not all high-speed buses suit this circuit.
Safety and limitations
Use only low-voltage open-drain I²C. This does not isolate bus grounds or make a mains connection safe.
Manufacturer and platform documentation
Community Notes for This Project
These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.
Set up the comments service to load community notes.