Author Topic: Cheapest way to get date/time from GPS  (Read 69389 times)

0 Members and 4 Guests are viewing this topic.

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6023
  • Country: gb
  • Doing electronics since the 1960s...
Re: Cheapest way to get date/time from GPS
« Reply #75 on: September 07, 2026, 07:42:40 am »
You can certainly get a GPS module for say $3-5 in 1k+ volume.

I use the NEO-M9N but that is a bit more.

And yes you can get time in pretty bad signal situations. IME, you can get GPS time in situations where you would not get the radiocode signal!

I think people are looking for ways which are cheaper...
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 8841
  • Country: gb
  • Professional HW / FPGA / Embedded Engr. & Hobbyist
Re: Cheapest way to get date/time from GPS
« Reply #76 on: September 07, 2026, 08:48:33 am »
In my experience even if a u-blox GPS module will not provide position, if it can see at least one satellite with Cno more than about 10dB, it will decode the time data.
 

Offline SteveThackery

  • Super Contributor
  • ***
  • Posts: 3364
  • Country: gb
  • 50 year novice
Re: Cheapest way to get date/time from GPS
« Reply #77 on: September 07, 2026, 09:03:32 am »
I wonder why they make the xtals flat around +20C, when wearing the watch warms it up well above that - around +30C.


Actually they are flat around 25C. It is a laboratory standard temperature, but usefully it's quite close to ideal for a wristwatch because most watches are only worn for maybe half to two-thirds of a day, and quite often unworn for several days. The on-wrist temperature varies a lot, depending on how tight the strap is, etc. But 25C might be considered a roughly "average" temperature.

Quote
Even in a clock radio it will be annoying.


Really? My "radio-controlled" clocks and watches synchronise every 24 hours.

Quote

I believe wrist watches use micro RTC calibration (the 32F4 etc support this but I never used it) and the pricey ones perform it over temperature.

Yep: active temperature compensation is used on the most accurate watches. In terms of setting the mean rate, in many watches the crystal is laser-trimmed during manufacture - the classic Swatch was the first volume watch to use a laser-trimmed crystal. Otherwise an inhibition circuit is used. The crystal runs a shade fast, and the electronics drop one or more cycles at regular intervals. The degree of inhibition is set up by burning one or more narrow traces on the the circuitry.
« Last Edit: September 07, 2026, 09:10:01 am by SteveThackery »
 

Online dietert1

  • Super Contributor
  • ***
  • Posts: 3007
  • Country: br
    • CADT Homepage
Re: Cheapest way to get date/time from GPS
« Reply #78 on: September 07, 2026, 11:03:01 am »
The question is how cheap one can get the temperature curve af an actual RTC and its crystal. Once you have that and if your MCU includes a temperature sensor accurate to let's say 1 K, the typical error of the temperature corrected clock can be a small fraction of a ppm. Typically 1 second drift per month.
Of course there are complications, like what happens during backup battery episodes with the MCU out of operation.
Depends on the application whether what is required.

Regards, Dieter
« Last Edit: September 07, 2026, 11:56:30 am by dietert1 »
 

Online zike

  • Regular Contributor
  • *
  • Posts: 196
  • Country: us
Re: Cheapest way to get date/time from GPS
« Reply #79 on: September 07, 2026, 05:51:03 pm »
I use the ATGM336H GPS, generally in the US$2 to $4 range, either on its own or to discipline a DS3231 RTC (GPS drops to something like 10 microamps in sleep mode).  Works for me, but I'm not looking to split microseconds at this price level.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3785
  • Country: gb
Re: Cheapest way to get date/time from GPS
« Reply #80 on: September 07, 2026, 06:05:36 pm »
Ah yes, good old ZHONGKEWEI
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6023
  • Country: gb
  • Doing electronics since the 1960s...
Re: Cheapest way to get date/time from GPS
« Reply #81 on: September 07, 2026, 07:42:54 pm »
The ATGM336H is not cheaper than a decent U-BLOX GPS module, so no point that I can see.

Quote
In my experience even if a u-blox GPS module will not provide position, if it can see at least one satellite with Cno more than about 10dB, it will decode the time data.

That I am sure of, but how do you know it is valid?

