Saturday, June 2, 2012

Building an Arduino LCD Interface, Part I

Its been long overdue that I build something using the Arduino Rev 3 on the Breadboard Mk I.  That project was built about two months ago, and has been sitting idle ever since (time flies when you have little free time)...  The first order of business is to get some kind of human legible output; bring in the LCD panel.

Thanks to that amazing series of tubes, there is no shortage of tutorials already written on this topic online.  I settled on the step-by-step instructions found at LadyAda.net, tutorial for connecting a parallel LCD Panel.  That tutorial was so comprehensive that it took only 20 minutes to get the panel up and running (including cutting wires, unpacking the parts, etc.).  For the cliff notes edition, I drew up the following wiring diagram to summarize the connections:


The parts for this project were purchased on Mouser.com:
[763-NHD0420E2ZNSWBBW]  Newhaven Display 4x20 LCD Panel (blue/white)
[652-3386F-1-103TLF]  10k trimmer resistor.

Once the parts were connected, I started with the "LiquidCrystal Library - Hello World" sketch, and modified it to reflect the LCD panel and pins I used.

The LCD initialization was changed to the following:
LiquidCrystal lcd(6,7,8,9,10,11);

The setup() method was changed to the following:
lcd.begin(20, 4);
lcd.print("sparetimenotebook");

After compiling and downloading the sketch, below is the photo of the final device configuration:


Everything is working great; However, I really can't stand the wires going all over the place (I'm funny like that).  The next steps for this project will be to create a schematic in Eagle, followed by manufacturing a small PCB to mount onto the LCD.  This will give the wire traces and trimmer resistor a permenant home, and using some PINHD connectors, will allow easy connect/disconnect for the LCD panel on the prototyping board.

More to come later...

No comments:

Post a Comment