As part of a bigger project, I needed to make a timer that would activate a relay for a set time to switch power on/off to another device. Rather than buy one I decided to build my own from electronic bits and pieces that were on hand in my workshop, wrote some software for a ‘spare’ Arduino Pro Mini that was lying around and packaged it all up in a small box. It turned out to be quite functional, so I decided to document the build in case someone else finds this useful.
For various reasons, digital I/O pins are always at a premium when implementing micro controller projects. There have been various multiplexing schemes described to allow more than one switch to be connected to a small number of pins, but some time ago I came across a very simple but highly scalable method that uses the 4017 decade counter to connect many switches (more than 100 if needed) to just 3 digital inputs.