Pages: 1 2 [3] 4 5 6   Go Down
Author Topic: Warning to users of some vendors LCD keypad shields.  (Read 47196 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI, I am working on my phi-3 shield design right now, a revision of my popular LCD keypad shield with lots of add-ons. It will have what these generic shields don't. You may choose which pin drives the LCD back light and only 3 resistors for 6 buttons on one analog input, of course compatible with phi-1 and phi-2 software and phi_prompt user interface library. I will be releasing the 20X4 version shield first. It will also feature a small proto area for and IC up to 16 pins, for example, shift registers etc can be used to sense/control multiple things via the RJ-45 ports. You can also use DAC or other stuff on the proto area.

Here is an idea:


* phi-3 shield.png (45.37 KB, 674x457 - viewed 131 times.)
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like robotshop is not dfrobot.
No warning here, and the schematic has not changed...

Bummer...
Yes, robotshop is a distributor for various parts manufactured by others (DFRobot in this case makes the lcd shield).  I've used them in the past rather than ordering straight from DFRobot because Robotshop is USA based and shipping times are much less.  As I mentioned upthread, evidently robotshop hasn't changed the warning, but when I ordered the lcd shield in May, it was the fixed version where digital pin 10 does control the contrast.

IIRC, you can't use servos and the lcd shield together on UNOs because the servo library disables PWM on pins 9 and 10.

Hi,  I'm curious about this.

My understanding is that pin 10 would control the brightness on boards with this bug - just that it puts a high current on the pin with the danger of frying it.   Have you done the test to see if the problem exists on your board, as described by the original poster?

Otherwise, I cannot see why DFRobot would not have updated their schematic.  Could it be that you are just lucky?

Also, you say pin 10 controls the contrast - do you mean brightness?  I thought a VR controlled the contrast?

B.
Logged

Coventry UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just received an LCD shield that came in a DFRobot branded box from this vendor on ebay:

http://www.ebay.co.uk/itm/LCD-Shield-Arduino-/320919256375?pt=LH_DefaultDomain_0&hash=item4ab8473d37

The circuit diagram, for the version 1.0 I have, has a 10K resistor between D10 and the base of the transistor. I haven't tried it yet but I would say that the board I have has been fixed.

Martyn.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 50
Posts: 1766
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,  I'm curious about this.

My understanding is that pin 10 would control the brightness on boards with this bug - just that it puts a high current on the pin with the danger of frying it.   Have you done the test to see if the problem exists on your board, as described by the original poster?

No, I haven't done a detailed test.

Otherwise, I cannot see why DFRobot would not have updated their schematic.  Could it be that you are just lucky?
There are 2 schematics at DFRobot, one labeled V1.0 that has the 10k resistor on pin D10 and the other V0.01 that does not have the resistor.  So to me it looks like they have updated the schematic.  Robotshop.com also has both schematics, but it has a third that is essentially the same as V0.01, and it still has the warning.

Also, you say pin 10 controls the contrast - do you mean brightness?  I thought a VR controlled the contrast?
An onboard potentiometer on the LCD shield controls the contrast.  Pin 10 controls the brightness.  The LCD backlight is visible on the side, and when I set pin 10 to low numbers, I can see it visibly becoming less bright, in addition to the screen.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Im new here and have only owned my Arduino Uno and SainSmart LCD keypad for 3 days, but in reading how to use it I came across this thread. It has been very enlightening.

Is it right to assume that if I can only see 1 resistor beside the transistor under the LCD that my board has the issue?

Will it be ok as long as I dont use D10 in my code for brightness?

I have only made a few sketches so far like the sample scrolling message and I modified the key grabber that goes with this board.

Cheers
Logged

Dallas, TX USA
Offline Offline
Edison Member
*
Karma: 47
Posts: 2332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
Is it right to assume that if I can only see 1 resistor beside the transistor under the LCD that my board has the issue?
It might or might not, it depends on the circuit.

Quote
Will it be ok as long as I dont use D10 in my code for brightness?
It should be ok. The cirsuits with the problem are ok when D10 is an input.
So as long as D10 remains an input (which it is by default after are reset) the backlight should be on and
should not create any issues.

--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thankyou for the quick response.

Is it possible to remove the D10 pin from the LCD board and solder a pot on there to make the backlight adjustable like the contrast is?
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is really a non-issue.

It would have been nice if the resistor is on the transistor's base.

But even if it is not, you can still control the backlight via the pin (D10): first, clear D10. After that, if you wish to turn on the back light, turn D10 into an input - the pull-up resistor will now turn on the switch / led; if you wish to turn off the back light, turn D10 into an output - now, D10 will be cleared thus turning off the switch / led.

If you do that in a timer, you can do software PWM and control the backlight brightness continuously.
Logged

Dallas, TX USA
Offline Offline
Edison Member
*
Karma: 47
Posts: 2332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is really a non-issue.
I disagree. If the shield is unmodified and you don't handle the output of D10 correctly it
is possible to damage the AVR.

Quote
It would have been nice if the resistor is on the transistor's base.
But there is a resistor on the transistors base. It pulls up the base to VCC to provide a default "on" state.
The problem is that D10 is directly connected to the base.
My guess is that the circuit was designed for an FET and in that case D10 would
connect directly to the gate and the circuit would work perfectly "as is".
Then somebody cost reduced the design a few pennies and changed it to
a NPN transistor, which doesn't work the same as an FET and creates a short when D10 goes high. - But that is just my guess.

Quote
But even if it is not, you can still control the backlight via the pin (D10): first, clear D10. After that, if you wish to turn on the back light, turn D10 into an input - the pull-up resistor will now turn on the switch / led; if you wish to turn off the back light, turn D10 into an output - now, D10 will be cleared thus turning off the switch / led.

If you do that in a timer, you can do software PWM and control the backlight brightness continuously.


From the original post:
Quote
There is also a software alternative which is to set the pin to input mode to turn the backlight
on and to output and low to turn the LED off.
And also in reply #3.
Quote
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.
PWM above meaning hardware PWM or analogWrite().

--- bill
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AVR's output, even in the push-pull mode, isn't a strong voltage source in that it has substantial output resistance. So even if you short the output pin (in a logic 1), you don't get much current (40-50ma maybe) out of it. The design here isn't a great design but it is not a deadly design either.

One of the schematics linked here had the led between Vcc and the transistor, without a resistor. If that's really the design, the led can draw substantial current under a 5v rail. Leds are pretty good at taking abuses but it is wise to put a resistor in serial with the led.

Quote
But that is just my guess.

It could have been designed for an open - collector type of output pin.
Logged

Dallas, TX USA
Offline Offline
Edison Member
*
Karma: 47
Posts: 2332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AVR's output, even in the push-pull mode, isn't a strong voltage source in that it has substantial output resistance. So even if you short the output pin (in a logic 1), you don't get much current (40-50ma maybe) out of it. The design here isn't a great design but it is not a deadly design either.

My real world measurements on an actual LCD shield using this circuit differ from your guess.
I measured 95ma being sourced from D10 when D10 is high.
That is well beyond the 40ma maximum rating for the m328 listed in the
Absolute Maximum Ratings table (28.1) in the Electrical characteristic section.
There is also a footnote with that table:
Quote
Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent dam-
age to the device. This is a stress rating only and
functional operation of the device at these or
other conditions beyond those indicated in the
operational sections of this specification is not
implied. Exposure to absolute maximum rating
conditions for extended periods may affect
device reliability.

Also down in note 3 subnote 2: (Arduino D10 is AVR port B bit 2)
Quote
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150 mA.

Add some additional i/o to digital pins D11 (B3),D12 (B4) and D13 (B5) and you might even
unexpectedly exceed the 150ma rating.

I take the electrical characteristics from the manufacturer very seriously and from my real world measurements
the un-modified shield vastly exceeds the manufacturers absolute maximum ratings for an i/o pin.
That is the reason that I would say the design could cause damage to the part.

In my opinion it is not worth the risk. Either don't use backlight control, modify the board,
or use D10 as recommended in the OP or in response #3 to avoid the short.

--- bill
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I measured 95ma being sourced from D10 when D10 is high.

Did  your Arduino die from that experiment?
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

AVR's output, even in the push-pull mode, isn't a strong voltage source in that it has substantial output resistance. So even if you short the output pin (in a logic 1), you don't get much current (40-50ma maybe) out of it.

Stop misleading forum readers.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hardware Problem Solved, Software Sucks
I just got a SainSmart Keypad Shield 1602 LCD from eBay because it was cheap and had US shipping.  After some diddling (I'm an Arduino newbie), I got the example to work, but: 1) I was momentarily blinded by the backlight; and 2) the display flickered when I pressed a button.  It seemed as if the shield was drawing too much current.  I goggled the problem and found this forum.  I thought that II had the problem as in the first post in this topic from bperrybap,

I decided to rectify it with a diode or resistor fix.  The schematics provided from SainSmart with the library were the same as posted by bperrybap, and  showed the same problem, but my board, marked "LCD Keypad Shield V1.0",  wasn't exactly the same, especially around the D10 pin.  I took off the LCD display using my trusty hot air rework gun and a solder sucker and found there was indeed, as ringz, aka Martin, noted a 10k resistor in series with  D10 and the base.  Problem #1, sucking current from the Arduino, solved. 

So why does the display flicker??  It's in the library driver DFR_Key.cpp, which is a very poor driver, and in the example program Key_Grab.ino, which is a very poor example.  If the call to keypad.getKey() returns with anything other than SAMPLE_WAIT, the whole display is cleared (which takes a lot of time), and then refreshed (which takes even more time), rather then just refreshing the single character that contains the button number.  Plus, the DFR_Key.cpp program thinks a button has changed a lot more than it should.  If the A/D result differs by only one bit from the previous reading due to jitter, even though there may be no change in the button state, the driver incorrectly thinks the buttons have changed, causing yet more extraneous refreshes.

That's my 2c worth.  Bye...
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The value of arduino rests on the community. Those that exploits profits without supporting the community will not get your money a second time, will they? (they are so cheap thou, for a reason).
Logged


Pages: 1 2 [3] 4 5 6   Go Up
Jump to: