In the second part of this series, I put together a working prototype of a button controller to be used in a larger project. Since then, I have designed the schematic, designed the circuit board, sourced and ordered the parts, and ordered the board.


The circuit is centered around an ATmega32u4 and an MCP23017 I/O Expander. I’ve designed a fairly minimal circuit, witha USB connection so I can debug the software, a 6-pin connector that I’m using in a dual role as ISP programmer, and SPI & power connection to a Raspberry Pi, with a switch to toggle between the two roles. There are also 2 12-pin headers that will connect the buttons to the I/O expander.

Controller schematic

There are a couple of design choices I’m not entirely confident about, so I may have to rework some aspects of this once I get the board and put it all together. In particular, I’m not sure what kind of length I’ll be able to have for the buttons without any extra power. And since this is my first design for a microcontroller-based circuit, I’m not sure if I’ve missed anything critical. There’s only one way to find out.

I’ve also done a lot of software work with the Raspberry Pi to connect to this circuit and respond to the button inputs. It also has the basics for making music, using a very cool program, SuperCollider. I’ll have something more to share about all of that in a future post.