Button "Shield" using shift registers

I have an idea that I think would be really useful for me- and just wanted to shout it out to see what others think.

One of my projects needs to interface with a few buttons - I estimate about 8 to 12 or so depending on feature set.

I intend to use shift registers for this - and I am thinking of making a small PCB to use for this.

The idea is this...

A board with a 74HC165, 8 tactile switches and 8 screw type terminal blocks (plus resistors etc). It could also include a couple of IDC header type connections for carrying power, ground, clock, load and input/output so that the boards can be strung together - essentially meaning you can have as many as you want within reason.

Would be useful for prototyping with the tactile switches, and then for attaching "real" switches when it comes to "production" - the tactile switches are dead cheap and wouldn't push the cost up.

Anyone see a flaw in my plan? (or more, have any ideas for improvements or where to start developing it)

James

I'm not sure it's exactly the same thing, but it would save you a couple pins (in exchange for using an analog in pin) using basically a series resistor circuit. Take a look at this post here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1226896251/9
Has 5 switches to 1 arduino pin, just by having a resistor between each switch, wired in series(I think?).

Also, this LCD Arduino shield uses the same concept, only 1 analog in (0)
.http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=2&zenid=505efeb7dde860ea8622b7c557df19e2

To me that's a bit of a hack - it doesn't do multiple key presses (or rather toggle states and button presses)

Shift registers are so easy to use and it makes sense if you ever need to put buttons on a wired remote away from the Arduino.

James

Well, yes and no.. I believe there's a way to code a value + a value = these 2 key presses, but probably much easier to just connect the extra switches :smiley:

Only experience with shift registers(595) at the moment are running some uber leds! I was excited to control 8 leds with 3 pins.

Do keep us updated, I'm sure others can offer some good insight.

Best of luck!
Cheers

So here is the strip-board layout - untested just planned.

The IN, LOAD, CLK rectangles are pin headers - red things are 10K resistors - blue are wires.

It's a bit wide - but I shall make a couple and see how it goes :slight_smile: