“Digital 60 led clock analog style with RTC DS3231
This is my first clock I made in 2004. I made the clock with digital ic’s.
I used 4 bit shift registers, so I had to use 33 of them. And to debounce 4 switches I used NAND gates to do the job. Also to make 1 Hz clock, I used several divider ic’s to slow down the 1 MHz crystal. My father in law engraved the front.
But the clock went to the attic.
Now I am retired and I rebuild it with arduino. The original clock is shown in the photo below.
I rebuild the clock and used all the 60 + 12 connections of the leds, so now I need 9 shifregisters (8 bit). Somehow I got a MM5451 35 bit shiftregister mounted on a printboard with 5 displays (7-segment led). I made a hole in the front and placed the displays in it. See photo below.
I made my own routines to read and set the RTC, so there is no need to load a RTC library. I am using the RTC 1 HzSQW puls via interupt pin 2 on the arduino. In the main loop the program is checking the state of the 4 switches. With 4 switches there are 16 functions.
The 16 functions are:
Function 1111:
Display: blank
Leds: time
Function 1110:
Display: time
Leds : time and moonage (see video below).
The blinking led is at position 46. Divide it by 2 = 23. The moon is 23 days old.
So the four phases of the moon are:
When the led blinks at zero, it means: new moon
at 15 (divide by two = 7.5 days) = first quarter
at 30 (divide by two = 15 days) = full moon
at 45 (divide by two = 22.5 days) = last quarter
From new moon till the next new moon are 29.5 days.”