2FAC – Two Factor Alarm Clock
Description
A wireless and sturdy alarm clock that can be snoozed by hitting (or throwing?) it but not turned off unless it is placed on its (bolted down?) docking station elsewhere in the house. The docking station also allows setting the clock and alarm time using a selector button/slide for the clock or alarm, and two rotating knobs to set the hours and minutes. The alarm clock itself only shows the current time (and the alarm time when shaken?).
Origin
A normal alarm clock doesn't work for all teenagers who need to get up early, and dads (like me) who want to be able to sleep in late.
Progress
Week 2 — CAD
In the week I played with 7-segment displays and a shape for the clock and base station. I did not deviate much from my initial sketch because pressure to learn FreeCAD and Blender to not leave any room for creativity.
Week 4 — Embedded Programming
Week 6 — Electronics Design
In this week I learned about Charlieplexing. If I go for 7-segment digits on the clock, I'll need it to drive so many LEDs. I still do not know if I want to go for OLED or super fancy e-ink instead.
Week 7 — Computer Controller Machining
Wood is very pretty and a good candidate for the base station or clock, or both.
Week 8 — Electronics Production
In this week I made a working 7-segment LED digit. I am still not sure if I am going this route but it is very cool!
Week 9 — Input Devices
I experimented with all the inputs for my project in this week.
- DCF77
- to get the current time
- Rotary Encoder
- to change the wake up time
- Step Response
- to detect a hand on the clock for snoozing
Build
Clock
Time keeping
Display
Power
The XIAO RP2350 has power management (PMIC) on board (XIAO RP2040 does not) can be connected to a LiPo battery and charge it. When USB is disconnected it will automatically switch to battery power. The battery level can be read from GPIO29 (see also pin map). The battery does need to have power protection (PCM) to avoid over(dis)charging.
The V5/VUSB/VBUS pin can be used to power the XIAO without using the USB port. To protect the VBUS it is smart to add a diode (see also XIAO with Lipo Battery Charging Circuit).