Oscar needed his night light's brightness set automatically every night. The fix: an ATtiny85, a custom PCB, a transistor, and support resistors crammed into a enclosure with no room to spare.
The unlabeled internals ruled out tapping existing pins. The underpowered supply ruled out a Raspberry Pi or Arduino. The ATtiny85 solved the power problem but required a purpose-built programmer workaround. The custom PCB was the only way to fit all components reliably. Read the original for the full schematic decisions and why each shortcut failed before this one worked.
The finished device detects when his home automation system energizes the plug, boots, pushes the button the correct number of times, then sleeps. A trivial outcome built on a non-trivial stack. If you have a similar low-power automation problem, Oscar's component selection logic is worth studying before you reach for the nearest dev board.
[READ ORIGINAL →]