DS3231 vs DS1302 for drift over time?

xanatosxanatos Posts: 1,120
edited 2014-01-30 - 15:53:37 in General Discussion
I notice that the clocks in many of my field projects that use the old DS1302 chips drift about 2 or 3 minutes a month. These projects are not near wifi or any ability to poll NIST, so they have to be standalone. While I give the users a very simple keypad entry time setting function, I'd rather that they don't need to set them every few months.

The DS3231 looks like it has much greater stability... does anyone here have any experience with that chip? Thoughts as to it's performance over the old DS1302?

Like Xanatronics on FB: https://www.facebook.com/xanatronics

There are only 10 kinds of people in this world - those that know binary and those that don't.


  • RDL2004RDL2004 Posts: 2,554
    edited 2014-01-29 - 21:11:14
    It's way better than the 1302. Keep in mind that it's I2C and not SPI though. There is an SPI version 3234, I think. It's not that the 1302/1307 are bad, it's mostly because the 323x series have the oscillators internal (and temperature compensated) instead of having to be implemented external to the chip. There was a thread on this not too long ago I think.
    - Rick
  • LA6WNALA6WNA Posts: 125
    edited 2014-01-30 - 04:32:11
    I had the same problem with my 1302 clocks as well. Thought about find another chip that`s more stable, but ended up with a simple solution; I made a simple routine that runs once a day (03.00 at night) that set the 1302 clock back 14 seconds. That because I figured out that the clock went abt 14 sec too fast pr 24h. Now my DS1302 has been fairly close to right time for 2 months. Simple way to by-pass a problem... , and you don`t have to do any hardware changes. This could maybe work for you, if you dont have to have "on the second" right time all the day through?
    :cat: Peter ***Aafjord, Norway***
  • RDL2004RDL2004 Posts: 2,554
    edited 2014-01-30 - 06:11:54
    The problem with daily resetting, even automatically, is that the calibration factor may have to be determined individually for each and every board. The primary reason for inaccuracy when using the DS1302 is the external crystal. Usually either capacitance issues due to board layout or off-spec/poor quality crystals. Temperature can also be a problem. The DS323x series side steps these issues by having a temperature compensated oscillator inside the chip.

    The only real problem is that they are all surface mount parts in 16 and 20 pin packages. This means that board layouts have to be changed if you want to switch. There is one part, the DS3231M, which is available in an 8 pin SOIC. It uses a MEMS oscillator instead of a crystal and is 5ppm vs 3.5/2ppm for the crystal oscillator versions. It's I2C only, no SPI version.
    - Rick
  • Kenny GardnerKenny Gardner Posts: 169
    edited 2014-01-30 - 11:24:46
    Whatever you do, don't buy the DS3231 chips from China (eBay or elsewhere). Pay the $10 per chip and buy them from Mouser or DigiKey. Or, use ChronoDots (macetech.com).

    I made the mistake of buying some DS3231's from eBay and not a single one keeps accurate time (worse than the worst of any DS1302). On the other hand, all of the chips purchased from Mouser only lose/gain a couple seconds a month.

  • RDL2004RDL2004 Posts: 2,554
    edited 2014-01-30 - 11:51:46
    My thoughts exactly. I have one that's been within 5 secs per month for over a year now. I got it from Mouser. I wonder if anyone who bought one of those cheap eBay/China boards has had a chance to test them.
    RDL2004 wrote: »
    Keep in mind that this board, probably made in China, fully assembled with eeprom and battery, was sold for $1 less than the 1000 quantity price of the DS3231 alone.
    - Rick
  • xanatosxanatos Posts: 1,120
    edited 2014-01-30 - 15:53:37
    Thanks folks. It'll be a bit of a switch to have to use surface mount, but the times are really demanding I make the switch, lest I be catalogued with various large extinct reptiles :) Which leads me to my next post about temperature sensing inside some sort of toaster oven for best reflow oven performance... :)
    Like Xanatronics on FB: https://www.facebook.com/xanatronics

    There are only 10 kinds of people in this world - those that know binary and those that don't.
Sign In or Register to comment.