This year’s Biohacking Village badge by Badge Pirates was hands down one of the coolest badge designs I saw. It’s modeled after the classic game Operation, with great artwork, a bag of fun little objects to implant, and a slick laser cut insert to hold the implants in their respective body parts.
It's here! Our #dc30 badge! Check out this interactive operation game designed by @BadgePirates 😍 use tweezers to extract charms, but don't hit the edge ❤️🤍🤍 #badgelife pic.twitter.com/NLgbS2vlbu
— Biohacking Village 🧪 (@DC_BHV) August 12, 2022
The copy I got to play with had some issues with the hit detection, with hearts in the health meter lighting up sporadically and in random order. This seemed like a debouncing issue, and I really wanted to fix it to do the awesome design justice.
Here’s a demonstration of the badge in its initial state, and disassembly.
Inside I found a decade counter used to cycle through the health indicator LEDs, and an RC circuit and schmitt trigger for debouncing hits from the tweezers. I also saw an unpopulated spot for a buzzer, and suddenly really wanted a buzzer.
Initially I thought I’d add or modify the debouncing circuitry and be done with it, but once I got it opened up and reverse engineered I had some new ideas about how I wanted the health meter to behave, and I wanted that buzzer. So I decided to gut the board logic and replace it with a microcontroller. I desoldered everything except the LEDs and power components.
My goals for new functionality were:
- debounce the tweezers hitting the edges
- start the health meter with all LEDs lit, and remove one each hit
- flash the health meter to indicate game over, then reset to full health
- buzzer to indicate edge hits and game over
- mute switch for the buzzer
I dug a switch, buzzer, and ATtiny85 microcontroller out of my spare parts. I chose the ATtiny85 because it was small enough to fit in the available space, and had enough GPIO pins to handle 1 input from tweezers, 3 outputs for the health meter LEDs, and a pulse-width modulation output to drive the buzzer.
I prototyped the circuit on a breadboard, and wrote the code for the microcontroller.
I used a multimeter to check continuity and establish which pads the microntroller pins needed to connect to. Then I laid the switch, buzzer, and microcontroller out on the board to make sure they’d fit in the space available.
I drew up a connection diagram to follow during assembly. I was particularly happy with being able to re-use the RC debounce circuit for input current limiting and pulldown by swapping in a couple 0603 resistors that I had on hand.
Much dodgy soldering and a little gluing later, and the board now performed as desired.
There’s a lot that could be cleaner, but I was able to bang this little project out in a day, and I think the result is a fun game that honors this amazing badge design. Thanks Badge Pirates and Biohacking Village!