Shop OBEX P1 Docs P2 Docs Learn Events
Please help with frequency drift. — Parallax Forums

Please help with frequency drift.

ArchiverArchiver Posts: 46,084
edited 2003-01-13 18:44 in General Discussion
Hello,

I have made a little clock using the RTC DS1302, a 32KHz OSC and a Basic
Stamp 2 (as most of you have done). What I would like to do next is to take
the RTC and OSC put them in an oven/cooler and log the temperature
induced frequency drift in the RTC (or indirectly the OSC). A nice temp vs
frequency drift chart at the end of all this is my goal. I know the BS2 does
have some frequency, pulse and commands. Can this be done with the BS2?
Logging the data is not so much a problem but if the rest of this is possible,
how should I approach this problem? If this wouldn't work with the RTC can I
monitor the OSC by itself? I would greatly appreciate any advice you folks
might offer.

-Jon

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-01-13 16:39
    I haven't looked at the specs on the 1302 in a while ... you might check to
    see if it as an oscillator output. If it does, you can read that with PULSIN
    (pulse width measurement) with a 2 us resolution (assuming BS2). Of course,
    you'll want to keep your BS2 outside the oven/cooler. Be sure to use
    shielded wire to carry your signals (and keep as short as possible).

    -- Jon Williams
    -- Parallax

    In a message dated 1/13/2003 10:21:54 AM Central Standard Time,
    vatguy20021@y... writes:

    > Hello,
    >
    > I have made a little clock using the RTC DS1302, a 32KHz OSC and a Basic
    > Stamp 2 (as most of you have done). What I would like to do next is to
    > take
    > the RTC and OSC put them in an oven/cooler and log the temperature
    > induced frequency drift in the RTC (or indirectly the OSC). A nice temp vs
    >
    > frequency drift chart at the end of all this is my goal. I know the BS2
    > does
    > have some frequency, pulse and commands. Can this be done with the BS2?
    > Logging the data is not so much a problem but if the rest of this is
    > possible,
    > how should I approach this problem? If this wouldn't work with the RTC can
    > I
    > monitor the OSC by itself? I would greatly appreciate any advice you folks
    >
    > might offer.
    >
    > -Jon



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-13 18:44
    Hi Jon,

    You might find Brian Mumford's Horology projects interesting:
    http://www.bmumford.com/


    For best results, you will need an accurate oscillator for
    comparison. One way would be to keep your reference clock at a
    controlled temperature, and room temperature might be okay because
    most watch crystals are flat at room temperature and concave downward
    (they slow down) at higher and at lower temperatures.

    Better would be an accurate frequency source, like the DS32khz. It
    is a temperature compensated highly accurate 32khz oscillator
    available in a dip or bga package. Some people who are really into
    this use the GPS signal or WWVB. If you connect your system to WWVB
    via a modem, you will have the seconds mark signal to within a few
    milliseconds.

    Even so, if you are counting seconds, you may have to wait a while
    for the clocks to drift enough for you to detect it and to
    distinguish drift from wobble. Unfortunately, the DS1302 does not
    have a higher frequency 32768hz output that would allow for faster
    comparisons. It is not a great idea to tap into the clock X2 signal,
    because doing so will add capacitance that will change the frequency
    and temperature characteristics slightly. That is especially true of
    the DS1302, which specs a 6pf crystal.

    Watches and clocks are sometimes calibrated by sensing the acoustic
    vibrations from the crystal. Be sure to read the Dallas application
    note #58 on clock oscillators. Also fascinating info on Brian
    Mumford's site.

    The latest most accurate clock uses mercury vapor trapped in a
    magnetic bottle to eliminate the quantum transition errors that occur
    when atoms hit the wall of a physical container. I forget how
    accurate the frequency is, but it is something like one second in a
    million years. There is a blurb about it in the latest N&V issue,
    the same one with Jon Williams' article about PBASIC 2.5.

    -- best regards
    Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
    mailto:tracy@e...






    >Hello,
    >
    >I have made a little clock using the RTC DS1302, a 32KHz OSC and a Basic
    >Stamp 2 (as most of you have done). What I would like to do next is to take
    >the RTC and OSC put them in an oven/cooler and log the temperature
    >induced frequency drift in the RTC (or indirectly the OSC). A nice temp vs
    >frequency drift chart at the end of all this is my goal. I know the BS2 does
    >have some frequency, pulse and commands. Can this be done with the BS2?
    >Logging the data is not so much a problem but if the rest of this is possible,
    >how should I approach this problem? If this wouldn't work with the RTC can I
    >monitor the OSC by itself? I would greatly appreciate any advice you folks
    >might offer.
    >
    >-Jon
Sign In or Register to comment.