Warning to users of some vendors LCD keypad shields

I use B4R (free basic cross compiler) and made a wrapper that incorporates your detection. I have 2 of these units (one good, one bad) and do not wish to trow any out.....I just will use i2c going forward.


Good job for supporting some users.

Please, DO NOT do this stupid thing.

Ive just burnt my lcd doing that omg. >.<

For those wanting to test their shield for this problem, there is an easy test.

Remove the shield from the arduino.

Attach a wire to the D10 pin on the shield.
Hook up ground and 5v to the corresponding shield pins.

When power is turned on, the backlight should light.

Ground the wire going to D10, the backlight should go off.

Now for a simple test.

Briefly (and I mean just a brief touch) connect the wire from D10 to Vcc.
If the backlight, blinks when you touch the D10 wire to VCC, the shield
has this issue.

Do not set D10 to HIGH or use PWM on this shield unless you modify it.
You can still control the backlight .
First set D10 to LOW. (only need to that once)

Then set the D10 to OUTPUT for off and INPUT for on.

UPDATE: (2014-07-03)
It is possible that there is still an issue even if the backlight doesn’t “blink” during
the above test. This could happen if the excess current draw isn’t large enough to cause
a power issue for the backlight when doing the above test.
It is possible that the current demand is still way beyond what
an AVR pin can safely supply.
If this is the case, it might work a while but could end up frying the AVR over time.

The best way to test for an issue is to actually measure the current on the D10 pin when it is being driven high.
To do this, wire up the shield as described above but then measure the current between the D10 pin and VCC.
Set your meter for current with + probe going to VCC and - probe going to the D10 pin on the shield.
If you measure more than about 30ma, the backlight circuit has the issue.

— bill

Please, DO NOT do this stupid thing.

Ive just burnt my lcd doing that omg. >.<

The current recommend way to test a shield is to use the test sketch indicated in the first post.
Even better is to use my hd44780 library which will work around the issue and also includes a test sketch to test for the issue, which is also mentioned in the first post.
Either of these test sketches are quick and simple to run and if you use the hd44780 library you don’t need to worry about it and can use the backlight API calls without worry of h/w damage.

How long did you connect the pin to vcc?
A brief touch would be moving the wire twards another wire in a quick motion where wires only briefly touch as the wires cross paths. Any more time and the risk of damage increases.
It is test that does come with risk of damage if you connect the wire too long.
It is kind of like testing the battery in you car by shorting out the jumper cables to see if you see a spark.
A very brief momentary touch is ok, but if too long it can cause damage.

When measuring the current into the D10 pin of the shield you must measure the current from the D10 pin on the Arduino board and not from VCC. If using VCC instead of D10 for measuring current, it will likely fry the transistor since the AVR can’t supply nearly as much as a unrestricted 5v supply.

The LCD should be fine, more than likely what happened is the transistor got fried.
What did you use for the 5v?
I guess I should have said to use the 5v from the Arduino rather than a bench supply as the Arduino board can’t supply gobs of current.

I’ll go update the post that describes this to not recommend doing this and instead use the s/w from the first post.
That post was written before the s/w to test for it existed.

— bill

1st off thanks to all who have contributed to the solutions in this thread!

2nd, HELP please!

I, like many others, just purchased one of these display shields. Read through this thread and downoaded the test sketch. The test sketch showed that my display had the problem. I disassembled the display off the main board to get to R7 and Q1 and found that R7 was 1KOhm. On my first read through, I didn't catch that a 1K would cause a problem using the recommended 510Ohm between D10 and base. (I didn't have any diodes handy.) So I cut the trace and installed the 510 and re-soldered the display back on. Test sketch now shows good, but I have no backlight control, it just always stays on.

I saw one post talking about needing a 29K but using a 10K and switching the 1K somewhere else, but I'm not savvy enough to follow what that was talking about. If I replace the 1K with a 4.7K and replace the 510 with a 10K will that work? Like the new schematics, or what do I need to do to get backlight control working?

