Have questions about FETS, transistors, measurement, power supplies, or anything else electrical?

User avatar
By rudy
#82884 What is the supply voltage on the PCF8574T / LCD? Are you using a good level shifter?

I have used 5 volt I2C character displays a lot and I always use a I2C level converter chip.

From the spec sheet. VIH HIGH-level input voltage 0.7VDD - VDD

Based on this, with a supply voltage of 5 volts for the PCF8574T, the minimum voltage for a logic high is 3.5 volts. 5v * 0.7 = 3.5v

If the supply voltage to the LCD is lower than 5 volts then the minimum voltage for a logic high will be lower and might be enough for the ESP8266 port high output. If this is done then I would recommend using 1 kOhm pull up resistors to Vcc of the ESP8266. I do not recommend using pull up resistors to the 5 volt supply of the LCD.

I do not recommend level shifters that use mosfets, like the 2N27000. I have had problems with the waveform being distorted, not clean rise. Maybe using the 2N27002 might work better but it is very similar so it also might cause problems.

First make sure you can see it with an I2C scanner before worrying about a compatible I2C LCD library for the ESP8266.

This is what I use with the ESP8266. https://github.com/agnunez/ESP8266-I2C-LCD1602
User avatar
By scooter7440
#85309 Hi, I modified the code to following and got it working:

Changed: lcd.begin();
to: lcd.begin(20, 4);


#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup() {
Serial.begin(115200);
//Use predefined PINS consts
Wire.begin();
lcd.begin(20, 4);
lcd.noBacklight();
lcd.home();
delay(200);
lcd.print("Hello, NodeMCU");
lcd.backlight();
}

void loop() { // do nothing here
}