Vasilis’ nerd blog presents
Most of my clocks are just websites, you can look at them in your browser. I turn some of my clocks into physical objects, physical clocks for in your home. One of the things that I find most complicated is the question of how to show the correct time on these things. There are a few possible strategies.
Computers use NTP to synchronise time. Raspberry pi computers use this protocol as well, so as long as there’s a network connection, the time will be right. This isn’t a real long term solution though. There are quite a few dependencies though, and I want as few dependencies as possible. First of all, NTP will probably stop working, one day in the future. From that day on the clock will not be a clock anymore.
The second issue with depending on a resource on the internet is that the clock needs an internet connection. Raspberry pi computers do have wifi, so it is possible to add a connection to such a clock. The problem here is: Will wifi exist forever? And the other, more complicated problem is: How do you change this network, if the clock moves to another place, or if the wifi is changed?
To make things more complicated, these clocks are in read-only mode. Which means that a graphical interface to change the network would involve restarting the computer first, then set the new wifi name and password, and then set the computer back into read-only mode. I find this too complicated.
The other option is to let the owner of the clock set the time manually somehow, for instance via a visual interface. This way you don’t depend on the internet, and on protocols, and the clock just works. The issue with this solution is that the internal clock of a raspberry pi is not very precise, and that time doesn’t keep on ticking when the power is cut off. You will have to set the time after every restart, and even if you never turn it off, you have to adjust the time every now and then.
What I like about this solution is that you have to interact with your clock, just like you have to interact with old mechanical clocks. My parents wind their clock every morning, and correct the time, if needed. It is part of a morning ritual, and it makes them more aware of the time, and of their clock.
Then finally there is the option of enhancing a manually adjustable clock, by adding a real time clock module to the raspberry pi. These modules can be pretty accurate, and they have the added benefit that they keep on ticking when you turn the power off. They do need a battery for this feature though, so that is a dependency. The battery will eventually run out, which can take years. The owner of the clock can then buy a new battery, if these specific batteries are still for sale in the future. And if not, the clock will fall back to a clock that needs manual adjustment after every restart. This might feel like the clock is broken, to people who are used to it.
I started writing this article with the intention of asking you, the reader, what the best option would be: NTP, a simple manual clock, or an enhanced manual clock with a real time clock module. But after writing it I come to the conclusion that I like the manual clock most. I’m still a bit in doubt if I like the enhanced version better. So if you have a very strong argument about one or the other, please let me know.