Warning to users of some vendors LCD keypad shields

bperrybap: Yes See the extra two parameters in the constructor? The back light pin and the active level.

But the BL stays off.

Is it not possible, regardless of the SW work-around, that there is no connection between the BL and the pins to the Arduino (e.g. due to blown transistor)? I can detect no continuity between terminal K and any of the pins that connect the shield to the Arduino.

Since I do not want to plug the Shield into the Arduino anyway (I didn't realise the shield blotted out all the pins before I bought it - yes I'm new to Arduino but have been coding off and on since 1970 and worked with Picaxe). I will be using a free-standing LCD display for my real project and in the meantime for learning I've soldered a jumper to LCD terminal K which when earthed on the Arduino board works just fine. I guess, despite pin D10 working OK as an LED output, there may have been some damage between when the BL worked and when it didn't. I'll see.

bumblepom: But the BL stays off.

Looks like you fixed the small coding error in the constructor. (blLevel misspelled - that will be fixed in next release) That should have turned on the backlight when begin() is called.

Is it not possible, regardless of the SW work-around, that there is no connection between the BL and the pins to the Arduino (e.g. due to blown transistor)? I can detect no continuity between terminal K and any of the pins that connect the shield to the Arduino.

If your shield is the same design as the other ones we have seen, then you won't see any continuity between the LCD K pin and any Arduino pin because it isn't wired up that way. The K pin is wired to the collector of an NPN transistor and D10 is wired to the base. The issue is there there is no series resistor between D10 and the base of the transistor. See the schematic in the 1st post. The datasheet from the product link you provided: https://www.jaycar.com.au/medias/sys_master/images/9133746290718/XC4454-dataSheetMain.pdf does not mention using D10.

However the LCDKeypadCheck test would seem to indicate otherwise. It sets D10 to HIGH and then reads the pin. If the shield has an issue, D10 will not be HIGH because of a short through the transistor and the D10 signal is being yanked back low even though the AVR is trying to drive the pin high. Reading a LOW instead of a HIGH is what causes the LCDksypadCheck sketch to report a bad BL circuit. This is because something is yanking the D10 pin down and that shouldn't be happening. This can damage the AVR. The output of bad BL circuit on the LCD means the sketch has determined there is a short on D10 and concluded that the BL circuit is bad, not that any of damage has necessarily occurred.

Does the backlight blink when the diag test is run when the shield is plugged directly into the Arduino? If it reports a bad BL circuit but the backlight does not blink you have some other kind of actual h/w issue - beyond just the shield backlight circuit design issue.

It isn't clear how you have wired things up or if there were any temporary miswirings. It is possible that something done has damaged something. It is possible that the transistor has been blown by shorting K to ground. While shorting K to ground will light the backlight, it also puts a hard ground to the transistor collector since the K signal of the LCD is connected directly to the collector of the transistor.

D10 is connected directly to the base. If you shorted K to ground while D10 was high, then the transistor would be 100% on due to the short from D10 into the base through the transistor to the emitter. With K grounded which also grounds the collector you now have an infinite current load flowing through collector to the emitter. This might blow the transistor or perhaps even a trace on the PCB.

Unfortunately, that transistor is in a location under the LCD so you can't get to it without removing the LCD.

Now if you have measured the current when K is grounded and you are sure it is 30ma or less, and you don't intend to ever plug the shield into the Arduino, you could cheat and wire D10 directly to the K pin of the LCD instead of grounding K. That would give you backlight control and allow PWM dimming.

These days for a text LCD display, especially one that isn't going to be on a shield plugged into an Arduino, I'd use an I2C backpack. It only uses the 2 i2c pins. You can get them off ebay for about $1 USD shipped to your door.

--- bill

bperrybap:

Now if you have measured the current when K is grounded and you are sure it is 30ma or less,
and you don’t intend to ever plug the shield into the Arduino, you could
cheat and wire D10 directly to the K pin of the LCD instead of grounding K.
That would give you backlight control and allow PWM dimming.

