ESP32: How to Interface LCD With ESP32 Microcontroller Development Board

About: Aerospace Engineer working in Software Development with a passion for Hardware.

Hello World!

In this Instructables we will be learning how to interface a 16x2 LCD with the ESP32 Microcontroller Board. There are currently no tutorials online on how to interface it, so I decided to share with you my experience and knowledge on how to connect this together!

The LCD display is one of the most versatile electronic component in the maker market so it is wise to learn how to interface it so as to apply his knowledge to many other applications that you will discover as a maker.

Let's get started!

Step 1: BoM

* ESP32 Microcontroller Development Board

* 16x2 LCD

* A Lot of Jumper Wires

* Potentiometer

Step 2: Connections

Follow the table below for a concise and comprehensive guide on how to connect all the pins of the LCD screen to both the potentiometer and the ESP32 micro controller development board

LCD PinPotentiometer Pin ESP32 Pin
1 and 16 1 GND
2 and 1533.3V
32 - Signal pin
422
5
GND
623
7unused
8unused
9unused
10unused
115
1218
1319
1421

Step 3: Code

#include <LiquidCrystal.h>
LiquidCrystal lcd(22,23,5,18,19,21);
void setup()
{
    lcd.begin(16, 2);
    lcd.clear();
    lcd.print("How to Interface");

    // go to row 1 column 0, note that this is indexed at 0
    lcd.setCursor(0,1); 
    lcd.print ("LCD with ESP32");
}
void loop(){}

Step 4: Contrast Control

Turn the knob of the potentiometer to change the contrast of the LCD. When you first upload the program onto the ESP32 board you may find that you're not seeing anything on the display, this is likely because the contrast is not set properly.

Turn the knob until you can see the display clearly.

Share

    Recommendations

    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    3 Discussions

    0
    None
    ManosZ1

    7 months ago

    Hi and thank you for the guide. I got a bit confused with "2-signal" for lcd pin 3. I supposed the it would go to potentiometer and from there to esp32 gnd. Am I missing something? Thank you

    0
    None
    laurentR15

    10 months ago

    Hello,

    Do you use a LCD1604 5v ? I don"t see any comment about the issue 5v/3.3v. ESP32 works with 3.3v but common LCD1604 works with 5v. How do you manage that ??

    Laurent.

    1 reply