| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

LCD Shield

Page history last edited by MrTundraMan 11 years, 12 months ago

LCD - Keypad Shields (DFRobot type)

 

 

Commonly available LCD 16x2 Keypad shield

 

The red LED is good for development when you want to know if your shield is getting power, but it's really annoying when you want to take a picture or shoot some video since it seems to mess with the autofocus on my camera.

 

My demo video.

 

Notice that right on the silkscreen of the part is misspelled as "RIGTH". The entertaining part is how many other Chinese clone boards have the same misspelling.

 

My first approach was to buy a premade shield for the Arduino. It seemed like a good idea since it was less than $10 (shipped from Hong Kong or China), but there are some downsides to this approach.

 

  • It uses 7 of the 14 I/O Pins and one analog input line (on the UNO)
    • Digital I/O pins 4-9 for the data interface
    • Digital pin 10 for the backlight (PWM control)
    • Analog A0 pin for the keypad

 

The shield does intelligently route the unused Arduino pins to expansion pins on the shield. To use these pins either a header (male to male) or socket (male to female) needs to be soldered to the shield. I would solder the pins so they are soldered from the display side and go down. That way the board could be mounted to something. Alternately, wires could be soldered directly to the shield pins.

 

 

From the schematic:

 

Arduino pin 
LCD Shield pin
 
Dig 0 (Rx)
J5-7
 
Dig 1 (Tx)
J5-6
 
Dig 2
J5-5
 
Dig 3 (PWM)
J5-4
 
Dig 11 (PWM)
J5-3
 
Dig 12
J5-2
 
Dig 13
J5-1
 
Analog 1
J6-5
 
Analog 2
J6-4
 
Analog 3
J6-3
 
Analog 4
J6-2
 
Analog 5
J6-1
 
Reset
J7-6
 
VCC
J7-4
 
GND J7-3  
GND
J7-2
 
VIN J7-1  

 

Another problem is with the buttons on this keypad. They are great for prototyping, but I can't figure out how to use this shield in an enclosure and be able to get to the buttons. I don't want anyone to directly touch the buttons and bring an ESD charge onto the unit. I can't find the button shafts that I would need to mount on a panel to transfer the push to the switch.

 

Better Approach?

 

There are I2C displays available for the arduino for around $15 shipped from China on E-bay). They are not shields and require external wiring but only use two of the Arduino pins (Analog 4, 5 pins on the Uno which implement the I2C interface). They also need +5V and Ground. They are the LCD part of this display but with a small (about $10) card which implements the I2C interface and converts the signals to parallel interfaces.

 


 

The interface to the keys consists of a voltage divider using resistors which are all on a single analog input to the Arduino. This same circuit could easily be used with five individual panel mount switches and five resistors.

 

Substituting for common values:

 

Switch Pressed Resistance
to ground
Resistance
accum
Resistance
to VCC
Output Volts

Exact

Count

Min Max
Right     2149 0.0 0 0 67
Up 330 330 2149 0.7 136 68 218
Down 560 890 2149 1.5 300 218 389
Left 1000 1890 2149 2.3 479 389 601
Select 3300 5190 2149 3.5 723 601 873
None       5.0 1023 873 1023

 

The keypad shield is great for development but not a good for real applications. My recommendation to anyone building an LCD panel is to get one with the I2C connector and wire the switches using individual switches.

 

Links

 

 

Comments (0)

You don't have permission to comment on this page.