solution for very accurate RTC?

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi - I want to find an RTC for a project I'm working on. The problem I'm running into is is that most depend on the accuracy of the external crystal - and I can't find crystals with better than about 20ppm accuracy. The only solution I've found to this is the Maxim DS3232, which has a built in crystal with 2ppm accuracy. But the 3232 doesn't do hundreths of a second - only full seconds. I'd really like something that can do hundreths. Also the 3232 is a SO-20 only, which is kinda chunky. Anybody have any reccomendations for a good solution to this problem? Also - what's a good battery to use (something very standard and easy to find). Thanks in advance.

Last Edited: Wed. Nov 23, 2005 - 01:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So which is it that you are wanting to have, a Real Time Clock or, an Analog to Digital Converter?

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want that sort of accuracy long term you are talking serious so look at using temperature controlled ovens. But then that will screw up battery operation.

Keep it simple it will not bite as hard

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I also want a long-term accurate real time clock for a datalogger. The Dallas/maxim are a bit expensive, and if you're goign to have a microcontroller in there anyway I was thinking of using an MSP430 running on a lithium clock battery (CR2032) with a 32kHz oscillator. Supposedly they are able to run for 10 years like this (if they spend most of their time powered down).

Assuming temperature has the most influence on crystal frequency, you would wake up once every minute or so to measure the temperature, make adjustments, then go back to sleep.

The most power efficient way I can think of to measure temperature is using the on-board comparator: time how long it takes to charge a capacitor with a thermistor, compared to charging with a reference resistor.

Anyone think this would work?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl wrote:
So which is it that you are wanting to have, a Real Time Clock or, an Analog to Digital Converter?

Does that really need to be asked?

Bite me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sutton wrote:
If you want that sort of accuracy long term you are talking serious so look at using temperature controlled ovens. But then that will screw up battery operation.

well the maxim chip already has the accuracy I want - it just doesn't outut hundreths of a second.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Does that really need to be asked?

Does anybody really know what time it is?

Of corse I knew you meant ADC! err. I mean DAC. err. I mean RTC...

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can't you use an on-board timer to count whatever resolution you need between seconds? 16 bit timer running at Mhz would give some nice sub-second divisions.

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use the int output from the DS3232 into the mega. Count the number of cycles the mega generates between your chosen pulse times you now have mega clock cycles in known time period so can calculate the actual clock frequancy of the mega. Hence number of cycles per one hundreth of a second

See ICP on mega data sheet

Keep it simple it will not bite as hard

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps the Maxim DS32KHz would be useful? They are not too expensive and could be fed into a timer to generate 10ms intervals. They are 2 ppm.

Ralph Hilton

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using a DS32KHZ, feeding the output through a 1M resistor to a 100pF cap to the XTAL IN of a ST Microelectronics M41T80M6E ( Digi-Key 497-2820-5-ND). The MT4180 has 1/100 second registers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rhilton wrote:
Perhaps the Maxim DS32KHz would be useful? They are not too expensive and could be fed into a timer to generate 10ms intervals. They are 2 ppm.

Nice call - coupling one of those with any of the maxim/dallas rtc chips would be a solid fix. Too bad it's a SO-16 (or BGA - eww) but I'll take what I can get.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sgomes wrote:
Can't you use an on-board timer to count whatever resolution you need between seconds? 16 bit timer running at Mhz would give some nice sub-second divisions.

Yes I thought about that - I could probabaly do something like that, though my crystal is not a nice frequency like that (18.432Mhz). I had been thinking I'd do something like count pulses from the 32.768 pin and have a prescaler on it (though I'm not sure the prescaler works on external inputs - I'd have to check that). Is it doable? Probabaly - but it'd use up one of my timers, and I like my timers. I always have about 20 things I'd like them to be doing. Still a possibility though.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nleahcim wrote:
Nice call - coupling one of those with any of the maxim/dallas rtc chips would be a solid fix. Too bad it's a SO-16 (or BGA - eww) but I'll take what I can get.

The DS32KHZ is also available in a 14-pin EDIP package.

Nice part. I'm using a DS32KHZ with a DS1307 RTC. After two months at room temperature, the drift is less than one second.

Don