Edit: ...and I'm round about 41.34 minutes east of Greenwich... I'll definitely take this into account when building my next clock and will add a that as one of the timezones. Probably a GPS will be my timebase, so I get that degrees information and the time wherever that clock will be... \o/ ...TLT (true local time)?
Hehe, I like that idea.... a good talking point, and of some educational benefit too..
We had a discussion once on internet time. With latency it is possible that the internet time could be off by up to several seconds due to packet delays. It's why I opted for the GPS route.
We had a discussion once on internet time. With latency it is possible that the internet time could be off by up to several seconds due to packet delays. It's why I opted for the GPS route.
How well does your GPS clock work indoors? Do you have to make sure it's near a window?
We had a discussion once on internet time. With latency it is possible that the internet time could be off by up to several seconds due to packet delays. It's why I opted for the GPS route.
Do you mean a single time request ?
Surely the average of internet time is more than good enough to sync a local TCXO reference ?
Short-term time is managed by the TCXO, and aging effects are corrected by the time requests.
David - I have an external antenna on the GPS and it is in the garage. The time from it is multi-cast over XBee radio to all devices in my house that use the information (clocks, alarm system, sprinkler, etc.)
jmg - With me it's a matter of getting consistent time returns. Averages are fine, but if you request the time for an update and it takes 3 seconds to return, then all the clocks are off by that until the next update.
jmg - With me it's a matter of getting consistent time returns. Averages are fine, but if you request the time for an update and it takes 3 seconds to return, then all the clocks are off by that until the next update.
? - Not if the local time-base is used as the master, and the remote only corrects for drift.
A 3 seconds skew would either be discarded, as an outlier, or repeated & verified many times, before being actually applied.
David - I have an external antenna on the GPS and it is in the garage. The time from it is multi-cast over XBee radio to all devices in my house that use the information (clocks, alarm system, sprinkler, etc.)
Hmm. Hadn't thought about that approach. Put the GPS where the reception is bound to be good, then broadcast the time via XBee to the clock. That has the additional advantage that the patch antenna can be oriented horizontally, regardless of how the clock itself is oriented.
Before I go that route, though, I ordered the uBlox GPS from DigiKey. It has a tiny omnidirectional antenna, so the board could be mounted vertically and still get good reception. Not sure how I'm going to deal with the 1mm pad spacing, though. Probably just solder wires to it.
At this point I believe by far the cheapest and most reliable solution, since I have a wifi connection, will be an ESP8266 ESP-01 module which you can get from $3 to $7 depending on quality level and source, querying a NTP server and shipping the time to the Propeller over a serial link.
I have tested the parallax software and its pretty good, you can customize the unit completely, to the point that its webpage and hostname are fully customizable.
For first connection the wifi software runs an AP so you can tell it what network to connect TO.
You can send the prop a program using this software and proploader. https://github.com/parallaxinc/PropLoader/releases
You can watch telnet port 25 using putty, for the RX-TX lines from the prop connected to the esp.
I do ansi control codes from the prop to my putty for data display.
Comm.str(string(27)) 'Set command mode
Comm.str(string("[2J")) 'clear screen
Comm.str(string(27)) 'Set command mode
Comm.str(string("[0m")) 'Turn off character attributes
Comm.str(string(27)) 'Set command mode
Comm.str(string("[3;3f")) 'position
Comm.str(string(27)) 'Set command mode
Comm.str(string("[34m")) 'Blue color text
Comm.str(string("Hello world."))
Clock Loop, I just saw that Parallax ESP module for the first time today. As usual for Parallax it looks like a beautiful product but "cheapest" isn't quite the right word here, and that would assume you can get it to do NTP without doing what you'd have to do to a $3 ESP01 from Amazon or eBay anyway. In fact I'd say it is barely competitive with some Sparkfun GPS modules which should be usable without any software modification at all, just getting the Propeller to interpret the bog standard continuous data stream.
The Parallax-ESP firmware is configured to work on ESP modules with 2MB of flash. The ESP-01 only has 512K I believe. While it would be possible to get the Parallax firmware to work with that module, you would give up over-the-air firmware updates and also would have a very constrained flash filesystem.
Before I go that route, though, I ordered the uBlox GPS from DigiKey. It has a tiny omnidirectional antenna, so the board could be mounted vertically and still get good reception. Not sure how I'm going to deal with the 1mm pad spacing, though. Probably just solder wires to it.
-Phil
I've been diddling with accurate indoor time for many years. GPS is rock solid on the top floor of our house. In the basement where the mad scientist lives, it works most of the time. But if you don't have a back-up oscillator of some sort, and a uC that can tell when GPS is sending garbage, you will have outages occasionally. BTW, one of the GPS receivers is a uBlox unit. In this application it is pretty much indistinguishable from any other tiny GPS.
Anyway, the two best solutions I've found are 1) the use of a radio remote as mentioned above (but I had to roll my own radio link because I'm odd that way) and 2) a transportable double-oven OCXO. I have several OCXOs, some for which I paid top dollar, and others that I ordered, used, from China, where they'd been stripped from old equipment. My favorite oscillator came this way and cost < $20. Once calibrated against the 1pps of a Trimble Resolution T (using a Propeller to effect the calibration, of course) it was off by only a barely discernible (visually) fraction of a second after a year of steady running.
The downside of #2 is that you have to provide backup power against outages. I used a diode-switched three-cell lithium as backup power to a small DC-to-DC converter that fed a linear regulator (which affords about 35dB of isolation from switching noise) that powers the OCXO. Of course a uC is needed to accommodate time zone, DST, zeroing function, display driving, oscillator pulse counting, etc. At different times I've used an ARM Cortex M0 or a Propeller for that, but the Propeller was much easier to work with, delivered more precise results, and has considerable reserve capacity for future expansion.
We had a discussion once on internet time. With latency it is possible that the internet time could be off by up to several seconds due to packet delays. It's why I opted for the GPS route.
How well does your GPS clock work indoors? Do you have to make sure it's near a window?
I am in a single story house in northern California. I have used three different GPS modules and they all three were rock solid anywhere in the house.
WWV-B is likewise solid except, as has been noted, I cannot have it within about 2 meters of any computer.
We had a discussion once on internet time. With latency it is possible that the internet time could be off by up to several seconds due to packet delays. It's why I opted for the GPS route.
How well does your GPS clock work indoors? Do you have to make sure it's near a window?
I am in a single story house in northern California. I have used three different GPS modules and they all three were rock solid anywhere in the house.
WWV-B is likewise solid except, as has been noted, I cannot have it within about 2 meters of any computer.
Good to know that the GPS works well indoors. I've only tried my FitBit GPS and it doesn't ever find its satellites when indoors. I'm in NH and WWV doesn't work well for me unless I put the clock near a window and leave it overnight.
I've been diddling with accurate indoor time for many years. GPS is rock solid on the top floor of our house. In the basement where the mad scientist lives, it works most of the time. But if you don't have a back-up oscillator of some sort, and a uC that can tell when GPS is sending garbage, you will have outages occasionally. BTW, one of the GPS receivers is a uBlox unit. In this application it is pretty much indistinguishable from any other tiny GPS.
Anyway, the two best solutions I've found are 1) the use of a radio remote as mentioned above (but I had to roll my own radio link because I'm odd that way) and 2) a transportable double-oven OCXO. I have several OCXOs, some for which I paid top dollar, and others that I ordered, used, from China, where they'd been stripped from old equipment. My favorite oscillator came this way and cost < $20. Once calibrated against the 1pps of a Trimble Resolution T (using a Propeller to effect the calibration, of course) it was off by only a barely discernible (visually) fraction of a second after a year of steady running.
If the basement GPS 'works most of the time', what level of outage are you actually talking about ?
Parts of one day ? Weather related ?
A double oven OCXO sounds an overkill, if using GPS as well.
eg a lower cost, VCTCXO with 500ppb(max) specs, will take about 23 days (worst case) to drift one second. (Quite a lot of outage )
The Parallax-ESP firmware is configured to work on ESP modules with 2MB of flash. The ESP-01 only has 512K I believe. While it would be possible to get the Parallax firmware to work with that module, you would give up over-the-air firmware updates and also would have a very constrained flash filesystem.
Oh yes, I forgot the flash chip limit. Well many here are capable of a SOIC8 replacement to a larger chip, since they are so cheap.
Hmm, heres something interesting.
USE GPS connected to a esp8266, Running its own AP, also running an NTP SERVER.
Its even possible to switch to AP+STA mode and connect the ntpserver to an internet wifi in the case of the gps signal not working,
It would still be a ntp server, but the sta side would be an ntp internet client, acting as an ntp relay.
The displays use esp8266 as STA clients that connect as NTP clients to the esp that has the gps unit and AP running.
That fills the wireless need, and makes the units firmware OTA updatable on both sides the gps unit in the attic, and the display in the basement, all from their wifi interfaces.
If doing GPS, why stop at gps, ...
A few more sensors on the end of the pipe where your external gps antenna is,
you can put temp, humidity, windspeed, sunlight sensor, etc... solar charging...
And most of that only needs to sit a few feet outside a window.
GPS has never worked for me unless I was holding the antenna against a window.
Even in a car it does this for me.
But most cases it eventually works when pressed up against a window.
If the basement GPS 'works most of the time', what level of outage are you actually talking about ?
Seemingly random spells of up to 10 minutes at a time, every week or two, on average.
Weather related ?
I figured they were on account of particularly unfavorable satellite constellations w.r.t. the receiver location and surrounding structures.
A double oven OCXO sounds an overkill, if using GPS as well.
Agreed. My OCXO clocks were never used in conjunction with a GPS installation. OTOH, GPS has been used from time-to-time to measure precise frequencies and long-term drift. The GPS clock was decommissioned at the time the first double-oven OCXO-based clock was put into service. I change things up every year or two, probably out of perversity.
For Iran I heared that they are offset by half an hour because then the whole Iran fits in that one timezone instead of being split in 2 halves when using the common hour steps.
I friend of mine was in Iran at the time the changed to one time zone. He said there was quite a period when nobody knew what time it was.
Comments
Instead of obeying what someone decided over your head you have to accept as noon, you'd know when it really is noon!
Just for fun.
Why not?
Hobby!
:-P
Surely the average of internet time is more than good enough to sync a local TCXO reference ?
Short-term time is managed by the TCXO, and aging effects are corrected by the time requests.
jmg - With me it's a matter of getting consistent time returns. Averages are fine, but if you request the time for an update and it takes 3 seconds to return, then all the clocks are off by that until the next update.
A 3 seconds skew would either be discarded, as an outlier, or repeated & verified many times, before being actually applied.
Before I go that route, though, I ordered the uBlox GPS from DigiKey. It has a tiny omnidirectional antenna, so the board could be mounted vertically and still get good reception. Not sure how I'm going to deal with the 1mm pad spacing, though. Probably just solder wires to it.
-Phil
https://www.parallax.com/product/32420s
For software on the ESP check this:
https://github.com/parallaxinc/Parallax-ESP/releases/download/v1.0/Parallax_Wi-Fi_Module_API.pdf
Open source is better.
https://github.com/parallaxinc/Parallax-ESP
https://github.com/parallaxinc/Parallax-ESP/releases
I have tested the parallax software and its pretty good, you can customize the unit completely, to the point that its webpage and hostname are fully customizable.
For first connection the wifi software runs an AP so you can tell it what network to connect TO.
This interface page can completely be changed to show YOUR device's config page.
https://github.com/parallaxinc/Parallax-ESP/blob/master/html/index.html
Allowing the user to input their timezone, and allowing the esp to do ntp are things that you would need to code in or ask David Betz -> http://forums.parallax.com/profile/49778/David Betz
You can send the prop a program using this software and proploader. https://github.com/parallaxinc/PropLoader/releases
You can watch telnet port 25 using putty, for the RX-TX lines from the prop connected to the esp.
I do ansi control codes from the prop to my putty for data display.
http://ascii-table.com/ansi-escape-sequences.php
Definitely not cheapest, so then just purchase generic esp, the parallax-esp firmware works on all esp's
And the esp most definitely can do ntp...
https://hackaday.com/tag/ntp/
Anyway, the two best solutions I've found are 1) the use of a radio remote as mentioned above (but I had to roll my own radio link because I'm odd that way) and 2) a transportable double-oven OCXO. I have several OCXOs, some for which I paid top dollar, and others that I ordered, used, from China, where they'd been stripped from old equipment. My favorite oscillator came this way and cost < $20. Once calibrated against the 1pps of a Trimble Resolution T (using a Propeller to effect the calibration, of course) it was off by only a barely discernible (visually) fraction of a second after a year of steady running.
The downside of #2 is that you have to provide backup power against outages. I used a diode-switched three-cell lithium as backup power to a small DC-to-DC converter that fed a linear regulator (which affords about 35dB of isolation from switching noise) that powers the OCXO. Of course a uC is needed to accommodate time zone, DST, zeroing function, display driving, oscillator pulse counting, etc. At different times I've used an ARM Cortex M0 or a Propeller for that, but the Propeller was much easier to work with, delivered more precise results, and has considerable reserve capacity for future expansion.
I am in a single story house in northern California. I have used three different GPS modules and they all three were rock solid anywhere in the house.
WWV-B is likewise solid except, as has been noted, I cannot have it within about 2 meters of any computer.
I could average 8 or 9 acquisitions in the basement where I live. GPS + external antenna.
If the basement GPS 'works most of the time', what level of outage are you actually talking about ?
Parts of one day ? Weather related ?
A double oven OCXO sounds an overkill, if using GPS as well.
eg a lower cost, VCTCXO with 500ppb(max) specs, will take about 23 days (worst case) to drift one second. (Quite a lot of outage )
Hmm, heres something interesting.
USE GPS connected to a esp8266, Running its own AP, also running an NTP SERVER.
Its even possible to switch to AP+STA mode and connect the ntpserver to an internet wifi in the case of the gps signal not working,
It would still be a ntp server, but the sta side would be an ntp internet client, acting as an ntp relay.
The displays use esp8266 as STA clients that connect as NTP clients to the esp that has the gps unit and AP running.
That fills the wireless need, and makes the units firmware OTA updatable on both sides the gps unit in the attic, and the display in the basement, all from their wifi interfaces.
http://www.absolutelyautomation.com/articles/2016/09/15/esp8266-based-wireless-ntp-server-no-internet-connection-needed
If doing GPS, why stop at gps, ...
A few more sensors on the end of the pipe where your external gps antenna is,
you can put temp, humidity, windspeed, sunlight sensor, etc... solar charging...
And most of that only needs to sit a few feet outside a window.
GPS has never worked for me unless I was holding the antenna against a window.
Even in a car it does this for me.
But most cases it eventually works when pressed up against a window.
I friend of mine was in Iran at the time the changed to one time zone. He said there was quite a period when nobody knew what time it was.