After completing the GPS-Controlled Binary Clock, I was interested to make a version that synchronised itself with time pulled via the Internet. I reasoned this would be of more interest to people whose offices were buried deep inside buildings, away from any view of the sky. The sensible way to do this would be by connecting the clock to the home or office network, and using the NTP protocol to get the time.
I had a play with ESP8266 modules, which were quite fun (I’ll certainly be using those in a future project or two!) but realised it would be a substantial amount of work to implement a web-based config (configuring access to the Wifi network, and setting the timezone). And it would have potentially been a more complicated circuit than the GPS-version, and wouldn’t have been all that friendly to set up.
Instead, I experimented with turning my Binary-Clock into a shield for a Raspberry Pi. The resulting project is a considerably simpler alternative to the GPS version!
I’ve adopted a similar form-factor to the GPS-clock: the front PCB is the same (the matrix of LEDs) so I can use the same board design for both projects.
The rear PCB is a new design. It needs to hold only the MAX7219 display driver, and a socket for the Raspberry Pi. I’ve added mounting holes so that you can fit any model of Raspberry Pi to it. This gives you the choice about whether you’d like to connect the clock to your LAN with a standard Ethernet cable (in which case: choose a Pi with an ethernet socket) or via Wifi (in which case: choose a Pi with wifi support, or add a USB dongle).
I’ve added all the pads for a 40-way connector, but I only use the first 26 of them. So the circuit is compatible with all Raspberry Pi variants, but the extra pins add a bit of extra strength to the mount.
By putting the MAX7219 on the other side of the rear PCB, the components sit nicely between the two PCBs (a bit more “centre-mass”, if you like), leaving the back of the PCB for just the Raspberry Pi.
As you can see – the new PCB design is very simple, and much less stressful to build than the GPS-clock.
I’ve also been able to remove the pushbuttons for adjusting timezone, which feels neater. Instead, the software just uses the Pi’s “local time” – which means that if you’ve configured your Pi to handle daylight savings time for your locale, it’ll switch over automatically.
The support software
It’s dead-simple, and might be useful reference if you want to do GPIO-control with C or C++.
Kit for sale
There’s all the information here if you’d like to build your own (with my blessing!) … but a kit is now available to purchase on Tindie. I have lots of spare boards, and thousands of LEDs to shift! 🙂 The PCBs are nice and easy to solder, and a manufactured PCB always looks nicer than something you put together on stripboard. All profits from these kits (and I’m telling you now: that aint much) goes back into funding more foolish projects for this blog! 🙂