These days for a text LCD display, especially one that isn’t going to be on a shield plugged into an Arduino,
I’d use an I2C backpack. It only uses the 2 i2c pins.
You can get them off ebay for about $1 USD shipped to your door.

— bill

I did measure the K to ground at 20 mA…
So I connected K directly to D10 → BL off
But when I reversed the code to
< const int … blLevel=LOW; > instead of HIGH, then the BL comes on.

And yes I will be moving to i2C and have a plain LCD and backpack in transit.

Thanks for your help.

Nelson

bumblepom:
I did measure the K to ground at 20 mA…
So I connected K directly to D10 → BL off
But when I reversed the code to
< const int … blLevel=LOW; > instead of HIGH, then the BL comes on.

Ah oops. My mistake. Since the bl pin (D10) is connected to K, the backlight comes on when it is low vs high.
So yes active level must be set to low, which tells the library to set the backlight pin low to turn on the backlight and high to turn it off.

With that correction,
you should now be able to control the backlight with backlight()/noBacklight() and even do backlight dimming using setBacklight(dimlevel)

— bill

Emartee: http://emartee.com/product/42054/Keypad%20LCD%20Shield%20V2.0%20%20Arduino%20Compatible http://emartee.com/product/41909/Keypad%20LCD%20Shield%20%20Arduino%20Compatible

Hello, Sorry for asking. Iam have the Keypad LCD Shield V2.0 and i have learn some tutorial page about it, but i need more learning this LCD, any suggestion program or links?

nielyay:
Hello,
Sorry for asking.
Iam have the Keypad LCD Shield V2.0 and i have learn some tutorial page about it, but i need more learning this LCD, any suggestion program or links?

That is outside the scope of this thread.
Those pages in the links you provided have the basic information on how the LCD, buttons, and headers are wired up to the shield.
I’d suggest for any further assistance to start a new thread.

— bill

Those pages in the links you provided have the basic information on how the LCD, buttons, and headers are wired up to the shield.

hello bill,

yes, i mean did you have any suggestion program for the LCD? i have try some program on the website.

I have a clone D1 ROBOT which doesn't have or at least I can not find a revison number. I run Bill's back light sketch and it report BL Bad.

The total current of the Arduino with LCD board mount is 70mA which doesn't seem excessive.

What was the original issue that has raised all this concern and suggested modifications? Nothing appears to be running hot after hours of running. So what was the flag that went up?

Read post 1 in this thread, it’s all there.

I have read this link, checked in my IDE I have this hd44780LCD library installed with the library manager. In the examples included with this library could not make out the sketch for testing the backlight control of the shield. Which sketch is it?

Regards for your time.

kssoin: I have read this link, checked in my IDE I have this hd44780LCD library installed with the library manager. In the examples included with this library could not make out the sketch for testing the backlight control of the shield. Which sketch is it?

See the wiki: https://github.com/duinoWitchery/hd44780/wiki/ioClass:-hd44780_pinIO

note: there is a link to the hd44780 library wiki in the included Documentation which can be found in the "Documentation" sketch.

--- bill

bperrybap: See the wiki: https://github.com/duinoWitchery/hd44780/wiki/ioClass:-hd44780_pinIO

note: there is a link to the hd44780 library wiki in the included Documentation which can be found in the "Documentation" sketch.

--- bill

Thanks bill

By the way: the D10 bug is not the only one of that shield. https://forum.arduino.cc/index.php?topic=629082.0

Bill

Thanks for the lib and help. Nice way to figure if the lcd is bad, very ingenious :wink:

Also, why not add a transistor (t1) as shown in the schematic? It is much simpler than having to unsolder the ldc board or redo all the traces. Think a 22-100k resistor (R4) in series with the base should work

V2 is the equivalent to d10

gimmick-thane: Also, why not add a transistor (t1) as shown in the schematic? It is much simpler than having to unsolder the ldc board or redo all the traces. Think a 22-100k resistor (R4) in series with the base should work

V2 is the equivalent to d10

You could do that. But it would invert the active level on the backlight. i.e. when d10 is high the backlight would be off, and when low or in input mode the backlight would be on.

Thank you for this.