loading
Welcome to my FIRST instructable,

i will show you how to connect a 16x2 lcd display to an arduino,

follow these simple step by step instructions and you will have it done in no time :)

Step 1: Gather All the Items You Need :)

You Need The Following Items :

Arduino
LCD Display 16x2
Jumper Wires
Breadboard
Stripboard
Header Pins
Electrical Tape ( White If Possible )

Tools Needed :

Soldering Iron
Wire Strippers
Pliers
Soldering Iron
Flux ( Liquid Or Solid )
Soldering Iron Cleaner
Tape Dispenser ( Makes Life So Much Easier )
Small Side Cutters
Permanent Marker Pen

Step 2: Solder Header Pins to LCD Display

We need to solder the header pins to the LCD display,

the header pins i have are 2.0mm and you need the 2.5mm pins to fit the LCD display,

so mine didn't fit because the were to close together, so i decided to cut my header pins into groups of 2,

after i cut them into groups of 2, i could put 1 group of 2 in 2 pins, 

when you insert them, turn the display over and apply a small amount of solder to each terminal,

ensuring that all the terminals are soldered,

they should all be the same length, not bent, loose or too short.

Step 3: Measure and Cut Stripboard for Display

We now need to solder the display to strip board and attach wires to it,

first get the display and the strip board,

insert the display into the end of the strip board, ( Look at image )

When inserted, you then need to decide where you are going to put wires and mark the strip board at that length, ( look at image )

When you have decided where you are going to cut the strip board, you have 3 ways of cutting it,

1 Way :

you can clap the strip board using a vice and cut down the line with a junior hacksaw

2 Way :

you can use small side cutters to snip along the line ( HOWEVER, IT WILL DAMAGE TE BOARD TO THE RIGHT OF THE LINE, E.G IT WILL SHATTER THE OTHER SIDE IN LITTLE PIECES, BUT THE BOARD TO THE LEFT OF THE LINE WILL BE OK )

3 Way :

( THIS IS THE WAY I ALWAYS USE AND I GET A GOOD CUT EVERY TIME ! )

Get a Paper Cutter and insert the board to where the line is,

you then slide the cutting wheel up and down over the board about 8 times,

you will then have a small cut on the line you drawn,

all you have to now do is remove it from the paper cutter and with your pliers, line them up with the line and snap the board whilst applying pressure with pliers,

Step 4: Solder Wires to Strip Board -- May Take a While :( --

Make sure you don't have anything planned for a few years as this takes a while ( lol, maybe not that long :/ )

first cut your wire, i done mine 1.2m each length, 

I needed 16x wire

so overall i needed 19.2m of wire, i have enough as i just brought 18x 100m rolls of eBay ahaha

cut your wire and strip both ends of every piece,

on one end you need to cut off a 3cm piece of electrical tape and put it on the 1 end of the wire then fold over to sick it together,

you then need to label it, e.g first pin is VSS so on the tape you write VSS,

do this step for ALL wires, so all 16 cables are labeled at the one end,

now on the opp end of the cable, you need to insert it into the strip board, then bend the copper so it is flat on the underside of the board,

you then solder all of them MAKING SURE NONE OF THEM TOUCH AT ALL !

look at pictures if you don't understand :),

then when ALL wires are soldered IN ORDER on the strip board, you need to plug it onto the LCD display ensuring that the pins match up with how you have soldered it, then solder it to the display,

look at pictures for more understanding :) 

Step 5: Solder Stripboard to LCD Display

Now just solder the stripboard to the lcd display,

look at picture for example :)

Step 6: CABLE ORGANISATION :)

Now you can organize your cables by using cable ties to keep them all together in one place,

just use 10cm cable ties and place them every 4cm apart, this will give you a tough cable that wont get tangled in anything,

look at pictures for example :) 

Step 7: PLUG in to Breadboard ( the Annoying - Not So Fun Part )

Now we need to connect the lcd display to the arduino, i chose to use a breadboard to do this but if you want to, you can connect straight to arduino, ill explain why i chose the breadboard method in the lat step :)

Make the following connections 

with Pin 1 being VSS on display : 

Pin 1 to Arduino GND
Pin 2 to Arduino 5V
Pin 3 to wiper ( this is the middle pin of the 10k potentiometer )
Pin 4 to Arduino pin 12
Pin 5 to Arduino GND
Pin 6 to Arduino pin 11
Pin 11 to Arduino pin 5
Pin 12 to Arduino  pin 4
Pin 13 to Arduino pin 3
Pin 14 to Arduino pin 2

Because we will only be writing, pin 5 will be dropped to ground to show that there will be no reading.  For those who wish to use the backlight, connect LCD pin 16 to GND and LCD pin 15 to +4.2V.

Connect one side of the potentiometer to Arduino GND, the opposite to Arduino 5v, and the center to LCD pin 3.  Now you're in business.

:)

Step 8: ARDUINO CODE :) THE EASY PART !!

Now goto the arduino ide and create a new file,

paste in this code :

/*
  LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD
and shows the time.

  The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print(" **Text for line 1 of LCD**");
  lcd.setCursor(0, 1);
  lcd.print(" **Text for line 2 of LCD**");
}

void loop() {
 
}


TO CHANGE the text of the display, find the following values :

lcd.print(" **Text for line 1 of LCD**");

lcd.print(" **Text for line 2 of LCD**");

And then change the part that says :

**Text for line 1 of LCD**

**Text for line 2 of LCD**


UPLOAD the code to the arduino and it will work,


thanks for reading, :)

Step 9: MY ADDED EXTRAS :)

THE reason that i used the breadboard was becuase i want to add multiple displays to display the same writing,

one for inside the room and one for outside the room,

so i used the breadboard to bring cables from the arduino the the board,

then i connected the wires from the 1st lcd display

and you will notice that a breadboard has 5 holes in a collum, so that allows me to connect 4 lcd displays,

if you want more than 4 for some reason then just do some jumpers from the 5th holes to another part of the breadboard

and connect your other displays :), 

look at the pictures for an example,

*** NOTE : I ALSO MOUNTED IT IN A PROJECT BOX WITH CABLE TIES AND I CUT THE HOLE WITH A KNIFE,

IT IS AN EXTREEMLY BAD ATTEMPT BUT IT IS A PROTOTYPE NOT THE FINAL PRODUCT,

THAT WAS JUST TO SEE WHAT IT WOULD LOOK LIKE ***


and thanks for reading, hope this helped :)
<p>Hiya ShaneColey</p><p>Super good tutorial mate, really well instructabled :)</p><p>1 question, and I know it is of no relevance but.....</p><p>In Part 7 the first photo shows the LCD connected by 16 green wires wrapped in red tape to a piece of strip board, which has another set of 16 wires coming from it wrapped in black cable ties. Is there any reason why you did this? (it isn't in your instructions). Did you need to extend the cables or what?</p><p>Cheers</p><p>MicRok</p>
i needed to extend the cables and didnt have any heatshrink at the time aha, sorry for the confusion
<p>How can I use this with an ultrasonic sensor?</p>
<p>THANKS ...nice tutoial </p>
<p>THANKS ...nice tutoial </p>
<p>i loved it.....thank u brother....</p>
<p>Hey, I connected the wires as required and also uploaded the code, but only the LCD gets powered on. There is no message on the screen. Unable to figure out the problem. Help!</p>
<p>same hear . . :( need help</p>
<p>i want to made it</p>
<p>Very tidy. What is the exact wire you stripped and used?</p>
<p>hello sir, i have done everything according to your given setup but lcd 's last 8 digits of both rows are not working</p>
<p>HafizA3, hi there, sorry to hear you are having problems, have you copy and pasted the code exactly? if so can you also check your soldering connections as if there is a loose connection on one of the LCD pins then it could affect it, only thing i can reccomend is to upload the blink sketch to your arduino and then upload the code again to see if that sorts it? it may of gone wrong whilst uploading the first time, thanks</p>
<p>This is a very CLEAN write-up! I am ordering LCDs to be used in a shed project of mine and I think your perfboard use is the cleanest I have seen yet!</p>
<p>Great instructable, What is I wanted to display different information on lcd, would can this be accomplished using your model? with slight modification of code and pins?</p>
TO CHANGE the text of the display, find the following values :<br><br>lcd.print(&quot; **Text for line 1 of LCD**&quot;);<br><br>lcd.print(&quot; **Text for line 2 of LCD**&quot;);<br><br>And then change the part that says :<br><br>**Text for line 1 of LCD**<br><br>**Text for line 2 of LCD**
<p>Ok thanks, I figured that part. In your &quot;added Extras&quot; you have 2 LCD's what if I wanted to add different txt to each LCD? would it be be a simple matter of duplicating the code and renaming LCD. to lcd2 and changing the pin?</p>
<p>good job ! <br>thanks</p>

About This Instructable

343,400views

58favorites

License:

More by shanecoley:Connect A 16x2 LCD Display To An Arduino 
Add instructable to: