Skip to content
LCD

20x4 Character LCD with I2C Backpack

The bigger 20x4 text display — more room for menus, logs, and multi-field status screens.

The LCD2004 is a 20-column, 4-row character LCD, built on the same HD44780-family controller as the smaller LCD1602 and almost always sold with the identical PCF8574 I2C backpack. That means the wiring, the library, and the code are essentially the same as the LCD1602 — the only real difference is passing 20, 4 instead of 16, 2 into the constructor. If a project's status screen or menu has outgrown two lines of 16 characters, this is the natural next step up rather than a different technology to learn.

Like the LCD1602, it only displays fixed-width text characters (plus up to 8 custom 5x8 glyphs), not arbitrary graphics — for pixel-level graphics, look at a display like the SSD1306 OLED instead.

Specifications

Display20 characters × 4 lines, fixed-width text (HD44780-family controller)
BackpackPCF8574 I2C I/O expander (converts the LCD's 6-wire parallel interface to I2C)
Operating voltage5V DC (most common); some 3.3V-tolerant backpacks exist but are less common
I2C address0x27 default on most PCF8574 backpacks, 0x3F on some clones — scan to confirm
InterfaceI2C, up to 100 kHz typical
BacklightLED backlight, on/off controllable over I2C
Custom charactersUp to 8 user-defined 5×8 pixel glyphs

Pinout

PinNameDescription
1GNDGround
2VCCPower, 5V DC
3SDAI2C data line
4SCLI2C clock line

Identical wiring considerations to the LCD1602: the PCF8574 backpack's I2C pull-ups reference VCC, and the panel needs 5V for proper contrast/brightness, so on 3.3V-only boards you're typically feeding VCC from a 5V rail while accepting 5V-level I2C signaling (or adding a level shifter if you want to be strict). If text looks like solid blocks or is invisible, adjust the contrast potentiometer on the back of the backpack first. If the bus doesn't respond at all, run an I2C scanner sketch to confirm whether the address is 0x27 or 0x3F before touching your code.

Variants

Use the LCD2004 when a project genuinely needs more visible text at once — multi-field sensor dashboards, small menus, scrolling logs. If two lines of 16 characters is enough, the LCD1602 is smaller, cheaper, and uses the exact same library and code pattern, just with different constructor dimensions.

VariantTemp rangeHum rangeAccuracyProtocolPrice
LCD2004 I2C~$4–7
LCD1602 I2C~$2–4
LCD2004 (parallel, no backpack)~$3–5

Board Integration

Library

LiquidCrystal I2Cby Frank de Brabander

Arduino IDE → Tools → Manage Libraries → search "LiquidCrystal I2C" by Frank de Brabander → Install

Wiring

Component pinBoard pinNote
VCC5V
GNDGND
SDAA4Uno's hardware I2C data pin.
SCLA5Uno's hardware I2C clock pin.

Code

C++

Notes

  • If the backlight is on but no text appears, adjust the contrast potentiometer on the back of the backpack before assuming it's a code problem.
  • lcd.print() does not auto-wrap between rows or clear a line first — always pad with trailing spaces if a new value might be shorter than the old one.
  • The extra two rows compared to the LCD1602 are genuinely useful for showing a label plus a live value plus a status line simultaneously, without needing to scroll or alternate screens.