LCD display contrast

Hello,

I have a problem with this display: PDF data sheet

I have connected it to an Arduino Nano using the LiquidCrystal Library in 4 bit mode. The pins are connected as in the reference: http://arduino.cc/en/Reference/LiquidCrystalConstructor

Everything works fine, but I have a problem with the contrast. First I have connected the LCD drive pin of the display directly to the ground. As result the display sometimes worked and sometimes the contrast was too low, which means the whole display turned white and you couldn't read the letters (look here for an image). I had to restart the Arduino many times until I could read something on the display. I have found here in this board the solution that I have to put a 10k POT between 5V and GND so that the LCD Drive pin gets around 0.5V. I works so I can set the contrast for perfect readability, but the problem is this only lasts till the next reset of the Arduino. So on every reset of the Arduino the voltage for the perfect contrast changes and I have to turn the POT. Is there any possibilty to ensure that the contrast is automatically set perfect, so that I can build the display in an case?

I have read something here that it perhaps works with different display librarys or other pin combinations from the Arduino to the display, but I don't know wether this is also valid for the latest library because that topic was last updated last year. Also I have read about putting the RW pin of the display also on GND. The contrast was fine then, but I got display errors: The line was filled with completely white fields on reseting the Arduino.

recheck your wiring, you should not need to put the RW pin to ground if its wired correctly and the constructor code matches the wiring.

Wiring cannot be the problem I have noticed this problem with different displays in at least 10 tryings making every wire completly new. When it sometimes work, I only press the reset button of the Arduinio and the contrast is bad, pressing the reset button again and the contrast is perfect.

Also I have read about putting the RW pin of the display also on GND. The contrast was fine then, but I got display errors:

The LiquidCrystal library puts the RW pin low whenever it sends data to the display so if wiring the RW line low changes the performance then the most likley cause is a wiring problem.

Can you post a picture of your setup?

There was a similar thread not long ago. It turns out that SOME LCD's are designed for outdoor or wide temperature ranges. You actually need to bring the contrast pin BELOW ground potential to get the right contrast. This may be your issue.

You would need to create a negative voltage source.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242852407/8#8

Most of the spec sheets I have seen for text LCDs have an absolute maximum rating of minus 0.3 volts on the contrast pin. Its not clear from the spec sheet linked by the OP if his panel can handle voltages lower than this. I think a warning is in order that if the panel is not designed to handle negative voltages then it could damage the panel. I would try and get some info from the supplier of the panel before wiring it up to a negative voltage.

Sorry it was wrong that the contrast is fine when putting the RW pin to ground. I testet it again and the contrast was bad and I hat to turn the POT. I also not thing that I need negative Voltage because the perfect contrast is between 0V and 1V. The problem is the Voltage ist different on every Arduino reset.

I have took some pictures:

Drawing of the wires: http://www.tueftler-ag.de/files/display/arduinodisplay.png

Pictures of everything: http://www.tueftler-ag.de/files/display/all1.jpg http://www.tueftler-ag.de/files/display/all2.jpg

Arduino: http://www.tueftler-ag.de/files/display/arduino.jpg

Potentiometer: http://www.tueftler-ag.de/files/display/pot.jpg

Display how it should be: http://www.tueftler-ag.de/files/display/normal.jpg

Display with bad contrast: http://www.tueftler-ag.de/files/display/error.jpg

Here you can see that the problem is the contrast because from the side you can see that the display shows what it should: http://www.tueftler-ag.de/files/display/error_side.jpg