Go Down

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

bperrybap

OK, I understand that was "fake news" :smiley-confuse:
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.
Fake news? I have no clue what you were tying to say.

With these comments it sounds like you didn't read the initial post in this thread.
It describes the issue. It is a backlight control issue.
If the Arduino drives the pin connected to the backlight circuit on the shield, there is the potential to damage the AVR processor since the backlight circuit is pulling way over the allowed current that an AVR pin can safely supply. (and  other processors too)

--- bill

HaplessDIY

Fake news? I have no clue what you were tying to say.

With these comments it sounds like you didn't read the initial post in this thread.
It describes the issue. It is a backlight control issue.
If the Arduino drives the pin connected to the backlight circuit on the shield, there is the potential to damage the AVR processor since the backlight circuit is pulling way over the allowed current that an AVR pin can safely supply. (and  other processors too)

--- bill

Sorry Bill, I was trying to be funny about "fake news".  I suppose you don't follow politics much.  Good for you.

I did go back to the original post, download, and ran the code, sure enough BL Circuit BAD.  So now I have many answers if not all.  I just need to sort out the details.  In the meantime I will enjoy the flashing bad message.

If I can be so humble as to suggest, your original post should be in a "sticky" with no responses allowed. 
My problem was that I read your post and I decided, well, I better read all the next posts because there is obviously more to the story.  The more I read the more confused I got.  I am an EE and I have a garage full of 1n34 to schottky diodes maybe even gaas  its just that I got tangled up in a long thread  of suggestions and counter suggestions and I couldn't tell who or what to believe.

I think I read somewhere in the threads that a workaround can be had by just not connecting pin10.  I'll look into that one.  Somewhere I saw mention of a schematic but then it wasn't clear that it was an accurate schematic.

The only other comment I would make is that while it is a "backlight control" problem it will make it look like the LCD  doesn't work at all.

Thanks for writing that code.  Its a nice piece of work.  I will dig into it.


bperrybap

The LCD should be working. The images that you posted looked like an LCD that was not initalized properly.
Perhaps you were not initializing what ever library you were using correctly.
i.e. if you used the HelloWorld sketch from the LiquidCrystal library "as shipped" it will not work with that shield as it uses different pins to control the LCD than the shield uses.

The backlight issue is actually a simple error in the design. They did not put a current limiting resistor in series with the Arduino pin driving the base of the transistor to limit the current being fed into the transistor. The transistor acts like a short to ground and allows more current to pass through it than the AVR pin is rated for.

The solution would be simple if you could get to the PCB area to add a resistor but on most shields the area you need to get to is underneath the LCD panel and desoldering it is pretty difficult.

There are several options in both s/w and h/w to deal with it.
You could use the hd44780 library instead of LiquidCrystal as it will check for the issue and work around it in s/w.
Or you could do a h/w mod to actually fix the h/w.
Or you could just make sure to never drive pin 10 high and let the backlight remain in its default state which is on when the Arduino pin is an input.

--- bill

HaplessDIY

.e. if you used the HelloWorld sketch from the LiquidCrystal library "as shipped" it will not work with that shield as it uses different pins to control the LCD than the shield uses.

you are correct I was using the library "as shipped" so your code fixed that problem.  I would have never figured this out unless I would have dragged out a logic analyzer and captured the data and then studied the controller spec etc.  or I suppose followed all those circuit traces.  No way would I have spent that much effort.

Who figured out that the pin assignments were wrong?  Was that in the Shield information from these different suppliers?


bperrybap

Was that in the Shield information from these different suppliers?
A schematic...  ;)

bperrybap

And a drawing...
A schematic is a drawing.
No fancy tools are needed to see the pin connections. Just look at the schematic.
It was attached in the very first post of this thread.
And even if a schematic wasn't available, it would only take a few minutes to figure out the Arduino pins being used to control the LCD by using an ohm meter.


--- bill

nielyay


bumblepom

#187
Sep 18, 2018, 01:12 am Last Edit: Sep 18, 2018, 01:21 am by bumblepom
My shield in duinotech XC-4454 2x16.
I've attached it to a Sainsmart UNO with the sketch below and it worked fine with good brightness.
Then, because I want to be using the Arduino without the shield actually pressed on, to free access to other pins, I reconnected it with jumpers, eyeballing the matching connections.  I initially connected just D4-9 plus 5v, gnd and A0.  I also experimentally connected other (matching I believe) pin with jumpers.
The display still works, i.e. gives the correct output w.r.t. button presses but the screen is very dim.  I'm not sure the backlight is on at all.
I pressed the shield back onto the UNO and still dim. I connected a 9v supply - no change.  I uploaded the sketch to a genuine Mega 2650 R3, pressed on the shield, and get the same result.

Is it possible/ likely I damaged the LCD (there is a transistor I read can be damaged?) by manually connecting pins?

Code: [Select]
// sketch 09-01 USB Message Board

#include <LiquidCrystal.h>

// lcd(RS, E, D4, D5, D6, D7)
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
int numRows = 2;
int numCols = 16;
int sensorPin = A0;
int boo = 0;



