Introduction: Hookup an LCD to an Arduino in 6 Seconds With 3, Not 6 Pins

Adding an LCD display to Arduino projects can add real value but the cost of doing so can be significant. Not a financial cost - you can pick up 16 (characters) x 2 (rows) LCD for as little as £3.50. The cost is the pin count it can take to drive them. Using the built-in LiquidCrystal Display library it can take as many as 6 pins! That does not leave much for your sensors, motors and other components.

There are many projects that discuss using alternatives - such as a much more expensive Serial LCD (£10 up). Other projects discuss using two-wire interfaces, increasing the complexity of your code. The simplest way to drive the HD44780 style LCDs, in my opinion, is to use a 74HC595 shift register, taking the pin count down to 3.

In any case, connecting an LCD either using the 595 Shift Register or the more traditional way takes a lot of wiring which is not only a super mess (unless you use a ribbon cable I guess), it takes time.

This shield is simplifies this process - all that is required is power and three wires back to the Arduino - ie. connect the LCD in under 6 seconds!

Step 1: Required Components

This is an extremely easy board to make and should take you no more than 15 minutes to solder up and have running.

Component List
    1 x 74HC595 Shift Register
    1 x BC547 NPN (or MOFSET or similar NPN)
    1 x 10k Trimmer Potentiometer
    6 x Male headers (I used right angle connectors)
    16 x Female headers
    Strip/Vero-board 17 strips x 13 holes (I used 15 for cable support)
    Hookup wire
    Your soldering kit

Step 2: Stripboard Preparation

!! Remember, you are cutting the other side of the breadboard so you need to cut the INVERSE of these graphics. A simple way to get this right is to download the image, flip it horizontally then use it as your cutting guide. !!

There are 18 cuts in total you need to make on your stripboard.

To cut the tracks of these boards you can use a "track cutter" which is available from most electronic component retails, use a drill bit or knife to cut across them or bring out your trusty Dremel and use one of the myriad of tools they have for doing this.

The board size needs to be, at minimum, 17 strips x 13 holes. That said, I used 15 holes to give my cables some extra support.

Double check all track cuts for bridges!

Step 3: Soldering Components

Now comes the fun part of soldering all the components. The attached images will help you place each of the wires and components easily. These are "top-view" images, i.e. your board should look exactly the same from above.

    Start by soldering the wires first.
    Then the 74HC595 Shift Register, Potentiometer then the NPN.
    Lastly, solder in the headers.

The NPN collector pin has been bent backwards slightly and is placed behind the base pin. This is easily seen in the second image.

Double check all track cuts again and your soldering for bridges!

Step 4: Connections

Overview the entire board (again) for any bridges to ensure there are no short circuits.

Now it is time to connect this up and test it.

    Connect the power (5v and ground).
    Connect the wires to the shift register, if you use the library as default you will connect Green to Arduino Pin 7, Blue to Arduino Pin 8, Yellow to Arduino Pin 9.

The pin between Green and Blue is not used. It is placed there to enable 4-pin connectors if that is the cabling you have and to make soldering much easier (trying to solder 1 pin then 2 pins is painful).

Next attach the LCD so it covers the board - this will ensure you are connecting it the correct way.

Contrast is adjusted using the Potentiometer.

Step 5: Software

The method of using a shift register to drive these displays with only 3 pins seems to have originally documented by Stephen Hobley. He did a great job of adjusting the built-in LiquidCrystal Library so it works brilliantly with the 595 Shift Register. I have now updated this library to be compatible with Arduino 1.x and adjusted some of the Shift Register pin assignments to be easier to prototype with. You need to download the latest code. It is feature complete and should be a drop-in replacement for any project you already have.

Here is the test Arduino sketch to show you how to use the new library, replacing the LiquidCrystal 6-pin with a great 3-pin version.

--------------------COPY BELOW HERE--------------------
* 3-pin Arduino interface for HD44780 LCDs via 74HC595 Shift Register
*     by Rowan Simms
*     License: Creative Commons - Attribution.
*     Full Documentation and Description:
* This sketch allows Arduinos to use a shift register to control an LCD, allowing
* a reduction in pins it requires from 6 to 3 while still retaining full control
* including backlight on/off.
* This requires the use of the LiquidCrystal595 library
* available at:

#include <LiquidCrystal595.h>    // include the library
LiquidCrystal595 lcd(7,8,9);     // datapin, latchpin, clockpin

void setup() {
    lcd.begin(16,2);             // 16 characters, 2 rows

    lcd.print("Wow. 3 pins!");

void loop() {
    // not used.
--------------------COPY ABOVE HERE--------------------

Copy this in to a new Sketch after installing the library and upload to your Arduino.

You should now be basking in the glorious glow of your LCD.

Step 6: Conclusion

This shield really does allow you to use just 3 pins of your Arduino to drive an LCD display - and it takes less than 6 seconds to connect it up.

Don't want to commit to a shield just yet? Wish to do this with only 3 components and breadboard?
I understand that you may not wish to make a shield before trying this method out - that is completely understandable. For you, I have this documented for breadboards too. Sure, you will have to deal with more hookup wire, but it gives you a great way of at least trying this 3-pin method without any soldering. That layout, more code and wiring explanations are available from

That's it. Enjoy your sub-6-second hookups!


matt.e.jenkins made it!(author)2012-11-09

I have this running great from an ATtiny85. It also has a TMP36 temp sensor to desplay the current temperature. LCD uses pins 0, 1, 2 and TMP36 uses pin 3.

matt.e.jenkins made it!(author)2012-11-19

Here is my version. Thanks, it was a fun project.

airton24x7 made it!(author)2014-08-31

Hi, please where did you buy this stripboard? It was online? I just found another version with independent holes, different of yours... Sorry my English, thanks!

sahanl2 made it!(author)2016-04-04

hi. You can get the connected holes from electronic store. They sell copper board with independent holes and copper strip board

bitterOz made it!(author)2012-11-20

That is fantastic Matt. Really nice work.

Being in London, I feel those cold mornings too.

Thank-you for sharing.

matt.e.jenkins made it!(author)2012-11-20

Hey thanks bitterOz. I gave your instructables page props in the description of the above video and in the prototype video
Thanks again, It was a fun project.

holidayv made it!(author)2013-05-20

I'm wanting to build your project Matt. Any chance you could post the modified code for the attiny85?

matt.e.jenkins made it!(author)2013-05-21

Hi. Here's a link I made for you.
It should contain the code.
The temp sensor I use is a TMP36 from
I hope this helps.

holidayv made it!(author)2013-05-21

Thanks! You should really do an instructable on this, or at the least, draw up a schematic for us noobs and post it in the description of your video.

jimpeachey made it!(author)2014-04-11

I finished it! This uses and ATTiny85 replacing the take offs for pins 7, 8,and 9 from the Arduino. I also used pins 3 and 4 from the ATTiny to run two flashing LEDs just to see how it work. This is running off a 4.5v battery pack using AAA batteries. I'm glad i got this done,it's a nice unit!

bitterOz made it!(author)2014-06-06

Brilliant stuff Jim. Looks great.

sahanl2 made it!(author)2016-04-04


I think it would be really helpful if you flipped the trace image and reuploaded.


AnthonyR3 made it!(author)2015-10-07

Hey, how did you get your display multiple lines like that? I'm a noob and I need help haha

jimpeachey made it!(author)2015-10-07

Its a 4 line display. im not sure what you mean by the question?

jan.wouter.5 made it!(author)2015-04-17

I thought this would be easy, but of cause it never is. But that was completely due to my sloppy reading.

So I managed in the end to get it working like it should and I certainly will build more of the shields to display readings from my Arduino. This certainly enhances the possibilities like thermometer, thermostats, clocks, etc etc.

I really like it, so thanks a lot for sharing,

RyanM394 made it!(author)2017-04-10

Would it be possible to connect multiple screens with multiple shift registers to the same 3 pins the same way you can daisy chain the shift registers for other purposes (like 7 segment LED's or input buttons)?

hemanthk13 made it!(author)2016-09-27

Finally made it, Had to swap the emitter and collector of the BC547 NPN transistor to make the back light work , Also had to use following to turn on back ight.


hemanthk13 made it!(author)2016-09-26

@bitteroz Had to swap the emitter and collector of the BC547 NPN transistor to make the back light work. Mistake in circuit drawings? Or is my LCD different ? I have a green one.

hemanthk13 made it!(author)2016-09-26

Also had to use following to turn on backlight.

zammykoo made it!(author)2016-09-09

Thanks bitterOz for the guide! I added a couple of jumper wires to consolidate into a single ribbon cable port, and omitted the transistor.

ricecakeburner made it!(author)2016-07-10

Works really well, i used a jumper instead of a transistor.

Fezder made it!(author)2016-06-27

Got it working, sorry to say but schematic pinout and what is said in code won't match; schematic is correct(pins go reverse between each). Still, thanks for sharing!

Could you update code so schematic reflects code? Also, mention how OE and MR are hooked in code. :)

camiloc17 made it!(author)2016-06-24

I have this running great from an ATtiny85. It also has a TMP36 temp sensor to desplay the current temperature. LCD uses pins 0, 1, 2 and TMP36 uses pin 3

camiloc17 made it!(author)2016-06-24

I have this running great from an ATtiny85. It also has a TMP36 temp sensor to desplay the current temperature. LCD uses pins 0, 1, 2 and TMP36 uses pin 3

LarsS12 made it!(author)2016-06-04

Is shorting Q6 to ground via the transistor really advisable?

koz12 made it!(author)2015-06-12

How crucial is transistor Q1 where the 595 pin 6 connected to the base of Q1 feeding the LED- (16) of the LCD? from what i can tell it only controls the backlight of LCD passing GND. could pin 6 be left disconnected?

sahanl2 made it!(author)2016-04-04

yes it may be bypassed

electric1981 made it!(author)2015-07-02

Hello I am having a very hard time getting all this to work with the shift register

i have the 74hc595 and an HD44780 but I cant get the library to work with my

arduino version 1.6.4 i keep getting error messages it says library not found ?

and i know it is installed

sahanl2 made it!(author)2016-04-04

extract it in the arduino folder in my documents

bitterOz made it!(author)2015-09-08

you could try and remove the existing LiquidCrystal library, quit the IDE and restart it.

Let me know if that works for you.

asimbhuta made it!(author)2015-03-27

Okay so I've tried to build this on a breadboard and I have deleted the original liquidcrystal library, but I still get black boxes on the first line of the lcd. I cannot get it to print anything... Any ideas?

sahanl2 made it!(author)2016-04-04

Make sure shift reg is connected to gnd even though the schematic says otherwise.

Bakty1975 made it!(author)2015-03-30

Hello! The project presented here is not working as is presented here,
if you will follow this instructable. I had the same problem like you,
and it seems that "copy-paste" method on ALL pages that describe this
metod, have the same issues. The problem can be solved if you put data
pin (wich goes to the arduino) on shift register pin 14 and LCD no. 6
pin on pin 15 of shift register. The rest is the same. Also, you can
remove the transistor from the circuit and put pin 16 of LCD to ground
(GND) and pin 15 of the LCD to + Vcc (trough a resistor about 1K if you
wish to reduce luminosity).

rramesh68 made it!(author)2015-10-24

Finally resorted to removing the transistor as you suggested and works fine. Still have not been able to figure out why the Arduino LED of digital pin 13 stays lit though.

ih55t made it!(author)2015-12-28

I was confused about why the LED for pin 13 stays lit too. As it turns out, the LED is not driven directly by the pin - there is a buffer / driver that monitors the voltage on the pin. Pin 13 is configured as an input if not used, and so the voltage on the pin floats high enough for the buffer to turn on the LED. Connect a 1k (or whatever you have) resistor from ground to pin 13, and the LED goes out.

rramesh68 made it!(author)2016-01-03

That does make sense. Should try that.

Thank you

electric1981 made it!(author)2015-07-02

i can not get the librarys to work on my arduino at all dont know why

sahanl2 made it!(author)2016-04-04

made this 4 my mums bday. Had trouble with the protoboard so made a pcb. Works like a charm. Programmed to work with Attiny85. Eagle design.

IvanC52 made it!(author)2016-04-03


I made it on a breadboard

IvanC52 made it!(author)2016-04-03


I made it

gushum made it!(author)2016-02-24

Hi, thanks for presenting this practical solution of saving 3 pins in LCD applications. I have followed the instructions and uploaded the program on Arduino Uno could successfully, however I could not observe the words on the LCD. I would appreciate any suggestions would help me to get the result.

gushum made it!(author)2016-02-24


I have wired up the circuit and installed the LiquidCrystal595.h file in the library properly. The program was uploaded with no error, but no letters appear on the display; just the empty boxes on the first line. I have checked the connections several times, but no success! I would be pleased if you could suggest me a solution.

hussinain made it!(author)2015-11-16

I made it. But my LCD would not show any text. Is it the potentiometer problem or something else as the the backlight also blinks sometimes. The lcd backlight is always ON but nothing else.

ArifSae made it!(author)2016-02-12

if LCD is plain backlit, try bringing contrast pin to 0 (ground)

if LCD is showing faint boxes (where the numbers are to be displayed) , than its something else a mistake perhaps, check wirring and steps.

ArifSae made it!(author)2016-02-12

Thankyou. worked for me.

lcd with shift register (3).jpg
ArifSae made it!(author)2016-02-12

additionally also controlled backlit via shift register and now it fades in on startup

VagelisS3 made it!(author)2016-01-14

I did it, Thanks

although I had to change a couple of things to get it done, and had to do a LOT of reading to finally make it wok properly, but learned a lot of things in this 6 seconds process :). Still on the breadboard.

Also thanks to Build_it_Bob, followed his advice on his comment and changed the pins of the transistor to the following:

Pin C (collector) of the 2n2222 to +5 volts

Pin E (emitter) to pin 15 of the Display.

Display Pin 16 to ground.

595 Pin 6 (Q6) to 1 k resistor

Resistor to Pin B (Base) of 2n2222

As I found out there are versions of 2n2222 with either EBC or CBE pins. Mine was P2N2222A with EBC Pins

I had to adjust the trimmer as well.

After I finally managed to make it work, i realized that it would write only the first character of any words or sentences printed. I had to edit the LicuiqCrystal595.cpp file, and add "return 1;" after the "send(value, HIGH)", like bellow

inline size_t LiquidCrystal595::write(uint8_t value) {

send(value, HIGH);

return 1;


The lcd.setLED2Pin(HIGH); (or LOW) worked very nice as well

Thank you!

mrunmay made it!(author)2016-01-20

i need ur help,

mrunmay made it!(author)2016-01-04

i dont know,whats happened to mine,allconnections are correct,but my lcd is showing only one charecter,

rramesh68 made it!(author)2015-10-25

Made it without the NPN transistor

LCD 3 wire connection shield.jpg