Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by JonWilman on Wed Oct 02, 2013 4:43 pm

Hi, I have purchased your Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi and have mounted the display only on the pannel of the project that I am building for my Son (Motorised camera slider) with 180mm jumper leads. I also wish to use external switches (see attached photos) to operate the Pi/display so have checked the connections on your board and have found the following
1 Select button connections Pad 2 common Pad 4
2 Left button conections Pad 2 common Pad 3
3 Up button conections Pad 2 common Pad 3
4 Down button conections Pad 2 common Pad 4
5 Right button conections Pad 2 common Pad 3
Is the above correct and I only need the two connections on all switches ? could I daisychain the common conections at the switches and only run one wire to Pad 2 for neatness or is it better to run pairs for all buttons.
Thanks for your great site and products.

Yours Jon Wilman
Attachments
2013-10-02 18.10.00.jpg
2013-10-02 18.10.00.jpg (189.49 KiB) Viewed 327 times
2013-10-02 20.00.47.jpg
2013-10-02 20.00.47.jpg (145.13 KiB) Viewed 327 times
JonWilman
 
Posts: 4
Joined: Tue Oct 01, 2013 6:10 pm

Re: Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by adafruit_support_mike on Thu Oct 03, 2013 3:05 am

The switches we use for that kit are commonly known as 'tact switches', short for 'tactile'.

There are only two electrical connections on a tact switch. If you hold the switch so the pins come out the left and right sides, the upper two pins are connected to each other, and the lower two pins are connected to each other. The upper and lower pairs of pins have no connection by default, but pressing the switch button creates a connection between them.

A tact switch usually has one pair of pins connected to GND and the other pair connected to what's called a 'pull up resistor'. Ladyada wrote a fantastic tutorial on the subject which can be found here: http://www.ladyada.net/learn/arduino/lesson5.html

You don't have to connect the pull up resistor or GND to both sides of a switch, and it doesn't matter which side you use to make the connections. The extra/redundant pins on a tact switch make life easier for people who have to route traces on PBCs.

In terms of carrying the signals from our PCB to the device you want to use, there are two arguably valid choices:

- For each switch, you can run a pair of wires (pull up and GND) from the appropriate pads on the PCB to the off-board switches.

- For each switch you can run a single wire (the pull up) from the appropriate pad on the PCB to the off-board switch, then you can run a single GND wire from the PCB to the external switches, and daisy-chain the GND connections from one switch to the next.

The first version is a bit pedantic, but technically more correct. The second version has a slightly higher chance of seeing interference between the button signals, but the odds are still very low.

Personally, I'd use the two-wires-per-switch option. I find daisy-chained connections to be more trouble than the wire they save. Either way, you life will be much easier if you use highly flexible wire (which you can get by cutting the ends off of these: http://www.adafruit.com/products/153) and bundle the wires into a harness between the off-board switches and the PCB.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10043
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by JonWilman on Thu Oct 03, 2013 8:14 am

Thanks Mike, can I assume that my pad connection listing was correct ?
JonWilman
 
Posts: 4
Joined: Tue Oct 01, 2013 6:10 pm

Re: Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by adafruit_support_mike on Thu Oct 03, 2013 4:49 pm

I don't happen to have a PCB with me to verify your measurements, but you can test all your connections with the continuity-tester on your multimeter:

For each switch, you'll find one pad that has a connection to the PCB's 'ground plane':

GND.jpg
GND.jpg (36.57 KiB) Viewed 285 times

Any of those pads will have a connection to all the other GND pads.

You'll also find a pad that has a connection to one of the pins on the MCP32017:

pins.jpg
pins.jpg (22.37 KiB) Viewed 285 times


Those will be the best pads to use.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10043
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by JonWilman on Thu Oct 10, 2013 4:07 pm

Hi,
another question on this kit is that I wish to use it on a battery operated unit so I have the desire to turn the display back light on and off on a switch to save power. Can this be achieved by placing the switch in series between one of the resistors ( 220 ohm Blue) leads and its terminal
Thanks Jon
JonWilman
 
Posts: 4
Joined: Tue Oct 01, 2013 6:10 pm

Re: Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by adafruit_support_mike on Thu Oct 10, 2013 10:19 pm

That would work, but you can also shut the backlight off programatically:

Code: Select all | TOGGLE FULL SIZE
    lcd.backlight( lcd.OFF )
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10043
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by JonWilman on Fri Oct 11, 2013 12:32 pm

Hi Mike,
Thanks for the reply I all ready have the switch installed it good to know that hard wiring the switch or progaming will work. I take it the code for on is
lcd.backlight( lcd.ON )
Thanks Jon
JonWilman
 
Posts: 4
Joined: Tue Oct 01, 2013 6:10 pm

Re: Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi

by adafruit_support_mike on Fri Oct 11, 2013 7:24 pm

Yep. If you want to get fancy about it, you can check for recent activity in the loop() function and turn the backlight on/off when it's actually in use.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10043
Joined: Thu Feb 11, 2010 2:51 pm