Why it wants five volts
The glass needs most of five volts to have any contrast, and I²C lines idle at whatever the display's supply is. Those two facts together are why a 3.3 V board cannot simply be wired to this display.
Nobody drives an I²C line high
I²C lines are open drain. A device can pull a line down to ground, and that is the only thing it can do to it. What brings the line back up is a resistor, and the voltage the line settles at is whatever that resistor is connected to.
On this board the pull-ups go to the board's own VCC. So the idle voltage of SDA and SCK is not something your sketch chooses — it is your supply choice, showing up on two wires that go straight into your microcontroller.
Two walls, and five volts between them
Slide the supply up and you hit the first wall. At 5 V the bus idles at 5 V, and an ESP32 pin is rated to 3.6 V. Current flows into the chip's supply through a protection diode that was never meant to carry it. It usually keeps working, which is exactly why people believe it is fine.
Slide it down and you hit the other one. The expander itself is happy from 2.5 V, so the temptation is to run the whole display at 3.3 V and forget the problem. Two things stop that:
- The glass. A 1602's contrast comes from the voltage across the liquid crystal, and below about 4.4 V there is not enough of it. The screen is faint at best and blank at worst, and the trimmer cannot get it back.
- The expander's own threshold. TI's datasheet specifies an input HIGH as 0.7 × VCC. At 5 V that is 3.5 V, so even a 3.3 V board driving the bus directly is below what the chip is specified to read as a one.
So: 5 V, and a converter on two wires
Run the display at 5 V, where it works, and put a two-channel level converter between it and the 3.3 V board on SDA and SCK. Each side of the converter is powered by its own voltage; the ESP32 sees a bus that idles at 3.3 V, and the display sees one that idles at 5 V.
Use a MOSFET-type converter or a TXS0108, not a TXB0108. I²C depends on pull-up resistors, and the TXB fights them — TI's own datasheet names I²C as an application not to use it for. Which board for which job is that argument in full.
Wiring it to an ESP32 is the build.
When it does not work
It probably has. A 5 V line into a 3.3 V pin conducts through a protection diode into the chip's supply, and the chip survives that for a long time before it does not. The failure, when it comes, is an input that stops reading correctly on a board that otherwise looks fine — and by then the display has been moved on and nobody connects the two.
It fixes the bus and breaks the screen. At 3.3 V the glass has no usable contrast left however far you turn the trimmer, and the expander also wants 0.7 × VCC on an input to call it HIGH — on a 5 V display that is 3.5 V, which a 3.3 V board cannot deliver either. The supply is the wrong knob.
Not usefully. The board already has its own pull-ups to its VCC, so adding weaker ones to 3.3 V does not lower the idle voltage — and even with the board's removed, the expander running at 5 V needs 3.5 V to read a HIGH. Both directions are out of specification at once.
No. An Uno, a Nano or a Mega runs its I/O at 5 V, the display idles the bus at 5 V, and the expander gets the 3.5 V it wants for a HIGH with room to spare. This is the combination that needs no extra parts at all.
The two-channel converter, the six wires, and the one line of setup() that decides whether any of it works.
Wiring it to an ESP32 →Edit this page — content/books/lcd1602/why-five-volts.mdx
Questions about this product
See what other owners have asked, and read their solutions.
3-Pack 1602 LCD Display Module, I2C 16x2 Blue
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.