Warning to users of some vendors LCD keypad shields

Thanks for the wisdom. I took another look and you appear to be correct. I obviously thought there was more room than there is. That said, I think it still may be possible to do something similar using stacking headers like those from Adafruit to lift the board up. The resistor or diode could be built into a modified header I think. I may give that a try since I have a couple of sets ordered (for no particular reason except it looked like something that one should have around).

Jerry

bperrybap:
Jerry,
I don't think you are missing anything.
While your suggestion would seem to work electrically, I'm not sure it is possible mechanically.
There isn't much space once the shield is plugged on to the Uno and the pins are quite stiff in terms of bending
so I'm not sure you could make it fit/work.
The other h/w solutions in the thread are electrically the same as what you are proposing,
they just tap into the circuit by modifying the traces on the PCB rather than mess with the header pin.
--- bill

Hello,

I'm using the SaimSmart 1602 as well but I'm not putting it right on the board, instead using DuPont cables to connect all the necessary pins to my arduino. I apologize for such a simplistic question, I believe it's basically the same as the last one you got, but it would work if I put a resistor in between digital port 10 on the arduino and the equivalent in the LCD shield?

If so, what resistance should I use?

And to be clear, I'd like to be able to use PWM control to dim the backlight, but I really don't want to physically modify the board if I can modify something outside (especially since I already have room to put stuff between the pins).

Again, I apologize for my simplistic questions. I'm not an idiot when it comes to electronics, but this is sort of my first dive into this sort of stuff.

nicw:
This thread seems in a mess to me and is confusing.

The top post states to look at the circuit especially at the backlight transistor. That shows only connections to pins 15 and 16 of the LCD, and to VCC and 0V, it shows no connection to D10 as mentioned.

Yes it does. Look closer at the schematic. While LCD pin 15 is connected to VCC,
LCD pin 16 is not connected to ground. It is connected to a transistor.
D10 connects directly to the base of the transistor.
When D10 is high, the circuit allows current
to flow into the base out the emitter with no current limiting resistor.
And that is the core of the problem.

So I purchased board and checked it. As expected it was the same, connection to pin 15/16 of the LCD, power and gnd with no connection to D10.
That might be the case, if so, then your shield is not the same as these others and does not have a transistor
for backlight control and so it does not have the problem.
Did you run the test program? What did it say?

Then look at the photos of the Diode mod, it clearly shows the diode connected to the trace going to D8 not D10.
I assure that the diode is going to D10 and not to D8.
While not really shown in the photos, (until now) as mentioned in the original post:

The trace to D10 goes around the header then drops through the board.
The trace can be cut and a diode dead bugged to the board.

note: I just updated the 2nd photo in the 2nd post to show the other side of the header
for clarity. As you can see the diode connects to t trace that goes to D10.

Going by the photos the board looks the same as the one I have here, but I can see no issue with it at all, and it matches the circuit as shown.
Maybe you haven't looked close enough? Or maybe your shield is different.
If your shield really is like this one or the others
that has backlight control, then there is a transistor and then the LCD backlight pins
(pin 15 and 16) are not directly connected to power and ground.

what am I missing here? Very confusing thread.....

Not sure. I think perhaps you are not understanding what the problem is?
which is that the base of the backlight control transistor is being driven by an Arduino pin
an there is no current limiting resistor in the circuit path through the emitter
to ground
--- bill
.

Hi,

I wrote to the actual engineers of this circuit to explain the issue at first the engineer disagreed there was an issue, stating the current draw is negligible. Then following the conversation and doing my own tests I was also unable to reproduce the 100mA draw quoted here even though I verified the circuit I was testing was identical to the one mentioned here. After a long discussions and emailing back and forth his final response is below. The final response is acceptable.

NW

Hello,
see image of digital pin internal circuit diagram, showing internal resistor.

When you set it to high, and connect it to D10 pin on l602 shield, it will drop down to 0.7V. It is still OK. But to be safe, we will replace with the NPN transistor with a NMOS instead..

nicw,
What happened to your original post? Looks like it is gone.
Originally you said that your shield was the same circuit and
D10 was not part of the backlight circuit on your shield. Both can't be true.

All I can say is the problem is very real and multiple people have
seen and measured the excessive current draw on the pin.
If you are not seeing the high current draw, then your backlight circuit is not like
the circuit that I showed or you are not testing the same conditions.

Did you run the sketch that will test the shield for the issue?

The image you posted looks similar to the I/O Pin Equivalent Schematic
in the mega328 documentation. The resistor in that diagram is the pullup resistor
and has nothing to do with the issue and will not be limiting the current when
the pin is driven high.

Again the problem is when the Arduino D10 pin is driven high, not when the pin is driven
low or when the pin is in input mode(with/without pullup enabled).

Using a NMOS FET would be a drop in fix for the problem since FETs don't draw current on the gate
the way a transistor does going into the base.
But if I were going to fix the circuit, I'd look at alternatives that use
just resistors which are cheaper than the cost differential
between the existing NPN transistor vs a FET.
i.e. why use a FET to fix the broken circuit when you could just re-design
the circuit using a traditional transistor and an extra resistor?

