Wednesday, September 21, 2011

MAX6818-Based Debounced Breadboard Keypad

This was a quick little project I put together while I was bored this week.  This is an eight button keypad, but uses the Maxim MAX6818 part to debounce all of the buttons.  This is important because when you connect regular buttons to TTL logic or a microcontroller, you don't realize it, but every time you press it, the button will bounce on it's contact, often several times, causing more than the single desired edge.

This is usually solved by implementing some sort of low-pass filter, to convert the multiple fast edges into a single, slightly slower edge.  This can be done in software, or even just using a simple RC filter with a Schmitt trigger to clean up the slow rise time.  That being said, it's always a pain for every project to have to wire up a bunch of capacitors and resistors, or copy-paste in the exact debounce software every time I want a button, so I designed this button module which can plug into a breadboard and have eight debounced buttons right away.

The MAX6818 is quite nice, in that it implements a 40ms low-pass filter on eight button inputs, has internal pull-up resistors, has an open-collector pin-change interrupt, and even tri-state outputs so you can share the buttons with other devices on an 8-bit bus.  I brought everything out to a 0.1" edge connector, which when populated with male header can plug straight into a breadboard.  I also added a solder jumper, such that you can hard-wire enable the outputs if you aren't interested in tri-state capabilities.

Unfortunately, I didn't bother checking component costs until after I finished the design.  The Maxim debouncer chip is more than $8!  Considering this can be implemented with a 50 cent 74HC14 chip, this thing really is just a waste of money, unless you're only planning on using it yourself, in which case you can sample the part from Maxim.
So, I'm not going to bother having this fabricated, but I will release the design files CC BY-SA, so if anyone else wants to actually order these and test it, do with the files as you will.

Design Files.

If you do order them from someplace like Dorkbot or ITead and end up with spares, I would be interested in buying one or two of the copies off you, just to have something to do with my MAX6818 samples.

3 comments:

  1. The coolest things are often born out of boredom... As for the MAXIM chip, I've been baffled by their prices before. The MAX7219 sells for $10 on SparkFun!

    ReplyDelete
  2. I know! I keep getting tripped up on it, because their sampling program is so good (which is probably exactly what they want). I'm redoing the board with a 74HC14 when I get the motivation to.

    ReplyDelete
  3. The tragedy of Maxim/Dallas - very neat stuff, good info and nice sampling policies but any number of the actual parts ends up horribly expensive and often hard to get.

    ReplyDelete