Thanks for any assistance!

Impressive that you able to successfully get the LCD off the shield. It is often quite difficult, unless you have some desoldering tools.

What is needed is to limit the current from D10 going into the base. The shields that have the issue don't have a resistor between D10 and the base. They typically only have a resistor between the base and VCC. This is a pullup resistor used to feed current into the base to turn on the backlight when D10 is an input and not driving the signal.

From your description, I can't tell what design you had or what you have done. You also mentioned 2 resistors in the last paragraph.

Can you fully describe all the connections going to the transistor base and to D10?

-- bill

Mine is like the original schematic with VCC going into one side of a resistor (R7), the other side of the resistor goes to the base of the transistor. Also to the base of the transistor is a trace back to D10 with no resistor. However, my R7 is 1K, not 4.7K like the schematic. I cut the trace to D10 and dead bugged a 510Ohm across the gap, which made the test happy, but the backlight won’t dim at all. I saw someone say they had to use a lower (~120Ohm) in the D10 line, but I think I also saw somewhere that still allowed too much current to flow and could cause damage.

As to the two resistors. There is a new schematic out there from dfrobot (attached) that shows a R7 4.7K just like the old schematic and a new R8 10K in between D10 and the base. Is that new schematic what they did to fix the problem and has a safe current load? Can I remove the 1K R7 and replace with 4.7K and swap the 510 for a 10K?

schematics-v1.0-dfr0009.pdf (48.4 KB)

Still not sure exactly how you wired in the added resistor.

It sounds like you may have put the new resistor in between D10 and the base but not between R7 and the base.

If you did that, then the short issue is resolved but D10 won't be able to turn off the backlight as there is now a voltage divider formed by R7 and your new resistor rather than D10 being able to absorb the current from R7.

If that is what you did, you could cut the trace between R7 and VCC. The backlight will be off until s/w turns it on by setting D10 high.

D10 must connect directly to the non VCC side of R7 to be able to pull down the pullup. There must also be a resistor between D10 and the base to prevent a short through the base. D10 needs to connect to both resistors like what is shown in the schematic that was in your post.

--- bill

Sorry that I am not describing it well. This is what the traces, etc. look like on my board. I tried to take a direct photo, but the board is black and it just wouldn’t work.

I cut the trace between D10 and where it connects to the transistor side of the R7 resistor. Then jumped the gap with a 510Ohm resistor.

So I need to restore the trace where I cut it and then cut the trace between the R7 resistor and the transistor and patch the 510 Ohm across there?

You can't turn off the backlight the way you did the modification as that creates a voltage divider rather than allowing D10 to ground the R7 pullup resistor.

To fix it, isn't just restoring the D10 trace and inserting the the new resistor between R7 and the base.

It is what I said earlier:

D10 must connect directly to the non VCC side of R7 to be able to pull down the pullup. There must also be a resistor between D10 and the base to prevent a short through the base. D10 needs to connect to both resistors like what is shown in the schematic that was in your post.

You have to do the resistors like what is shown in the schematic in your post #166 schematic Note that D10 connects to both resistors and still must flow through a resistor before going to the base.

Its been a long time since I looked at this, but from what I remember, depending on the board trace layout, it may be very difficult to dead bug the added resistor between R7 and the base and get D10 to connect between R7 and your added resistor.

Alternatively, you could just cut the r7 to vcc connection with what you have now and D10 could control the backlight, but the backlight would be off until D10 turned it on.

Another possibility is to measure the actual backlight current. Some 16x2 backlights are very low current and use as little as 2-5ma. If that is the case, then you don't need a transistor at all and you could control the backlight directly from the D10 pin.

--- bill

Thanks for helping me get my head wrapped around the correct interpretation of that schematic. Got it working with backlight control now and a good report from the test sketch.

MTWallet: Thanks for helping me get my head wrapped around the correct interpretation of that schematic. Got it working with backlight control now and a good report from the test sketch.