--- bill

I eventually found one here that was the same, so I removed the post to the different one with a different circuit. I really don't care what other users say they have found with this probably with their hobby equipment. What I said was I could not reproduce what they were saying here with the same design, same sketch, same conditions, which is not that hard to do, this is not a complex circuit. The current draw was far less than I have read here, but I took up the cause to see what I could do with my contacts as others here said they had no response.

As I said after "LONG" discussions the company who designed the original circuit is going to change it. even though they see no real need in their opinion. You cannot assume that a transistor and resistor will be cheaper at the point of manufacture or that fitting two surface mounted parts is cheaper than one, or that a series resistor wont waste current draw etc. The cheapest and best method for them following the discussion they decided was to go to the fet. Like it or lump it :wink:

nicw:
What I said was I could not reproduce what they were saying here with the same design, same sketch, same conditions, which is not that hard to do, this is not a complex circuit. The current draw was far less than I have read here.

If you are not seeing the large current draw, then I'm guessing that the circuit and/or components
you have on your shield is more than likely different than the shield that I have.
I measured the current draw on my setup and it was 100ma which
is way beyond the maximum current rating for a M328 pin.

How much current did you measure with your setup?

--- bill

I am sure there are different tolerance boards, parts, power supplies etc. I measured 49mA on one board, and 44mA on one other, the third board here does not have this connection at all. One board is difficult to change the transistor or neatly modify it, while the other is quite easy with a well exposed transistor and exposed track. In the case here I have elected to permanently disable this entire circuit on both.

nicw:
I measured 49mA on one board, and 44mA on one other

Even on your boards with the issue, both are pushing current above the 40ma maximum DC Current per I/O Pin
as specified in the AVR absolute maximum ratings table.
So I have a very hard time understanding how anyone, especially the goofy designers of
the board that you contacted, could disagree that this is a problem, particularly if you read
the AVR documentation which explicitly states:

Stresses beyond those listed under “Absolute Maximum Ratings”
may cause permanent damage to the device.

But regardless of whether you are able to convince one vendor to correct his broken design,
it doesn't fully resolve the problem going forward, because there are several vendors
out there making similar LCD keypad shields and many of them appear to have copied
the same broken backlight circuit design so the problem will continue to live on.

--- bill

bperrybap:
But regardless of whether you are able to convince one vendor to correct his broken design,
it doesn't fully resolve the problem going forward, because there are several vendors
out there making similar LCD keypad shields and many of them appear to have copied
the same broken backlight circuit design so the problem will continue to live on.

And of course the problem is of LCD shields that are already made, and may be sitting on some distributor's shelf waiting to be bought.

Lets get this into perspective shall we. You simply cannot accept bugs in software as fact, and then just expect all hardware, (especially of this kind) will always be bug free, and the main reason I contacted the designer of this board in the first place when I saw others had failed. They make the boards for many distributors under different brands, and any change will eventually filter through.

We need to make sure any visitors to this site are made aware of such things and its explained plain enough for them to take corrective action in SW or HW many new comers may not understand. In my profession I see such things often, even well designed hardware can fail in production due to unexpected or unforeseen events. IMHO this will often be an issue buying Chinese copies of hardware, even Arduino compatible boards with extra features will probably get errors in the design, and a good reason to support official products. In this particular case the hardware is reasonable enough, and most hardware of this kind with those will lesser knowledge are far more likely to destroy a board or an IO pin via other methods. :wink:

drdanielfc:
Hello,

I'm using the SaimSmart 1602 as well but I'm not putting it right on the board, instead using DuPont cables to connect all the necessary pins to my arduino. I apologize for such a simplistic question, I believe it's basically the same as the last one you got, but it would work if I put a resistor in between digital port 10 on the arduino and the equivalent in the LCD shield?

If so, what resistance should I use?

And to be clear, I'd like to be able to use PWM control to dim the backlight, but I really don't want to physically modify the board if I can modify something outside (especially since I already have room to put stuff between the pins).

Again, I apologize for my simplistic questions. I'm not an idiot when it comes to electronics, but this is sort of my first dive into this sort of stuff.

I'd just like to make sure my question isn't forgotten; would highly appreciate an answer :blush:

dr,
A diode would be better than a resistor as that would allow d10 to fully pull the line
going to the base of the transistor low (which eliminates the current going into it)
but would not drive the line high which is where the issue is.

An issue with using a resistor will be that while the resistor will protect the pin from
the transistor drawing too much current when D10 is high,
it creates a voltage divider with the existing pullup resistor so the signal going
to the transistor will be some voltage above ground that may not turn off the backlight
as it will allow some amount of current to flow into the base of the transistor.

The actual current going into the base will depend on the value of the resistor
you select, and value of resistor used on the shield as a pullup and the transistor
used on the shield.
Since most shields don't provide an accurate schematic with exact parts used,
it's not possible to precisely calculate a resistor value or tell if it would completely turn
off the backlight (i.e. it might still be very dim, when you try to turn it off)

For sure 125ohm or larger would protect the pin from excess current
but depending on the other components, it might not fully turn off the backlight.

If you wanted to experiment a bit, you could use a pot rather than a fixed resistor.
Then when D10 is low, turn down the pot until you see the backlight go off.
(there is no overcurrent danger in doing this)
You then need to see if that value is large enough to protect d10 from over current.
To do that you need to measure the current going through the wire when D10 is raised to high.
Since the resistor value of the pot might be low enough to allow excessive current,
you should carefully do this test.
Just set it all up, but don't fully connect the meter.
Then connect the meter. The backlight should light up and you can
measure the current coming from D10. If it is over 40ma, the resistor value
should be larger.

While there is probably a resistor value that works acceptable, I'd use
a diode instead as it won't waste additional power when the backlight is on.

--- bill

bperrybap:
dr,
A diode would be better than a resistor as that would allow d10 to fully pull the line
going to the base of the transistor low (which eliminates the current going into it)
but would not drive the line high which is where the issue is.

An issue with using a resistor will be that while the resistor will protect the pin from
the transistor drawing too much current when D10 is high,
it creates a voltage divider with the existing pullup resistor so the signal going
to the transistor will be some voltage above ground that may not turn off the backlight
as it will allow some amount of current to flow into the base of the transistor.

The actual current going into the base will depend on the value of the resistor
you select, and value of resistor used on the shield as a pullup and the transistor
used on the shield.
Since most shields don't provide an accurate schematic with exact parts used,
it's not possible to precisely calculate a resistor value or tell if it would completely turn
off the backlight (i.e. it might still be very dim, when you try to turn it off)

For sure 125ohm or larger would protect the pin from excess current
but depending on the other components, it might not fully turn off the backlight.

If you wanted to experiment a bit, you could use a pot rather than a fixed resistor.
Then when D10 is low, turn down the pot until you see the backlight go off.
(there is no overcurrent danger in doing this)
You then need to see if that value is large enough to protect d10 from over current.
To do that you need to measure the current going through the wire when D10 is raised to high.
Since the resistor value of the pot might be low enough to allow excessive current,
you should carefully do this test.
Just set it all up, but don't fully connect the meter.
Then connect the meter. The backlight should light up and you can
measure the current coming from D10. If it is over 40ma, the resistor value
should be larger.

While there is probably a resistor value that works acceptable, I'd use
a diode instead as it won't waste additional power when the backlight is on.

--- bill

Is there a specific diode I should use (ie could you link me to a good one)? And I can just connect it between d10 on the shield and the arduino? Does the orientation matter?

I truly apologize for the simplistic questions.

drdanielfc:
Is there a specific diode I should use (ie could you link me to a good one)? And I can just connect it between d10 on the shield and the arduino? Does the orientation matter?

I truly apologize for the simplistic questions.

There is discussion about this earlier in the thread.

Thank you bperrybap for the headsup and the test sketch (OP), and dweston for the diode fix. I just purchased a no-name board equivalent to the old dfrobots and the sketch showed it to be bad, with a current of 121ma. I found a 1N5817 on an old circuit board and after installing per dweston's directions (Reply#10) the current dropped to 65ma and the sketch indicated it was good. Both of you rock!

Is that current for the entire shield or just for the d10 pin?
If it is just for d10, then it is still too high as 40ma is the max current per pin.

--- bill

I just purchased the DFRobot version from Amazon and it had this issue. I followed post #69 by Rocketeer503 but used a 1N5231 diode instead since it was what I had on hand. I ran the test sketch and it checked out good! Thanks! I will update if I have any issues down the road

Hey guys,
I just got this 1602 keypad shield http://imall.iteadstudio.com/im120417018.html and found this thread.
I've read through here and did the test - checked out bad, but I'm still very confused as to whether or not this is a shield that has the mentioned problem.
As a noob I see the D10 input mod from post #3 as the best "fix", but I'm unsure as to how to use this.
Could someone please upload a sample code with the D10 correction so me and others can test it out and use it in our future sketches?

Cheers!

Fyod:
Hey guys,
I just got this 1602 keypad shield http://imall.iteadstudio.com/im120417018.html and found this thread.
I've read through here and did the test - checked out bad, but I'm still very confused as to whether or not this is a shield that has the mentioned problem.
If you run the test sketch and it reports the shield has the issue. The shield has the issue.

As a noob I see the D10 input mod from post #3 as the best "fix", but I'm unsure as to how to use this.
Could someone please upload a sample code with the D10 correction so me and others can test it out and use it in our future sketches?

"sample code with the D10 correction" ????
I'm not sure what you are asking for.

I as well as a few others have posted h/w fixes for the issue.
I also posted a text document in a zip file that includes a description
of the issue, along with 2 possible s/w only work arounds, along with instructions
on how to use them in your sketches.