Timekeeping -- low power and no outside time reference - Page 1
Forum section: electronics / beginners

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 17, 2014, 09:51:38 pm
content: I came across a clock and it made me curious. The clock apparently has the time set (to UTC?). When you get the clock you set your time zone and DST if you want it and the clock sets itself. Nothing magical but it got me thinking about the most reliable accurate way to maintain time for longer periods with no outside time reference, human or otherwise.What's the simplest, cheapest and lowest power way to maintain accurate time for long periods? Let's say accurate to +-1 sec/month. Is this ridiculous?The clock mentioned above:http://www.equitybylacrosse.com/40222b

author: Richard Crowley
author_rank: Super Contributor
timestamp: April 17, 2014, 10:02:20 pm
content: Back before solid-state electronics, we had clocks and even wrist-watches with that kind of accuracy. Of course the accuracy must be "calibrated-in" it doesn't happen automatically. There are chips which use wrist-watch crystals and wrist-watch "coin" batteries to keep time at that kind of accuracy over months at a time.Of course, with GPS receivers continuing to get smaller and cheaper, that old-school technology (quartz crystal) seems antique by comparison. I got a GPS receiver from SparkFun that is smaller than my little finger. That is what I am going to use for my clock project. If you wanted to get fancy, you could even automatically determine the time zone and DST with some code and make it completely automatic with no user settings. And more accurate than those clocks that use VLF time broadcasts like WWVB, etc.

author: gxti
author_rank: Frequent Contributor
timestamp: April 17, 2014, 11:18:59 pm
content: Probably TCXOs are the best you can do with less than 1W. Strapping the oscillator a large thermal mass will improve its stability even more (maybe bury it in a deep hole).

author: Rick Law
author_rank: Super Contributor
timestamp: April 18, 2014, 12:34:35 am
content: A GPS receiver is not "without external reference" as the original post specified.Temperature compensated crystal solved one problem but not others. You have the temperature issue with the other components, noise issues... The DS3231 with TCXO gets to 2ppm.20ppm looks good for normal stuff, so 2ppm looks great. But - there is 2.6 million seconds in a 30 day month. So, even with1ppm you are off 2.6 seconds a month. For +- 1second per month, you are talking 0.25ppm range which means another order of magnitude better.I used to think my old watch was accurate to the second each month, now I think I merely don't have a good reference to compare against so I only thought my watch was that good. I really have a hard time believing that mechanical watches or quartz can really reach 1ppm consistently.So, I think "without external reference" is too expensive a game for most. I actually have been waiting for a DS3231 I ordered a couple of week or so ago for experimentation. If it come close to 5ppm, I would be very pleased. I know pushing the decimal point around can be a very expensive game.

author: miguelvp
author_rank: Super Contributor
timestamp: April 18, 2014, 03:14:47 am
content: From a previous post:QuoteEdit, I think that one has age correction and you can offset it too, but only accurate at 16K (1024 type of K) cycles for 50/50 duty cycle.@Rick, glad you gave up on the DS1307 will be nice to know how accurate your clock is.I'm going to get a Software Defined Radio to get a more precise Performance counter by using the radio atomic clock signal to measure my CPU clock, now averaging at 2402500 Hz after a week of running the code. The performance counter claims it's 2405000, but my measurement is with respect the lower accurate RTC.Yeah, I know atmospheric bounce of the radio signal will alter it here and there.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 18, 2014, 04:31:54 am
content: Ok a TCXO, I will research that a little.@Rick Law, I used to wear a casio, and it seems to me that it maintained the time very well, but you make a good point about a reference. I did occasionally dial the recorded time signal to set the watch once in a while.I will look at that DS3231.And you're correct that I didn't consider GPS as it's external. Plus GPS can be tampered, it's a very weak signal. Do the military still fiddle around with GPS signals? They use to switch resolution or switch it off altogether. But I haven't paid attention to GPS in a while (does it show?). I don't know the state of that art.I'm wondering what kind of MEMS devices there are for timekeeping or related to time keeping. Maybe instead of a coiled spring the time would tick off as a function of atomic decay.

