Sunday, April 17, 2016

Old and new parts


I have been building my parts drawer for a few years.  Most of it has come from junque piles at hamfests.  Who can resist looking through boxes of old parts and finding a few gems?  I have built up a stash of keypads of various sizes and types that have been waiting for me to come up with a project.

One issue with the keypads is that you need a way to scan them to recognize the key presses.  Keypads that are wired in a row/column matrix use fewer I/O lines than those that simply close a switch to a common line.  My Grayhill keypads are the latter type; my 16 button keypad has 17 pins -- one for each key and the common pin.  And I have a 20 button keypad that has 21 pins...  I'd like to use a Grayhill keypad with my radio project but 16 pins would tie up all the I/O pins on any reasonably sized microcontroller (not to mention 20 pins).

I like these Grayhill keypads as they allow one to set the label for all keys.  The plastic top of each key pops off and an insert can be placed which will let me to design any layout I want.

I came across the SX1509 I/O expander from SparkFun and ordered a couple.  It provides an I2C interface to 16 I/O pins that can be used in various ways.  Up to 4 devices can be used to provide more I/O pins by setting the I2C address.  Matrix keypads are supported as well as many output options including some cool LED features.

Within a couple of hours of unpacking them, I had a keypad interfaced with the MicroView.

From upper left clockwise:  MicroView, Si5351 DDS, optical encoder, SX1509, Grayhill keypad, SSB6.1
I wired a couple of keys to handle band up and down and updated the firmware to rotate through the DDS frequencies.  Next I have to wire up control lines to the SSB6.1 to actually switch the band pass filters.  Then maybe I'll deal with direct keypad entry of frequencies...