This alarm clock is basically a finite-state machine that works in two modes:

  • If the alarm is not triggered it just displays the time using the RTC and an I2C led backpack to show the info (time can also be set using the keypad).
  • When the RTC module triggers it's internal (and previously set) alarm it changes to a different set of states that needs to be fullfiled in order to go back to the rest position (here some actions need to be performed in certain order: turning the keys at the same time, entering a secret keycode, pushing some buttons...).

The whole device is build inside a custom 3D-printed case (one of my first "big projects" related to 3D design, by the way). It's not the best box (there are some gaps since the screws are only on the bottom) but it gets the job done and I've taken lots of notes from this experience.


I have a full post in my website (albertgonzalez.coffee) with all the specs, pictures and details about how I made this and the things I learned while doing it.

There's even a video with the device itself on action! (some noisy beep and then the complete deactivation sequence being performed).