How to safely interface 3.3 V and 5 V logic without specialized ICs
In embedded systems, it is extremely common to connect devices that operate at different logic voltages. Many modern microcontrollers run at 3.3 V, while older devices, sensors, serial peripherals, and some modules still use 5 V logic.
Although dedicated level-shifter ICs exist, sometimes you need a discrete components solution.

Why Level Shifting Matters
A 5 V logic device typically interprets:
- Logic HIGH ≈ 0.7 × VCC ≈ 3.5 V
- Logic LOW ≈ < 0.8 V
A 3.3 V microcontroller outputs 3.3 V HIGH, which may or may not be interpreted as a valid logic HIGH for a 5 V device.
More importantly:
Feeding a 5 V signal directly into a 3.3 V GPIO pin can permanently damage it.
This is why level shifting is needed for:
- UART (TX/RX)
- I²C
- SPI
- 1-Wire
- General-purpose GPIO
-
Bidirectional BJT Transistor Level Shifters
While MOSFET level translators are the modern standard, BJTs can also perform level shifting.
Advantages of BJT Level Shifters
- Very cheap
- Good noise immunity
- Higher ESD robustness than MOSFETs
- M ust be tuned for the best performannce (base resitor and capacitor)
- Work well for simple bidirectional pull-down logic translation
When BJTs Make Sense
- Sensors with open-drain outputs
- 1-Wire, I²C in low-speed mode
- Lines that need clean, strong pull-down capability
- Harsh environments where ESD robustness matters
Circuit Example: NPN Bidirectional Level Shifter
In this circuit:
- V1/D1 & V2/D2 act as open-drain drivers
- R3 and R2 are pull-ups to different voltage domains
- R1 / C1 are tuned for the best performance
-
Bidirectional MOSFET Level Shifters
The most common and universal discrete level shifter for low-speed buses is the N-channel MOSFET level translator.
It is used in:
- Commercial I²C breakout boards
- Many modules and shields
- Arduino ↔ Raspberry Pi interfacing
- Sensors with open-drain interfaces
Typical MOSFET Bidirectional Level Shifter
How it works
- The MOSFET body diode allows initial conduction from lower to higher voltage.
- When either side pulls LOW, the MOSFET conducts and pulls the other side LOW.
- When both sides are HIGH, each pull-up defines its respective voltage domain.
Characteristics
- True bidirectional
- Non-inverting
- Perfect for I²C, 1-Wire, and slow digital lines
- Not ideal for fast SPI (> 4 MHz)
- Requires good pull-up selection
Conclusion
Discrete level-shifting circuits are an excellent alternative when a level shif IC solution is unnecessary.
With the right choice of devices and resistor values, you can interface 3.3 V and 5 V domains safely, reliably, and inexpensively.