Synchronize Multiple Wall/Desk Clocks  - Page 1
Forum section: electronics / projects

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 29, 2017, 02:19:49 pm
content: I have an increasing number of clocks! My main (slave) clock is wall mounted and is attached to a home brew slave driver which receives DCF77. But now I also have a nixie clock on my desk and am in the process of building a 'Tix clock' with my daughter and probably another for myself... and maybe another nixie clock etc. etc.Now obviously there are many ways of obtaining a time reference... e.g. DCF77, MSF60, GPS, NTP etc but what are good solutions for distributing this to the various clocks around the establishment?WiFi would probably work but requires initial configuration... I have some RFM69W modules.... I could just add a DCF77 receiver to every clock (but DCF and MSF are highly directional when using a ferrite antenna)Any novel suggestions for distribution?Thanks in advance.

author: niekvs
author_rank: Contributor
timestamp: August 29, 2017, 02:29:03 pm
content: Your RFM69W modules would work. Another option would be some little NRF24L01+ modules: they're very cheap and will work through a few walls. So unless you live in a palace, it should be a good solution.You can get them here:https://www.aliexpress.com/item/10Pcs-x-NRF24L01-Wireless-Module-2-4G-Wireless-Communication-Module-Upgrade-Module/1289649564.htmlhttps://www.aliexpress.com/item/Smart-Electronics-10Pcs-Similar-NRF24L01-2-4G-Wireless-Data-Transmission-Module-1-27-SMD-Mini-NRF24L01/32739425642.html

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 29, 2017, 02:36:52 pm
content: Quote from: niekvs on August 29, 2017, 02:29:03 pmThat might be interesting. Not sure if it would stretch to the East Wing though.

author: Leiothrix
author_rank: Regular Contributor
timestamp: August 29, 2017, 10:59:43 pm
content: If you're not trying to get the clocks matched to the microsecond, perhaps you could use the NRF24L01+ as repeaters as well?Simple protocol with a message ID, TTL, and the time. If a clock receives a message it hasn't seen before, decrease the TTL and rebroadcast it, perhaps after a random delay.

author: Benta
author_rank: Super Contributor
timestamp: August 30, 2017, 07:27:05 am
content: Simplest and cheapest is to give every clock a DCF77 receiver.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 30, 2017, 09:37:33 am
content: Quote from: Benta on August 30, 2017, 07:27:05 amThe problem is that DCF77 is approx 650km away at a bearing of about 100 degrees, my house is aligned pretty much to North. So the interior walls either point at a good angle to DCF or at exactly the wrong angle for DCF. So if I put a DCF receiver in a rectangular clock aligned with the clock then it will work in some locations but not in others. (And DCF77 and MSF60 don't work well in computer (monitor/PSU) environments)

author: Kalvin
author_rank: Super Contributor
timestamp: August 30, 2017, 09:43:15 am
content: Use TCXO or OCXO so you should get 1ppm ... 0.1ppm or better accuracy, which means 1 second drift in 1.5 weeks ... 3 months.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 30, 2017, 11:07:33 am
content: Add NTP to everything. Then they even match your Phone, PC.I recommend buying Particle Photons, easiest IoT experience imho.https://github.com/bkobkobko/SparkTime

author: Benta
author_rank: Super Contributor
timestamp: August 30, 2017, 11:51:26 am
content: 650 km is nothing for 77 kHz, and the transmitter is very powerful.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 30, 2017, 12:06:02 pm
content: Quote from: Benta on August 30, 2017, 11:51:26 amFerrite rod antennas are VERY directional, it's not so much about power. Maybe I should use MSF60 anyway post-BrExit

author: Ian.M
author_rank: Super Contributor
timestamp: August 30, 2017, 12:09:39 pm
content: Locally rebroadcast (on a licence free band) or distribute by wire, the demodulated DCF77 data signal or GPS NMEA0183 signal from a dedicated rceiver with an outdoor antennae.

author: georges80
author_rank: Frequent Contributor
timestamp: August 30, 2017, 05:18:51 pm
content: My wife sets the kitchen clock 5 minutes (give or take) ahead. Microwave some minutes ahead. Oven clock some minutes ahead. I don't wear a watch (haven't for at least 20 years).Time, who cares for most day to day stuff. Only important for very specific events that are generally outside of the house and then cell phone provides you that service quite accurately (meeting, appointment, flight etc).Hungry, time for food - who cares if it is 12:00pm of some time before or after... Living by the clock is a form of imprisonment...cheers,george.

author: DaJMasta
author_rank: Super Contributor
timestamp: August 30, 2017, 05:30:37 pm
content: With how small and cheap Wifi modules are.... NTP is probably going to be the simplest option, so long as none of the clocks are just battery powered.That said, if you go with a decent quality RTC chip, you can easily get within a couple seconds of accurate in the course of a year. I've got a DS3232 based RTC that's been <10s out per year consistently now.

author: madsbarnkob
author_rank: Frequent Contributor
timestamp: August 30, 2017, 07:01:30 pm
content: Im going to follow this thread, I recently got hold of a Meinberg GPS170 rack clock with external antenna, so got to use that stratum 0 for something else than the one display I have for it

