Word clocks are not new but they sure are fun, and Christopher’s entry goes further than most. As well as telling the time, it announces holidays and birthdays by shining LED lights behind specific letters and numbers on a custom-made panel. Everything is controlled by a Raspberry Pi computer. “When I thought of the project, Raspberry Pi felt like a natural fit,” he says.
Time to try
The idea came when Christopher bought a 3D printer. “Rather than printing figurines, I wanted something practical; something with function,” he explains. “I was browsing Printables when I came across a similar project and thought, ‘I bet I have most of the stuff I need to make this’.” Even so, aspects of the build posed a challenge.
Since Christopher was making his own housing for the clock, he needed to use a 3D graphics tool. “That meant learning Blender and taking precise measurements with callipers,” he says. He also opted to use a 128×64 HUB75 LED matrix that he’d received with a monthly HackerBox subscription, and this influenced the size of the word matrix that he had to print.
“There was a lot of trial and error,” he says. “A key problem I noticed early on was light. I opted to use a 2×2 grid of LEDs per illuminated letter, but putting the letters too close meant I could see each light,” Christopher says. “In the end, I designed a lattice to sit between the RGB matrix and the printed word matrix. Between it, I placed a grey sheet of paper cut to size, and this worked pretty well to diffuse the light.”
Since the word matrix was 62×32 characters, Christopher realised he had space for many letters. “Once I’d finished arranging the time parts, I had more than half a screen’s worth of real estate left, which is why I decided to also announce the date and any holidays and family birthdays,” he says.
To keep time, Christopher included an RGB Matrix HAT + RTC from Adafruit so that the project could benefit from a persistent real-time clock. Setup involved connecting this to the Raspberry Pi computer, and hooking everything to the display inside the printed case.
Of course, Christopher also needed to program the device. “The project I found on Printables had an example Python script, so that was a good jumping off point, but it still needed to be heavily modified,” he says. “I used a holidays library to determine if the current day was a holiday or not. I also had the challenge of lighting the letters.”
He had to figure out, for example, that LEDs at positions 14,46, 14,47, 15,45 and 15,47 needed to be turned on for the letter J. “This had to be done for each letter I wanted to turn on, so I set them into arrays for better organisation,” he adds. Once done, the clock could spring into life, looping every second to update the LED clusters. “Raspberry Pi has been a great device for the job,” he says.