Introduction: Interfacing 20x4 LCD to Arduino Using Only 3 Pins

About: iam a B.E Electronics and Communication Engineer. I have great interest on electronics.

You can Interface 20x4 LCD to Arduino using only 3 pins.Normally we need six pins to interface LCD to Arduino.

Using IC 74HC595N the LCD can be interfaced to Arduino using 3 pins. IC 74HC595N is a shift register which receive the data serially and out the received data parallel.You can also adjust the two potentiometer to vary the LCD Brightness and Contrast

Step 1: Components Required

  • Arduino
  • 20 x 4 LCD
  • IC 74HC595N
  • Female Header Pin
  • Male Header Pin
  • 1x3 pin screw terminal
  • 1K Pot
  • 10K Pot
  • General Purpose PCB

Step 2: Schematic Diagram 1

This Schematic is for powering the 20 x 4 LCD through Arduino.

1K pot is used to adjust LCD brightness

10K pot is used to adjust LCD Contrast.

Step 3: Schematic Diagram 2

This Schematic is for powering the LCD through External Power Supply.

Step 4: Assembling the Schematic on a PCB

I had soldered the Schematic Diagram 1 on a general purpose pcb.

Connect the female header pin of 20x4 LCD to male header pin in the PCB.

Make a hole on the bottom left corner of the PCB to mount the 20x4 LCD with Screw and Bush.

You can also connect 16 x 2 LCD .For connecting 16 x 2 LCD you need to solder the 16 x 2 LCD with male header pin and plug into the Female header pin given in the PCB.

Step 5: Updating Libraries

To interface 20 x 4 LCD using 3 pins you need to Update the ARDUINO LiquidCrystal libraries.Which is located at the following location

Local Disk(C)-->Program Files-->Arduino-->libraries-->LiquidCrystal.

Open the LiquidCrystal folder and there are some files inside that folder.Cut and paste these files Some where on your pc. Because you need to use these files when you interface LCD using 6 pins.

Now Download and Extract the following libraries.Which is an updated Liquid Crystal libraries to use LCD with 3 pins.Copy the extracted files and paste it in the following Location

Local Disk(C)-->Program Files-->Arduino-->libraries-->LiquidCrystal.

Note: open the folder of Liquid Crystal and paste it. Now you have updated your Arduino Liquid Crystal libraries

Step 6: Operation of IC74HC595N

IC 74HC595N shift Register accepts serial input data and converts into parallel output.This shift Register contains 3 input pins and 8 output pins.By updating LiquidCrystal libraries the arduino generates serial data in single pin and give it to input data pin of IC74HC595N and the shift Register converts these serial data into parallel output and these parallel data is given to LCD.

IC 74HC595N contains 3 input pins

  • Data pin: Data is sent in serial mode.
  • Clock Pin: A clock runs on this pin
  • Latch Pin: This pin is used to toggle so that shift register shows 8 bit data on output.

Step 7: Program Code

#include <Wire.h>

#include <LiquidCrystal_SR.h>

// Defining LCD and Pins for interfacing.

// Pin 6 - Data Enable/ SER, Pin 5 - Clock/SCL, Pin 9 -SCK

LiquidCrystal_SR lcd(6, 5, 9);

void setup(){

lcd.begin(20,4); // Initializing LCD
lcd.home (); // Setting Cursor at Home i.e. 0,0


void loop()


lcd.print("3 Pin LCD"); // Print Something on LCD

delay(2000); // Waiting for a while
lcd.clear(); // Clearing LCD





Step 8: Download Program Code

Download and open it in Arduino IDE

Step 9: Video

Make it Glow Contest 2016

Participated in the
Make it Glow Contest 2016

Green Electronics Contest 2016

Participated in the
Green Electronics Contest 2016