20x4 Serial LCD Goes Blank

Hi,

I’m new on this forum and have for some time been using this Serial LCD:

https://www.sparkfun.com/products/16398

with a Raspberry Pi Zero 2 W using this library:

https://github.com/sparkfun/Qwiic_SerLCD_Py

It has been running fine continuously for several weeks now as a clock display. However recently it has gone blank, i.e. it does not display any text at all and it only maintains its RGB setting (which is (255, 255, 255), aka white).

That is not to say it is always blank, a simple reboot fixes it for a few days before it goes blank again.

Below I have included the code that’s running the display:

from __future__ import print_function
import qwiic_serlcd
from time import sleep
from datetime import datetime, timedelta, timezone

try:
    #Setup code for 20x4 LCD.
    lcd = qwiic_serlcd.QwiicSerlcd()

    lcd.setBacklight(255, 255, 255)
    lcd.setContrast(5)
    lcd.begin()
    lcd.disableSystemMessages()
    lcd.clearScreen()
    sleep(1)
    lcd.print("UTC Time:")

    interval = 1
    next_time = timedelta(seconds=interval) + datetime.now(timezone.utc)

    while True:
        now_ts = datetime.now(timezone.utc)
        if next_time <= now_ts:
            lcd.setCursor(0, 1)
            lcd.print(now_ts.strftime("%Y-%m-%d %H:%M:%S"))
            next_time = timedelta(seconds=interval) + next_time

except BaseException:
    print("\nExited 'UTC_Clock.py'.")

finally:
    lcd.clearScreen()

I also have set the Pi’s I2C bus speed to 9600 to be the same as that of the display. When it was not set to 9600 the Pi would not communicate properly with the display. I have checked the physical connection for the SHIM to the Pi, the cable to the SHIM and the cable to the display.

If anyone knows why my display keeps blanking please let me know, it’ll be most appreciated.

Hmm, that’s strange - maybe try implementing a ‘reset’ function?

How do would I do a ‘reset’ function? From what I can tell that would necessitate some as of writing this unknown to me code that can tell whether the screen has gone blank or not and trigger a reset.

Also could I use this method to configure the display to use a higher I2C bus speed (instead of 9600 something closer to the Pi:s default of 100000)?:

https://qwiic-serlcd-py.readthedocs.io/ … cd.command

I’m having the same problem on the same 20x4 Serial LCD, you describe a “simple reboot” to temporarily fix it.

I’m unaware of how to preform a reboot, how would one go about doing this?

I have the 20x4 Serial LCD at the end of a Qwiic chain. Arduino Red Board → 5 other Qwiic boards → the 20x4 Serial LCD.

When the relay board (one in the 5 mentioned above) would power on the relay and use juice, the LCD would go blank. I eliminated the pull up resistors on 3 of the Qwiic boards between the Arduino and the LCD and the going blank did not happen as often. But it still happens.

I eliminate the pull up resistors by cutting the solder connection on the I2C part on the boards.

I’d like to eliminate the pull up resistors for the other 2 of the 5 boards but I have no idea if the LCD has pull up resistors. I have no idea what happens if I remove the pull ups for the next two boards. The LCD does not have a way to eliminate the pull ups, if it has them.


TLDR: I think the pull up resistors are draining power and causing the Qwiic (I2C) signal to be squirrely enough to cause the LCD to need to be reset. Can I run 6 Qwiic connected boards (LCD being the last) with all the I2C pull ups removed from the middle 5 I2C boards? Does the LCD have built in pull ups since it only has one Qwiic connector and needs to be at the end of the chain?

The only reboot I know of is to power cycle the entire product set. Unplug it, plug it back in. Frankly that is not a viable solution unless I’m going to sit there and watch it (to NOT have to watch it is why I’m automating it in the first place.)

It just matters that there is one active set of PU resistors per bus (usually); the main issue is likely that the combined wire resistance (may be mitigated by using short qwiic cables/a Mux) and/or from a power ‘brown out’ due to voltage drop when the relay kicks on (fix this by using a more robust power supply/scheme)

My QWIIC daisy chain is:

DEV-15123 SparkFun RedBoard Qwiic

DEV-15164 SparkFun Qwiic OpenLog

SEN-16467 SparkFun Humidity Sensor Breakout - SHTC3 (Qwiic)

COM-15093 SparkFun Qwiic Single Relay

BOB-16842 SparkFun Qwiic Button - Green LED (1st)

BOB-16842 SparkFun Qwiic Button - Green LED (2nd)

LCD-16398 SparkFun 20x4 SerLCD - RGB Backlight (Qwiic)

Regardless of the specs, the RedBoard does NOT put out enough (current or voltage) to power this entire daisy chain of QWIIC devices when the relay switches ON. When first powered up, everything is powered and functional.

When the relay switches ON, the two buttons and the LCD screen present as if they have no power. On the button modules the red LED that indicates they are powered, go dark, and the LCD blinks as if it is really trying to power up, but yet it cannot. Again, might be voltage drops across the QWIIC connectors, or through the QWIIC wires, might be not enough current from the RedBoard, no clue.

Sometimes when the system would run for a day or so, the button boards and the LCD would get powered back on. While they were off, the RedBoard Arduino was still alive, it just could not communicate with those three boards.

My solution was to put a 1000mF capacitor on the 3.3volt and GND pads on the top left of the LCD board. My theory was that there was inadequate current when the relay toggled and there was never enough current to recover. Adding the capacitor to the end device (the LCD) seems to give the entire chain enough current to ride through the spike of the relay switching AND provide enough to keep the last three boards operational.

I’m not sure why the QWIIC chain is not providing enough power from the RedBoard all the way out to the LCD, and I don’t care. Now that the entire chain stays powered, I can move forward with the project.