Initially it shows all zeroes, and maybe a nonzero time value means it is good. Is there some internal CRC at that level? I've been using year>=2026 as a flag :)
« Last Edit: September 07, 2026, 07:44:31 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 9824
  • Country: nl
  • Current job: ATEX product design
Re: Cheapest way to get date/time from GPS
« Reply #82 on: September 07, 2026, 07:48:35 pm »
The ATGM336H is not cheaper than a decent U-BLOX GPS module, so no point that I can see.

Quote
In my experience even if a u-blox GPS module will not provide position, if it can see at least one satellite with Cno more than about 10dB, it will decode the time data.

That I am sure of, but how do you know it is valid?

Initially it shows all zeroes, and maybe a nonzero time value means it is good. Is there some internal CRC at that level? I've been using year>=2026 as a flag :)
Out of curiosity, which ublox module do you buy for 1.8 dollars?
 
The following users thanked this post: Someone

Online dietert1

  • Super Contributor
  • ***
  • Posts: 3007
  • Country: br
    • CADT Homepage
Re: Cheapest way to get date/time from GPS
« Reply #83 on: September 08, 2026, 02:31:00 am »
For an embedded solution with Ethernet and internet access the cheapest way is no GPS receiver and no antenna at all, but use the GPS receiver of a NTP server. The code is public, it is easy to implement and costs near nothing.
A pitty that USB does not include time services.

Regards, Dieter
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6023
  • Country: gb
  • Doing electronics since the 1960s...
Re: Cheapest way to get date/time from GPS
« Reply #84 on: September 08, 2026, 08:22:05 am »
For sure NTP is great but you need the internet :)

I've done RTC sync over USB but it is a custom thing and needs a custom bit of sw running on the PC.

Which GPS module is $1.80, really, for a real production item?

The old Q about whether you can get time from GSM without a [valid] SIM card has never AFAIK been settled. Anybody who really knows is not talking.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3785
  • Country: gb
Re: Cheapest way to get date/time from GPS
« Reply #85 on: September 08, 2026, 10:36:43 am »
Which GPS module is $1.80, really, for a real production item?

The ATGM336H GPS mentioned above is $1.68 for at 10 off. Or $1.30 at 100 off.
At LCSC.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6023
  • Country: gb
  • Doing electronics since the 1960s...
Re: Cheapest way to get date/time from GPS
« Reply #86 on: September 08, 2026, 11:53:42 am »
Bloody hell...

I eventually found an English DS for it
https://www.tinytronics.nl/product_files/002176_ATGM336H.pdf

It is RS232, NMEA output, no other documentation. Well that's all you need for simple date time and position.

Peak Icc is 100mA which is notable.

The I2C pins are "Hung" whatever that means. But RS232 (TTL level presumably) is fine.

The ATGM336H-5N7x is the one which does the lot and that is a little more.

At the price, unbeatable! Commercially I would regard this device as high risk but one can't argue with the price :)
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online zike

  • Regular Contributor
  • *
  • Posts: 196
  • Country: us
Re: Cheapest way to get date/time from GPS
« Reply #87 on: September 08, 2026, 12:25:06 pm »
It is RS232, NMEA output, no other documentation. Well that's all you need for simple date time and position.
 ...
Commercially I would regard this device as high risk but one can't argue with the price :)
Seems fairly ubiquitous by now in microcontroller/Arduino/drone/maker circles, plug-n-play on a board with antenna, regulator and coin cell backup for US$5-12. e.g. here and here. Don't see them disappearing anytime soon.  $PCASxx style commands seem (mostly) standard in common with other Asian GNSS modules. I made myself a cheat-sheet, test for yourself/use at your own risk.   
« Last Edit: September 08, 2026, 12:27:29 pm by zike »
 
The following users thanked this post: fourfathom

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2287
  • Country: us
Re: Cheapest way to get date/time from GPS
« Reply #88 on: September 08, 2026, 03:49:34 pm »
$PCASxx style commands seem (mostly) standard in common with other Asian GNSS modules. I made myself a cheat-sheet, test for yourself/use at your own risk.
Thanks for the cheat-sheet!  I just used it to configure the output sentences and sentence frequency on a ATGM336 (LCSC # C90770) I am using on one of my boards and it worked.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 
The following users thanked this post: Someone


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->