Cannot detect LCD display with I2C

Hello everyone,

I am trying to use the Arduino UNO rev 3 with the Kookye IIC 1602 LiquidCrystal Display (see product information here: https://www.amazon.co.uk/gp/product/B019SXNKGU/). It is a 16x2 LCD display with a I2C backpanel. I am using the Arduino IDE 1.7 on Windows 7.

I tried to determine the address of the display using the sketch described here: Arduino Playground - I2cScanner

// --------------------------------------
// i2c_scanner
//
// Version 1
//    This program (or code that looks like it)
//    can be found in many places.
//    For example on the Arduino.cc forum.
//    The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
//     Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by Arduino.cc user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
//    http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
// Version 6, November 27, 2015.
//    Added waiting for the Leonardo serial communication.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//
 
#include <Wire.h>
 
 
void setup()
{
  Wire.begin();
 
  Serial.begin(9600);
  while (!Serial);             // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
}
 
 
void loop()
{
  byte error, address;
  int nDevices;
 
  Serial.println("Scanning...");
 
  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
 
    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");
 
      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknown error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");
 
  delay(5000);           // wait 5 seconds for next scan
}

The LCD display powers on but the scanner cannot detect any I2C device. I get:

Scanning...
No I2C devices found

I checked the wiring but found no error/faulty cable.
Connections:
VCC-5V
GND-GND
SDA-SDA
SCL-SCL

Does anybody have an idea what could cause this?

Thanks!

There are several things that could cause this.
incorrect pins being used, incorrect wiring, bad/broken wires, or incorrect pullup resistors.

My suggestion would be to use my hd44780 library. The hd44780_I2Cexp i/o class included in the library is for hd44780 LCDs that are using a i2c backpack.

The library will auto locate the backpack i2c address, and self configure the pin mappings used between the backpack and the LCD.
It should "just work" with your LCD device.

If it doesn't, the library also includes a diagnostic sketch that will test the i2c connections, the backpack and the LCD.

The library can be installed using the IDE library manager.
Here is a link to the github page for more information: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library
It also has information about installation and which IDEs are compatible.
While IDE version 1.7 should work ok, at some point you should consider upgrading to a newer IDE version as there have been many useful updates and bug fixes since then.
Use the library manager to install the hd44780 library. Do not download it from the github page and install it using a zip file.
Here is a link to the wiki for additional information about the library and the i/o classes:
Home · duinoWitchery/hd44780 Wiki · GitHub

The i/o class for your device is hd44780_I2Cexp.
I'd recommend first running the diagnostic sketch, I2CexpDiag, to make sure everything is working correctly.
The diagnostic sketch will print information on the serial port about the tests and any issues that it may find.
After that is working, then look at the HelloWorld sketch to see what header files need to be included and how to declare the lcd object.

--- bill

Dear Bill,

Thank you for your detailled answer. I will try what you suggested and report the results.

Cheers

I have tried the I2CexpDiag sketch after having installed the hd44780 library. The output is:

--------------------------------------------------------------------
Reported Arduino Revision: 1.8.5
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..
Total I2C devices found: 0
No I2C devices found

I think the I2C backpack is the problem, because I was able to use a OLED display with the same configuration.
Thanks for your help.

arbatax:
Does anybody have an idea what could cause this?

If the I2C scanner does not detect the PCF8574 that is on the backpack, then either its faulty or you wired it wrong.

I cannot see how fidling with the wiring on the display side will help, if the PCF8574 is not responding, solve and deal with with that problem first.

Can you show a photo of your board, backpack, and wiring so we can take a look?
--- bill