I2C Level Shifting With The TCA9517 With Reference Schematic
David Ray
The Voltage Mismatch Problem
I²C looks deceptively simple: two wires (SDA and SCL), lots of devices, and everything “just works.”
But the trouble starts when devices don’t agree on voltage.
- Most modern microcontrollers run at 3.3 V
- Many sensors, displays, and older peripherals still run at 5 V
If you directly connect them:
- A 5 V pull-up can drive a microcontroller pin above its absolute maximum rating
- Best case: unreliable communication
- Worst case: permanent damage
I²C’s electrical design helps, but it doesn’t magically solve voltage differences.
What an I²C Level Translator Does
An I²C level shifter (or level translator) sits between the two voltage domains and does one simple but critical job:
It allows both sides to communicate without ever exposing either side to the other’s voltage.
Each side:
- Sees valid LOW signals
- Generates its own HIGH voltage locally
- Remains electrically protected
This works because of how I²C signaling behaves.
Why I²C Is Special: Open-Drain Signaling
Unlike push-pull interfaces (SPI, UART, GPIO), I²C uses open-drain outputs.
That means:
- Devices never drive the line HIGH
- Devices only pull the line LOW
- HIGH is created by pull-up resistors
This single design choice is what makes safe, bidirectional level shifting possible.
Pull-Up Resistors: One Set per Side
These rails define what “HIGH” means on each side of the bus. The translator never forwards a voltage directly. It only mirrors LOW states.
Because no device drives I²C HIGH, pull-ups are mandatory.
A typical value for a pull-up resistor is 4.7 kΩ. Place one pair of pull-ups on the 3.3V side and another pair on the 5V side.
How the Translation Actually Happens
Here is what is happening:
- If either side pulls the line LOW
- The level shifter detects that LOW
- The LOW is mirrored onto the other side
What never happens:
- A 5 V signal crossing into the 3.3 V domain
- A driven HIGH being forwarded
Enable Pins and Decoupling
Many level shifters include an enable pin. The TCA 9517 has an internal pull-up, so it can be left floating to be always active (often recommended).
Each supply rail should also have a 0.1 µF ceramic capacitor placed close to the pin. These capacitors suppress noise, improve edge stability, and prevent weird, intermittent I²C failures.
They matter more than people think.