I got two keypads from Jameco.com that I wanted to use with my Raspberry Pi.  Turns out it's quite easy, as long as you know what the pinout structure is for the keypad.

This instructable will take you through the steps I had to go through to discover the pinout on my keypads, and how I hooked it up to my Raspberry Pi.  I'll include the code I'm currently using to "drive" my keypad, and then offer some "next step" type insights into what can be done better, and what could be done next.

Finally, this instructable will really be a sub-instructable that will be part of something I'm calling Voiceberry Pi.

Step 1: Taking a look at what you've got

Because my keypad didn't come with a datasheet of any kind, my first step was to make a visual inspection of the keypads.

So, I took a look at the back, saw that there were 10 wires, and three "jumpers" on the outside, but no other indication of how things were wired on the inside.  So, I took out the five screws, and looked at the actual circuit board to trace the leads.
<p>Mrmath, thank you for the very nice instructable. The lists of which pins correspond to rows and which ones correspond to columns conflict with the table below them: according to the table it looks like pin 4 corresponds to a row, and not a column?</p>
<p>It's a weird keypad, and I wouldn't buy it again. But in this case, it's kind of a row in that it gets 7 and 8, and kind of a column in that it gets 8 and 0. But pins 5, 6, and 7 are definitely columns, so I treated pin 4 like a row.</p>
<p>I've got some cheap keypads and 2 line LCD panels for sale. www.ebay.com/itm/231488797272 www.ebay.com/itm/331488948368</p>
<p>Hi Everyone, i have a project at home where i can coltrol my lights and water features etc via relays which can be coltrolled over the internet but i have now ordered a 2 in 1 RFID Reader &amp; Ketpad &quot;Image Below&quot; that id like to use as a gate entry that either you can enter a certain code or use the rfid to enter which will turn off a relay, when the relay is turned off the magnetic lock will release and then after a few seconds the relay powers on again and locks.</p><p>CAN ANYBODY HELP</p><p>I have attached some pictures of the 2 in 1 RFID &amp; Keypad, aswel as the sticker that shows what the wires are. But i cannot figure where to wire them to. (Which pins on the Rasp Pi) I understand the Red And black are to go to a 12v power supply.</p><p>Also i have seen so many people using different code, but does anyone have any that would help me at all?</p><p>The wire picture isnt that clear but it shows:</p> <br>Colour:Details:BlackGNDRedVCC +12VWhiteD1 / TX / 4R -YellowBUZZERBlueLEDGreenD0 / RX / 4R +Grey26 /34<p>I have a Raspberry PI Model B running raspian, i have the following pins available:</p><p>1,3,4,5,8,9,10,14,17,19,20,21,23,24,25</p><p>Look forward to hearing from you Callum</p>
I found a discussion of GPIO interrupts at http://ryniker.ods.org/raspberrypi/MagPi/GPIO_interrupts <br> <br>I haven't tried it yet, but it seems that this could allow one to suspend execution until a key was pressed. <br> <br>My idea for the keyboard is, combine it with a two line display and a wifi adapter and hook up a set of speakers. I'd write a program to load and shuffle music from my DLNA server and put the whole thing in the kitchen. I could also get it to pull and play NPR for me.
For idea #1, how about a lock of some type? <br>#2, Maybe some computer shortcuts. <br>#3, I bet you could control something like your house's lighting and electrical outlets somehow. <br>The possibilities are endless. The sky's the limit and all those metaphors.
Could you imagine using a RasPi to unlock your house!?
great ideas!
You have some really great instructables!
Thank you so much! I'm blushing!
good job :)
Thank you!
I am thinking maybe using a keypad to set the ip address of the pi. Sounds useful for a headless system.
The thing to remember about keypads is that the vast majority share the same pinout, for simplicity; you appear to have one of the very few exceptions, since it has more than seven pins.

About This Instructable


102 favorites


More by mrmath: Running an HD44780 Display off the ATmega on a Gertboard Voiceberry Pi! Driving an HD44780 Display using a Shift Register and a Raspberry Pi
Add instructable to: