LCD display words too dim (NOT contrast issue)

Hi all, I’ve connected a HD44780 LCD to the Arduino and have loaded the example code:
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

void setup() {
// set up the LCD’s number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.print(“hello, world!”);
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis());
}

I have checked every connection many times so that is not the issue.

The words displaying hello, world! and the milliseconds are way too dim (they are dark instead of white against the blue backlight as it should be). But when I press the reset button on the Arduino, the millisecond counter pauses and the words show up perfectly. when i release the reset button, the same thing happens again. I have checked all the connections at least 10 times, also I have tried to connect to different pins and initialized the lcd() differently. It is also not a contrast issue because when I vary the voltage at the V0 pin the contrast adjust accordingly but again the contrast only shows up when i press the reset pin (meaning if the V0 pin is connected to GND the contrast will show up at its maximum when i press the reset button. Without pressing the reset button, the words are simply too dim.

Video: https://youtu.be/2ol468j4aB8 (take note of what happens when I press the reset button)

Summary: LCD only displays correctly when the reset button of the Arduino is pressed.

Any help is greatly appreciated!

Insert a delay in your loop(). The LCD is being updated so fast that it will be unpleasant to read.

Seriously, can you really read at millisecond speed? Even though the display controller can work at this speed, the physical lcd screen does not like being changed this fast.

David.

With respect to LCD refresh/update rates, the liquid crystal inside the LCD is quite slow at rotating its molecules (takes on order of milliseconds) so trying to update pixels can take enough time to create unpleasant visual effects. Human eyes are slow, but not that slow.....

That said, your sketch is not actually modifying the pixels on the top line, so I would have expected that line to remain stable and clear. That is what you see on most of these types of LCD displays.

I see a couple of things that should be addressed. In the code you are telling the library that the display is 20x4 when it is not a 20x4 display.

In the video it appears that you have not soldered the wires to the LCD or if they are soldered, they are not soldered good enough. If this is the case, that can create all kinds of strange problems. You could end up with ground bounce on the signals, or current starvation under heavy command load like you are doing. The reason is that without soldering the wires, you can end up with marginal electrical connections which are not properly carrying the signals or current.

I'd fix those things and see if things look better. But keep in mind that the line with the millis counter will never look very good if you update it quickly with changing characters like you are doing. The characters that are not changing should continue to look ok and stable as long as the display is not being cleared and your have good electrical connections.

With most of these types of LCDS, you can update the display as often and as fast as you can and if the pixels are not changing the display should remain clear and easy to read.

--- bill

Try changing

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis());
}

To:

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
  delay(1000);
}

That’s a really poor example to use when you are initially trying out a new LCD , since you really shouldn’t be doing anything in ‘loop’ under those circumstances.

Code such as this is a lot more appropriate:

#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
                                             // do nothing in 'loop'
  }

That being said you don’t need to add a delay in ‘loop’ if you divide millis() by 1000 as originally presented here http://arduino.cc/en/Tutorial/LiquidCrystal. You don’t need to do both.

Using the delay without dividing millis() by 1000 would be a better choice for this horrible example to emphasize the point presented by David.

Don

"That's a really poor example to use when you are initially trying out a new LCD , since you really shouldn't be doing anything in 'loop' under those circumstances. "

Pardon me, but I beg to differ.

While you were responding I modified my previous post to show what I feel is a better example to use when originally setting and testing an LCD.

I don't think it is a good idea to try and figure out possible wiring errors if the display itself is constantly being rewritten.

Perhaps you can explain your reasoning.

Don

If you have to modify your previous post, then it sounds like you didn't get it right the first time, (sorry).

There are many thousands of ways to code. If you have a reason to think that a section of code will not work, then we welcome your input. If you just say that the code is not as good as I would do it, then I guess we would also allow that. Do you see a reason that the section of code will not work?