Fix Corrupted 16x2 LCD Display Problem for Arduino Project

Project Description

16x2 LCD character display, which initially worked well in an Arduino project, started to display corrupted characters randomly. We need to identify the root cause of this problem and fix it.

Normal output - a couple of strings and a number

Normal output - a couple of strings and a number



Corrupted random characters on LCD display

Corrupted random characters on LCD display



Completion Notes

This project is a minor modification of the Hello World project for 16x2 LCD displays utilizing the LiquidCrystal library. Here is its entire code:

// 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("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print("good bye! ");
  lcd.print(millis()/1000);
}

Initially, the display works fine. After a while, though, it may start displaying random characters. On the picture above, the second line consists almost entirely of random characters.

LCD Hardware

We have tested the project with two types of 16x2 LCD displays. One purchased at Sparkfun, another on eBay from China. The problem was observed with both pieces of hardware, with slightly different manifestations.

LCD 16x2 hardware - front

LCD 16x2 hardware - front



LCD 16x2 hardware - back

LCD 16x2 hardware - back



Root Cause

The root cause of the issue turned out to be loose contacts between the LCD module and breadboard pins.

Solution - Header Pin Resoldering

Both displays were fixed by resoldering all 16 pins properly by making sure enough solder is put into the holes to fill them entirely.

Comments

jscampbe: had same problem, the compression connector between LED display and circuit board is sensitive to pressure variation, bending metal retaining tabs change pressure along connector. Also noted that my display needed at least 5.4V to fully light up the display pixels.


You can leave a comment on this project, or post a new project for consideration.