GPS clock prototyping, part I

in clock by DP | 22 comments

gps_clock_prototype_0001

Kevin Rye has been working on his GPS clock project and wrote a detailed explanation on his blog describing the build:

The great thing about setting the time and date via GPS is that I won’t have to put any buttons on the clock. It’ll set itself, and appear to be completely autonomous. By removing the buttons needed for entering menus and setting the time and date, I can hopefully make the clock that much smaller. Ideally, I don’t want it to be any bigger than the display itself. In addition, shaving a half inch or so off the PCB should save a few bucks when it comes to getting the PCB made.

This entry was posted in clock and tagged , .

Comments

  1. Kevin says:

    Wow, that was fast! I just posted that last night! Thanks.

    Hopefully I can finish the alarm and time zone compensation code this weekend. Stay tuned, there’s always something in the works!

  2. Nate B says:

    It’s a shame that setting TZ by GPS is such a PITA. There appear to be commercial products for it, and some free-but-awful products, but no good free downloadable database of TZ geo boundaries.

    That being said, if you wanted to show local solar time, that’s a simple longitude calculation and might be really cute. :) Also sunrise/sunset calculations are pretty straightforward if you know your location, and that math is all over the place.

    Have you considered comparing your local RTC’s drift against the GPS when its signal is solid, to compensate for that drift when your reference is unlocked? This is a practice known as “disciplining a clock” and there’s a silly amount of literature on the topic, most of which is probably far too serious for a little clock project. But it might get you down from seconds per week to seconds per year in an unlocked condition. (Particularly if you plot drift against temperature, interpolate to a curve, and correct based on that curve.)

    Regardless of future features, it looks gorgeous now, and I appreciate the detailed writeup! Sharing your experiences where they’re searchable helps us all avoid the DenverCoder9 problem. ;)

  3. Nate B says:

    I amend my previous comment: There’s a shapefile here with names that correlate into zoneinfo: http://efele.net/maps/tz/world/

    Also: Beware that GPS time is several seconds offset from UTC, so if you have an inexplicable offset, check $GPZDA.

    Further time-nuttery on the time-nuts listserv…

    • Drone says:

      Nate,

      Sheeesh, I’ve never been able to get straight on this GPS vs. UTC thing. Maybe you can help…

      So does $GPZDA output UTC or not? If it does, how long after the GPS is first locked after never being used before (no stored data) before $GPZDA outputs true UTC? Before $GPZDA outputs true UTC is the time shown off by the number of leap seconds plus-minus since the GPS epoch somtime in 1980? If yes, what is that offset in seconds today (somthing like 20 sec.)?

      If when locked properly, is $GPZDA UTC still off from “standard” UTC by several seconds? I don’t think so. I think at the PPS rising edge it should be within some tens of microseconds?

      Finally, (this one has never been properly defined in my opinion), does the $GPZDA sentence time & date UTC value apply to the previous PPS or the next PPS output?

      Thanks, David

    • Kevin says:

      You made a lot of good points. Thanks. I didn’t even consider sunrise/sunset. That’s a cool idea. I also didn’t know about that TZ stuff. I was going to just subtract the hours off the GPS time, but having it do it automatically based on L/L sounds like a cool idea.

  4. Daniel says:

    Definitely looks like a neat project. I am curious though how you plan to set the alarm, or at least turn it off without any buttons?

  5. Jac Goudsmit says:

    You still need buttons to set the time zone and the alarm time :-)

    • Daniel says:

      I was wondering about using optical sensors, since I’ve seen some pretty tiny ones. His blog was blocked from work so I wasn’t sure if he explained that.

      • Kevin says:

        It’s blocked at work? Weird. It’s not blocked at my job and we have the usual office-filtering scheme set up. Does your browser say what it’s being blocked for?. I don’t have anything on my site that’s NSFW so I’m curious as to what it keyed off.

    • Kevin says:

      See answer above. Check out my blog post too. I’m going to use an IR remote.

    • Eric-Jan says:

      Hi, Jac ! I guess wih an in-display-menu you also don’t need buttons on the device, or perhaps some led’s to indicate the “mode” ?

  6. Frank Schwab says:

    Hey Kevin –
    This is just about precisely the project I was about to embark on. I don’t want an Alarm clock, I want a high-update GPS interfaced to an LCD as a speedometer on my boat. And this would be perfect, especially since I have zero time to to the development at the moment (and three other projects scattered across the desktop).
    Are you willing to buy an extra PCB when you have them built and sell it to me?

    • Kevin says:

      No sorry. But when I’ve completed the project all my source/design files will be posted on my site.

      • Frank Schwab says:

        I appreciate the consideration. Thanks anyway.

      • Eric-Jan says:

        I see you use a graphical display in your design ? it’s a KS0108 type ? I have such a display, like to make also your project, but i understand it’s “work in progress” ? could you update your progress from time to time ? Great project !

    • Nate B says:

      Frank,

      Have you considered using a smartphone? GPS speed solutions are typically more accurate than position, as [I've been told] they’re computed using phase shifts from the received signals. Unless you need crazy high-dynamics (in which case you’re looking at fancy receivers anyway), I bet an app like Mictale GPS Essentials configured with the dashboard widgets to “huge” would fit the bill. It’s what I use. :)

      • Eric-Jan says:

        We have no joke secton here :) this here is for people who like to make things by them selves, it’s more fun that way.

  7. Kevin says:

    I know that the use of GPS as an accurate timebase is total overkill. The GPS signal sets the time on a DS3231 RTC. I have several other clocks I’ve made using the D3231 and after a year, they are still to-the-minute. As accurate as the DS3231 is, there’s really no need to sync with GPS daily. The reason I’m doing it is because I can, and it’s fun!

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.