DS1307 runs slow on Vbat.

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I built a RTC assembly using a DS1307. When I run it on 5 VDC, it gains about a half second a day, but when it's on Vbat (CR2032), it loses about 2 seconds a day. Is this normal? Can it be corrected? Thanks.
 

Papabravo

Joined Feb 24, 2006
13,454
Frequency variation with supply voltage is absolutely normal. From your data it seems as if there might be a supply voltage that will result in less error. Problem is that as you try to find that magical point the temperature goes and changes on you. So now you have to try and compensate for two things at once.

You could try for a Cesium clock but I'm guessing that working with radioactive substances would violate forum rules. You could reset the RTC periodically using either WWV or the internet. That would at least bound the absolute error.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Frequency variation with supply voltage is absolutely normal. From your data it seems as if there might be a supply voltage that will result in less error. Problem is that as you try to find that magical point the temperature goes and changes on you. So now you have to try and compensate for two things at once.
That's what I suspected. As you say, I could probably adjust the supply voltage to "fine tune" the clock, but then temperature would need to be controlled. I have read about an assembly method that uses a small resistance element bundled with the crystal to provide temperature compensation, but I don't remember where I saw it. I have a DS3231 RTC that has this function built in, and is much more accurate, but (being cheap) I wanted to try the DS1307. Now I know. :)
 

djsfantasi

Joined Apr 11, 2010
6,330
That's what I suspected. As you say, I could probably adjust the supply voltage to "fine tune" the clock, but then temperature would need to be controlled. I have read about an assembly method that uses a small resistance element bundled with the crystal to provide temperature compensation, but I don't remember where I saw it. I have a DS3231 RTC that has this function built in, and is much more accurate, but (being cheap) I wanted to try the DS1307. Now I know. :)
The link to Roman Black's simple xtal oven for accurate clocks is here: http://www.romanblack.com/xoven.htm
 

tgotwalt1158

Joined Feb 28, 2011
110
Accuracy of DS1307 is based on the crystal and matching of capacitive load of oscillator & capacitive load of Xtal. Crystal frequency drift due to temp fluctuations may also cause error. Noise in your 5 volt source being fed to oscillator may be causing +1/2 sec/day error.
 
Top