So, previously I added 6 button controller support to the arcade test rig with an arduino and some i2c IO expanders. That board dangled out the back and I actually busted it the other day when I was getting ready to replace it. Not a very sleek or robust solution. It’s not a difficult circuit so I laid it out on a board for ease of packaging.
I actually purchased a pcie to dual serial port board to get the bracket and connectors for this build. A few design consiferations:
- I used a dip atmega328 because I have a bunch of those and don’t have other uses for them right now
- I added an ISP header because I would have to blow fuses and a bootloader into this thing
- I added a serial header so I could easily iterate programs on it if needed
- I broke out all the IO expander pins even if I didn’t need them
- Labels for the IO expander addresses, the bits of the ports, and their use in my software
This did not go completely perfectly though, I forgot the power and ground on the controller pinouts so I had to bodge those.
This is a functional board. I didn’t make it infinitely configurable, the strappings for the addresses are only set for two specific addresses and while you could bodge it for others I didn’t make it easy. I also have a mix of surface mount and through hole parts as is easier for me to populate (what I have in stock).
I installed the components mostly on the back side because the serial port connectors cover so much of the board I didn’t want to interfere with them (and it’s not like there’s other cards in this system anyway).
That’s it, it just works now. I have fixed the board layout in my github but haven’t regenerated gerbers. I have 4 of these boards to spare if anyone wants one for any reason. You could adapt them for use as any sort of buttons that need grounding, but I really can’t think of use cases for that. It could be a dual IO expander board with GPIO on pinheaders, or for serial communication (you get 32 via i2c, 14 from the arduino directly, and serial on an ftdi header.