Arduino Backlit LCD shield

In this tutorial learn how to make your own backlit-LCD Arduino shield.

Let’s see how simple it is to make your own Arduino LCD shield. Sure – you can just buy one, but where’s the fun in that?

Getting Started

Arduino Backlit LCD shield

Our LCD is a two line, sixteen character backlit LCD. It has a typical HD44780-compatible interface, which makes it very easy to use with Arduino. The other parts required are laid out along with the LCD:

We have the LCD, a Freetronics Protoshield Basic, a button, a 0.1 uF capacitor and some header pins. We also need some solid core, thin wire to make jumpers.

Next is the plan – our schematic. Even for the smaller projects, this is a wise step. You can iron out the bugs before soldering. From experience with these backlit LCDs, there are two ways to wire them up. Either with a trimpot so you can adjust the display contrast, or without. With my example screen, the display was only clear with the trimpot turned all the way to one side, however your screen may vary.

Please note that the voltage for LCD backlights can vary, some are 5V, some are 3.3V. Check your data sheet and plan accordingly!

Consider the following schematics:

If you are making this circuit without the protoshield, the 0.1 uF capacitor is for decoupling, so place it between 5V and GND. It would be wise to test your LCD using the setup on pin 3 as shown in the second schematic. Then you will have a good idea about the display brightness and contrast. This was done with the usual breadboard setup, but not before soldering the pins into the LCD:

which allowed the LCD to slot into the breadboard nicely:

The brightness shown in the image above is satisfactory, so I measured the resistance between each of the outside pins of the trimpot and the center. The resulting resistance between the center and ground was around 15 ohms, so basically nothing. So for this LCD, there will not be any adjustments – and the full schematic above will be used (with LCD pin 3 going straight to GND).

Arduino Backlit LCD shield Schematic

The sketch to drive this LCD is quite simple, for example this will do:

/*
LCD shield test
October 2010 tronixstuff.com/projects – CC by-sa v3.0
liquidCrystal library originally added 18 Apr 2008 by David A. Mellis library modified 5 Jul 2009 by Limor Fried (http://www.ladyada.net)
*/
#include <LiquidCrystal.h> // we need this library for the LCD commands
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(4,5,6,7,8,9); // this line will stay the same for this shield
void setup()
{
lcd.begin(16, 2);             // need to specify how many columns and rows are in the LCD unit
lcd.clear();
}
void loop()
{
lcd.println(“tronixstuff.com “);
lcd.setCursor(0,1);
lcd.println(“/projects       “);
delay(60000);
lcd.clear();
}

For more information about using LCD modules with your Arduino, please refer to my series of Arduino tutorials.

For more detail: Arduino Backlit LCD shield

 


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top