DOWNLOAD:  https://raynerd.co.uk/wp-content/uploads/2025/03/V17-ClockTimer-WebUpload1.zip

After spending five years designing and building a miniature Tower Clock, I wanted to push things a step further. While the clock’s movement is mechanically sound and visually rewarding, I wanted to know: how accurate is it, really? That’s where the Pendulum Timer project comes in. More than that – I just wanted to get it accurate and without a timer, the more accurate you get the clock, the harder it is to measure the error.

Why Build a Pendulum Timer?

Mechanical tower clocks rely on pendulums for their heartbeat. Over time, even the best designs can drift—tiny changes in temperature, air pressure, or friction can cause a pendulum to gain or lose time. To fine-tune my clock and measure how it performs over days and weeks, I needed a way to monitor its beat intervals with high accuracy.

Commercial tools like the MicroSet and eTimer exist, but I wanted to create something using cheap dev boards and sensors. My goal was not just to measure beat intervals but to build a system I could tailor, improve, and learn from. And so the Pendulum Timer was born.


How It Works

The Pendulum Timer is built around an ESP32 microcontroller, chosen for its processing power, Wi-Fi capability, and real-time performance. Here’s a quick overview of how the system works:

1. A photointerrupter detects each pendulum beat.
2. An interrupt-driven signal records the exact microsecond of each beat.
3. Environmental sensors track temperature, humidity, and pressure.
4. A GPS module provides time sync and ultra-precise PPS (pulse-per-second) signals.
5. Data is logged to an SD card and displayed on a web dashboard in real-time.

This lets me measure beat intervals, drift, frequency, asymmetry, and more, with timestamped environmental context.


Sensors and Components Used

Here’s a breakdown of the key components:

Component Purpose Price (approx.)
ESP32 DevKit Core processor and Wi-Fi controller £7
GP-20U7 GPS Module Provides accurate UTC time and PPS signal £10
BME280 Sensor Measures temperature, humidity, and pressure £4
Photointerrupter (e.g., OPB703 or similar) Detects pendulum beats £2
0.96″ OLED Display (SSD1306) Displays live timing stats and metrics £3
Micro SD Card Module Stores CSV logs of pendulum data £2
3.3V Regulated Power Supply or USB Powers the system Already owned

Total hardware cost: under £30, depending on what’s already in your parts bin.


Features

  • Microsecond Precision: Beat intervals logged with very high resolution.

  • Environmental Logging: Track how air pressure and temperature affect timekeeping.

  • Web Dashboard: Access live timing stats (BPS, BPM, drift, frequency) on any device.

  • CSV Data Logging: Review performance over hours or weeks.

  • GPS Time Sync: Compare clock drift against atomic time standards.


What I’ve Learned So Far

Even in a climate-controlled room, the pendulum’s beat frequency can drift subtly with environmental changes. With this timer, I can see exactly how and when it happens. The project has also taught me a lot about interrupt handling, real-time microcontroller design, and practical electronics.

It’s been a brilliant companion to the tower clock—transforming it from a static build into a living experiment in horology.


What’s Next?

I’m currently refining the PCB design to house all the components in a clean, compact layout. I’m also working on expanding the web interface with more controls and possibly adding remote firmware updates and calibration tools.

Stay tuned—and if you’re working on your own clock project, feel free to reach out or drop questions in the comments!

The video below shows the initial timer that was created to get the concepts and sensors working at the start.