Author Topic: Clock circuit design idea  (Read 2007 times)

0 Members and 1 Guest are viewing this topic.

Offline ConnecteurTopic starter

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
Clock circuit design idea
« on: July 25, 2020, 05:03:35 pm »
A lot of our clocks nowadays achieve accuracy by referencing a signal from the internet or from a shortwave broadcast. Quartz clocks are quite accurate and atomic clocks are nearly perfect, but most of the everyday clocks we use have the annoying habit of drifting off accurate time long before we notice it. But what about a much simpler solution designed into the clock circuitry itself? 

A simple clock such as one in a stove could learn how to keep more accurate time by taking note of two numbers: 1, the amount of time elapsed since the clock was last set, and 2, the amount of time lost or gained since the last reset.  From this valuable data, it's simple math to correct the clock speed, making it much more accurate each time it's set.  The circuitry should be designed to adjust it's own rate based on the actions of adjusting the clock.

I once saw this feature built into a mechanical clock that was built in the Soviet Union.  The instructions were that the clock should be adjusted once a day to correct the time until it kept excellent time.  For example, if you set the time correctly on Monday at 8 AM, and by Tuesday at 8 AM it had lost 10 minutes, setting the clock caused the mechanism to automatically adjust the mechanism to be 10 seconds faster per day.  After a few adjustments, this mechanical clock provided almost flawless timekeeping.

I'm surprised that no one has incorporated this simple principle into digital clock design in all the years that they have been used.
 

Offline m98

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: de
Re: Clock circuit design idea
« Reply #1 on: July 25, 2020, 05:33:02 pm »
That's just not how this works. Clocks don't only drift from a constant frequency offset.
 

Offline ConnecteurTopic starter

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
Re: Clock circuit design idea
« Reply #2 on: July 25, 2020, 06:34:44 pm »
That's just not how this works. Clocks don't only drift from a constant frequency offset.
Seems to me whatever the cause, it could be mitigated by this simple time-correcting solution.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 8995
  • Country: us
  • Retired, now restoring antique test equipment
Re: Clock circuit design idea
« Reply #3 on: July 25, 2020, 06:52:01 pm »
Back in the day, clocks at railroad stations ran freely (with pendulum mechanism) and would receive a synchronizing pulse (telegraphed from an observatory) on the hour that pushed the minute hand back to top center (12).  So long as the pendulum was reasonably accurate, each correction was small and the clock would stay synchronized to the observatory over the long run.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: Clock circuit design idea
« Reply #4 on: July 25, 2020, 07:10:58 pm »
I have lots of clocks in my house. The only one I need to think about is my oven clock. All the others are synchronized either by DVB, Web or DCF-77.

To me it's a non-issue.



 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: Clock circuit design idea
« Reply #5 on: July 25, 2020, 07:31:22 pm »
That's similar to how a lot of clocks in school rooms worked when I was growing up.

Back in the day, clocks at railroad stations ran freely (with pendulum mechanism) and would receive a synchronizing pulse (telegraphed from an observatory) on the hour that pushed the minute hand back to top center (12).  So long as the pendulum was reasonably accurate, each correction was small and the clock would stay synchronized to the observatory over the long run.
 

Offline ConnecteurTopic starter

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
Re: Clock circuit design idea
« Reply #6 on: July 25, 2020, 08:15:19 pm »
I'm sure the clocks in my school were regulated by the 60 Hz line signal.  Power stations back in those days had revolution counters, and they were sped up or slowed down to maintain an accurate revolution count.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Clock circuit design idea
« Reply #7 on: July 25, 2020, 08:27:56 pm »
Clocks in mains power appliances like microwave ovens are driven from the mains frequency which is kept in sync over the long term in many countries. Even cheapo clock radios still use the mains. Whereas pretty much anything that has a connection to the Internet uses that to keep time in sync.
 
The following users thanked this post: Ian.M

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Clock circuit design idea
« Reply #8 on: July 25, 2020, 08:30:59 pm »
That's just not how this works. Clocks don't only drift from a constant frequency offset.
Seems to me whatever the cause, it could be mitigated by this simple time-correcting solution.
It will work to some degree, but there are inherent fluctuations in any system, look up 1f noise.
https://www.google.com/search?client=firefox-b-d&q=1%2Ff+noise.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13156
  • Country: ch
Re: Clock circuit design idea
« Reply #9 on: July 25, 2020, 08:40:03 pm »
Back in the day, clocks at railroad stations ran freely (with pendulum mechanism) and would receive a synchronizing pulse (telegraphed from an observatory) on the hour that pushed the minute hand back to top center (12).  So long as the pendulum was reasonably accurate, each correction was small and the clock would stay synchronized to the observatory over the long run.
Swiss railway clocks, even today, are synchronized every minute with a pulse. The seconds hand orbits in 58.5 seconds, then sits at 12 o’clock for 1.5 seconds until the sync pulse comes, at which point the minutes hand advances a minute and the seconds hand begins its next lap.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13156
  • Country: ch
