A bit over a decade ago I built a word clock - one of my first microcontroller projects. The project was fairly expensive: It uses a large stainless steel front panel (ca. 39cm x 39cm, laser cut) and a similar sized PCB. Over the years I had to resolder one or two of the RGB LEDs and replace a failed one, but other than that it’s still working as intended.
Then one or two months ago, I saw a post on hackaday about a tiny word clock - using a pretty clever and simple design: member sjm4306 just used a PCB with black solder mask as a front panel. This is feasible because the PCB’s material ( FR-4) is translucent enough to let a significant amount of light pass through; however light can be selectively blocked by just leaving the copper in place. At the same time, the FR-4 material works as a diffusor in front of the LEDs that illuminate the characters. And the solder mask determines the color of the panel. Nice!
For my version I replicated the 11x11 character matrix design of the large word clock mentioned before. One advantage of the 11x11 matrix (compared to different designs with less rows and/or columns) is that I can actually use it as a matrix display with 2x2 characters of 5x5 pixels each. This proves really handy for the clock settings menu. Since I was able to re-use some of the code I wrote a decade ago for the mentioned large clock, the new clock has alternate display modes too: A numeric clock and a binary clock display.
A STM32G0 series microcontroller with a dedicated VBAT pin for the RTC peripheral multiplexes the LEDs. Since the microcontroller sources the current of up to 11 LEDs at a time (column) I had to limit the current to something like 5 mA. The LED’s brightness is kind of ok, but certainly not great - despite the fact that I use fairly efficient white LEDs. One potential reason: I forgot to select a lower PCB thickness and so I got a standard 1.6 mm panel. I don’t intend to, but if I ever did a revision B I probably would add high side switches (i. e. P-channel MOSFETs) to allow for higher LED currents. Also worth mentioning: The FR-4 will inevitably give the light a yellow-ish tint. Choosing a white LED with a high color temperature (“cool white”) might or might not help here a bit, haven’t tried.
I calibrated the RTC with my frequency couter which worked really well using the LSE clock output pin. (Don’t forget to reserve this pin for this purpose like I did.)
Initially I struggled with two of the general purpose inputs used for the switches. Allthough I activated the pull ups, the voltage level was fluctuating and often closer to zero than VDD. At first I suspected that it might have something todo with the multiplexing, but no: On both suspect pins the microcontroller has pull-downs for USB C PD that are active by default (reading the documentation helps). Deactivating those explicitly solved the issue. STM itself seems to be confused about it too, stating on a few occasions in the HAL library/Device configuration tool that you can deactivate the “pull ups” instead of “pull downs”…