OHMYARD

DISCOVER  ·  EXPERIMENT  ·  BUILD

TRACK 7 · ESP32, PI & ARDUINO APPS30/30
NOV 27, 2026
14:20:00
3.3V DOMAINESP32 / Raspberry Pi3.30 V (HIGH)TX SENDING →BSS138 SHIFTERN-MOSFETOFF (PULL-UPS)LV: 3.3VHV: 5.0V5.0V DOMAINArduino Uno / 5V I2C5.00 V (HIGH)RX RECEIVING →Bidirectional Translation: LV (3.30 V (HIGH)) ⇄ HV (5.00 V (HIGH)) · Shared GND Required
Drag or WASD to pan · Q / E to rotate · Scroll to zoom

Bidirectional 3.3V ⇄ 5V MOSFET Logic Level Shifter Lab — Engineering Notes & Troubleshooting

✓ Reviewed by Jason Guo (OhmYard Lab)· IEC & Datasheet Verified· Updated Nov 27, 2026
QUICK ENGINEERING ANSWER (TL;DR)

Need a 3.3V ESP32 or Raspberry Pi to talk cleanly with a 5V Arduino or 5V I2C sensor? A single BSS138 N-MOSFET and two 10 kΩ pull-up resistors automatically translate logic signals in BOTH directions with zero direction-control pin!

LV HIGH (3.3V) ⇄ HV HIGH (5.0V) | LV LOW (0V) ⇄ HV LOW (0V)

Ideal for I2C (100/400 kHz) and UART serial up to 115200 baud. For ultra-fast 800 kHz WS2812B or 10 MHz SPI, use a push-pull 74AHCT125 buffer instead of 10 kΩ pull-up shifters!

SymbolComponentReal-World Engineering Tip
LVL44-Channel BSS138 Bidirectional ShifterNever try to power a 3.3V sensor FROM the LV pin — LV is a voltage reference input, not a 3.3V regulator output!

Real-World Bench Scenario: Connecting a 5V Arduino Uno to a 3.3V ESP32 over I2C/UART: wire Uno 5V→HV, ESP32 3.3V→LV, tie GND, and bridge SDA/SCL through HV1/LV1 and HV2/LV2!

Bench Challenge: Bidirectional Test: Flip the signal direction (3.3V → 5V vs 5V → 3.3V) and toggle Logic 0/1 to watch the BSS138 MOSFET channel switch ON and OFF!

Frequently Asked Questions

When can I use a simple 2-resistor divider instead of a bidirectional MOSFET level shifter?

Use a 1 kΩ + 2 kΩ voltage divider for one-way 5V → 3.3V signals (like HC-SR04 ECHO or Arduino TX → ESP32 RX). Use a bidirectional BSS138 shifter whenever the wire carries TWO-WAY data (like I2C SDA) or needs 3.3V → 5V step-up!

Continue Exploring Related 2.5D Labs
29. Opto Relay Module →1. Closed Loop & Faults →2. Ohm's Law & Thermal →

OHMYARD · ALL 30 INTERACTIVE LABS & SIMULATORS

1. Closed Loop & Faults
/closed-loop
2. Ohm's Law & Thermal
/ohm-law
3. Series vs Parallel
/series-parallel
4. X-Ray Breadboard
/breadboard-simulator
5. LED Resistor & E24
/led-resistor-calculator
6. Voltage Divider & Load
/voltage-divider
7. Multimeter Trainer
/multimeter-simulator
8. RC & Oscilloscope
/rc-oscilloscope
9. 555 Timer Pulse Lab
/555-timer
10. Diode & Rectifier
/diode-rectifier
11. Transistor & Flyback
/transistor-switch
12. PWM Dimmer & Fan
/pwm-dimmer
13. Op-Amp Comparator
/opamp-comparator
14. H-Bridge & Shoot-Through
/h-bridge-motor
15. Buck vs LDO Power
/buck-converter
16. Digital Logic Gates
/logic-gates
17. Resistor Color Code
/resistor-color-code
18. ESP32 Pinout Guide
/esp32-pinout
19. Arduino Uno Pinout
/arduino-uno-pinout
20. Zener Voltage Clamp
/zener-diode-regulator
21. I2C Pull-Up Bus
/i2c-pullup-bus
22. Battery Life & Sleep
/battery-life-calculator
23. PCB Trace Width
/pcb-trace-width
24. Wheatstone Bridge
/wheatstone-bridge
25. Raspberry Pi GPIO
/raspberry-pi-pinout
26. WS2812B LED Strip
/ws2812b-led-strip
27. SG90 Servo PWM
/servo-pwm-control
28. HC-SR04 Ultrasonic
/ultrasonic-hcsr04
29. Opto Relay Module
/relay-optocoupler
30. 3.3V ⇄ 5V Shifter
/logic-level-shifter