Re: Clock circuit design idea
« Reply #10 on: July 25, 2020, 08:48:02 pm »
Not the best quality video, but the newest, showing that behavior next to the newest-generation departure signs (big TFTs) (where they easily could have integrated the clock into the flat panel)

https://youtu.be/SKPgZj1vb8o
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 10172
  • Country: gb
Re: Clock circuit design idea
« Reply #11 on: July 25, 2020, 09:18:40 pm »
That's just not how this works. Clocks don't only drift from a constant frequency offset.
Seems to me whatever the cause, it could be mitigated by this simple time-correcting solution.

I have an alarm clock program on my Palm TX PDA (yes I know, ancient) that does exactly this. It applies a time correction in terms of fractional seconds per day to the crystal derived clock. The drift compensation actually works very well.
Best Regards, Chris
 
The following users thanked this post: Connecteur

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Clock circuit design idea
« Reply #12 on: July 26, 2020, 01:55:33 am »
There is no reason that a quartz clock cannot learn to correct its drift and temperature compensation, but typically it is not done because they are close enough.  If you did want a better one, then a much more accurate TCXO could be used which some high end clocks do.
 

Offline ConnecteurTopic starter

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
Re: Clock circuit design idea
« Reply #13 on: July 26, 2020, 03:09:20 am »
I'm sure "close enough" is the reason we don't see it incorporated into most clock circuits today, but why couldn't it just be part of normal electronic clock design?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Clock circuit design idea
« Reply #14 on: July 26, 2020, 03:13:16 am »
I'm sure "close enough" is the reason we don't see it incorporated into most clock circuits today, but why couldn't it just be part of normal electronic clock design?

The first thing which occurs to me is that it requires state to be saved unless it is acceptable that the calibration be lost if power is removed.  Saving state will mean some floating gate memory and nobody is going to build a cheap clock IC on a process which provides that, or add a second IC.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: Clock circuit design idea
« Reply #15 on: July 26, 2020, 03:27:26 am »
 

Offline ConnecteurTopic starter

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
Re: Clock circuit design idea
« Reply #16 on: July 26, 2020, 12:49:08 pm »

Good point, but I think non-volatile RAM has advanced to the point where data could be stored for up to 10 years or more.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: Clock circuit design idea
« Reply #17 on: July 26, 2020, 01:12:02 pm »
I am not sure where this incremental correction scheme would have its application niche these days. External time references are so easy to come by -- be it mains cycle counts, time broadcast stations, or NTP servers available via a fixed or wireless network.

Those clocks which might benefit, namely "off the grid" portable ones, will get carried around, exposed to fluctuating temperatures, run on batteries of varying voltage... In which case I would expect the effect of those external fluctuations to dominate the inaccuracy of the clock, such that a correction of constant errors or long-term drifts doesn't cut it anymore.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Clock circuit design idea
« Reply #18 on: July 26, 2020, 02:17:00 pm »
I know of one project which implemented this kind of idea: https://hackaday.io/project/169509-a-very-accurate-led-clock It may not work so well if the temperatures range is wider.

I suspect the real reason it isn't implemented in cheapo clocks is 1. there is already some other source of time, and 2. even if such a scheme is used, it will cost to calibrate each unit, and if the drift is too much in the field, people will get annoyed anyway and the scheme isn't doing any good.
 

Offline Tom45

  • Frequent Contributor
  • **
  • Posts: 556
  • Country: us
Re: Clock circuit design idea
« Reply #19 on: July 26, 2020, 02:31:15 pm »
I once worked with a guy that had that feature in his car's clock. This was decades ago and the implementation left something to be desired. Think mechanical clock movement with no electronics involved.

He said that it would overcompensate when he made a time correction. So each time he corrected the time it would overshoot in the other direction. It took quite a few iterations to get it close.

No, I don't remember the manufacturer of the car.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15795
  • Country: fr
Re: Clock circuit design idea
« Reply #20 on: July 26, 2020, 04:21:35 pm »
That's just not how this works. Clocks don't only drift from a constant frequency offset.
Seems to me whatever the cause, it could be mitigated by this simple time-correcting solution.

If it's kept in relatively constant conditions (temperature, RH...), that would sort of be OK I guess. But in real life conditions, that's rarely the case.

I don't really see a point these days though - even a good modern, but still not expensive TCXO, which is not boutique stuff at all, can get you less than 0.5 ppm drift over a large range of conditions, which would equate to approx. 1.3 s drift over a month, without any adjustement needed. I kind of doubt the scheme you suggest could get anything close to that, and it would require more "maintenance".

Of course you can get better than this yet, but that's quickly much more expensive (OCXOs, atomic clocks, etc.) and draws a lot more power.

Overall, the idea of a "learning" process is right only 1/ if the conditions that can influence the clock freq. are stable, or at least vary in a predictable, more or less constant way, or 2/ if your learning "algorithm" can actually take into account A LOT of parameters and compensate accordingly: that would mean using temperature, probably RH (depending on the clock generator), maybe pressure, vibrations... then also take into account how the clock generator reacts to these parameters... then feed it to some kind of neural network maybe. Eek. And even with that amount of sophistication, I still doubt you could get better than even a cheap TCXO. I'd be curious to see something like this implemented though, as an exercise.

 

Offline ConnecteurTopic starter

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
Re: Clock circuit design idea
« Reply #21 on: July 26, 2020, 06:44:29 pm »
I don't know if I'm the only one, but my expectations for accuracy for clocks have been raised, especially when things like phones and smart TVs provide accuracy to the second all the time.  When I set my AV equipment to turn on a program at a certain time, it's disappointing to miss the first minutes sometimes because the clock has lost time.  It's not only that, but it's a bit annoying to be late for an appointment because your car clock is 10 minutes off because you never paid attention to it until that time you forgot your phone at home.  No one is asking for the moon, but I think it would be great if some of the cheap clocks that seem to be everywhere nowadays could be more accurate, or at least self-adjusting with a simple program algorithm.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15795
  • Country: fr
Re: Clock circuit design idea
« Reply #22 on: July 26, 2020, 07:02:51 pm »
I don't know if I'm the only one, but my expectations for accuracy for clocks have been raised, especially when things like phones and smart TVs provide accuracy to the second all the time.  When I set my AV equipment to turn on a program at a certain time, it's disappointing to miss the first minutes sometimes because the clock has lost time.  It's not only that, but it's a bit annoying to be late for an appointment because your car clock is 10 minutes off because you never paid attention to it until that time you forgot your phone at home.  No one is asking for the moon, but I think it would be great if some of the cheap clocks that seem to be everywhere nowadays could be more accurate, or at least self-adjusting with a simple program algorithm.

That's because most cheap clocks use crappy oscillators. You wouldn't need anything really fancy. I gave some figures - you can expect a few seconds drift a year with a decent TCXO, but many cheap clocks have more like 100 ppm oscillators, and it can get worse than this in cars due to large temperature variations. And why is it so? Cost mainly. Even though a TCXO is not expensive these days, it'd still add a few bucks in the BOM, in a world where we shave off every cent. Secondly, because manufacturers likely don't even care - probably because in turn customers have been used to get crap clocks in common devices including cars, so they are not expecting any better.

A related thought regarding the market - what manufacturers sell, what consumers expect and buy: the clock ("watch") industry has followed this trend for a long time. Very accurate clocks with low drift have been considered luxury items for a long time, and often come at a premium. So in a car for instance, you're more likely to find an accurate clock in a luxury car.

Of course, as with mobile phones, as soon as some given device has GPS or an internet connection, it can get very accurate time. More and more recent cars come with some kind of internet connection, and it will likely increase in the future. Likewise, AV gear increasingly gets internet access. So I guess everyone will definitely consider this a solved issue, which may worsen the situation further as to getting low-drift, but fully autonomous clocks in the future.
 

Offline duckduck

  • Frequent Contributor
  • **
  • Posts: 420
  • Country: us
  • 20Hz < fun < 20kHz, and RF is Really Fun
Re: Clock circuit design idea
« Reply #23 on: July 30, 2020, 06:10:02 am »
I'm sure "close enough" is the reason we don't see it incorporated into most clock circuits today, but why couldn't it just be part of normal electronic clock design?

The first thing which occurs to me is that it requires state to be saved unless it is acceptable that the calibration be lost if power is removed.  Saving state will mean some floating gate memory and nobody is going to build a cheap clock IC on a process which provides that, or add a second IC.

Amazon will sell me an "Atomic wall clock" delivered to my front door for US$20. When the shortwave time-keeping stations are shut down, your idea may find a place in non-internet-connected locations if dedicated GPS-set clocks are still fairly expensive, as they are now.

There's at least one utility that does time trimming via software for the built-in clocks in personal computers. The software doesn't actually modify the hardware, but uses software to modify the time based off of comparisons with NTP. I remember using this around the year 2005 or so. Nowadays I can't be bothered and everything is internet-connected anyways, right?

Speaking of, the head of IT Security at my company has a friend with one of those stupid internet-connected refrigerators. Every time security guy visits his friend's house, he makes sure to browse to a certain popular NSFW video website and leave the browser displaying it when he leaves.
 

Offline ConnecteurTopic starter

  • Regular Contributor
  • *
  • Posts: 247
  • Country: 00
Re: Clock circuit design idea
« Reply #24 on: July 30, 2020, 02:55:41 pm »
From my point of view, in the year 2020 there should be no excuse for clocks that don't keep time. It's fine if the device is already connected to the internet or shortwave; those may be the simplest solution, but for independent devices, self-correcting circuitry should be standard.  Who can remember how to set the time on a device you got 6 months ago?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf