Hello guys I bought a 1602 screen to connect to my NodeMCU. The screen needs 5v input to work and has a built-in I2C interface. At first I tried to power it from the VIN pin of the Node but it didn't even turn on. Later I bought a breadboard 5V output PSU so I got power from there and the screen turned on(measured 4,79V on the psu output) but I couldn't detect it with the I2C Scanner sketch and also I couldn't make anything to show up in the screen using the LiquidCrystal_I2C library. The eshop that I bought it says that the I2C address is the 0x27 and it can't be changed. I tried to connect it both to D3-D4 and D1-D2 I need some help troubleshooting. Did I do anything wrong?Is the I2C or the screen faulty or the voltage is not enough?
@septillion thank you for your reply. I now power the LCD from an externat breadboard PSU that gives about 4.8 volts and the screen turns on but only the backlight and the first row of the screen with black boxes.
kvais: @septillion thank you for your reply. I now power the LCD from an externat breadboard PSU that gives about 4.8 volts and the screen turns on but only the backlight and the first row of the screen with black boxes.
Yeah, so? That's what that display does when you connect power but don't send data... And the backpack doesn't see the commands from the ESP so does not send data to the screen.
@Paul__B Nope it's doesn't sell dildos. Now for the jumpers I know that you can use them to change the address.
From the seller's site:
I2C Address: 0x27 ( address can't be changed !!!).
Backlight (Black character on Yellow background)
Supply voltage: 5V
Size: 82x35x18 mm
Come with IIC interface, which can be connected by DuPont Line
\
The code is this
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
// initialize the LCD
lcd.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello, world!");
}
void loop()
{
// Do nothing here...
septillion:
Yeah, so? That's what that display does when you connect power but don't send data... And the backpack doesn't see the commands from the ESP so does not send data to the screen.
I am new to electronics. Where do I need to add the level shifter?
kvais: @Paul__B Nope it's doesn't sell dildos. Now for the jumpers I know that you can use them to change the address.
So you clearly know that the seller's description is completely meaningless! Fair enough.
Frankly, I doubt that the levels are in any way the problem. You are using a "LiquidCrystal_I2C" library which is quite useless. Install Bill Perry's HD44780 library in the IDE, study the documentation and work through the examples provided. It will automatically determine which I2C backpack that is, and operate the display.
Ah! A little addendum:
Driving this with a NodeMCU you do need to remove the I2C pull-ups from the "backpack" and provide your own pull-ups - 4.7k - to 3.3 V to protect the ESP8266.
Paul__B:
So you clearly know that the seller's description is completely meaningless! Fair enough.
Frankly, I doubt that the levels are in any way the problem. You are using a "LiquidCrystal_I2C" library which is quite useless. Install Bill Perry's HD44780 library in the IDE, study the documentation and work through the examples provided. It will automatically determine which I2C backpack that is, and operate the display.
Ah! A little addendum:
Driving this with a NodeMCU you do need to remove the I2C pull-ups from the "backpack" and provide your own pull-ups - 4.7k - to 3.3 V to protect the ESP8266.
They are smaller and, IMO, easier to use.
You simply hook the 5v to the VIN and DO NOT hook 3v from the Master to the 3v pin.
The 3v pin on the level shifter module is an output not an input.
It is intended to power 3v devices when going from 5v masters to 3v slaves.
In this case there is a 3v master talking to a 5v slave(s).
So to wire up with a NodeMCU
wire gnd to both gnd pins.
wire 5v to VIN
wire the 3v i2c signals to the 3v side
wire the 5v i2c signals to the 5v side
(be consistent with signals, i.e if SDA is on A on 3v side put SDA on A on 5v side)
do not wire anything to the 3v pin on the level shifter
If you have more i2c slaves, hook the 3v ones to the 3v side, and the 5v ones do the 5v side.