Milad Al Usta Halabi
العربية
Menu

04Embedded product

LED Matrix Dashboard

A desk clock that runs itself

Draws on

  1. Electronics
  2. Software
  3. Product
Role
Sole developer, electronics, firmware and enclosure
Year
2022 to 2026
Disciplines
Electronics and PCB design, Embedded systems and firmware, Software engineering, Product development and prototyping
Technologies
ESP32, FreeRTOS, MAX7219 LED matrix, DS3231 RTC, DFPlayer Mini, Rotary encoder, Telegram Bot API, Open-Meteo, Aladhan API, PlatformIO
Wooden desk clock showing 9:55 on a red LED matrix, its glow reflected on the table

An ESP32 clock in a handmade wooden case. It rotates the time, date, weather and prayer times on an 8x32 LED matrix, plays the azan, and is run from Telegram, including firmware updates.

The challenge

A device that sits on a desk for months has to look after itself. It needs to keep time through power cuts, recover from a bad network on its own, take new firmware without a cable, and never freeze in the middle of an animation, all on one small microcontroller.

The solution

  • Seven FreeRTOS tasks split across both cores. Network work, Telegram and the weather and prayer-time fetches run on core 0, so a TLS handshake can never stall the display on core 1. Every task that matters is watched by the watchdog.
  • Shared state goes through a small settings module and mutex-guarded strings, and logic that does not need the hardware is unit-tested on the PC under AddressSanitizer.
  • Firmware updates over Telegram: the owner sends a .bin and its SHA-256, the device writes it to the inactive slot while hashing, and boots into it as pending. If it does not stay healthy for two minutes, the bootloader rolls back to the previous version.
  • A DS3231 real-time clock keeps time without the network, a DFPlayer Mini plays the alarm and azan, and a rotary encoder drives an on-device menu.
  • First-time setup through the device's own Wi-Fi hotspot with a random password per device. The bot token and owner are entered there, never stored in the code, and only the owner can add users or update firmware.

My contribution

Designed and built the electronics, firmware and the wooden enclosure.

Outcomes

  • Built as a gift in 2022, and still improving through firmware sent over Telegram.
  • Firmware updated remotely over Telegram, with automatic rollback if a new version fails.

Documentation

Wooden desk clock showing 3:42 on a workbench next to tools and boards
Fig. 1 On the workbench
Top view into the open wooden case showing the boards, wiring and battery
Fig. 2 Inside, from above
Back panel in red acrylic with ventilation holes, a switch and a USB port
Fig. 3 Back panel
Front view into the open case with the ESP32 board, modules and wiring
Fig. 4 Electronics in the case
Fig. 5 The on-device menu, driven by the rotary encoder
Fig. 6 Clock pages rotating