DS1302 high-precision RTC [180620]
A small, DS1302-based Real-time Clock (RTC) module with on-board, 20-ppm oscillator.
The schematic is pretty simple as it consists of only four pars: a DS1302ZN+, a ASH7KW 32.768 kHz crystal and a optional 100 nF cap.For the accuracy, if we calculate worst case from the datasheet we get:
32,768 Hz with +/-20 ppm result in 51.84 seconds offset for 30 days.
This means we will be ~10 minutes off in a year in the worst case.
The DS1302 is supported by a few Arduino libraries and only requires three pins on the microcontroller to operate. With the current design you can upgrade for example the 3 displays alarm-clock to give it a more stable timebase. For the update procedure you can have a look at the article about the clock on the Labs. The final PCB now look like this:


Inspiration of how to add this RTC to your own project can be taken from the software of the 3 displays alarm-clock.

Discussion (0 comments)