author: Twoflower
author_rank: Frequent Contributor
timestamp: August 30, 2017, 07:09:04 pm
content: Just add a pendulum and wait until all oscillators synchronize. This is known since 350 years:http://www.realclearscience.com/journal_club/2015/07/24/why_pendulum_clocks_synchronize_109319.htmlSo to say a PDXO a pendulum disciplined crystal oscillatorMore serous. Use the 50Hz or 60Hz line frequency. In most countries that frequency is extremely stable. Especially over long time. Unless it's not too noisy (e.g. old electro motors) it shouldn't be to complicated to get a clean clock from it. Of course that doesn't help you to set them initially.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 30, 2017, 09:09:24 pm
content: Quote from: georges80 on August 30, 2017, 05:18:51 pmI appreciate the sentiment. Actually I don't really care if they are correct just as long as they are all the same.I have DS3231 RTC in all my projects so the requirement is only to resync occasionally (and to work out DST).

author: edavid
author_rank: Super Contributor
timestamp: August 30, 2017, 09:31:42 pm
content: If you already have WiFi coverage, I think that's a good solution, despite the configuration issue. You could use ESP8266 modules (probably have to have a simple time server on your network to figure out DST etc.), or Raspberry Pi Zero W/CHIP/Orange Pi/other cheap Linux SBC (costs more, but can just run NTP).Another idea is to have infrared timecode beacons in the rooms with the clocks.Or hey, ultrasonics... you can use that to power your clocks too

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 30, 2017, 09:41:34 pm
content: I'm moving towards having ESP8266 and implementing a WPS button on the clocks. Then somewhere on the LAN I will have SNTP or similar. Not sure about DST yet.

author: DaJMasta
author_rank: Super Contributor
timestamp: August 31, 2017, 01:56:27 am
content: DST isn't hard to do in software, look up Sakamoto's Algorithm and it will spit out day of the week for a given date, and using that, the month, and the 2am turnover time, it's easy to implement an automatic DST switch, or just disable it with a boolean variable written to eeprom or whatnot. My aforementioned DS3232 is in a nixie clock that uses that method and has been giving me good DST-adjusted time for a couple years. Plus, especially if you've got a micro with a USB connection, it's really easy to send over NTP time as a sync once when you program it, then it will likely be accurate to within a few seconds for years. Wifi means you probably don't need a good RTC (or any, potentially), using the mains frequency will keep fantastic time, but it doesn't set the initial time and won't holdover for outages, plus if you have an external power supply running it, you'll probably need a wire as an antenna and a little amp to get it to a usable state in your device.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: August 31, 2017, 03:39:11 am
content: Went through this process recently.I have several servers that are run continuously and are NTP sync'ed to external time sources.So for the clocks I just implemented a simple UDP time sync connection to the servers locally. This is easier than having to implement NTP on the clock itself.

author: niekvs
author_rank: Contributor
timestamp: August 31, 2017, 09:43:39 am
content: Quote from: Benta on August 30, 2017, 07:27:05 amHow is that the cheapest? Where do you find DCF77 modules cheaper than the 30 cents a piece that these NRF24L01 modules cost?https://www.aliexpress.com/item/Smart-Electronics-10Pcs-Similar-NRF24L01-2-4G-Wireless-Data-Transmission-Module-1-27-SMD-Mini-NRF24L01/32739425642.htmlQuote from: DaJMasta on August 30, 2017, 05:30:37 pmThat's not very simple at all, also now you rely on Wifi and have to configure all that. How is that simpler than NRF24L01, which, combined with the master DCF77 module, will work anywhere and not rely on Internet?

author: DaJMasta
author_rank: Super Contributor
timestamp: August 31, 2017, 03:29:18 pm
content: Oh I understand bit banging the whole thing yourself isn't easy... but the software's been done already and is well documented and the wireless network is already present and at a good signal strength. It's probably a comparable amount of software work, but it's also probably a comparable price using cheap wifi modules, and much of the work is already done on the software side - I'd imagine there's more than a couple tutorials on how to get NTP on very inexpensive wifi modules.Ultimately, there's options and most of them are pretty cheap. We're not talking 100k units for the lowest end market, so it's probably more about preference than anything else.

author: Ian.M
author_rank: Super Contributor
timestamp: August 31, 2017, 07:45:12 pm
content: There's enough clutter on 2.4GHz as it is without adding lots of NRF24L01 modules distributed round one's house. Personally, I'd look at 433MHz transmitter and receiver modules as the application only needs a unidirectional link.

author: niekvs
author_rank: Contributor
timestamp: September 01, 2017, 09:27:35 am
content: Quote from: Ian.M on August 31, 2017, 07:45:12 pmWell, only one has to transmit, and it has to do this only like once per hour at most, so this seems a total non-issue. And if you want to prevent clutter, 433MHz clutter will go a lot further than 2.4Mhz clutter, all else being equal. Also, wifi will have much bigger overhead than NRF24L01.

author: Fungus
author_rank: Super Contributor
timestamp: September 01, 2017, 03:13:35 pm
content: Quote from: NivagSwerdna on August 29, 2017, 02:36:52 pmNo worries:http://www.ebay.com/itm/253018252658

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 01, 2017, 03:29:22 pm
content: Quote from: niekvs on September 01, 2017, 09:27:35 amYou ideally would want new clocks to join and sync quickly... so once per minute seems more sensible.