Cool! That is great. Did you end up increasing the resistor values? It isn't necessary but it would reduce the wasted power a bit.

I'm curious what did you use to remove the solder on the LCD pins? I have a desoldering iron with a vacuum pump but it wasn't good enough for the job.

Are you using the hd44780 library which supports backlight control and auto-detects the keypad shield backlight circuit issue and does a s/w work around automatically if necessary?

I went with the 10K Ohm resistor as that was what was listed in the other post about R7 being 1K (also it was what was on the new schematic.)

As to removal, I had to remove it twice. The first time I flush cut all the pins sticking through the bottom of the main board, then I added a good bit of solder to all those connections, not enough to bridge them, but pretty good blobs. Then I used my soldering station with a large tip on the iron and set it to about 450C and then ran that back and forth along the bottom of all the pins while pulling the LCD from the other side. This eventually liquified all the blobs enough for the pins to pull through. Then I cut the plastic pin holders on the bottom of the LCD so that each pin was separated and pulled them through the LCD while heating the other side with the iron at a more normal temperature. A little cleanup of the holes with some solder wick, and back in business. The raking did bang up the solder pads a little bit though. No serious damage, but they weren't so pretty anymore.

The second time I didn't want to accidentally kill any of the solder pads on the bottom with the raking, so I used my hot air rework gun on the top next to the LCD while pulling the LCD away from the bottom board. I wasn't too keen to do this as I was afraid the heat might damage the LCD panel, but it ended up being OK. Then I did the same cut pins and pull separately through the bottom board and clean holes with wick like I had done the first time. Once I got it all back together, I thought I had killed the LCD because the top 1/4 of it wasn't displaying, but fortunately it was just some flux that had wicked under the panel connector so after I took the display apart and cleaned up with some alcohol all was fine. (The 2nd time I put it back together I used some pin sockets on the main board instead of directly soldering the display to the board as I'm not concerned about depth.) So it was easy to get to the back of the LCD that time. Also I could get back to the resistors if the 10K didn't work out.

As for libraries, I haven't started using that yet. I am a complete newbie to arduino and honestly, right now I wouldn't even know what to do with the library if I added it.

Sorry for the long descriptions of desoldering, but maybe it will help someone in the future. And thanks again for the responses to help get me straightened out.

Very nice write up. I didn't ever think of flush cutting the pins. I think that would be a big help.

For the library - called hd44780, it is noted in the first post and available in the IDE library manager. It provides API functions to control the backlight, whereas the IDE bundled LiquidCrystal does not. It is also much faster than the bundled LiquidCrystal library.

--- bill


I cannot tell from all the postings if this shield is totally dead ie not useable unless this backlight problem is resolved or are there just some undesirable backlighting effects. In the one I have I can turn the backlight down but all I see is small rectangles for where “hello world” should appear.

See attached photograph.

Did you run the diagnostic tool included in the hd44780 library to test the shield? --- bill

No I didn't. I was hopping around from post to post and I saw something about someone blowing their board due to some test code. If that test code is indeed valid and safe then I'll give it a try.

Well, if the shield has the backlight design flaw, then there is always the possibility of an issue. However, the test code minimizes the amount of time that the Arduino pin is driven to try to avoid any issue. The amount of time will be in milliseconds. In real life I've done testing on my shield and have had the backlight control pin driven high for a minute or more without issue.

I've only heard of an issue from one person (earlier in this thread), and when I tried to contact them for more information as to what they had done, they didn't respond with they actually did so I have no idea what he really did to blow his Arduino board.

So far over the course of several years I've not heard anyone saying that running the diagnostic test sketch I provided damaged their Arduino.

--- bill

OK, I understand that was "fake news" :confused: Anyway, if it has the design flaw does the display still work at all, should I be able to see some characters? Does that bad design keep the screen from showing characters? If the answer is that it only affects backlighting then there's no point in me trying test code.