Embedded Alarm Clock

Requirements

The perfect alarm clock should have the following features

Bonus

Modes

Buttons

Using rotary encoder

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

Suitable hardware for this solution could be a nRF52840 Dongle which includes hardware support for Quadrature decoders.

State diagrams

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

An alternative state diagram.

A simplified state diagram

SHOW TIME SET ALARM "AL" SET TIME "CL" SET TIME "--:--" "HH:MM" SET TIME "--:--" "HH:MM" STORE ALARM STORE TIME ALARM SET TIMER SET TIME "HH:MM" SNOOZE GET TIME STORE TIME TIMER RUNNING MODES SETTING MODES SET TIME HTTP REQ TIME SET BRIGHTNESS "Br" SET TIME "--:--" "HH:MM" STORE TIME PUSH ROTATE PUSH ROTATE abort delay ROTATE PUSH PUSH PUSH PUSH ALARM PUSH / ABORT ALARM ROTATE PUSH SNOOZE PUSH PUSH PUSH ROTATE PUSH PUSH

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

front_layout.png

References