Real Time Clock Source

Holds discussions about Wimborne Model Town's River System Design and any relevant drawings.

Relevant documents are available at https://wmtprojectsforum.altervista.org ... les/Design
Post Reply
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Real Time Clock Source

Post by TerryJC »

This Topic provides a summary of the discussion that has been ongoing by email between Hamish and myself with respect to whether the NAS Box should become the RTC time source. It has been placed here because it relates more to the whole system rather than the NAS Box or any other specific piece of hardware.

Hamish asked:
...do we want to use the RTC in the NAS box to sync the time with everything else, instead of the RTC we currently have for Sump Pi?
In response I wrote:
It's a very attractive proposition to use the RTC in the NAS Box, because it reduces the number of hardware items in the system, thereby improving overall reliability.

However. I've just searched the User Manual for the DNS-320L and the only reference to the Real-time Clock that I can find is in the list of Features
where it states: 'Supports Real-time Clock (RTC)'. This begs the question; how is the RTC battery changed?

Currently the RTC battery can be changed easily by removing the lid on the IP65 Box. Alternatively, the Webserver Pi has a UPS which includes a RTC and I have used this for the web pages. There is no separate battery needed for this because the UPS-Pico has a LiPo battery to keep the Pi alive long enough to shut down cleanly if the power goes off.

On balance I'd still rather use the NAS Box RTC, because the hardware is likely to be more robust. If we can't change the battery OK, then we will
have to make a group decision.

One further option is to make the NAS Clock the master clock and open a path to a timeserver through the firewall in the Webserver. We should be able to do this without compromising the rest of the network.
As a response to this, Hamish looked inside the NAS Box and found that the RTC battery is relatively easy to change. It is a type CR1220, and the terminal voltage is 2.95 V. However, that's out of circuit so it probably hasn't much life left. It was agreed that we should use the NAS Box as the primary timeserver for the system and replace the battery when the system is deployed. We will decide whether we should get time from an NTP server nearer the time.

Hamish then suggested:
One idea I had was to keep sump pi's RTC as well, and then we could use it as a fallback for time syncing if the NAS box goes offline.
I responded that I'd always thought that the RTC in the SumpPi is physically vulnerable and we have to change the configuration of the wiring to the first six GPIO pins to accommodate it, so I would prefer to use the webserver.

So when the NAS Box is deployed, the Software Framework will be changed so that all River System Pis will obtain the time from the NAS Box with a fallback to the Webserver if the system detects that the NAS Box RTC has failed (eg the time given is earlier than the last known time).
Terry
PatrickW
Posts: 146
Joined: 25/11/2019, 13:34

Re: Real Time Clock Source

Post by PatrickW »

The more stable indoor temperature might be better for the battery lifespan and the accuracy of the clock.
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Real Time Clock Source

Post by hamishmb »

Note for future reference: The battery was changed and the system does now used the NAS box as a primary time source. The RTC installed with Sump Pi is used as a backup.
Hamish
Post Reply