Keypad Interface Module Reverse Engineers Pinouts So You Don’t Have To

If you’ve scavenged some random keypads and want to reuse them in a project without the hassle of figuring out the pinouts, then [Cliff Biffle] has an interface module for you. The Keypad Go connects to the mystery keypad via an 8-pin 0.1 inch header, and talks to your own project using I2C and/or serial.

You could categorize the mechanism at work as machine learning of a sort, though it’s stretching definitions a bit, as there is no ChatGPT or GitHub Copilot wizardry going on here. But you must teach the module during an initial calibration sequence, assigning a 7-bit ASCII character to each key as you press it. Once trained, it responds to key presses by sending the pre-assigned character over the interface. Likewise, key releases send the same character but with the 8th bit set.

The heart of the board is either an STM32G030 or STM32C011/31, depending on parts availability we presume. I2C connectivity is over a four-pin STEMMA connector, and logic-level serial UART data is over a four-pin 0.1 inch pin header. [Cliff] plans to release the firmware and schematics as open source soon, after cleaning up the code a bit. The device is also for sale on Tindie, though it looks like they won’t be back in stock until later on in the month.

Longtime readers might recognize [Cliff] from his impressive m4vga project which we covered back in 2015, where he manages to generate 800×600 VGA signals at 60 Hz from an STM32F4-family microcontroller.

Continue reading “Keypad Interface Module Reverse Engineers Pinouts So You Don’t Have To”

DIY Button Matrix Lights Up And Speaks I2C

[David Johnson-Davies] always wanted an illuminated button matrix for projects, but cost was never very friendly. That all changed when he discovered a cheap source of illuminated pushbuttons on Aliexpress, leading to this DIY 4×4 illuminated button matrix design which communicates over I2C. The button states can be read independently of setting the light pattern, and an optional interrupt signal gets pulled low whenever there is a change detected. Not bad for one PCB plus about $10-worth in components!

The device uses every single pin on an ATtiny88, and because each button gets its own pin the keypresses can be detected with pin-change interrupts. The state reporting of buttons over I2C is unambiguous, even when multiple buttons are pressed simultaneously. A simple protocol provides all the needed functionality, and all connections are brought to the board’s edge to allow for easily tiling multiple panels.

The GitHub repository contains the code and PCB files and [David] helpfully shared the board files to OSH Park and PCBWay for easy ordering. In addition, he provides two demos (Tacoyaki and Tacoyaki+) which are games related to the classic Lights Out to show off the matrix.