OTD ACADEMY
Sign in / Sign up
Library

LIBRARYLevel shifting.

A 3.3 V chip and a 5 V chip cannot always share a line safely. What logic levels are, the risk of over-voltage, and the kinds of level shifter to use.

A 3.3 V chip and a 5 V chip cannot always share a signal wire safely, and a level shifter is the part that translates between them. Before you connect two parts, check their logic levels, because driving a 3.3 V input with 5 V can damage it.

Logic levels

A digital line stands for a 1 or a 0 by its voltage. Each input has a threshold above which it reads high (VIH) and below which it reads low (VIL). A 3.3 V part and a 5 V part have different thresholds, so a level that reads clearly high to one can sit in the undefined middle of the other.

The risk, and when you can skip it

The danger runs one way. Feeding a 5 V output into a 3.3 V input can push the pin past its maximum rated voltage and degrade it over time. Going the other way, a 3.3 V output into a 5 V input, is usually safe electrically, though it may not reach the higher part's high threshold. Some pins are 5 V tolerant and need no shifter at all; the datasheet says which ones.

Kinds of shifter

For a slow one-way input, a resistor divider can knock 5 V down to about 3.3 V. For a bidirectional bus like I2C, a single MOSFET per line shifts both directions at once, and for anything fast a dedicated level-translator IC does the job cleanly.

Vout=VinR2R1+R2V_{out} = V_{in} \cdot \frac{R_2}{R_1 + R_2}
Deep dive· Why a divider only works for slow signals

A resistor divider drops the voltage, but the capacitance of the wire and the receiving input forms an RC with those resistors, so the shifted signal rounds off and slows down. At a few kilohertz that is fine; at megahertz the edges smear and the data is lost. That is why a divider suits a slow enable line or a low-baud UART, and a fast bus wants an active translator that drives both edges hard. The same RC idea sizes an anti-alias filter in the reactive-parts guide.

A signal crossing from a 5 V domain to a 3.3 V domain through a level shifter, with both voltage domains labelled.
A line crossing from a 5 V domain to a 3.3 V domain through a level shifter.

On a One Thousand Drones board a 3.3 V microcontroller reads a 5 V-tolerant input directly where the datasheet allows it, and gets a shifter only where a part truly runs at a different level. Checking the levels first is what keeps a pin from slowly failing.

Checkpoint

Quick check

Why can driving a 3.3 V pin with 5 V be a problem?
For a bidirectional I2C bus, a common level shifter is which of these?
When can you skip a level shifter entirely?
0 / 3 correct

One Thousand Drones engineering team · verified 2026-07

Level shifting explained: 3.3 V and 5 V logic levels