void setup()
{

  Serial.begin(9600);
  lcd.begin(numRows, numCols);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Arduino");
  lcd.setCursor(0,1);
  lcd.print("Rules");
}

void loop()
{
  if (Serial.available() > 0)
  {
    char ch = Serial.read();
    if (ch == '#')
    {
      lcd.clear();
    }
    else if (ch == '/')
    {
      // new line
      lcd.setCursor(0, 1);
    }
    else
    {
      lcd.write(ch);
    }
  }
  testfunction();
}

//======

void testfunction()
{
boo = analogRead (sensorPin);
lcd.clear();
   lcd.setCursor(0, 0);
lcd.print (boo);
Serial.println (boo);
 delay (5000);
}

bumblepom

#188
Sep 18, 2018, 11:20 pm Last Edit: Sep 19, 2018, 12:06 am by bumblepom
So, using the hd44780.h library and this sketch:

// LCDKeypadCheck - LCD keypad shield backlight circuitry test
// Copyright 2013-2016 Bill Perry

I get "BL circuit bad"  so I guess something has happened to damage the LCD circuits.  I've got another LCD 2 x 16 on order, this time not a shield (I don't want it clamped to the other board), and with the I2C backpack.  So  think I'll just move on.

EDIT: Does "BL circuit bad" refer only to the LCD shield itself or can it mean a damaged i/o pin on the AVR?

bperrybap

#189
Sep 19, 2018, 01:41 am Last Edit: Sep 19, 2018, 01:47 am by bperrybap
EDIT: Does "BL circuit bad" refer only to the LCD shield itself or can it mean a damaged i/o pin on the AVR?
It means the BL circuit on the shield is a bad design and has the short circuit issue on digital pin 10.
Which means that you need to be careful not to set D10 to HIGH as the high current draw could potentially damage the AVR.

I'll update the message to be a little clearer.
It will be in the next release of the code.

--- bill

bumblepom

It means the BL circuit on the shield is a bad design and has the short circuit issue on digital pin 10.
Which means that you need to be careful not to set D10 to HIGH as the high current draw could potentially damage the AVR.

I'll update the message to be a little clearer.
It will be in the next release of the code.

--- bill
Thanks Bill
Pin 10 seems still OK (led flash output OK).  Is there an alternative pin-to-pin I can jump to turn on the backlight or is it likely to be permanently dead?

bperrybap

The message display on the LCD by LCDKeypadCheck was left alone.
The comments in the sketch were updated to better explain what "BL circuit bad" means.
It will be in the next release of the library.
--- bill

bperrybap

#192
Sep 19, 2018, 02:07 am Last Edit: Sep 19, 2018, 02:10 am by bperrybap
Thanks Bill
Pin 10 seems still OK (led flash output OK).  Is there an alternative pin-to-pin I can jump to turn on the backlight or is it likely to be permanently dead?
Not sure what you mean by "led flash output OK". The led on the Arduino board is pin 13.


If you use the hd44780 library, you don't have to worry about it. You can use the backlight control API functions to turn the backlight on/off as the library auto detects the issue and works around it to protect the Arduino.
If you try to use dimming [ the setBacklight() ] function, the library will disable dimming and revert to safe on/off only as dimming can't be done safely with that backlight circuit.

If you don't use the hd44780 library, don't manually control the backlight using digital pin 10 or attempt to use PWM on digital pin 10.
While it may appear to work, it can potentially damage the Arduino processor.

And no matter which library you use, don't ever set D10 to high unless you hardware modify your shield.

--- bill

bumblepom

Not sure what you mean by "led flash output OK". The led on the Arduino board is pin 13.


If you use the hd44780 library, you don't have to worry about it. You can use the backlight control API functions to turn the backlight on/off as the library auto detects the issue and works around it to protect the Arduino.
If you try to use dimming [ the setBacklight() ] function, the library will disable dimming and revert to safe on/off only as dimming can't be done safely with that backlight circuit.

If you don't use the hd44780 library, don't manually control the backlight using digital pin 10 or attempt to use PWM on digital pin 10.
While it may appear to work, it can potentially damage the Arduino processor.

And no matter which library you use, don't ever set D10 to high unless you hardware modify your shield.

--- bill
I connected LEDS to pins D8 -13 (a clip-on mini shield) and No 10 functioned normally.

I added " setBacklight (255); "  within the setup of LCDlibTest but got "'setBacklight' was not declared in this scope".  I'll be talking to an experienced user later today so will try to sort it out with him.  But I'm still trying to understand: If it is most likely the circuitry within the shield is damaged, maybe it is impossible to turn on the backlight regardless of the SW.

bperrybap

It doesn't sound like anything is broken. The shield you have has a design flaw.
To really fix it requires a h/w modification. hd44780 can detect it and work around it but you will loose dimming capability
as dimming requires using the pin in way that could damage it with the shield you have.

The API functions are methods within the lcd object. So if your lcd object is named "lcd",
you would use lcd.backlight() or lcd.noBacklight() to turn the display on/off.

setBacklight(dimvalue) is for dimming, and while you could use that, dimming won't work if the shield has the BL circuit issue.
If the BL circuit is detected by hd44780, all values other than setBacklight(0) will turn on the backlight with no dimming supported.

--- bill

Go Up