AlarmClock (Rev #16)

Embedded Alarm Clock


The perfect alarm clock should have the following features

  • A nice looking display which is visible both in bright daylight and in complete darkness
  • Automatic backlight control where the brightness is manually adjustable. Possibly different brightness setting for day and night.
  • It shall have 2+ independent alarms
  • It shall have 1 timer alarm
  • It shall be super simple to set alarm, timer, snooze, turn on/off alarm and set time manually
  • It shall have high quality buttons which are easy to press
  • It should have automatic time adjustment according to time zone (either radio controlled or via WiFi)
  • It shall be mains connected and not include any batteries. Battery backup for settings is however preferred.


  • Buttons may trigger smart home events
  • Simple date on display
  • Weather


  • NORMAL - Time and alarm on/off state and possible timer state is visible
  • SET_ALARM_1 - Change alarm 1
  • SET_ALARM_2 - Change alarm 2
  • SET_TIMER - Change timer. Timer start directly after it is set
  • SET_BRIGHTNESS - Change brightness level
  • SET_TIME - Set time
  • SET_DAYLIGHT - Change daylights saving on/off (alt: 2)
  • WIFI_SETUP - Go to soft-AP mode and present a configuration web page for SSID, password configuration. Manual wifi setup should also be possible.


  • SET (S) - Iterate between different settings

    • Short press - Next setting
    • Short press - Switch views between timer / clock when timer active
    • Long press - Exit setting
    • Exit setting after inactivity period
  • UP (+) / DOWN (-) - Modify setting (alt: 1)

    • Short press - Increase/decrease by one
    • Long press - Increase/decrease automatically with increasing speed
    • Advantage: valid also for brightness
  • HOUR (+) / MINUTE (-) - Modify time setting (alt: 2)

    • Short press - Increase hour/minute
    • Advantage: simple to switch time zone
  • MODE - Set primary mode TIME, AL 1, AL 2, TIMER (does not support combinations)

  • SNOOZE - Delay active alarm N minutes

  • ALARM_OFF - Turn off active alarm (possibly combined with other key). Also switch ON/OFF in set modes

Using rotary encoder

Possibly mode selection, time setting could be selected using a rotary encoder knob.

State diagrams

Preferred state diagram only using a SET button and a rotary UP/DOWN button.

An alternative state diagram.

Wifi provisioning

  1. User enter wifi settings on the provisioning server
  2. User setup predefined open hotspot on a phone
  3. Device connect over predefined hotspot
  4. Communicate a common device identity between cloud service and device
    • Device display a short and short lived ID on display which the user enter on the web page
    • User is presented with a short lived ID allocated from provisioning server which is entered to device e.g. using rotary controller
    • Device has a GUID printed on the device which the user enter on the provisioning web page
  5. Device download provisioning information associated with common identity

Physical layout