Most importantly, is this time tolerance a fix value or it has random error. Can we fix this problem with code?
DS3231 is much expensive, I need a cheaper one. but I hoped to fix this drift with codeHello,
No way to correct the DS1307
.. or Maybe by hardware: to add a litle variable capacitor on Quartz 32Khz ?
i observed a drift of +-2 to +-6mn by month on my old numerical clock.
with delta T°Amb. min=17°C to max= 30°C ) Winter/Summer (without clim!)
you better have to replace it by a DS3231 ...
drift becomes 1mn per 6 months for same delta T°Amb.
+-2 to +-3mn per year...
DS3231 has internal correction ... mainly for temperature effect
Thanks I have not added caps to the crystal, maybe I should try itFor DS1307, accuracy is mainly a matter of crystal quality and correct load capacitor dimensioning.
I hoped it would have a fix amount of drift per day or month to compensate that with code. But as it does not have fix drift which it is sometime + and some times -, so it is impossible.Hello!
As said above, the clock will vary mostly according to temperature, and you can compensate
with capacitors at the crystal. There are probably methods that you can find on the net.
But prior to that, the question is: what are your specs? What accuracy are you aiming at?
Fixing by code? Yes you can. You have to find a nearby clock which is accurate and synchronize
to it. If your clock is by some way linked to the net, there are time servers. If it's not, there are
satellites / GPS. Will it be enough? I don't know, describe your application better!
Dora.
I have a good prototype to test the accuracy of the ds1307 timer. I have not used any cap for crystal. So based on your explanation 12.5 pf cap would fix problem to some extent.
- Do you have a real prototype problem or just need random advice?
- How consistent and accurate is your measurement error? ... vs Temp, time, Vdd.
- What are your expectations and requirements? Always use [ppm] for specs.
- Do you know how 32kHz XO works in that chip? It is based on a 12.5 pF Xtal.
- IRQ and bad coding may cause errors, but let's get your error history 1st.
Here is how a good Swiss Xtal spec looks from www.microcrystal.com
Room temp tolerance has a range of specs and price. Then the thermal effect peaks between 20 and 30 deg C. ( mean wristwatch temperature) then has a negative hyperbolic 2nd order negative coefficient below the peak .
View attachment 190523
Thanks I have not added caps to the crystal, maybe I should try it
I give this question back to you.Most importantly, is this time tolerance a fix value or it has random error.
for 4 ppm.Do you have a real prototype problem or just need random advice?
- How consistent and accurate is your measurement error? ... vs Temp, time, Vdd.
- What are your expectations and requirements? Always use [ppm] for specs.
- Do you know how 32kHz XO works in that chip? It is based on a 12.5 pF Xtal.
- IRQ and bad coding may cause errors, but let's get your error history 1st.
Here is how a good Swiss Xtal spec looks from www.microcrystal.com
Room temp tolerance has a range of specs and price. Then the thermal effect peaks between 20 and 30 deg C. ( mean wristwatch temperature) then has a negative hyperbolic 2nd order negative coefficient below the peak .
View attachment 190523
100ppm /2.6million = is almost 4 seconds off per month.
DS1307 approximately is 20 seconds faster than real time per a week.All the specs to answer you were in this comment, but you were too afraid to ask what you need to understand.
First. How fast or slow is it?
Second How accurate do you need it? Or nice to have. 1ppm is about $5 0.001 ppm is is about a hundred times more unless connected to the web.
What can you afford?
There are about 2.6 million seconds in a month, so when it says below the tolerance is from 20 ppm to 100 ppm, that means at nominal room fix temperature. so 100ppm /2.6million = is almost 4 seconds off per month. If it is too fast, that's good, you can trim it slower with a load cap some like <=5 pF for a few seconds slower per mo. 5 pF is really small.
Where do you find this information?I should add 12.5 pf caps to the crystal.
After one week one of them was 12 seconds slower and another one was 18 second slower.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?