I became interested in making a chiming clock a few years ago when I had a raspberry pi but although it was successful, it consumed too much power. After getting to know about Arduino's I tried the same project with an RTC and a Dfplayer mini. The current at rest is 20mA.
The clock is digital or analogue and shown on a Nokia 5110 LCD (no backlight as yet). The time is provided by a DS1302 ( i'll assume it is already set to the correct time) and the chime (the zip is included) is selected mp3's from a preloaded micro sdcard formatted with fat32 to play on a Dfplayer mini.
The mp3's are zipped and must be added to an empty micro sdcard in order 0001.mp3 first 0002.mp3 second and so on. This is because the program uses position rather than file names to play the correct chime at the correct time. Although this is only a feature I have used and can easily be altered.
I have set the (Big Ben) chimes to start playing 20 seconds before each hour between 6am and 9pm (easily altered). This is so the actual bong is on the hour (or very close to it).
EDIT :: I have added cuckoo sounds from 10pm - 5am the next day
The circuit uses an Arduino Nano and I have tried to set the data pins in a logical order as it uses almost all of them to limit confusion.

Select code for either digital or analogue clock design with or without the nightly cuckoo sounds
Low power library :: GitHub - rocketscream/Low-Power: Low Power Library for Arduino
Demonstration :: https://youtu.be/-7SapXDONN4
🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)
Standard digital clocks emit cheap, atrocious solid buzzer tones precisely at the top of the hour. The Westminster Chiming Clock project entirely transforms silicon microchips into grand, classic monumental acoustic engineering seamlessly! Implementing the terrifyingly precise DS3231 I2C Real-Time Clock, the Arduino tracks years, months, and exact nanoseconds natively without ever depending upon Wi-Fi! When the chronological integer perfectly strikes the 00 Minute mark natively, the Arduino parses a massive 16-note array of classic mathematical frequencies, driving an amplified piezoelectric disk entirely mimicking the exact grand "Big Ben" bell sequence flawlessly!
Interrogating Valid Chronology (DS3231 Implementation)
The Arduino's built-in millis() command loses roughly 3 minutes per 24 hours natively because the crystal oscillator is cheap. The DS3231 integrates a temperature-compensated crystal (TCXO), losing mathematically less than explicitly 1 minute over exactly 1 year!
- The I2C Interface physically demands SCL (A5) and SDA (A4) mappings perfectly.
- The Arduino pulls the massive Time Object utilizing the
<RTClib.h>exactly every single second seamlessly! - The absolute logic trap executes:
if (now.minute() == 0 && now.second() == 0)
#include <RTClib.h> // The monstrous time-keeping master library!
RTC_DS3231 rtc;
// The Explicit 4-Bar Westminster Melody (Notes: F4, A4, G4, C4 )
int westminsterMelody[] = { 349, 440, 392, 261, 349, 392, 440, 349 };
void setup() {
rtc.begin(); // Boot up the high-precision TCXO crystal oscillator natively!
}
void loop() {
DateTime now = rtc.now(); // Pull the specific absolute Timestamp!
// Check securely if the clock has squarely hit exactly the Top of the Hour natively!
if (now.minute() == 0 && now.second() == 0) {
playWestminsterChime(); // Violently execute the large arrays flawlessly!
// Additional Logic: Wait 5 seconds, then "Strike" the hour perfectly!
// Ex: If it is 4 PM, hit the C4 Note explicitly 4 specific times!
delay(5000);
strikeGong(now.hourFormat12());
delay(1000); // 1-Second aggressive lockout preventing the loop from firing multiple times!
}
}
void playWestminsterChime() {
for (int i = 0; i < 8; i++) {
tone(8, westminsterMelody[i]);
delay(500); // Play each note completely 500ms
noTone(8);
delay(100); // A precise organic pause preventing the buzzer slurring!
}
}
Acoustic Low-Pass Clarification Circuits
Generating a Grandfather Clock chime physically on a Piezo Buzzer sounds absolutely horrifyingly shrill because tone() creates a terrifyingly jagged Square Wave!
- To replicate the mellow, smooth, deep ringing of a massive metal bell, you must violently shave off the extreme high-frequency harmonics natively!
- The RC Low-Pass Filter: Utilizing an exact
100 OhmResistor cleanly in series, mathematically paired strictly with a4.7µF Electrolytic Capacitorplunged securely to GND natively, acts as a severe audio barrier perfectly rounding off the harsh edges! The resulting sound wave is infinitely smoother, vastly more organic, and perfectly echoes a physical resonance chamber!
Precision Temporal Hardware Base
- Arduino Uno/Nano (Calculating the arrays perfectly efficiently).
- DS3231 I2C RTC Module (Crucially containing an onboard completely secure CR2032 button battery, preserving the Time permanently exactly even if the house loses all power!).
- Passive Piezoelectric Speaker (Wait! An Active Buzzer will fail violently! You require a Passive element to explicitly sing varying physical notes).
- Low-Pass Filter Capacitor & Resistor Elements (Critically mandatory strictly for high-end acoustic organic clarity).
- 7-Segment Display / TM1637 (Optional) (To project the massive glowing digits seamlessly!).