I2C LCD Strange contrast problem

Hi all,

So i recently acquired a SainSmart I2C enabled 20x4 LCd display. I have a very odd problem with it.

Using the code from the link below:

http://forum.arduino.cc/index.php?topic=120929.15
post # 22 (minor change mine is actually on 0x27 instead of 0x3F - go figure)

and this LCD:

I can get the device up and running no problem...sort of. If the contrast pot is turned way down, I am able to adjust it to view the text. Simple LCD display procedures.

If I reset the device with the contrast adjusted, I get two lines of blank boxes.

Turn the contrast down until the boxes disappear, reset it, contrast back up, and suddenly everything works again.

Images attached.

I am assuming there is some kind of voltage drop problem, but honestly i'm just guessing.

Anyone have a solution to this?

Your I2C address is 0x27 because your board uses a PCF8574T instead of a PCF8574AT. That's what they had in the bin on the day your board was stuffed.

I agree that there is a voltage drop problem, probably due to a defective potentiometer or poor soldering. If the pot was not defective before it probably is now.

It looks like there is excessive solder on all of the adapter pins and some extra solder between the pins and the potentiometer. Try cleaning things up and see what happens.

Don

In your photo IMG_270 it looks like there is a bit of solder that dripped off the backpack PCB and onto
the hd44780 display PCB pin pads for pins 3 and 4.
That would be shorting pins 3 and 4 which is the contrast voltage and the RS signal.

This could explain why initialization doesn't work since the contrast voltage could be overriding the signal going to the RS pin depending on the adjustment of the pot.

Take a close look and clear that extra solder on those pads and see if that helps.

--- bill

Gentlemen,

Thank you for your replies.
I took the solder vacuum and some solder wick to the pins and re-did them. Looks clean now, unfortunately the problem persists. I will be removing the pot next and replacing it with an off board one.

EDIT
Pot replaced - no luck =/

Are the symptoms still the same?

If so please describe what configuration enables you to get the display to work as shown in your first photo.

Don

What about the solder that was on the HD44780 PCB pin pads? (between hd44780 pin pads 3 and 4) ?

Not the soldered pins on the i2c backpack and not the soldered pins on the HD44780 PCB on the same side as the LCD glass but the actual solder pads on the hd44780 PCB on the same side as the backpack.
The ones that show up in the IMG_370 photo.

I'm still going with a short between hd44780 pin 3 and pin4.

Consider this.
In order to get the contrast voltage adjusted to see the pixels the pot output voltage will need to near 0v or at least well below the threshold voltage of a logic 1.

If you have the pot adjusted that way and there is a short between pin 3 and 4, then this near 0 voltage will be presented to the RS pin which is also connected to a PCF8574 pin.

The PCF8574 can sink but it can't drive output pins.
That means that if there is any load on the PCF8574 pin that is pulling it down (which would be the case if there were a short between pin 3 an pin 4 and the pot were adjusted to a low voltage) the PCF8574 would not be able to pull the RS signal back up to a logic 1.

However, since the PCF8574 can sink, if the pot is adjusted such that the voltage is above a logic 1 threshold, the PC8574 could still pull the RS signal low.

So this would be a scenario that seems to mimick what you are seeing.
On one end of pot adjustment (when the contrast looks good) the library would be unable to initialize the LCD.
On the other end of the adjustment, the LCD could be initialized but you won't be able to see the pixels.
After the LCD is initialized, you could adjust the pot and see the pixels.
But then when the pot is adjusted to see the pixels, communication with the LCD is once again corrupted.

I attached a photo showing what I'm concerned about.

--- bill

Bill,

That did it! Thank you very much. I didn't even realize that little bridge was there. Quick bit of solder wick, and all is well.

-Matt

Glad it works.
Just remember, when playing at this level, details and attention to detail are very important.

--- bill