[Solved] LCD Module blinks but does not display text

I recently purchased an LCD Module for Arduino Uno here on Amazon.

The LCD screen successfully powers on and blinks based on my code but for some reason, it does not output any text.

Here's my wire configuration:
[LCD] [Arduino]
GND ------- GND
VCC -------- 5V
SDA -------- Analog 4
SCL -------- Analog 5

I ran the I2C scanner sketch and found that my screen's address is 0x3F so I made the necessary changes to the code I found here, as follows:

#define I2C_ADDR 0x3F

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

Here is the code I uploaded to the screen:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x3F

/*-----( Declare Constants )-----*/
/*-----( Declare objects )-----*/
// set the LCD address to 0x27 for a 16 chars 2 line display
// A FEW use address 0x3F
// Set the pins on the I2C chip used for LCD connections:
//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address


void setup()  
{
  Serial.begin(9600);  // Used to type in characters

  lcd.begin(16,2);   // initialize the lcd for 16 chars 2 lines, turn on backlight

  // ------- Quick 3 blinks of backlight  -------------
  for(int i = 0; i< 3; i++)
  {
    lcd.backlight();
    delay(250);
    lcd.noBacklight();
    delay(250);
  }
  lcd.backlight(); // finish with backlight on  

//-------- Write characters on the display ------------------
// NOTE: Cursor Position: (CHAR, LINE) start at 0  
  lcd.setCursor(0,0); //Start at character 4 on line 0
  lcd.print("Hello, world!");
  delay(1000);
  lcd.setCursor(0,1);
  lcd.print("HI!YourDuino.com");
  delay(8000);  

// Wait and then tell user they can start the Serial Monitor and type in characters to
// Display. (Set Serial Monitor option to "No Line Ending")
  lcd.clear();
  lcd.setCursor(0,0); //Start at character 0 on line 0
  lcd.print("Use Serial Mon");
  lcd.setCursor(0,1);
  lcd.print("Type to display");  


}


void loop()   
{
  {
    // when characters arrive over the serial port...
    if (Serial.available()) {
      // wait a bit for the entire message to arrive
      delay(100);
      // clear the screen
      lcd.clear();
      // read all the available characters
      while (Serial.available() > 0) {
        // display each character to the LCD
        lcd.write(Serial.read());
      }
    }
  }

}

Btw, I am using an official Arduino Uno R3 and downloaded the NewliquidCrystal library from here. There are no other conflicting LCD libraries in my libraries folder.

Thoughts?

I recently purchased an LCD Module for Arduino Uno here on Amazon.

Your link shows a picture of a generic display but what would be more helpful is a photograph of your actual I2C adapter which is the smaller board on the back of the display.

Even a casual review of previous posts in this forum will give you all the information you need. Posts similar to yours pop up on almost a daily basis, or at least it seems that often to me.

Of course you did adjust the contrast potentiometer . . . .

Don

Hi

Also make sure that your Arduino's 5V regulator doesn't overheat. With similar lcd screens but green background I've seen that Arduino's regulator doesn't have enough power to feed screen and backlight both so I've used additional power source (TO-220 regulator) for feeding it.. Lack of power does blink backlight when it tries to start.

TommiP

floresta:
Your link shows a picture of a generic display but what would be more helpful is a photograph of your actual I2C adapter which is the smaller board on the back of the display.

Here is a picture of the adapter:

floresta:
Of course you did adjust the contrast potentiometer . . . .

Ah...I followed this video tutorial, with no such mention of any other components or configurations other than the basic wiring and library download.

I'm not going to waste my bandwidth to get the answer by looking at a video. Did you adjust the potentiometer?

Don

floresta:
I'm not going to waste my bandwidth to get the answer by looking at a video. Did you adjust the potentiometer?

Don

In the video the LCD module (same as my own) is being plugged directly to the Arduino without a potentiometer. I wasn't aware that I needed one, but I'll gladly try that out and post here if I'm successful.

My apologies, thanks for the heads up!

VerFloe:
In the video the LCD module (same as my own) is being plugged directly to the Arduino without a potentiometer.

Your backpack is not the same one being used in the video.
However, your i2c backpack, just like the red one in the video, has a potentiometer on it.
It may need adjustment in order to see the pixels.

Can you post a photo of the other side? So we can see the solder connections to the LCD module?

The constructor you have used looks to be ok for that backpack for that library, however, many backpacks look similar and not all backpacks have their PCF8574 pins wired to the LCD and the backlight circuit the same way so without being able to look at closer, it is impossible to say for sure if the pin mapping you have entered is correct.

I'd recommend using my hd44780 library package.
It supports that backpack and also includes a diagnostic sketch to test the i2c connections and the LCD internal memory.
The library will auto detect the i2c address and the pin mappings.
It is available in the IDE library manager so you can quickly and easily download and install it without having to do any alterations to any other installed library.
You can read more about it here: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library
The i/o class for that backpack is hd44780_I2Cexp
I'd recommend running the included diagnostic sketch I2CexpDiag to test things.

--- bill

bperrybap:
Can you post a photo of the other side? So we can see the solder connections to the LCD module?

Thanks a lot!

