accurate replacement for DS1307

martinn

Member
Is there a 'drop in' replacement for the DS1307 chip, which is more accurate, I mean, keeps better time over a range of weather conditions (temperature).

I have a fountain controller that activates at 00 and 30mins (during daylight) and the DS1307 drifts a few minutes over a couple of months, which means resetting the clock :(

thanks
Martin
 

westaust55

Moderator
Is it the DS1307 or the crystal that is the cause of the error.

Keep in mind that for a typical 32.768 kHz crystal, the specs can be:
Nominal Frequency: 32.7680kHz
Calibration Tolerance at 25ºC: ±20ppm


DS1307 datasheet:
http://datasheets.maxim-ic.com/en/ds/DS1307.pdf
From AN58: An error of 20ppm is equivalent to approximately 1 minute per month.

DS1338 datasheet
http://datasheets.maxim-ic.com/en/ds/DS1338-DS1338Z.pdf

The DS1338C integrates a standard 32,768Hz crystal in the package. Typical accuracy at nominal VCC and +25°C is approximately 10ppm.
The DS1338 without crystal is a drop in replacement but with iin-built crystal is a longer package.


App Note 58:
http://pdfserv.maxim-ic.com/en/an/AN58.pdf

So the DS1338Z with inbuilt crystal will tentatively have the error but accuracy drift due to temperature variations will still occur

in the past, ovens were used to ceep crystal circuits operating at a constant temperature.

DS3231 is not drop in in terms of DIP8 package but is i2c interface:
. Accuracy = 2ppm from 0C to +40C
. Accuracy = 3.5ppm from -40C to +85‹C
 
Last edited:

Andrew Cowan

Senior Member
I've always used the DS1338C, and found it has much more accuracy. I believe this is due to my DS1307 circuits introducting too much capacitance on the crystal tracks (maybe due to DIY boards and no groundplane). The DS1338C has a built in crystal, so they do all of that hard stuff for you.

A
 

Dippy

Moderator
I can't offhand think of a drop-in (i.e. no work needed) replacement.
Read the above replies first.


For a minimum of coding effort, but a hardware mod, you could move to the DS3232 , but I haven't looked at the Dallas-Maxim site for ages - have a look for yourself. See if something new and shiny has popped up.


Get the Data Sheet and App Notes on the Philips PCF8563 , 73 etc RTCs.
There are some useful notes about crystal choice and trimming methods.
Whether or not it'll work with the DS1307 I don't know. That would be for you to try (and let us know).

Or, you could use a 'manual' method.
If, for example, you know it drifts consistently by -20 seconds per week , then read,subtract and write back.
A little bodgy but better than nothing and better than what you have.


Do you have large temperature variations? If so look at the suggested chips which have Xtals with temp compenstation. Those Dallas ones also have age compensation too.


Otherwise you are into MSF or GSM/GPS modules or similar and I doubt if you need something that complicated or expensive for your project.
 

hippy

Technical Support
Staff member
Most crystal oscillator circuits can probably have the crystal removed and be driven by a square wave of the correct frequency. One option would be to do that, use a low ppm discrepency crystal oscillator module and use a divider chip which outputs 32.768kHz.

The advantage is it's an add-on improvement for what you already have. The disadvantage is you'll have to figure out how to keep it running from battery backup if you want that.
 
Top