author: ejeffrey
author_rank: Super Contributor
timestamp: April 18, 2014, 05:07:25 am
content: Watch crystals are very good, and they have the advantage, when used in wrist watches, that they are never turned off and are held at a reasonably steady temperature close to the inflection point. If you make a habit of leaving your watch in the car on winter or summer days, you will get worse performance. Likewise, the same crystal in a piece of equipment that generates a lot of heat will perform substantially worse.

author: Richard Crowley
author_rank: Super Contributor
timestamp: April 18, 2014, 05:28:04 am
content: Quote from: GiskardReventlov on April 18, 2014, 04:31:54 amMaybe. You never actually identified what you mean by "inexpensive" $10? $30? $100?QuoteYou never know if your "independent" timekeeping gadget is working properly without comparing to an external reference.QuoteKeep your tinfoil hat on, and watch out for the black helicopters.It is far easier to tamper with ANY of the other time reference schemes that depend on a central authority. The nice thing about GPS, like the internet, is that it is de-centralized. If you don't trust GPS, then feel free to use GLONASS (Russian) or Galileo (EU) or several others.QuoteMaybe you should try it sometime. My cheap GPS keeps up quite nicely for me and 10s of millions of other drivers. Not to mention commercial air traffic, etc, etc,QuoteSelective Availabllity was turned off 10 years ago. You could catch up in 5 minutes by reading the Wikipedia page.QuoteIf anybody is working on such a thing, they are keeping their mouth shut.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 18, 2014, 05:43:53 pm
content: Quote from: ejeffrey on April 18, 2014, 05:07:25 amI don't recall my casio ever being way out on accuracy. I think the battery lasted for a few years or more. But it got an outside time reference once in a while.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 18, 2014, 06:10:33 pm
content: @Rick Law, this reports +-20ppm but the resonator it uses reports +-5ppm, I've just given it a quick look and will read more about all these.http://www.sitime.com/products/clock-generatorshttp://www.sitime.com/products/embedded-resonators/sit1052This says "+-4.6ppm over 20 years" and " designed to replace legacy OCXOs and TCXOs with extremely small, 4-pin packages."http://www.sitime.com/products/stratum-3There's some jargon I'll have to figure out too.

author: Kremmen
author_rank: Super Contributor
timestamp: April 18, 2014, 06:53:16 pm
content: Quote from: GiskardReventlov on April 17, 2014, 09:51:38 pmDepends entirely what you consider a 'long period'.Not simple; not cheap; will run a _long_ time:http://longnow.org/clock/

author: codeboy2k
author_rank: Super Contributor
timestamp: April 18, 2014, 08:09:33 pm
content: I would welcome an IOT (Internet of Things) WiFi standard that enabled my microwave oven, kitchen cooktop range/oven, washer/dryer, dishwasher, wall and desk clock(s), security alarm panel, etc... to all be able to get an IP address and use NTP on a "Time Network" subnet of my WiFi without any setup from me. Seems easy enough with DHCP.. It just needs a time-net standard so all the devices try to do the same thing.I don't want all those things on the net so my house can be totally pwned, but on a firewalled time-net, sure !

author: Rick Law
author_rank: Super Contributor
timestamp: April 19, 2014, 02:29:58 am
content: Quote from: codeboy2k on April 18, 2014, 08:09:33 pmEven if one made a 1ppm clock, I think it would be difficult to verify. As a point of reference (about internet of things), Windows time sync default isassured to be within 5 minutes- not 5 seconds."The W32Time service cannot reliably maintain sync time to the range of 1 to 2 seconds. Such tolerances are outside the design specification of the W32Time service."I used to sync my watch by listening to my radio "at the tone, it will be exactly 9am..." (radio stations used to do that. I haven't heard that for years now.) Say I am 20 miles from that radio station, that signal would take 0.1074 millisecond for that signal to get to me best case (pulse of light in vacuum - 186282 miles/second). That is > 1000ppm of a second. And...who is to say the guy isn't pressing the tone by his wrist watch.I think the GPS receiver, or a radio that receives NIST type time signal is as close as an average individual gets to Shangri-La.For me, realizing that I typically adjust clocks twice a year (daylight savings time adjustment), my requirement became +- 0.5 minute/six months (+-5 sec/month). That would keep all my stuff within the same minute.The link below is an article from some Microsoft folks in the Directory Services team. (That is where I get the 5 minutes sync info and the quote.)This article explains in detail about time syncyou may find useful:http://blogs.technet.com/b/askds/archive/2007/10/23/high-accuracy-w32time-requirements.aspxRick

author: SeanB
author_rank: Super Contributor
timestamp: April 19, 2014, 09:46:49 am
content: You are overtinking bthe clock. the OP refers to a clock with a built in radio receiver that listens to a time service that is broadcast. WWV or WWVH has a good signal at night around the world on a few bands, and is used by clocks to sync time. The tip is the setting of a time zone and if DST is needed, as WWV transmits the DST info and the UTC time, which can be used to set local time if zone is known to offset the data. In the UK you use Rugby or the BBC long wave transmitter and in Germany DFC for this purpose.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 19, 2014, 04:23:42 pm
content: @SeanB, no that clock does not use an external reference. That's what got my curiosity up on this topic. I did not do an extensive search on how the clock implements its timekeeping but I just read that it uses an algorithm. It seems that it comes with a 3V battery and when you get it you add two AAs. So I presume it's calibrated at the factory and maintained with the 3V and the AA turns the hands of the clock.

author: Wytnucls
author_rank: Super Contributor
timestamp: April 19, 2014, 04:39:55 pm
content: My Omega marine chronometer with a quartz vibrating at 2.4MHz, used to drift less than 10 seconds a year.

author: ejeffrey
author_rank: Super Contributor
timestamp: April 19, 2014, 06:25:15 pm
content: Quote from: codeboy2k on April 18, 2014, 08:09:33 pmThis already exists (and did so long before the "internet of things" buzzword). It is called pool.ntp.com, which uses DNS to automatically give you a NTP server geographically close by. Any network enabled device is free to use that, and let your home router provide the firewall. If you really want to avoid having your devices talk over the internet even behind a firewall, you can use the DHCP "ntp-servers" option to point them at a local time server (which can in turn talk to the pool or be have a GPS receiver). Corporate networks and thin client systems have been doing this for decades, and the only thing that really needs to happen for it to work is the individual devices to include an NTP client with a default setup.

author: rdl
author_rank: Super Contributor
timestamp: April 19, 2014, 06:45:11 pm
content: From the instructions for the clock in the original post:QuoteSounds like it has some kind of microcontroller that comes pre-programmed, but you still have to set it manually. It costs less than $20, I'd be willing to bet the accuracy is not all that great, probably no better than any other battery powered quartz clock.

author: codeboy2k
author_rank: Super Contributor
timestamp: April 20, 2014, 03:22:46 am
content: Quote from: ejeffrey on April 19, 2014, 06:25:15 pmOf course I know that the pool NTP servers exist. I guess I wasn't clear about that, but I was talking about NTP and DHCP.You misread me and reposted what I already implied.. I already said this could be done with NTP and DCHP options, and even implied a local NTP server. Hell, I run one here at my home labWhat I said didn't exist yet was astandardizedway to do this locally, and on a "TIME ONLY NETWORK".. i.e. I want my devices to get time, I don't want them on the main Internet to do this, and I don't want to have to program each one with the WIFI parameters needed to do this. Just as you said, a preconfiged NTP setup. I want a standard WIFI time server, I.E. SSID 'time', that my router can even provide with an extra radio, or hook to the neighbors open "time" network.. but this network is NTP only, no other services run on it. This way, devices that need time can embed a wifi module and an NTP client and bind to the "time" SSID, do DHCP to get an IP address and then get the time. The standardization is in the availability of the "time" SSID, or not having that, a new DHCP option that points to a time SSID (I don't mean the time server host option). Devices that need time can use self-assigned link-local addresses in the range 169.254.0.0/16. They should expect to find a time server there, so wifi routers should provide one, or a GPS receiver could too. This is the type of standardizaton I was referring to.However, I see this is all academic now. There is a usefulness to having these same devices that need time to also provide a web server to control / monitor them. So I realize it just makes more sense now to continue to firewall the home network and just allow the devices to get network time from the NTP pool then, and provide HTTP servers to the home occupants.What's needed now, then, is a standard interface for home appliances like SCPI is for instruments, but that's off topic here and I've said enough already

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 20, 2014, 04:45:25 am
content: Quote from: rdl on April 19, 2014, 06:45:11 pmThe blurb I read said "Select your time zone and DST if you want and then the clock will set itself"Maybe you're reading the instructions for setting it manually. They probably allow manual setting since the 3V could go dead, etc.

author: Richard Crowley
author_rank: Super Contributor
timestamp: April 20, 2014, 05:37:36 am
content: It is an ordinary WWVB-referenced clock. It resets itself every night via 60 KHz ground-wave. It has GMT day, hour, minute, second reference, but it has no way of knowing WHERE it is (i.e. what time zone, or if DST is in effect, etc.) Except for the LF receiver, it is otherwise just another basic quartz clock.I presume similar consumer mass-produced products are available in other parts of the planet for MSF, HBG, DCF77, and JJY, et.al.

author: ConKbot
author_rank: Super Contributor
timestamp: April 20, 2014, 04:57:53 pm
content: Quote from: Wytnucls on April 19, 2014, 04:39:55 pmcompared to a normal TCXO in a generic widget, watches have the advantage of being 'ovenized' to ~75-85F (depending on your skin temperature) most the time they are in use.

author: rdl
author_rank: Super Contributor
timestamp: April 20, 2014, 05:23:35 pm
content: I'm pretty sure it just has a built in RTC that's factory set. It may still be close to correct by the time you purchase it, but it's going to drift badly (since it's a sub $20 cheap clock). No doubt that's why it has hour and minute setting. I'd be surprised if it uses a radio to sync. If it did, that would be a selling point, but no mention of radio is made anywhere. It probably doesn't even use a real RTC, just a cheap micro programmed to try and keep time. Somebody buy one and do a "tear down". It costs less than a week of fast food lunches. I won't waste my money on either.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 20, 2014, 05:46:45 pm
content: Quote from: rdl on April 20, 2014, 05:23:35 pmIt has the time factory set, that's why it comes with 3V batt.You are correct it has no radio.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 20, 2014, 05:47:31 pm
content: The more interesting question isn't what the clock does. The more interesting question revolves around the task.If given the task to find a cheap, reliable, low power timekeeper that uses no outside reference how would you implement that?One solution was a TCXO another was one I found from sitime that uses a MEMS resonator and asserts to obsolete TCXO (and OCXO).I would use one or more MEMS accelerometer to locate our latitude then once I know the timezone, voila.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: April 21, 2014, 04:05:10 pm
content: Quote from: Kremmen on April 18, 2014, 06:53:16 pmI was thinking 5-10 years, for that clock you linked to, no one will care. Will anyone be here? If so they'll probably be the few survivors and they'll not care about what time it is only where's the next meal.

author: miguelvp
author_rank: Super Contributor
timestamp: April 21, 2014, 05:06:15 pm
content: Quote from: GiskardReventlov on April 21, 2014, 04:05:10 pmWhy does everyone assumes the future is all gloom and doom? We have already been in the planet as Homo Sapiens Sapiens for 200,000 years and as "modern" humans for the last 50,000 years. Your 10 years are a drop in the bucket and in 10,000 years we might not be here, at least not all of us, by then I will hope we conquered space for real

author: codeboy2k
author_rank: Super Contributor
timestamp: April 21, 2014, 08:47:04 pm
content: I'm going to be on a beach in 10 years. I won't be here .. see ya !