Here's a picture of the front:

And a dump of the serial output from the I2CexpDiag:

*SED
 Address line test: --------------------------------------
LCD Display Memory Test
Display: 0
 Walking 1s data test: PASSED
 Address line test: --------------------------------------
LCD Display Memory Test
Display: 0
 Walking 1s data test: PASSED
 Address line test: 
********************************************************************
Serial Initialized
--------------------------------------------------------------------
I2CexpDiag - i2c LCD i/o expander backpack diagnostic tool
--------------------------------------------------------------------
hd44780 lib version: 0.8.3
--------------------------------------------------------------------
Reported Arduino Revision: 1.8.1
CPU ARCH: AVR - F_CPU: 16000000
--------------------------------------------------------------------
 A4: digital pin: 18
 A5: digital pin: 19
SDA: digital pin: 18
SCL: digital pin: 19
--------------------------------------------------------------------
Checking for required external I2C pull-up on SDA - YES
Checking for required external I2C pull-up on SCL - YES
--------------------------------------------------------------------
Scanning i2c bus for devices..
 i2c device found at address 0x3F
Total I2C devices found: 1
--------------------------------------------------------------------
Scanning i2c bus for all lcd displays
 LCD at address: 0x3F | config: P01245673H | R/W control: Yes
Total LCD devices found: 1
--------------------------------------------------------------------
LCD Display Memory Test
Display: 0
 Walking 1s data test: PASSED
 Address line test: PASSED
--------------------------------------------------------------------
Each working display should be displaying its #, address, and config information
If display is blank, but backlight is on, try adjusting contrast pot
If backlight is off, wait for next test
--------------------------------------------------------------------
Blinking backlight test: to verify BL level autodetection
If backlight is mostly off but
you briefly see "BL Off" on display with backlight on,
then the library autodetected incorrect BL level
and the library cannot autoconfigure the device
--------------------------------------------------------------------
Displaying 'uptime' on all displays
--------------------------------------------------------------------

I can see a faint text of what looks like "LCD" displayed on the screen, so it must definitely be a contrast issue. I recently purchased a 10k pot module and will be trying it out soon. I'll post here if I'm successful.

Thanks again!

The diagnostic test passed, which means that the arduino is talking to the LCD correctly.
Is the backlight on?

If the backlight is not on or didn't blink during the diagnostic test, then there is a backlight problem.
If the backlight is on after the test completed, then there is a contrast problem.

Given you previously said that the backlight blinked, I'm assuming that the backlight is on.

So are you now saying that nothing happens when you adjust the pot?
And that is why you are suspecting the pot?

I've seen backpacks with bad pots, but it is quite rare.

Removing the pot on the backpack is not going to be easy on that backpack.
It requires removing the backpack from the LCD.
Alternatively you can chop up the existing pot, yank it off the board and then "dead bug" a new pot to the backpack.
But I'd very sure that the pot on the backpack is really bad before I'd go messing with the pot.

--- bill

In the video the LCD module (same as my own) is being plugged directly to the Arduino without a potentiometer. I wasn't aware that I needed one, but I'll gladly try that out and post here if I'm successful.

I recently purchased a 10k pot module and will be trying it out soon. I'll post here if I'm successful.

I don't think you quite understand that the potentiometer that we are talking about is the blue device mounted on your I2C adapter right next to the four wires that go to your Arduino.

Don

bperrybap:
If the backlight is not on or didn't blink during the diagnostic test, then there is a backlight problem.
If the backlight is on after the test completed, then there is a contrast problem.

Given you previously said that the backlight blinked, I'm assuming that the backlight is on.

So are you now saying that nothing happens when you adjust the pot?

Backlight is on yes. I hadn't realized that the board had a built-in potentiometer... how would I go about adjusting it?

VerFloe:
Backlight is on yes. I hadn't realized that the board had a built-in potentiometer... how would I go about adjusting it?

Look at it. It should be obvious that you adjust it using a screwdriver to turn it.

The white area is the part that turns. Use a small screwdriver or the point of a knife blade in the + shaped slots.

Don

It is marked as "solved".
So was the issue simply an incorrectly adjusted potentiometer?

bperrybap:
It is marked as "solved".
So was the issue simply an incorrectly adjusted potentiometer?

Yup that was it, thank you guys!

Just to confirm. I had the same issue with both a 16x2 and 20x4 backlit LCDs with i2C backpacks. I guess they were the first LCDs I'd used that were backlit. (btw, I'm using the LiquidTWI library.)

Anyway, to confirm: No library code changes necessary. Just back off on the brightness until you're greeted by "Hello World!"

And an interesting point.

These modules inherit an error from the early days of the HD44780 LCD driver where a 10k potentiometer as such was shown in a test circuit, connected between ground and 5 V, setting the contrast voltage on Vo - pin 3.

This is a mistake. The potentiometer should not be connected to 5 V, that end terminal should be unconnected. And the value of the variable resistor should be about 1k or 2k, though 2k is an uncommon value.

Breaking the connection of the potentiometer to 5 V on these modules with due care - the pad may be being used as a through path - will both save 500 µA in needless current consumption and make contrast setting easier.