This all started because i wanted to stop keeping my phone in the bedroom at night. But I still needed to wake up on time, so the only way I could think of to solve that problem was to build my own alarm clock from scratch. (That was in uhh… September…)
Anyway. It uses a macropad kit from retrobuiltgames.com, with custom printed keycaps from wasdkeyboards.com. The switches are some Novelkey Hako Royal Clears I had leftover from my last keyboard build.
I wrote the code for the macropad and have it hooked up to a raspberry pi zero w, which is running the alarm clock code (about 500 lines of python). The pi is hooked up to a 16x2 display I found online somewhere.
Then I designed and built the case with the glowforge, which took entirely too long (about 16 hours over the last two days). The case is mostly wood-glued together - i don’t like the look of finger joints. It’s not perfect - there’s definitely a few small gaps and misalignments, but it’s not bad. The living hinge was a serious pain to glue though. I watched a playlist of all the cold opens in Seasons 1 through 5 of Brooklyn 99 while holding it together waiting for the glue to dry…
“Set” cycles through changing the alarm time, changing the max volume of the alarm, changing the song that gets played, and a “reset alarm” function in case something goes wrong and my alarm file gets corrupted (I think I fixed the issue that was causing that but just in case!).
“Arm” will arm and disarm the alarm (so I can turn it off on the weekends!)
“Display” turns the display on and off.
When in Alarm Set mode, the left encoder changes the hour, the right encoder changes the minute. In any other setting they both do the same thing.
When the alarm goes off, it triggers the pre-selected song to play through my bedroom Sonos speaker. It starts very quiet (5/100) and each second it ticks up 1% until reaching the pre-defined max volume.
The last software thing I want to do is to change the default screen from “Awaiting Input” to displaying the current time.
I was originally going to cut that coiled USB cable (which connects the pi to the macropad), take out the slack, and solder it back together…… but i really didn’t feel like dragging out my soldering iron again. It would look a lot cleaner in there if I did that though.
I need to order some weak magnets, which I’ll glue to the back panel so it magnetically attaches and detaches so I can access the pi.
Anyway! This was a fun project. If you ever decide you want to improve the quality of your sleep and keep your phone out of the bedroom, I highly recommend you start by spending 7 months building and designing an alarm clock from scratch.