Go Down

Topic: Warning to users of some vendors LCD keypad shields. (Read 94539 times) previous topic - next topic

jerrybass1955

Hi Folks,
I am a super newbie,  Just got my Uno R3 yesterday and also picked up a Sainsmart 1602 keypad shield.  I ran the test sketch from this post and looks like that shield has the problem.  After running across this post while trying to figure out how to actually make the hardware do something, I read this thread  thoroughly.  If I am understanding correctly, the problem is that the D10 pin on the LCD shield needs to be isolated from the base of the transistor so that D10 won't be looking at a base-emitter drop to ground if it goes high.  If this is correct, seems to me that the easy solution is to remove the pin connected to D10 of the shield and replace it with a jumper wire with a diode or resistor.  Then plug the jumper wire into the pin D10 socket of the Arduino.  I think you could probably even just bend the shield pin in or out and plug in there too.

Am I missing something?  Remember I am new to this world!    I think would rather do this surgery than start scraping off the top of a circuit board or remove the LCD.

I am an EE from way back so I understand electronics, but have primarily been an analog guy.  This seems like a good entry into some neat stuff that bridges both analog and digital.  Looking forward to being part of this group.

Jerry

bperrybap


If I am understanding correctly, the problem is that the D10 pin on the LCD shield needs to be isolated from the base of the transistor so that D10 won't be looking at a base-emitter drop to ground if it goes high.  If this is correct, seems to me that the easy solution is to remove the pin connected to D10 of the shield and replace it with a jumper wire with a diode or resistor.  Then plug the jumper wire into the pin D10 socket of the Arduino.  I think you could probably even just bend the shield pin in or out and plug in there too.

Am I missing something?  Remember I am new to this world!    I think would rather do this surgery than start scraping off the top of a circuit board or remove the LCD.

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

jerrybass1955

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

drdanielfc


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.

bperrybap


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:

Quote
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
.


nicw

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..





bperrybap

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

nicw

#82
Apr 20, 2014, 12:17 am Last Edit: Apr 20, 2014, 12:19 am by nicw Reason: 1
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  ;)

bperrybap


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

nicw

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.

bperrybap


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:
Quote
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


MichaelMeissner


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.

nicw

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.  ;)

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  :smiley-red:

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

Go Up