Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

time accuracy error in rtc clock.

Status
Not open for further replies.

tapu

Full Member level 4
Joined
Sep 15, 2014
Messages
234
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
india
Activity points
3,041
Dear all,
I have designed & developed rtc clock by using 89c52, ic 1307,battery(coin cell),crystal 32.768khz and lcd16×2.time is running but noted 5 seconds back per day.I have changed unknown brand ic 1307 by original DS1307 but problem remains same.please reply how to solve this problem.

Thanks,
Tapu
 

I have 38 second/day on STM32. Poor cristals, incorrect capacitor values and e.t.c.
I have solved it in s/w. Since mcu is started from HS cristal, it calculates the time error during 1 hour. Than multiply it on 24 and substract or add once per day.
 

The crystal divider is absolutely accurate so the problem is a slight inaccuracy of the crystal frequency.

Bear in mind that 5 seconds a day equates to 5 in 86,400 or an error of 0.0058% so it is very small. The only way to fix it is to try a different crystal or loading capacitors. For very accurate timing, change one of the capacitors for a variable one and adjust for exact frequency.

Brian.
 

Hi,

usually in the DS1307 datasheet you should find the informatin:
* what crystal to choose
* what DS1307 input capacitance

In the crystal datasheet you find:
* how to calculate the capacitors
* what accuracy you can expect

Klaus
 

time is running but noted 5 seconds back per day.
A typical inaccuracy of a 32.768Hz tube crystal reaches +50 ppm, what means a variation within the range of ~4,32 seconds in a day, so it seem that everything is working as expected in the hardware level. You could improve it by replacing the DS1307 by another oscillator with PLL so that you could somehow tune the frequency with a fine adjust, but the Easyrider83's solution seem the most feasible.
 

Thank you for your valuable replies.
Which rtc is best for clock.?
 

All of them will be innacurate. SW correction is a common solution especially when you have HS reference.
 
  • Like
Reactions: tapu

    tapu

    Points: 2
    Helpful Answer Positive Rating
I use lots of RTCs for my projects.
I used to employ the DS1307 but in certain critical projects, the inaccuracy would be annoying.

Therefore I switched to the DS3231, and the performance improvement is outstanding. I now employ DS3231 for new projects.

Having said this, if you require absolute accuracy, then the very best would be to use a GPS-disciplined 32.768Khz source.
 
  • Like
Reactions: tapu

    tapu

    Points: 2
    Helpful Answer Positive Rating
Hi,

or RV-3029, DCF-77, or internet time,

***
All RTC´s with external xtal suffer from the same problem: You need to read the datasheets, proper calculations of the capcitor values, choose the right XTAL, keep on design guidelines:

DS1307 datasheet says:
++++
CLOCK ACCURACY
The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was trimmed. Additional error will be added by crystal frequency drift caused by temperature shifts. External circuit noise coupled into the oscillator circuit may result in the clock running fast. Refer to Application Note 58: Crystal Considerations with Dallas Real-Time Clocks for detailed information.

++++
Besides this it gives XTAL specifiactions and layout considerations.

*****
I assume, if you follow the rules, then you will be satisfied with the result.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top