Alarm clock

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, with custom printed keycaps from 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.

Hardware wise:

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.


This is such retro cool! Thanks for the write-up as well, I would never be able to do all this so congrats on getting it complete in such a short time!


:rofl::rofl: how many days did you wake up late while waiting to complete it? I have a dozen alarms set on my phone and watch, plus i have my robo vacuum set to go off at the time i need to wake up… and today i still slept through all of them. The vacuum ran for almost an hour before i noticed… I think the problem is, the world wants to start their day too early, where mine really should start at 11-ish.


I have spent a good portion of my life reinventing the wheel. Apparently, I feed on it.

Cool project, There’s a special joy in using something you created.


For some unknown reason, my world wakes up before sunrise, but after coffee and breakfast I read my newsfeed and my eyelids become lead-filled, and I finish what I started the previous night.


My body seems hardwired for late second shift, with my most productive hours being nighttime when i should be sleeping.

I don’t know how it’s going to be when i get older, because I’m finding it harder and harder to get out of bed every day…pretty soon I’m going to need to sleep with the coffee pot beside me instead of an alarm clock.


You might be surprised. I had no problem at all sleeping till 9:00, all of a sudden my organism started becoming aware way too early. Bright side is the sunrise is new to David… and is often magnificent.

1 Like

I’ve often been known to go to bed after sunrise…but always because I get lost in something-a book, a project, work, etc…I’d rather be in bed by 9 though…I really love sleep, wish I had more time in the day to get more of it.


From an evolutionary perspective, it always struck me as odd that we must become incapacitated for hours, and thus be subject to predation. Doesn’t sound like the optimal strategy for survival.

Turns out the neurons expand during consciousness, and the glial cells contract, while that reverses during sleep. That describes a pump. Hmm.

@zaccohn, I apologize for polluting the thread of your project, but that happens around here,

1 Like

Most of the critters that are out during the day sleep at night in their hideout. Early humans were able to cast off heat by sweating, and hunted animals that couldn’t. By chasing them till they suffered heat exhaustion they did not put up much of a fight.

My first year away at college I bought a cheap alarm clock that sounded really awful and set it for 6:00AM. By three days I was up about a half minute before the alarm went off and after a month found I did not need to set it at all, and did not need to do so for the next 50 years. Since that time I have had a strange effect from food that I get very sleepy and can put it off for a bit but not a long time. I have meds I take for it and they worked well for a time but less and less. Now I often wake up at 6:00 but don’t know if it is AM or PM.


We once had an awful alarm like that, and the same behavior resulted. Wake with a purpose a minute or two before as a defensive mechanism.


This has got to be one of the coolest things I have seen! I absolutely love it!! Do you have a site where you sell any of your creations?

If you click on the avatar it will show a store site (if they have one and put it into their profile).

You’re reinvented Heathkit :slight_smile:

My dad had a heathkit bedside clock when I was a kid, a shame they’re no longer a thing.

It was ages ago but I think the model was really similar to this one:



oh duh, thank you!

This whole thing is very cool and reminds me, yet again, that I want to work on electronics…maybe when I retire :stuck_out_tongue:

Clamps man, clamps!


Nope. This took way too much time and requires way too much my-house-specific stuff (sonos system, i store the songs it plays on my home server, etc). Even just for assembly i’d have to charge way more than any reasonable person would be willing to pay.


The curve made it really hard to clamp with any of the clamps I have. Not impossible, but it was easier and safer to just hold it in place.

1 Like

Yes! My dad just shared a story about building an alarm clock from a heathkit. Seems very cool. His required more soldering (but mine required more programming).


Heathkit is still around, and they sell a clock kit.

1 Like