General > General Technical Chat
Cheapest way to get date/time from GPS
Peabody:
I've used the DS3231SN RTC, which has an Aging register to permit calibrating the built-in crystal oscillator. The register value adjusts units of capacitance on the crystal legs, and a change of +/- 1 adjusts the crystal about 0.1ppm at room temperature, so if you find the right setting, you're good to 3 seconds per year or less.
I wrote an Arduino sketch that takes as inputs the 1PPS output of a cheap GPS module and the 1Hz squarewave output of the DS3231SN, and adjusts the Aging register until the two are nearly as possible the same frequency. The DS3231SN also has an automatic temperature adjustment that uses the same capacitance adjustment mechanism.
So with an initially calibrated RTC, the frequency of syncing to GPS might me as seldom as once a month or so, depending on how accurate you have to be, and how important GPS power consumption is. I think temperature would have the biggest impact on how often syncing needs to be done.
Edit: Is there any chance the British MSF broadcast would work better than DCF77? In theory it shouldn't because it's lower power, but in a particular location it might.
nctnico:
The problem with any RTC is that you'll need a battery which needs swapping at some point. And an RTC still doesn't solve the time sync issue so it is back to square one.
A modern day microcontroller has a significant amount of processor power so I expect it can do GPS decoding in software. Remember GPS was developed in the 1970's; it is very old technology made for slow electronics. If you can find a low power SDR frontend, it should be doable to build your own receiver, especially if you only need time.
antenna:
I found an old microsoft streets and trips GP module, found a website that shows the pinouts, and was able to read it via arduino with serial monitor in the arduino app.
SiliconWizard:
--- Quote from: alex_ on February 27, 2024, 10:05:28 am ---I was already struggling with DCF77 in the south of France indoor with the cheap antenna, so it must not be better in Madrid.
Do you have better results outside ?
--- End quote ---
It has gotten way, way worse in the past decade.
The DCF77 signal is always noisy, so the decoder needs to be a bit "smart" to get reliable data - I implemented this on MCUs - but around 10 years ago, when I did this, it usually took only a few minutes to get a valid time and date, indoors, with a relatively small antenna. These days, the same devices, in various parts of Europe (unless close to the transmitter), fail to get any signal reliable enough to get valid data over the course of, sometimes, several weeks in a row. There's probably much too many interferences now for this to be practical. That's unfortunate.
GPS works rather well outside for this, but indoors, it's not that great. Even when close to a window, not all receivers are made equal. I've used receivers with surprisingly good performance even indoors, but these had a rather chunky patch antenna (like 40x40mm) and were based on the most expensive chipset that was available (don't remember which exactly, I can look that back.)
alex_:
--- Quote from: peter-h on February 27, 2024, 11:46:52 am ---To get date/time.
Or to periodically sync a standard 32768Hz xtal RTC.
--- End quote ---
What about a wifi module (ESP32 or other)? Get the header of a webpage to get a UTC time and date.
That's how I resync daily my scheduling devices. Not ns accurate of course, but cheap and 0 power between polls.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version