1307 RTC accuracy?


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1

    Default 1307 RTC accuracy?

    How come a $5 LCD watch can be accurate for years but
    my RTC 1307 losses about 4-5 seconds/day, the sparkfun boards original xtl was at 32,764 hz measured at the sig-out pin set to xtl freq and it lost time. Then i soldered a new xtl which is at 32,768 hz and the time gains that 4-5 sec each day.

    thanks,
    don

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Is it ALWAYS like this

    Hi,

    Do you have a nice clean power supply and a fresh backup battery?

    Is it always loosing/gaining the same much every day or it is depending on the temperature?

    Is the PIC always running or is it asleep?

    If the pic is always running and the error is always the same you simply adjust for it in your code i.e add 4 seconds per day running

    If the pic is asleep you need to know when you wake up how many days it was since you last corrected this problem. i.e sleep for 25 days... wake up... read DS ... realize it was 25 days ago.... add 25*4 seconds to the current time....store last correction date... do your stuff.... go back to bed

    All RTC's has a built in error, some more, some less but they all have it. And the trick to get it accurate is to compensate for it in the code by + or - the right amount of seconds.

    Done properly in a stable temperature environment you can adjust n sec per day, x sec per week, y sec per month and z sec per year.

    Then you can run it för a million years :-)

    or you can buy 1000 x-tals and measure them all and pick the best one ;-)

    /me

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Are the crystals you are using the same Capacitance as that required by the RTC - ie 12.5pF? Probably not. Is your xtal 32768.0000000Hz? Probably not. Is your xtal in an environmentally controlled and regulated oven? Probably not. Have you added any Trimming Capacitors to get the frequency spot-on? Probably not. Have you Phase Locked the xtal to WWV? Probably not. At only 5 seconds/day, you're doing damn good!!!

    In any event, the Maxim RTC's are not that great. They work, sure, but not that spectacular, and they are hellishly overpriced for what they are. $1 for a DS1307? Who are you kidding Maxim!

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    Are the crystals you are using the same Capacitance as that required by the RTC - ie 12.5pF? Probably not. Is your xtal 32768.0000000Hz? Probably not. Is your xtal in an environmentally controlled and regulated oven? Probably not. Have you added any Trimming Capacitors to get the frequency spot-on? Probably not. Have you Phase Locked the xtal to WWV? Probably not. At only 5 seconds/day, you're doing damn good!!!

    In any event, the Maxim RTC's are not that great. They work, sure, but not that spectacular, and they are hellishly overpriced for what they are. $1 for a DS1307? Who are you kidding Maxim!
    Hi Melanie,
    Yet to address his question, the $5 watch has no oven or PLL . . . , but may have the correct xtal, and trimmer caps, and as far as Maxim's overpriced RTC . . . I'm guessing you know a better I. E. cheaper solution . . . YES?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5


    Did you find this post helpful? Yes | No

    Default rtc more

    how stupid of me to think that a REAL-TIME-CLOCK could actually keep real time. actually I would totally agree with all the measures, but it seems that should give mabye 5 year accuracy or something like that. I have seen the correction routines in some PLC's but that also seems , well OLD. I think you would need several days to TUNE your clock. The xtal I got from digikey was of the type, for rtc timing. ME, you are probably right that the 32,768 can't be 32,768.725 which would calculate out to x-added seconds.
    Intersil has a RTC chip with some error adjustment registers, but same basic data format as 1307.
    Who can make a small circuit board for SO-small outline 8 pin device and stuff, and how do you solder junk that small anyway.
    don

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    2pf caps to the xtall sometimes is good.

    eXPerience !


    Here is the linkie:
    http://www.maxim-ic.com/appnotes.cfm/an_pk/58

    Accuracy
    The frequency accuracy of a crystal-based oscillator circuit is mainly dependent upon the accuracy of the crystal and the accuracy of the match between the crystal and the oscillator capacitive load. If the capacitive load is less than the crystal was designed for, the oscillator runs fast. If the capacitive load is greater than what the crystal was designed for, the oscillator runs slow.

    In addition to the errors from the crystal and the load match, crystals vary from their base frequency as the ambient temperature changes. Dallas RTCs use "tuning fork" crystals, which exhibit an error over temperature, as shown in Figure 2. An error of 20ppm is equivalent to approximately 1 minute per month.


    _______________________________
    Last edited by sayzer; - 6th October 2008 at 07:42.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    $5 watch has no oven
    Hi,

    A 5$ wristwatch is warmed by your body.
    (The body temperature is constant).

    Best regards,

    Luciano

  8. #8
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by Luciano View Post
    Hi,

    .....(The body temperature is constant).


    Luciano
    The body temperature is constant ?

    Mine changes from time to time.

    ________________
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  9. #9
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    What Luciano meant is that body temperature variations will never be as great as ambient.

Similar Threads

  1. Easy and Accurate Clocks without RTC IC
    By paul borgmeier in forum Code Examples
    Replies: 18
    Last Post: - 28th October 2013, 21:28
  2. PIC 16F877 I2C communications
    By sigmoideng in forum General
    Replies: 7
    Last Post: - 13th July 2007, 10:28
  3. Using RTC to generate long time delays
    By schlaray in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd January 2007, 00:31
  4. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07
  5. X1226 RTC - Help
    By charudatt in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th August 2006, 17:54

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts