This Dual-Microcontroller 3D-Printed Lock and Key Triggers MQTT Messages to Log You In
Pseudonymous maker "Cheats" has found an unusual use for pogo pins: a dual-microcontroller electronic "lock and key" that doubles as a USB security token.
"I wanted to create a kind of lock and key that acts sorta like a USB hardware token," Cheats explains of the project, "meaning it doesn't unlock something physically but rather programmatically. I also want it versatile enough so that I can unlock many things such as a computer, or a website. The base of the structure will be the 'lock' and will house the [Espressif] ESP8266 and the 'key' will be its own separate piece that contains the [Microchip] ATtiny45."
The idea: The key half of the device contains a secret which must be transmitted to the lock half in order to perform a given action, like logging into a computer or website. In order to successfully communicate, though, the key must be attached to the lock the right way around — which is where the sprung pogo pins, commonly used for temporary connections in testing rigs, come in.
"I thought pogo pins were aesthetically pleasing and fun to use so I decided to use them as the contacts for power and data lines between the lock and key," Cheats explains. "The key must be placed on top of the pogo pins to trigger the process. Both parts have 3D printed cases to house all the electronics. The lock will sit on a desk or anywhere and be attached to power. The key is a floating piece that you can take anywhere."
When the key is rotated into the correct orientation and connected to the pogo pins, communication takes place over I2C and triggers an MQTT or HTTPS signal to perform the unlock action. "Full warning," Cheats notes, "I'm not a security expert, I don't know how easy it would be to hack this lock and key."
Full details, including source code and a schematic for the project, are available on Cheats' Hackaday.io project page.