Another birthday, another opportunity to gift someone a ridiculous bespoke invention.
What I wanted to do was build a class-compliant USB device using surface-mount parts, small enough to fit inside the USB plug to hide the fact that there are any electronics at all. This has been done before as prank cables, which look severed, but actually house a USB device which randomly hits the caps lock key every few minutes. I could have built one of those, but instead I build this. It identifies as a USB keyboard, and pressing the button types a message.
We start by soldering the zener diodes and the SMD resistors straight on to the pins.
Next a capacitor between power and ground, the ATtiny85, and some wires. The chip is sufficiently exposed that I can fit a test clip over it to program it.
The push switch was just one that happened to be in my drawer and it was red. Obviously it's supposed to be panel mounted but fitting it to any kind of box would defeat the point of squeezing everything into the plug. I'll leave it up to the recipient as to where they want to mount it.
This is after all a public website, so the reader shall be spared the details of exactly what message is written when the button gets pressed.