RTC (Real Time Clock) chips and modules...

Many Arduino users end up trying to make some form of clock and most, if they are sensible, make use of a Real Time Clock device. A RTC typically uses a crystal oscillator running at 32768Hz which is a frequency that can be easily divided to produce a 1Hz clock. This 1Hz clock is used internally by the RTC to clock counter registers which contain time data such as Year, Month, Date, Day of week, Hours, Minutes and Seconds. The registers automatically update each other and roll-over at the required times. Some RTC devices also keep track of Leap Years. Typically, the 1Hz clock signal is output on a pin for the user to make use of and often the 32768Hz signal is also made available.

Most of the devices for the hobbyist make use of the I2C serial bus and the ones discussed here are no exception. If you haven't used I2C before, don't worry as Arduino provide the "Wire" library to communicate with  I2C devices for you. There are many tutorials available to guide you but, I will explain the hardware aspects of I2C devices elsewhere on this site.

DS1307 with Crystal
(~3 GBP)
DS3231 with AT24C32
ChronoDot V2.1
using a DS3231 (~17 GBP)

Some examples of RTC devices are shown above. The leftmost device is the common DS1307 RTC which requires an external 32768Hz crystal. It provides all the time and date information necessary for an Arduino project and it has the added advantage of including a small amount of Flash Memory which can be used to store alarm times etc.

The big disadvantage of the DS1307 is its inaccuracy which can be measured in +- Seconds per day! The main reason for its inaccuracy is that the crystal oscillator can and does drift with temperature, a problem that is often overcome in commercial equipment by placing the crystal in a temperature stable "Oven". It is possible to connect an external Lithium battery to keep the oscillator running if power is removed from the device. It typically costs around 3 GBP with the crystal so it is a cheap option especially where it is being synchronised with the MSF signal for instance.

The rightmost device, the ChronoDot, is probably one of the most accurate devices available to the hobbyist. It not only provides all the signals and data that the DS1307 does, it also has the advantage of a very accurate oscillator which typically will lose or gain about a Minute per year. There is also the facility to tune the oscillator for even better accuracy.

I purchased my ChronoDot from a UK company, phenoptix.com, which means that the price is higher than buying from Chinese suppliers but, if something goes wrong with it, I do have someone to call on for support. I must say that it is a quality device with a good PCB and excellent screen printing.

There are 2 alarms built-in as well as a temperature sensor. It uses the DS3231 RTC and comes with a built-in Lithium cell to keep the oscillator running if power is removed. The downside of this RTC module is its cost which is typically around 17 GBP and it has no available user accessible Flash Memory but, as I said, it does come with backup if necessary.

The centre module is, for want of a better term, a ChronoDot clone. It uses the same DS3231 as the ChronoDot and has the same facilities and accuracy. Battery backup is provided by a rechargeable Lithium battery. The manufacturer of this particular module has also added 4K of Flash Memory which can be very useful. Oh, and the cost of this incredibly accurate device, 3 GBP from the far East. Unfortunately, if it goes wrong, don't look for support from the supplier!