This DIY Digital Cuckoo Clock Is a Reimagined Version of the Old Style
Take a look at Katie Dumont's completely digital take on the centuries-old cuckoo clock, complete with a digital bird!
The world of cuckoo clocks
Countless forms of media depict the early Nineteenth Century with a variety of imagery, and none are perhaps as iconic as old wooden furniture, steam locomotives, and the cuckoo clock. This special time-keeping instrument is unique due to how rather than chimes sounding at the top of each hour, a cuckoo bird flies out the middle and chirps. Inspired by this design, Katie Dumont from element14 Presents wanted to make her own version while digitizing it along the way.
Initial ideas, hardware, and planning
To get the ideal workshop clock, the device would need large numbers to display the current time, along with some kind of sound to signify the rolling over of the hour. With this in mind, Dumont selected four large seven-segment digits, as well as a small piezoelectric buzzer for making beeps and a Raspberry Pi Pico W as the microcontroller. The biggest challenge was when it came to planning how the cuckoo bird itself would be shown. It could have been a little animatronic robot, but that would have required extra materials, motors, and program complexity. So instead, Dumont settled on a screen that could show an animation of the bird coming forward.
How to display animations
Going from a physical robot to one that is entirely digital presented a challenge because Dumont had never created a 3D animation before. Because she had previous experience with Blender in her code club at a primary school, she decided to use it for her 3D model and movements. Whenever the hour changes, the first animation brings the bird model up to the front of the screen, and subsequent animations turn the model's head left and right for the number of hours that have elapsed. Once finished, Dumont exported her three animations as 240x240px AVI files to an SD card for future playback.
Handling the time
Because this project is primarily a clock, after all, retrieving and displaying the current time was one of the most important aspects to get right. Once a day, the Python script fetches the latest timestamp via the network time protocol (NTP) and sets the machine's internal RTC with the returned value. Within the main loop, the current hour and minute are continuously read and then parsed into separate digits. Because this project runs on a Raspberry Pi Pico W, the seven-segment digits could be easily connected and driven according to the hour or minute value.
Screen programming
While the clock portion was quite simple to implement, showing the bird animation proved to be quite a challenge. In a previous project, Dumont's bike speedometer, she used a round pixxiLCD screen module from 4D systems that was capable of playing embedded video files directly from an SD card and without the need for an external controller sending it streams of data. However, she ran into a problem with the square 2.5" screen not playing the video clips even when she gave the exact byte position within the SD card's filesystem.
Assembling and testing the clock
After verifying her circuit worked as intended on the breadboard, Dumont soldered it together on a piece of perf board and added an additional two seven-segment display modules. Next, she used FreeCAD to design a small enclosure which has cutouts for the four seven-segment modules, the 2.5" LCD screen, and for the round buzzer at the bottom. The back had a keyhole in the center so the entire assembly could be easily hung on the wall. From here, everything was placed inside the case, albeit with the screen still not working. In the future, Dumont plans to remedy this issue by either rewiring the code in C so that she could take advantage of the Arduino library, or import the video into a conversion utility and program the screen directly.
To see more about how this digital cuckoo clock was built, you can watch Dumont's video here on YouTube.