IoT Clock Tower Automation Project

The Challenge of Pendulum Clocks

Pendulum clocks are beautiful and historically significant, but they can be quite tricky to maintain. Changes in temperature, humidity, and even air pressure can affect the pendulum’s length, making the clock run too fast or too slow. This means you have to adjust the pendulum frequently to keep the clock accurate, which can be a hassle.

Our Solution

To tackle this problem, my dad and I decided to automate a historic clock tower located in Oostwoud, a small village in the Netherlands, situated in the province of North Holland. Our idea was to have the pendulum run a little fast all the time, then catch it and correct it before it got too far ahead. By doing this, we could ensure the clock stayed accurate without needing constant manual adjustments.

Hardware Used

For the hardware, we used a Raspberry Pi and some custom components to control relays and read data from industrial inductive sensors. The Raspberry Pi acted as the brain of our system, running the control logic and communicating with the sensors and relays.

Software and Automation

We used Home Assistant to handle the automation tasks. Home Assistant is an open-source platform that helps control and automate smart devices. By integrating our custom hardware with Home Assistant, we created a dashboard to monitor and control the clock tower.

Python Script and MQTT

To interface with the hardware, we wrote a Python script that ran on the Raspberry Pi. This script was responsible for reading data from the sensors and controlling the relays. The measurements from the sensors were then converted into MQTT (Message Queuing Telemetry Transport) messages. MQTT is a lightweight messaging protocol ideal for IoT applications, allowing us to easily send the sensor data to Home Assistant for processing and display.

Here’s a screenshot of our Home Assistant dashboard:

The dashboard gave us real-time information on the clock’s performance, including pendulum speed, clock accuracy, and the environmental conditions affecting the clock. This setup allowed us to make adjustments and monitor the clock remotely, keeping it accurate no matter what.


This project was a great learning experience for both me and my dad. By combining traditional clock mechanics with modern IoT technology, we managed to preserve the clock’s historical value while ensuring its accuracy and reliability. It’s a perfect example of how IoT can be used to solve real-world problems.

Leave a Reply

Your email address will not be published. Required fields are marked *