Hi, I have a node mcu 0.9 and an azdelivery LCD HD4478 screen with its I2C adapter. I just solder the I2C adapter to the LCD.
The problem is : the screen doesn't show anything when I try to use it through the LiquidCrystal_I2C library.
When I run the I2C address scanner, here's the enormous output I get in the serial monitor : https://pastebin.com/wu7tyhvs
This output continues as a loop indefinitely.
Also, I realized after a moment that the node mcu, after scanning in loop, was becoming very, very hot (I almost burnt my hand while taking it...). I don't know at all if it has a link or not, but I precise it here anyway.
Any idea of what I can do please ?
Please properly post: a schematic, clear photos of YOUR wiring (we need to see all the connections), your code.
Read the how to use this forum-please read sticky to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code.
Also, the node mcu is working fine. I used it just before for some others jobs without a LCD and it worked fine. The blink example works too and the node mcu doesn't get hot. Maybe it was due to the fact that the I2C scanner was running in loop and making the node mcu use too much current... ?
Here is the code I'm trying to use to make the LCD display something :
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // don't know what address to put instead of 0x27 as the scanner don't work
void setup() {
Wire.begin(2, 0);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Test");
}
void loop() {}
Finally, the I2C scanner I'm talking about is this one
your soldering is VERY BAD - use some desolder and do it again.
Wire.begin(D2, D1)
when D2 should be SDA and D1 SCL
2 and 0 are completely different pins.
POST YOUR IMAGES TO THE FORUM, don't hotlink to another webspace!
Even with Wire.begin(D1, D2), the LCD doesn't work.
So this issue is caused by the I2C not being soldered properly?
It's the first time I soldered something and it was really complicated, I did my best but I must admit it's not really perfect
I'll try to resolder it later. Thanks
That display needs 5V to work. Is it getting 5V? Is the LCD ground going to NodeMCU ground?
Have you tried the contrast adjustment?
For an I2C LCD display to work, the I2C address and the I2C backpack to LCD pin mapping must be correct. If the library default settings for either or both are not correct the LCD will not work. You can try to figure out the right pin mapping and use an I2C scanner to find the address, but if you install and use the hd44780 library that is done automatically by the library.
Install the hd44780 library. The hd44780 library is the best available for I2C LCDs. The library is available in the Library Manager. Go to Library Manager (in the IDE menus, Sketch, Include Libraries, Manage Libraries) and in the Topics dropdown choose Display and in the Filter your search box enter hd44780. Select and install the hd44780 library by Bill Perry.
The class that you want to use is the hd44780_I2Cexp class. There are examples to show how to use the library. The nice thing about the hd44780 library is that it will autodetect the I2C address and the I2C backpack to LCD pin mapping.
In the examples, there is a diagnostic sketch that will help us to help you if you still have trouble with the display. Run the diagnostic sketch and post the results.
double and tripple check your wiring. I think you mixed up the SDA SCL wiring.
I checked again, but as you can see in the pictures above, the wiring is fine. SCL leads to D1 and SDA to D2.
I tried to use Wire.begin(4, 5) but it still doesn't show anything.
As long as you the i2c scanner can't identfy your backpack, it will not work.
This seems to be the main problem. The scanner keeps raising lots of unknown errors, for each address.
Is it getting 5V? Is the LCD ground going to NodeMCU ground?
Once more, the wiring seems ok. The LCD is getting 5V properly as its VCC pin is wired to the noce mcu Vin's one, which leads directly to the 5V delivered by the micro usb wire.
Have you tried the contrast adjustment?
Yes, but still nothing on the screen, no matter the contrast
Install the hd44780 library.
I've never heard of it before. On almost every tutorial on the node mcu + lcd i2c, the library people use is liquidcrystal_i2c. I'll check this one out. But I don't think the problem is coming from there right now. After all, the scanner still can't see the I2C address
In the examples, there is a diagnostic sketch that will help us to help you if you still have trouble with the display. Run the diagnostic sketch and post the results.
using 5v slaves with a 3v master (most serious issue as it can potentially damage the nodemcu)
The nodeMCU is 3.3v the LCD is 5v and you have provided it Vin which from USB is likely about 4.8v.
You should not directly connect the i2c signals from the 3.3v nodeMCU to a 5v LCD slave, particularly one that has 5v pullups. (the i2c backpack you have has 5v pullups on it)
Did you not see this warning in the I2CexpDiag sketch and the hd44780_I2Cexp HelloWorld sketch?
// WARNING:
// Use caution when using 3v only processors like arm and ESP8266 processors
// when interfacing with 5v modules as not doing proper level shifting or
// incorrectly hooking things up can damage the processor.
You should use a proper level shifter when connecting 5v i2c slaves to the 3v esp8266 processors.
I saw no warning about this problem of interfacing 3.3V to 5V. The Vin pin should do it fine, in theory, on every LCD I2C node mcu tutorial people just wire VCC to it without problem. I don't know exactly what a level shifter looks like as I never used one, I'll take a look.
But as the diagnostic says and you all said, it may be the soldering who is bad. I did pay attention to avoid short circuiting the pins together but I guess I didn't do it properly
Thanks for all your replies, I'll try to redo ether soldering this evening
cypelf:
I saw no warning about this problem of interfacing 3.3V to 5V.
It is in the I2CexpDiag and HelloWorld sketches.
line 31 of I2CexpDiag, line 11 of the HelloWorld sketch.
The Vin pin should do it fine, in theory,
In theory, no, but
perhaps it can "work" in practice with a single slave using on board 4.7k pullups, but hooking up 5v signals to 3v non 5 volt tolerant inputs is out of spec and can damage the part.
Using more than one 5v slave with onboard pullups increases the likelihood of damage.
There are lots of Arduino tutorials out there that are not doing things correctly.
In many cases it may appear to work, but there are underlying issue that can crop up later.
I wouldn't do it. I always use a level shifter when connecting 5v slaves like the one you have to an esp8266.
The soldering does look bad.
I would get out a volt meter and take some measurements.
I'd measure Vin, voltage on the LCD, the voltage on SDA and SCL, on the LCD backpack, and at the nodeMCU.