Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Controlled I2C LCD Display

Image of ESP32-Controlled I2C LCD Display

Circuit Documentation

Summary of the Circuit

This circuit integrates an ESP32 microcontroller with a 16x2 I2C LCD screen. The ESP32 is responsible for controlling the display on the LCD, which shows messages in a loop with specified delays. The communication between the ESP32 and the LCD is established via the I2C protocol, utilizing the SCL and SDA lines for clock and data respectively.

Component List

ESP32 (30 pin)

  • Description: A microcontroller with Wi-Fi & Bluetooth capabilities and a wide range of GPIO pins.
  • Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
  • Purpose: Acts as the main controller for interfacing with the I2C LCD screen and executing the embedded code to display messages.

I2C LCD 16x2 Screen

  • Description: A liquid crystal display capable of showing 16 characters per line across 2 lines.
  • Pins: SCL, SDA, VCC (5V), GND, VDD, VO, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, BLA, BLK
  • Purpose: Displays the output messages controlled by the ESP32.

Wiring Details

ESP32 (30 pin)

  • GND: Connected to the GND pin of the I2C LCD screen.
  • Vin: Connected to the VCC (5V) pin of the I2C LCD screen.
  • D22: Connected to the SCL pin of the I2C LCD screen.
  • D21: Connected to the SDA pin of the I2C LCD screen.

I2C LCD 16x2 Screen

  • GND: Connected to the GND pin of the ESP32.
  • VCC (5V): Connected to the Vin pin of the ESP32.
  • SCL: Connected to the D22 pin of the ESP32.
  • SDA: Connected to the D21 pin of the ESP32.

Documented Code

/*
 * This Arduino Sketch interfaces an ESP32 with an I2C LCD 16x2 screen.
 * The ESP32 displays two messages on the LCD screen in a loop with delays.
 * Connections:
 * - ESP32 GND to LCD GND
 * - ESP32 Vin to LCD VCC (5V)
 * - ESP32 D22 to LCD SCL
 * - ESP32 D21 to LCD SDA
 */

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  Serial.begin(115200);
  lcd.init();
  lcd.backlight();
  lcd.print("Welcome");
  delay(2000);
  lcd.init();
  lcd.backlight();
  lcd.print("WOMEN SEC/AUTOBOT");
  delay(2000);
}

void loop() {
  delay(1000);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("READ CAMERA/AUTOBOT");
  delay(2000);
}

File Name: sketch.ino

Description: The code initializes the I2C LCD screen and prints a welcome message followed by "WOMEN SEC/AUTOBOT". In the loop, it periodically clears the screen and prints "READ CAMERA/AUTOBOT". The serial communication is started at a baud rate of 115200 for debugging purposes.