Close
0%
0%

1ppd: Midnight Reset

What is the best way to resynchronise a wall clock every day ?

Similar projects worth following
This is a study and evaluation of methods to get a very accurate time. This compensates the inevitable drift of a simplistic oscillator with aging, temperature, voltage fluctuations...
What method is best ? GPS ? GSM ? DCF77 ? Wifi ?

The design of two closely-related clock projects #Yet Another (Discrete) Clock and #Clockwork germanium uses a medium-stability oscillator. Until the accuracy is precisely measured, this is suitable for one day or one week but the drift might be perceptible in a month. And it's a clock and you don't want to have to correct the clock all the time !

I need a convenient, energy-saving, economic way to reset the clock at midnight, with just one pulse.

  • Low-cost is important, yeah.
  • It should be able to run on batteries for a long time. Spending its day in sleep mode, waking up every day or two, to check the time and send that pulse then go back to deep sleep...
  • Convenient, should survive battery loss

As discussed in https://hackaday.io/project/9376-yet-another-discrete-clock/log/34710-integrated-32khz-clock-source the DS3231 is good but fails on convenience because 1) battery loss resets the chip to default state (no external alarm pulse) and 2) there needs to be a way to set the clock easily (with another midnight pulse ??) so an external µC is required.

What are the other solutions ?

  • DCF77 would be good but receivers are not available or cheap anymore and a µC is still required to analyse the noisy pulses, when the receiver is in a good reception spot.
  • GPS doesn't work indoors. Clocks live indoors. Too bad. I'm sure you won't install a long antenna cable and a patch antenna on your window, just to get accurate time at midnight.
  • GSM/GPRS/xG works indoors and somehow carries timestamps. How ? Is it possible to get the timestamps without the need of a SIM card ? I'm not a GSM guru, please enlighten me!
  • Wifi is often mentioned but then comes the hard/complex question of configuring the client devide. The ESP8266 is mentioned everywhere and would work as a NTP client but 1) power consumption 2) convenience (how do you tell it to connect to a particular AP ? how do you provide it credentials ?)

Until I get a reasonable answer, all I can do is make the oscillator as stable as possible, and reserve an open collector/drain input to clear all the counters...


Logs:
1. Got Rb ?

View project log

Enjoy this project?

Share

Discussions

Ted Yapo wrote 05/19/2016 at 15:29 point

I am also frustrated by the lack of a simple, local time synch protocol.  It could be used in many, many places.  For example, I had to replace the battery in my car recently.  A few minutes after starting it back up, the built-in GPS obtained lock, and knew the current time to tens of nanoseconds.  Six inches (15cm) away, the dashboard clock was still blinking "12:00".  Ridiculous!

  Are you sure? yes | no

Yann Guidon / YGDES wrote 05/19/2016 at 15:35 point

I'm considering a 2-tiers approach with a local DS3231, a MPU with I²C and serial, and a GPS receiver that is turned on every week or so to catch the time...

But GPS does not work well indoors and not at all in my place so a loooong wire is necessary to reach the closest window.

  Are you sure? yes | no

Ted Yapo wrote 05/19/2016 at 16:26 point

Why not a RPi / GPS / WiFi combo server (a few watts) near a window, and an ESP8266 client that wakes periodically and uses SNTP to query the server. You could standardize on an "open" WiFi SSID and password just for this service - many access points allow multiple SSIDs (I have five in my house) .  You could make sure that traffic on that SSID is *only* ever routed to the time server, so nobody sneaks on your network (except to receive the time, if they want).

  Are you sure? yes | no

Yann Guidon / YGDES wrote 05/19/2016 at 16:49 point

No, for multiple reasons.

NTP has been used as amplification relays for DDOS, it only moves the problem around and... not everybody has Internet access everywhere. So it's not the most cost-effective.

My favorite solution would be some DCF77 but it's not a worldwide standard and receivers are harder to find than 20 years ago :-(

  Are you sure? yes | no

Ted Yapo wrote 05/19/2016 at 17:35 point

If you run an NTP server on the RPi, you don't need Internet access at all - it gets the time from GPS and serves it to local clients over WiFi.  You're stratum-1. You do need local WiFi access, though, which may not be available.

If your network is routed/filtered so that time clients can only get to your local time server and vice-versa, there's little danger of DDOS attacks, especially if your time server isn't routed to the Internet at all (gets time from GPS).  But, you have to configure your network correctly :-)

I have two WWVB-synchronized watches that never set correctly.  I have always wanted to build a WWVB-emulator that produced a 60kHz time signal (it's well-documented) inside a metal enclosure I could store my watches in at night.  It would get accurate network or GPS time and make a "fake" local 60kHz signal (well-shielded to prevent interference to other devices). Add an efficient LED lamp inside to charge the batteries (the watches are both solar), and it works like a watch winder for automatic watch movements.

  Are you sure? yes | no

matseng wrote 04/18/2016 at 13:19 point

Don't know about the best method, but just sharing something semi-relevant I recently read.

A regular tuning fork have a tempco of about 86 ppm/C. That is incredibly low considering a ceramic resonator is about 3000-5000(!) ppm/C and it is just slightly worse than a crystal at 20-50ppm/C. This for just being a large fsking piece of metal...

I'm tempted to build a real 440Hz tuning fork oscillator just for funs when I get my lab back ^_^

  Are you sure? yes | no

Yann Guidon / YGDES wrote 04/18/2016 at 13:26 point

Won't you quiickly get tired of the constant tone ? :-D
Furthermore, according to http://www.ieee-uffc.org/main/history-marrison.asp there are tuning forks in alloys with almost no tempco...

  Are you sure? yes | no

matseng wrote 04/18/2016 at 13:39 point

Already got tinnitus since a few years back so there's already a constant ringing in my ears but at a very noisy about 11KHz frequency.  But a tuning fork that is not put in contact to a resonating object is relatively quiet, so maybe it could be usable even in a home environment, especially if put under a glass dome.

Nice pdf.... I guess that having special alloys and multi-material tuning forks would be more than just *slightly* more expensive than the regular ones. I guess that the low frequency models also are quite expensive and much harder to find than the regular "musical tuning" models.

Still it would be cool to make a tube-based tuning fork oscillator and have mounted on a nice hardwood base and some brass knobs and stuff to make it "steampunkish" (even if tubes are a bit post-Victorian)....

  Are you sure? yes | no

K.C. Lee wrote 05/19/2016 at 16:15 point

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates