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

Picture of Interfacing 20x4 LCD to Arduino Using Only 3 Pins

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

Picture of 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

Picture of 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

Picture of Schematic Diagram 2

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

Step 4: Assembling the Schematic on a PCB

Picture of 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

Picture of 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


Kunal Gehlot (author)2017-08-15

I'm having a problem of IDE showing error of not finding Wire.h, which I'm unable to fix

You need to install old IDE version of arduino software.That is 1.0.6.Don't go to latest version of IDE.The wire.h command is available only in older versions like 1.0.6.Install the older version and try uploading the code.You will get that right.

Thank you for your assistance!

Kunal Gehlot (author)2017-08-15

Can you upload the schematic in higher resolution?

Rajkumar2506 made it! (author)Kunal Gehlot2017-08-15

I can't upload it in high resolution.Because i would take time for me to redraw it in high resolution.I have attached you the schematic.Try that schematic and instead of 16 x 2 LCD in that schematic use 20 x 4 LCD

About This Instructable




Bio: iam a B.E Electronics and Communication Engineer. I have great interest on electronics.I love my college life.Even though there are many sadness ... More »
More by Rajkumar2506:Interfacing DS1307 I2C RTC With ArduinoHow To Design Common Emitter Amplifier +5V and -5V Dual Regulated Power Supply
Add instructable to: