How It Works: The MOSFET Design
The most common and effective design for a bi-directional I2C level shifter uses a specific configuration of MOSFETs (Metal-Oxide-Semiconductor Field-Effect Transistors), usually N-channel MOSFETs.
Key Components
- High Voltage Side (HV): The side connected to the higher voltage (e.g., 5V).
- Low Voltage Side (LV): The side connected to the lower voltage (e.g., 3.3V).
- MOSFET: Acts as an automatic switch, controlling the current flow between the LV and HV sides.
- Pull-up Resistors: Two separate pull-up resistors are connected from the SDA SCL lines on each side to their respective voltage rails (V_CC, HV and V_CC, LV).
Operation
The MOSFET setup works without explicit direction control, making it ideal for the bi-directional nature of I2C:
- LV Side Pulls LOW: When the $\text{LV}$ device pulls the line low (to 0V), the MOSFET’s body diode turns on, pulling the gate low. This fully turns on the MOSFET, pulling the HV side down to near 0V as well.
- HV Side Pulls LOW: When the HV device pulls the line low, the MOSFET’s body diode acts similarly, pulling the LV side to V
- Going HIGH (Floating): When either device releases the line (makes it high-impedance), the pull-up resistors pull the line voltage up to its respective V_CC. The LV side goes to V_CC, LV, and the HV side goes to V_CC, HV. This automatic switching action allows data to flow in both directions simultaneously.
Module Pinout and Connections
A typical I2C level converter module will have four power/ground pins and two pairs of I2C signal pins:
| Pin Name | Side | Function | Connection Example |
| VCC, HV | High Voltage | Connects to the Higher Voltage supply | 5V (e.g., Arduino Uno VCC |
| VCC, LV | Low Voltage | Connects to the Lower Voltage supply | 3.3V (e.g., ESP32 VCC) |
| GND | Both | Common Ground | System Ground |
| SCLH | High Voltage | SCL (Clock) line for the HV device | Arduino Uno SCL pin |
| SDAH | High Voltage | SDA (Data) line for the HV device | Arduino Uno SDA pin |
| SCLL | Low Voltage | SCL (Clock) line for the LV device | ESP32/Sensor SCL pin |
| SDAL | Low Voltage | SDA (Data) line for the LV device | ESP32/Sensor SDA pin |
Advantages
- Bi-Directional: Crucial for I2C, as it handles signals flowing from Master to Slave and Slave to Master.
- Simple Setup: Requires no control pins; the voltage translation is automatic.
- Wide Voltage Range: Can typically shift between any two standard voltages, such as 5V, 3.3V, 2.5V, and 1.8V











Reviews
There are no reviews yet.