How to Make Basic Keypad Terminal Connections

With all the plug-and-play, ready-to-use devices available to consumers, an unconnected matrix keypad may be a bit of a puzzle. For beginners in electronics, the means of connection may not be obvious, and for experienced hobbyists or professional developers, there is specific information that is required to determine the correct placement of connections.

KeyboardBanner



Physical Keypad Terminations

(or skip to Logical Keypad Terminations)

The first step in connecting a matrix keypad is determining what type of termination was included in the design. At the time of this post, the currently available styles are shown in the list, below.


KeypadTermStyles


Use the available resources to determine which of these applies to the product in question. The product page may have the termination style listed in the “Product Attribute” section, but there may also be a drawing or photo with more details.

Part number 1K041103 [ Digi-key Part Number MGR1512-ND ] from Storm Interface, for example, does not show the termination style in the standard photo, but by using the 360-Rotating option from the product page photos, a male pin header is revealed.


Keypad4FrontandBack


A cable + connector combination is another termination option, and some products may include a mating header to complete the connection to a PCB. Part number 27899 [ Digi-key Part Number 27899PAR-ND ] from Parallax Inc. is an example.

A similar example from Adafruit Industries part number 3845 [ Digi-key Part Number 1528-2673-ND ] includes a Card Edge + Solder Pad configuration.

KeypadAdafruitIndustries3845.PNG

The previous examples show direct terminations where the rows and columns of the keypad correspond to logical connections on another device (likely a microcontroller pin). A non-direct type of termination is available on some keypads in the form of a Connector Area Bus (CAN) connection.

Part number 505200 [ Digi-key Part Number 2617-505200-ND ] from Marlin Technologies uses this technology, and the specific connections must be found in the manufacturer’s documentation: [ 505200 Datasheet ]

Note the specific mating connector shown in the 505200 datasheet. Part number DT06-4S [ Digi-key Part Number 1734-1010-ND ] is needed to complete this keypad connection.

KeypadCANConnector


Logical Keypad Termination

Now that we’ve learned about the physical connections of a keypad, let’s turn to the logical connections needed to send and interpret the signals when keys are pressed. We’ll start with the direct types of termination.

Parallax part number 27899 from our previous example shows a typical connecting matrix from keypad terminals to digital microcontroller pins (use the colored lines as a guide). Individual products may vary.



Actual microcontroller programming won’t be included here, so we’ll only describe the transfer process in general terms. The microcontroller will do some work in the background involving the high/low state of the affected pins that correspond to the columns and rows. It’s the intersection of a row and column that leads to the indication of a pressed key. If not for this method, sixteen pins would be required to process the keypad signals—one for each key on a 4 x 4 pad. A 3 x 4 keypad (without the letters shown above) would require seven microcontroller pins after adding up the rows and columns, or twelve if there was no way to use the row and column method.

The same type of information might be presented in a different form depending on the manufacturer. Although the termination pins on the keypad are numbered according to a direct physical layout, the rows and columns may be labeled with different numbers and letters to portray the matrix more clearly. The 1000 Series from Storm Interface uses this style (diagram below). Other types of drawings use only one line color, but the row/column connections are still clear.



The other termination type shown earlier is the CAN bus connection. This relies on a predefined set of signals and interpretations. The drawing for part number 505200 from Marlin Technologies shows this basic pin location and function: [ Outline, 505200 Configurable 12 POS KYPD ].



This keypad uses the industry standard SAE J1939 messaging protocol to communicate within the CAN network. This is different than a physical layout that corresponds to rows, columns, and microcontroller pins. The keypad manufacturer should provide specific guidelines that show details of the data sent across the CAN connection. Marlin Technologies includes this with their Specification Document [ A011713SAX2, 505200 ]

Summary

These are basic connection principles that should help with many keypad products. Some manufacturers and Digi-key suppliers may provide full kits with LCD or OLED screens and code samples. Others may sell educational kits or evaluation boards to help learn more about their keypad products. These are good starting points for hobbyists and instructors. Developers may need the extended documentation for CAN support or more complex, multi-function keypads.

Microcontrollers and keypads are intrinsically connected (not just literally!), so it’s worth some time exploring MCU products as well. These can be found in the main MCU category [ Embedded Microcontrollers ], or they can be filtered with the keyword ‘Keypad’ to focus on those with built-in keypad support [ Keypad Microcontrollers ]. All products can also be found by starting from the Digi-key home page: [ Digi-Key ].


Learn more about a similar topic in this forum post: [ Basic Segmented Display Connections ].





For convenience, full URLs are provided, below:

Part Number MGR1512-ND
https://www.digikey.com/en/products/detail/storm-interface/1K041103/186790

Storm Interface Products
https://www.digikey.com/en/supplier-centers/storm-interface

Part Number 27899PAR-ND
https://www.digikey.com/en/products/detail/parallax-inc/27899/3523678

Parallax Inc. Products
https://www.digikey.com/en/supplier-centers/parallax

Part Number 1528-2673-ND
https://www.digikey.com/short/z1htm8

Adafruit Industries
https://www.digikey.com/en/supplier-centers/adafruit

Marlin Technologies
https://www.digikey.com/en/supplier-centers/marlin-technologies

505200 Datasheet
https://media.digikey.com/pdf/Data%20Sheets/Marlin%20Technologies%20PDFs/505200%20Outline%20Drawing.pdf

Storm Interface 1000 Series
https://www.digikey.com/short/z1h3bm

Outline, 505200 Configurable 12 POS KYPD
https://media.digikey.com/pdf/Data%20Sheets/Marlin%20Technologies%20PDFs/505200%20Outline%20Drawing.pdf

Specification Document A011713SAX2, 505200
https://media.digikey.com/pdf/Data%20Sheets/Marlin%20Technologies%20PDFs/505200%204x3%20Keypad%20Protocol.pdf

Embedded Microcontrollers
https://www.digikey.com/en/products/filter/embedded-microcontrollers/685

Keypad Microcontrollers
https://www.digikey.com/short/z14n71