DS1302 inaccurate time

Hi,

I have a question about the DS1302... What can cause that my Arduino-based clock with that IC skews when it is powered from its internal battery?
I have built a timer circuit, which displays the time and temperature. It has an external power adapter, and i have connected a battery to DS1302, to preserve time when external power is unplugged.

Now, when powered from wall socket, the time is accurate, but when i plug it out, and leave the DS1302 to run from its own battery, the clock skews (forward, or backwards!).

Can anyone give a point, about what can cause this?

Thanks for any help :slight_smile:

how much does it skew?

Some minutes. But randomly forward, and backwards. And as i observed, only when there is no external power.
External power and DS1302's CR2032 battery (brand new) haven't got any common points except common ground :slight_smile:

3 minutes (per day I assume) ~~ 200/86400 == 1/4500 is too much - it should be in the 10 seconds/day IIRC,

The RTC should have a crystal, can you see if the connections are OK?

check - http://pdfserv.maximintegrated.com/en/ds/DS1302.pdf - for the details

Hi,

Not per day. It rns normally when powered from PSU, but when i pull out, and leave it for a couple of minutes, or half an hour, its time differs from any other clocks i have. (Phone, wall clock, PC clock...)
Will be easy to locate the rrror if the skew were constant from every power source.

DS1302's backup battery is brand nev... It's a CR2032.

It seems that replacing the crystal solved the problem. Thanks :slight_smile:

where can i get a crystal to replace the one i have on the DS1302 board ?

From ebay or any elecronics parts shop...

ColT:
From eBay or any electronics parts shop...

Hmm, Radio Shack (AKA TAndy) died a miserable death in this country, and its scavenger, Dick Smith Electronics, no longer sells electronic parts as such but does sell Iphone cases.

I wonder - does Radio Shack still count as an electronics parts shop? :wink: