Go Down

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

wmassey

I decided to bite the bullet and separate the LCD module from the LCD/keypad shield I have. Unsoldering 16 pins simultaneously is a challenge but it can be done if most of the solder is sucked out of the holes and then you wiggle the two boards relative to each other and also wiggle each pin in each hole for a while to break loose any solder that does remain.  I found an SOT-23-3 transistor labeled AM1 (like this one http://www.digikey.com/product-detail/en/SMMBT3904LT1G/SMMBT3904LT1GOSTR-ND/3062754 ) installed on the lower board.  I got this 2N7002 FET as a replacement for the transistor: http://www.digikey.com/product-detail/en/2N7002,215/568-1369-1-ND/763366. Soldering something that is as tiny as one of these is also a challenge and you need to have a good soldering iron with a needle tip to attempt it. After connecting everything back together it works.

I found that the following code could be used to turn the backlight on or off or any value in between.

  pinMode ( BACKLIGHT_PIN, OUTPUT );
  analogWrite ( BACKLIGHT_PIN, 64);        // a value of 000  (off) to 255 (on) controls PWM%
  //digitalWrite ( BACKLIGHT_PIN, HIGH );  // turn on backlight
  //digitalWrite ( BACKLIGHT_PIN, LOW );   // turn off backlight

  lcd.begin(16, 2);              // start the lcd object

C2

#61
Dec 25, 2013, 10:33 pm Last Edit: Dec 27, 2013, 11:59 am by C2 Reason: 1
Hi All,

Just discovered this issue in my LCD shield.

[edit: I just replaced the transistor with a 2n7002 (marked 702  3d salvaged from a random PCB), since I shorted the transistor that was in there trying one of the earlier suggestions. Whew!]

[edit2:  that lasted a few minutes. I had a simple timer to turn off the backlight after 60 seconds. After a few cycles, instead of going off, the backlight flickered and then went off permanently. I've now cut the trace to D10, the gate voltage is 0.34V, 2.4V on LCD pin 15. I can jump the gate voltage to 5V and measure about 40mA, and the backlight will then go on. So the mosfet seems to be working. Seems like the 4.7K resistor is open or maybe there is not enough to drive the mosfet?]



I have these small signal diodes: PMBD914
datasheet: http://www.nxp.com/documents/data_sheet/PMBD914.pdf

Will that diode work here?

If so, I can cut the trace from arduino pin 10 on the shield. Do I solder pin 3 of the diode to arduino side pin 10?

Thanks!

AMPS-N

AMPS

dhalbert

I bought an OSEPP 16x2 LCD display shield today (16X2SHD-01) and found it has the same issue. The test sketch posted here reports it as "BAD". There is a 1K pullup resistor and no base resistor (schematic from OSEPP). Intriguingly, I can just barely see an empty SMD outline next to the 1K resistor. I tried removing the display to see how easy it would be to add a base resistor, but failed: my only desoldering tool is a solder sucker and some pads were starting to lift.  So I'll live with it for now: I don't really need to control the brightness for the simple projects I have in mind.

bperrybap

dahlbert,
I'd recommend reporting the issue to them.
Maybe post a thread on their support forum.

--- bill

dhalbert

I'd recommend reporting the issue to them.
Maybe post a thread on their support forum.

Will do. I am now awaiting registration approval on their forum.

flyingfish

Hi All, This is my first post and I hope I have not broken any rules unknown to me. Thank you for the heads up on the backlight D10 NPN issue and the work-arounds. Well done to all. In my case I am using the PCF8574 Remote 8-bit I/O expander for I2C-bus LCD 'backpacks' and am wondering if the same issue is at hand when the 8574 drives the J3Y S8050 NPN transistor on those particular boards. They seem to have the same LED circuit as the LCD shields. See attached. Kind Regards to all.
- Gary

bperrybap

Good catch and great question.
Slightly off topic, but still a bit relevant.
The PCF8574 uses quasi bi-directional i/o pins.
This is done by using the data in the port register as the direction bits.
If the bits are a 0, the pin is an output as driven low.
If the bits are 1, then the pin is an input and a pullup is turned on.
The result is that PCF8574 can only sink current or drive pins low.
When the bit is 1, then the pin becomes an input with a pullup resistor
so it can't source much current.

The "short" issue in this circuit is when the base of the transistor is high.
Since the PCF8574 can't really drive current with a high output signal, (it only turns on a pullup),
it doesn't create an issue since there is no "short".
Essentially the circuit is taking advantage of the internal design of the PCF8574.
That said, do I think the designers of this board intentionally did this?
Probably not,  I think more than likely they got lucky.

--- bill

flyingfish

Dear Bill, Your explanation regarding the I2C PCF8574  backpack is well put indeed.  The PCF8574 datasheet mentions 'Latched outputs with high current drive capability for directly driving LEDs.' But closer reading reveals that this relates to current sink of 25mA and current source of up to 300uA with a 1mA transient pull-up current for one clock pulse only.  I was worried as I have a system in the tropics that uses both the LCD shield and I2C backpacks. My concern was that the operating temperature peaks around 58degC (136degF) and I was worried that I may cook the D10 pin at elevated operating temps. Luckily, the PWM LED dimming function has not been selected yet...

May I say this entire thread has been most helpful and I thank all who have contributed.  I do hope I will be able to provide some assistance with regard to aspects of my arduino system applications in the future.

F.Y.I. my LCD shields (varying designs old and new) all fail the backlight test, and on pcb inspection reveal direct connection to D10. I will be installing FETs on all shields. Bill, thank you for your time to respond so quickly.

- Gary
- Gary

Rocketeer503

#69
Jan 26, 2014, 12:56 am Last Edit: Jan 26, 2014, 01:45 am by Rocketeer503 Reason: 1
Thanks bperrybap for the test program and the heads up. I have the Sainsmart LCD keypad shield that I just purchased on Ebay and it lists as dimmable. I don't think the builders are going to correct the boards considering the time frame of this issue. This thread is needed. Despite the earlier programming cautions, I don't recommend any software fix as Arduinos are used for testing and a preexisting sketch may have set pin 10 high. If the shield is then put on before connecting to the computer, the USB port will be overloaded before reprogramming and hopefully just disconnect. This however would be frustrating to figure out if this issue is not known. A hardware fix is the only good option.  I had some old radio shack 1N34A germanium diodes and completed your repair. Found that the diode can easily brake if the leads are not carefully bent. Thanks again.

Reb9

My DFrobot keypad LCD purchased Jan2013 also has a 1K resistor for R7. (you can measure it between pin10 and the Vcc pin) The board matches the pic posted by Rocketeer503. Unfortunately this means that neither a 500R resistor or a 1N34 diode from the transistor base to pin 10 will turn off the transistor. I tried both and they only drop a couple of mV from the nominal 0.8v base voltage - not enough to turn off the transistor. My bare board draws 8 mA with pin 10 grounded and the LCD backlight off or 25 mA with the light on. I think I'll just leave the pin 10 trace cut and soldier on without dimming capability.

bperrybap

Reb9,
An alternative is use a resistor between D10 and the base *AND* cut the connection of R7 to VCC
You might even be able to re-use R7
by cutting  the D10 to base connection and re-connect it to
the other side of R7 where VCC was so R7 now connects to D10 on one side
and the base on the other.
This allows D10 to have full control of the transistor.
The draw back is that by default the backlight will be off since there
is no pullup on the base.
This can eaasily be fixed in s/w.
An easy remedy is to  simply switch to using fm's LiquidCrystal library
replacement:
https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
If you fill in the constructor with the backlight control information,
then lcd.begin() will turn the backlight for you.
You will also be able to use lcd.backlight() to turn it on, lcd.noBacklight() to turn it off and
lcd.setBacklight(dimvalue) for dimming.

Note:
Do not use the deprecated setBacklightPin() call, just fill in the constructor
with the backlight pin and polarity. After that, every thing will work just
like with the LiquidCrystal that comes with the IDE other than you now
have backlight control.

--- bill

Reb9

Bill
Doesn't look like I can do that on this shield without removing the LCD sub panel. I may eventually pluck the transistor and dead bug a new one.  I'll keep your suggestions in mind.
thanks for keeping this thread going

Ceramiclover

I am new to Arduino and am almost wholly incompetent with PCB's.  I bought the Sainsmart 1602 on Ebay, used the test program and found my LCD to fail.  I am interested in the software fixes, but am unsure where to put the code and what specific code I should use.

Am I modifying the library or each individual sketch?
Does this short fry the pin when the backlight is bright or dimmed?  And if it is one of these, can I just leave the LCD in one setting.

The shield seems to be working now.  Does it dry the pin gradually or immediately?

Thanks.

bperrybap

Ceramiclover,
The information you are asking about is there but is scattered about
across various thread responses.

I have updated the initial post with information about s/w work arounds.
Go have a look at the first post again and you will see the new information.

In terms of s/w modifications you could modify either the library or the sketch.
The default LiquidCrystal library does not have any way to control the backlight,
so if using that library, the changes would be in the sketch.
If using some other 3rd party LiquidCrytal library like fm's library, then the changes could be in either the library
or the sketch.

The information I provided shows how to do it in the sketch
as it will work for any library.

--- bill

Go Up