Description
I2C Module for 16x2 (1602) Character LCD
The I2C Adapter Module (commonly used with 16x2 or 20x4 LCDs) allows you to control an LCD using only two Arduino pins via the I2C communication protocol, instead of the usual 6 or more.
Technical Specifications:
-
Operating Voltage: 5V (compatible with 5V microcontrollers like Arduino Uno)
-
Communication Interface: I2C (Inter-Integrated Circuit)
-
Backlight Control: Yes (via jumper or programmatically)
-
Adjustable Contrast: Yes (via onboard potentiometer)
-
IC Chip: PCF8574 / PCF8574T (I2C I/O expander)
-
Compatible LCDs: 1602 (16x2), 2004 (20x4) character LCDs with HD44780 controller
-
Size: Small PCB (~5cm x 2cm) mounted on the back of an LCD
- Current Consumption: Typically < 2 mA (not including the LCD's backlight)
Pinouts:
Connection with Arduino:
I2C Module |
Arduino |
Connects to Arduino UNO Function |
GND |
GND |
Ground |
VCC |
5V |
Power supply |
SDA |
SDA |
I2C Data line |
SCL |
SCL |
I2C Clock line |
Sample code:
#include <Wire.h>
void setup() {
Wire.begin();
Serial.begin(9600);
while (!Serial); // Wait for Serial to be ready (especially for Leonardo/Micro)
Serial.println("I2C Scanner Starting...");
}
void loop() {
byte error, address;
int count = 0;
Serial.println("Scanning for I2C devices...");
for (address = 1; address < 127; address++) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.print("I2C device found at address 0x");
if (address < 16)
Serial.print("0");
Serial.print(address, HEX);
Serial.println(" ✓");
count++;
} else if (error == 4) {
Serial.print("Unknown error at address 0x");
if (address < 16)
Serial.print("0");
Serial.println(address, HEX);
}
}
if (count == 0)
Serial.println("No I2C devices found.\n");
else
Serial.println("Scan complete.\n");
delay(3000); // Repeat every 3 seconds
}
Types of components we can connect I2C Module with:
An I2C adapter module (like the one used with an LCD) is just an interface that allows a device to communicate over the I2C protocol. The I2C protocol itself supports multiple devices on one set of two wires (SDA and SCL).
Example Use Case: On an Arduino UNO, you can connect:
- 1x LCD with I2C adapter (e.g., 0x27): LCD Screen
- 1x BMP180 pressure sensor (e.g., 0x77): Barometric pressure sensor
- 1x RTC DS3231 module (e.g., 0x68): Real-time clock (RTC) module
- 1x EEPROM (e.g., 0x50)