After the untimely death of my Mac Mini (the last thing Apple I never buy), I recycled her limping in a clock display LEDs.
Technically, there is not rocket science: an Arduino reads the time from an external clock and displays a matrix of 8×6 colored LEDs for hours, minutes, seconds and a linear array of numbers for the date. A last line of LEDs appears a balance.
Tell the time
At first glance, the reading time is quite mysterious! But it’s easier than it sounds, it reads almost like a clock face.
The first six LEDs of the first two lines (red) are the hours from 1 to 12. The last two LEDs in each row display respectively PM (yellow) or AM (blue).
Minutes and seconds
The minutes are displayed on two lines.
The first two lines of LEDs 6 (purple) are the x5 minutes. The LEDs on the right (pink) are simple minutes from 1 to 4. When roses 4 LEDs are lit, they disappear in the fifth, an additional “x5” LED lights up and the cycle repeats.
The second read exactly the same way, with light green and dark green LEDs.
So in the picture, it is 10 h 23 min 42 s PM:
- 10 red LEDs: 10am yellow LEDs: PM
- 4 3 roses and purple LEDs LEDs: 4×5 + 3 = 23 minutes
- 8 green LEDs light green dark + 2 +2 = 8×5 = 42 seconds
The reading of the date is less mysterious, it’s just days month years.
Last button, the bottom line of LEDs appears a “balance” and made the round trip in 10 seconds, coming to an end when the second-units are full.
To give a little more life to all, I added sound.
Grandfather as the clock strikes the hour (once per hour) and half hour (at once). It based on this tutorial I sampled my grandfather clock, converted recording mp3 16 kb / s to 8 kHz 8 bit and saved all in the Arduino. At first it gave a horribly shrill sound, until the Arduino, a random test, decided to play the recording in slow motion, giving a much more serious and sweet sound. It was perfect!
You can hear it ring 8:00:
Taking advantage of the addition of the speaker, I built a routine that plays the tune “Happy Birthday” at 8am, 12.30 and 19.30 days birthday family members.
To generate the melody I based this tutorial converting the file notes in French notation.
The setting is simple: a mode button (M) moves from one unit to another, the + and – buttons are used to adjust the unit. The setting of seconds simply resets. The selected unit is updated only if it was changed, otherwise it is left unchanged.
The “QuickFix” button (QF) simply reset the seconds to zero by rounding to the nearest minute. This lets you easily correct the drift in readjusting the clock to an external source (talking clock or radio controlled, tops France Inter …)
For more detail: iTime clock in a Mac Mini box using Arduino