Built an alarm clock
Launched a side project
It was finally time to make my own alarm clock.

Things I want an alarm clock to do:
  1. Toggle the lights in my bedroom
  2. Play Gregorian chants in the morning from a Spotify playlist
  3. Not distract me when I'm trying to sleep with a bright screen or any extra apps
  4. Offer enough control to adjust alarms from my bedside table without a million buttons
So I created this one. It was quite an adventure in reverse engineering at first, as I ended up salvaging the display board from my old clock. I knew almost nothing about how it worked, but I did find some datasheets on the microcontroller driving the LEDs (HT1632C). From there I used a multimeter and the process of elimination to figure out how the clock manufacturer had done the board pinout. There are more wires than I accounted for (probably related to an ambient light sensor) but I got enough to power the display and the secondary LED.

After that I cobbled it together with a Pi Zero W which also acts as a webserver on my local network. I used XState to write a basic UI for the clock which is controlled with a single, massive rotary encoder (the only input). The Node server onboard runs that and interfaces with GPIO to control the display and speaker. It also hosts a small web app which I can access on my phone to tweak settings which are too involved for the minimalist clock controls.

It works great! I've got a few ideas for next steps...

  1. Spotify is nice but I've started wearing Bose SleepBuds for sleeping, and I don't want to crank up the volume and disturb my wife. I ordered a vibration motor, now I'll see if I can replace the speaker with it and put it under my pillow - it might just work out of the box if I feed in the same signals I was to the speaker. Maybe it'll even be recognizable as music (doubt it).
  2. Google recently opened up the Nest SDK, I could totally control my thermostat from bed too. I'm really close to being able to leave the phone in my office at the end of the day!