User Tools

Site Tools


chronodot_v3.0

ChronoDot 3.0

The ChronoDot RTC is an extremely accurate real time clock module, based on the MAX31328 temperature compensated RTC (TCXO). It includes a CR1632 battery which should last at least 8 years if the I2C interface is only used while the device has 5V power available. No external crystal or tuning capacitors are required.

The MAX31328 has an internal crystal and a switched bank of tuning capacitors. The temperature of the crystal is continuously monitored, and the capacitors are adjusted to maintain a stable frequency. Other RTC solutions may drift minutes per month, especially in extreme temperature ranges…the ChronoDot will drift less than a minute per year. This makes the ChronoDot very well suited for time critical applications that cannot be regularly synchronized to an external clock. The ChronoDot can deliver ± 3.5ppm accuracy across the entire -40C to +85C temperature range, but can be significantly more accurate (1ppm) near room temperature (22C).

The ChronoDot will plug into a standard solderless breadboard and also has mounting holes for chassis installation.

The I2C interface is very straightforward and virtually identical to the register addresses of the popular DS1337, DS1307, and DS3231 RTCs, which means that existing code for the Arduino, Basic Stamp, Raspberry Pi, and other controllers should work with no modification. The interface is exactly the same as the DS3231 chip used in previous ChronoDot versions, meaning DS3231-specific functions such as temperature reading will also work.

Features

Controller: Maxim MAX31328
Function: Temperature-compensated RTC
Accuracy: ± 3.5ppm at -40C to +85C (~1 minute per year)
Power Supply: 2.3 to 5.5 V DC
Current: 200uA (active), 820nA (timekeeping)
PCB Size: 1.2 x 1.0 inches (30.5 x 25.8 mm)
Pin Spacing: 0.1 inches
Header Spacing: 0.9 inches

For slightly different specifications and instructions for older ChronoDots, please visit this page: ChronoDot V2

Assembly

The ChronoDot V3.0 has been updated with a top-mounted battery holder – no soldering required. Simply remove the CR1632 battery from its packaging, and snap into the battery holder. Please ensure the top (marked +) side of the battery is facing the top of the battery holder.

Power Connections

The VCC and GND pins are used to power the ChronoDot when it is connected to a microcontroller. The ChronoDot can be used just with the internal battery power, but it could quickly run the battery down and require replacement. VCC can be anywhere between 2.3 and 5.5 volts, making it possible to use the ChronoDot with 3.3V and 5V systems.

Battery

The battery is a 3V lithium CR1632 coin cell, provided with every ChronoDot purchase. You should install the battery before use, to prevent loss of timekeeping during power loss. The battery voltage is also connected directly to the BAT pin. This could be used to attach an external battery instead of the CR1632, or to monitor the health of the battery. Make sure not to short this pin accidentally, or the battery could be drained quickly.

EEPROM

New in the ChronoDot 3.0! The ChronoDot includes an ST M24C16-R 16kbit EEPROM (2 kilobytes). This is connected to the same I2C pins as the RTC chip. It works well with the SparkFun External EEPROM Library.

SDA/SCL

The SDA and SCL pins are used to communicate with the ChronoDot, using the I2C standard interface. The I2C bus requires pullup resistors from SDA and SCL to VCC. Since many devices that have I2C buses already have the resistors in place, these are not provided with the ChronoDot. But there are two locations for 4.7K or 10K resistors to be soldered, in case your controlling device does not have its own pullup resistors. In the ChronoDot V3.0, the pullup resistors can be disabled by cutting the traces in the solder jumpers. To enable the pullup resistors again, the solder jumpers can be bridged with dot of solder.

RST

The RST pin is an active-low signal that can be used in some microcontroller applications. In most cases you will not need to use it. If the VCC supply is less than ~2.5V, the RST line will activate. Additionally, the RST line will watch for the signal to be pulled low by an external signal. If that happens, it will hold the RST line low for 250ms beyond the point the external signal release the line. This can be useful for resetting a microcontroller in the event of low power, or an external condition like a reset pushbutton. The RST line does not affect timekeeping functions.

SQW

The SQW pin can be configured to output a square wave signal at 1.000 Hz, 1024 Hz, 4096 Hz, or 8192 Hz. This is controlled by the RS2 and RS1 bits in the control register (address 0x0E). The pin can also be used as an alarm trigger. If the INTCN bit in the control register is set, then the output will go low when the current time matches the time set in either of the two alarm registers. This pin needs to be pulled up to VCC with a resistor if it is used, 10K would be a good choice.

32K

The 32K pin is open-drain (needs a pullup resistor) and outputs a 32768 Hz clock signal. This can be enabled using the EN32kHz bit in the Status register (address 0x0F). This pin could be used as an accurate oscillator reference for some external device.

Datasheet

The MAX31328 datasheet provides all other necessary information such as registers, maximum voltages, power consumption, and special features.

Arduino Libraries

Here is a ChronoDot library written by mizraith, on Github: https://github.com/mizraith/RTClib

The MAX31328 is identical in operation to a DS3231 chip. Here is a DS3231 library (including alarm support) by jarzebski on Github: https://github.com/jarzebski/Arduino-DS3231

The Time.h library by PaulStoffregen is great for many time-based operations and supports an external RTC: https://github.com/PaulStoffregen/Time

Examples

Very simple Arduino code to read and print the hours, minutes, and seconds from the ChronoDot:

#include <Wire.h>
 
void setup()
{
  Wire.begin();
  Serial.begin(9600);
 
  // clear /EOSC bit
  // Sometimes necessary to ensure that the clock
  // keeps running on just battery power. Once set,
  // it shouldn't need to be reset but it's a good
  // idea to make sure.
  Wire.beginTransmission(0x68);
  Wire.write(0x0E); // select register
  Wire.write(0b00011100); // write register bitmap, bit 7 is /EOSC
  Wire.endTransmission();
}
 
void loop()
{
  // send request to receive data starting at register 0
  Wire.beginTransmission(0x68); // 0x68 is DS3231 device address
  Wire.write((byte)0); // start at register 0
  Wire.endTransmission();
  Wire.requestFrom(0x68, 3); // request three bytes (seconds, minutes, hours)
 
  while(Wire.available())
  { 
    int seconds = Wire.read(); // get seconds
    int minutes = Wire.read(); // get minutes
    int hours = Wire.read();   // get hours
 
    seconds = (((seconds & 0b11110000)>>4)*10 + (seconds & 0b00001111)); // convert BCD to decimal
    minutes = (((minutes & 0b11110000)>>4)*10 + (minutes & 0b00001111)); // convert BCD to decimal
    hours = (((hours & 0b00100000)>>5)*20 + ((hours & 0b00010000)>>4)*10 + (hours & 0b00001111)); // convert BCD to decimal (assume 24 hour mode)
 
    Serial.print(hours); Serial.print(":"); Serial.print(minutes); Serial.print(":"); Serial.println(seconds);
  }
 
  delay(1000);
}
/home/macetec/public_html/docs/data/pages/chronodot_v3.0.txt · Last modified: 2022/08/12 22:52 by mtadmin