1602 LCD with Keypad Shield Board Blue Backlight for Arduino Duemilanove Robot

Hi all! I did not have any problems till friend of mine presented Duemilanove module to me. That happened exactly month ago. And then problem started >:( I successfully registered in this Forum and downloaded Arduino software for coding the module. Of course, I had nothing to connect to module to see what it can do. Only managed to take from examples blinking code and got LED blinking once per second. And that is all. Then I looked in E-bay for something that can work with my module and ordered different stuff. One of the parts arrived today (name in Subject). Usually it happens to my wife when she goes shopping, buys something and at home asks me what was that what she just bought! This time it happens to me… I do not know what LCD I bought and how can I use it? Can it be used at all? It was very cheap and even it will not work at all I will not be upset.
So I attached LCD circuit board to Arduino module, connected to PC and screen has light! Great! But can I get something displayed on the screen?

P.S. Please be tolerant to my pure knowledge as I am just a beginner.

Yes you should be able to use it.
You will need to use an LCD library and in order to do that you will have to know how the arduino pins are attached/wired up to the LCD.
The LiquidCrystal library can be used, but you have to initialize it with the pin mappings to tell the library which pins to wiggle to control the LCD.
i.e. what Arduino pins are wired up to LCD pins RS, E, D4, D5, D6, D7

For shields like that there are two common ways that they are wired up.
One of the more common ways is
rs= arduino pin 8
en=arduino pin 9
db4=arduino pin 4
db5=arduino pin 5
db6=arduino pin 6
db7=arduino pin 7
Backlight control = arduino pin 10

Also you may want to have a read of the sticky about lcd keypad shields as many of them have a h/w issue on the backlight circuit that can damage the Arduino board.

There is quite a bit of information in that thread, but the most important information is all in the first post.

If you want, you could use my hd44780 library package.
It is set up by default to use the pin mappings above so the examples may work with your shield, "out of the box" with no modifications.
If the examples do not work, then you will have to figure out the pin mappings by either carefully looking at the shield or using an ohm meter to figure out how the pins are wired.

The hd44780 library can quickly and easily be installed from the IDE library manager.
You can read more about the hd44780 library here: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library

The i/o class for your shield is called hd44780_pinIO
There are several examples included that use the above pin mapping by default.
I would recommend running the LCDKeypadCheck sketch to see if your shield has the h/w issue.

If it does have the issue, the hd44780_pinIO i/o class will automatically detect it and avoid doing any operation that could cause damage to the Arduino. This will ensure that as long as you use the backlight API functions, there will be no damage to your Arduino board.

--- bill

OK @bperrybap, thanks for your very informative answer, appreciate that. That will probably take some time for me to digest it. I'll be back.

bperrybap:
rs= arduino pin 8
en=arduino pin 9
db4=arduino pin 4
db5=arduino pin 5
db6=arduino pin 6
db7=arduino pin 7
Backlight control = arduino pin 10

Yes everything is like you say. Except the fact that I can not find “Backlight control” . Could you show it on the picture?

I’ve downloaded sketch to test h/w and got “BL Circuit BAD” message.

RimaNTSS:
Yes everything is like you say. Except the fact that I can not find "Backlight control" . Could you show it on the picture?

It is not possible to show "Backlight control" on that picture.
Arduino pin 10 is used to control the backlight circuit that controls the backlight.
The backlight transistor circuit is under the LCD module on the shield.
As I mentioned in reponse #1 above, there is a thread I started where
you can read about a h/w issue that many lcd keypad shields have that depending on how you use arduino pin 10 could damage the arduino processor.
There is a description of the issue and an attached schematic that you can view to see the h/w design flaw in the very first post of that thread.

RimaNTSS:
I've downloaded sketch to test h/w and got "BL Circuit BAD" message.

This means that the shield you have has the h/w issue.
See response #1 of this thread for the link to the thread about it (it is also a sticky in the Displays section of the forum)
There is information in that response as well as the sticky thread mentioned for how to deal with the issue.
I highly recommend that you read at least the first post of that thread.
Pretty much all the information about the issue and some ways to avoid the issue are in that first post.
The rest of the LONG thread thread is more about various vendors shields and various ways of how to modify the h/w to eliminate the issue.

If you don't intend to do back light control and ensure that Arduino pin 10 is never used, then you can use the stock LiquidCrystal library without worrying about damaging the arduino.
However, if you want to do backlight control, then as I mentioned previously, I would recommend that you use my hd44780 library package as it will auto-detect the h/w issue and do things in s/w to allow backlight control while avoiding damaging the arduino.

--- bill

Bill, thanks for that!
The problem with me that I simply do not understand some simple technical language (simple for you ). Of course I've red your response #1 in this thread and also sticky (from where I downloaded sketch for h/w testing). And, TBH, I do not know whether I intend to do back light control. Lets say, I will not do back light control, then I do not need to deal with the issue? But, perhaps it is better to do preventive measures and add just one diode to the circuit board as you had shown in the sticky?

RimaNTSS:
Lets say, I will not do back light control, then I do not need to deal with the issue?

Not exactly. The shield you have has a bad backlight circuit design that can potentially damage the AVR chip.
If you set Arduino pin 10 to an output and set the pin to HIGH, it creates a short to ground which overloads the pin and can damage the AVR chip. There is also a problem using digital PWM ( analogWrite() ) since that also sets the pin to HIGH while doing the pulsing.
As long as you avoid setting D10 to HIGH then it can be ignored.

But, perhaps it is better to do preventive measures and add just one diode to the circuit board as you had shown in the sticky?

There are several alternatives on dealing with the issue from not using backlight control and not using D10 to s/w work arounds to a couple of h/w modifications.
If you never intend to control the backlight, you can even clip the D10 header pin on the shield.

--- bill

bperrybap:
If you never intend to control the backlight, you can even clip the D10 header pin on the shield.

Just to be sure: Should I clip pin marked with X?

That appears to be correct.
The pin to clip on the LCD shield is the pin that plugs into the header on the Arduino board for digital pin 10.
But once you do this, there is no going back. You will not be able to control the backlight.
The backlight is on by default but you will not be able to control it.

If you you are wanting to permanently disable d10 from backlight control,
if you look at the back of the shield there may be trace that goes to that header pin that you can cut instead of clipping the header pin.
That option would offer a way to re-enable the backlight control should you decide you want to use it in the future.

--- bill

Did not see possibility to do it differently, so pin is clipped off. Seems that I will not be doing backlight control with this LCD display. :slight_smile: Not a big deal.

Hello! What am I doing wrong?

  • I connect module to PC. LCD lights up.
  • I open Arduino application on PC.
  • I go File-Examples-LiguidCrystrall- HelloWorld
  • then upload to Arduino. It uploads normally, green LEDs are blinking.
    But see nothing on the screen, as on attached picture.
    Could somebody, please, guide me on this?

RimaNTSS:
Hello! What am I doing wrong?

You trying to "do" too much before reading.
Slow down and read some more first.

The sketch must tell the library how the LCD is wired up to the Arduino pins in order for the library to know which pins to wiggle to control the LCD.

This is true regardless of whether you are using my hd44780/hd44780_pinIO library or the LiquidCrystal library that comes bundled with the IDE.

Both use the same form of initialization. They both provide the needed pin mapping information through the library object constructor named lcd.
You will see this pin information in the comments and in the code for the example sketches.
You will see a line that declares the lcd object along with the pin information.

If this pin information is incorrect, it will not work.
My library example sketches just happen to use the same pins as your shield.
The LiquidCrystal library uses different pins in its examples.
Either library can work with your shield but the pin information given when declaring the lcd object must match your shield.
If it doesn't match, then you will have to edit the code to modify the pins to match your shield.

You should first read the LiquidCrystal library pages to see how to properly initialize the library:
https://www.arduino.cc/en/Reference/LiquidCrystal

Then you should read the sketch code as it also has some useful text in the comments that tell you how/where to initialize the library for the Arduino pins used to control the LCD.

If the pins used in the lcd object constructor do not match the pin mapping/wiring on your shield, then you must edit the sketch code before it will work.

--- bill

OK, I think I got it. I've changed sketch according to previously checked

The circuit:

  • LCD RS pin to digital pin 8
  • LCD Enable pin to digital pin 9
  • LCD D4 pin to digital pin 4
  • LCD D5 pin to digital pin 5
  • LCD D6 pin to digital pin 6
  • LCD D7 pin to digital pin 7
  • LCD R/W pin to ground
  • LCD VSS pin to ground
  • LCD VCC pin to 5V
  • 10K resistor:
  • ends to +5V and ground
  • wiper to LCD VO pin (pin 3)

But when I upload this modified sketch then nothing happens again.

RimaNTSS:
OK, I think I got it. I've changed sketch according to previously checked

If that is all you changed then all you did was modify the comments.
You need to modify code. More specifically the lcd object constructor as that is what really matters since the constructor is what is used to tell the library the pin information.

Read the code closer and you will see the constructor.

--- bill

BTW, if you look at my library it is bit more obvious how to change the pins as I used variables in the constructor as parameters which makes it easier to see & change.
The LiquidCrystal examples just use raw pin numbers in their constructor and they have not really documented the proper order of the parameters.

— bill

bperrybap:
Read the code closer and you will see the constructor.

Now I got it! Bill, you are the Man! Thanks