Hi, i’m trying to use Freenove I2C LCD 1602 Module FNK079A, and the problem is it shuts down after a minute or so. It’s currently driven by Arduino Yun, but I also have a RaspberryPi 2b, and a ZeroW available.
I tried different power sources (laptop usb3 port, power bank, wall charger) and it doesn’t change much.
Maybe I’m missing some really basic information.
The library I’m using is markub3327/LiquidCrystal_I2C 2.0.0, and I also tried RobTillaart/I2C_LCD0.2.6 with similar code, it also shuts down in less than a minute.
Code is really simple. With delay 1000, it shuts down in about a minute. With delay 100, it shuts down after 15 seconds. Period is slightly different each time.
Please post schematics. Pen and paper drawing is fine. The symtom points out powering. Are You sure You gave the full and correct name of the controller? No sub bransches?
A general rule is: Don't use micro controllers as power supply for other things than one or two LED.
We can't see which pins you are using on the Yun from your photos, so a diagram of a different model of Arduino with "similar" pins connected to a different LCD module does not help.
Why not draw a diagram for us? Do you have pencil and paper?
It's odd that the shutdown time varies with the loop delay. If the backlight stays on, the current drawn by the display presumably doesn't change much, no matter what the delay is. So what would account for this? I wonder if anything is getting warm.
I could not find a schematic for the LCD device board to see what kind of pullups, if any, are on that LCD device. It does appear that there are pullups on the YUN board.
I would install the hd44780 library.
The hd44780_I2Cexp i/o class is for the LCD device you have.
Run the included i2CexpDiag sketch that is part of the hd44780_I2Cexp i/o class examples.
This will do some tests on the i2c signals and then do internal memory test of the LCD CGRAM and DDRAM.
Then fall into a loop doing an lcd update.
You could also run LCDiSpeed and LCDlibTest which will do some tests that stress the i2c interface and the LCD more than I2CexpDiag.
There is also a ReadWrite example that will continuously write to the LCD and read back the data and checks for i2c errors as well as data corruption during the process.
I think he can just disconnect everything, then use his multimeter to measure resistance between the display's SDA pin and Vcc pin, then the same for SCL. Then reverse the leads and measure again. If reversing produces a different result, the lower resistance value is the value of the pullup resistor, if present at all. Odds are quite high that it will be 10K or 4.7K.
He could probably make the same measurements on the Yun. The Yun schematic has pullup resistors shown, but with no value assigned, and they are marked DNP, which I assume is Do Not Populate.
I tried using a different board, but my SD adapter is not working, both Raspberry need one, so i will need to find another one.
Adding Serial.print(strlen(buffer)); Serial.println(buffer); before lcd.print(buffer); : the serial stops updating when the LCD stops, but still says “connected”.
Removing all wires, the resistance between VSS and SCL is 18.2k, and the same backwards. Also between VSS and SCK, i read 18.2k.
During operation, i read voltage between VSS and SDA: it’s 4.5 when working, then goes to 5 when the output freezes. Same between VSS and SCK: 4.6 while the clock updates, goes to 5 as soon as the output freezes.
I2CexpDiag output:
********************************************************************
Serial Initialized
--------------------------------------------------------------------
I2CexpDiag - i2c LCD i/o expander backpack diagnostic tool
--------------------------------------------------------------------
hd44780 lib version: 1.3.2
--------------------------------------------------------------------
Reported Arduino Revision: 1.6.7
CPU ARCH: AVR - F_CPU: 16000000
--------------------------------------------------------------------
SDA digital pin: 2
SCL digital pin: 3
--------------------------------------------------------------------
Checking for required external I2C pull-up on SDA - YES
Checking for required external I2C pull-up on SCL - YES
Checking for I2C pins shorted together - Not Shorted
--------------------------------------------------------------------
Scanning i2c bus for devices..
i2c device found at address 0x27
Total I2C devices found: 1
--------------------------------------------------------------------
Scanning i2c bus for all lcd displays (4 max)
LCD 0 begin() failed: -1
No working LCD devices
I also tried the same test, with the same result, using the other I2C pins:
Maybe you can try adding this after the delay() at the end of the loop to see if the issue is
some sort of corruption which can be recovered from or a power supply or power component dropping out.
The strange characters which appear on the display indicate corruption.
static uint32_t lastClean = millis() ; // static initialised once only
if ( millis() - lastClean > 5000UL ) {
lastClean = millis() ;
lcd.init();
}