What Is the DS1307 RTC Module, and Wiring It to Arduino?

Engineering illustration: What Is the DS1307 RTC Module, and Wiring It to Arduino?

The DS1307 is one of the most popular and least expensive real-time clock (RTC) modules, and we covered wiring it alongside the DS3231 in an earlier article; this article focuses on its own specific details: the battery system, the square-wave output, and its onboard memory.

Core function

The module accurately keeps track of seconds, minutes, hours, day, date, month, and year, with automatic month-end correction and leap-year compensation, and these calculations remain valid through the year 2100.

The backup battery system

The module includes a CR2032 lithium coin cell holder on its underside, with a power-monitoring circuit that automatically switches the chip to run off the battery when main power is lost. Thanks to very low consumption of around 300 nanoamps, a single CR2032 battery (47mAh capacity) can keep the clock running for about 18 years with no external power at all.

The square-wave output (SQW)

The SQW pin provides a square wave selectable in software across four frequencies: 1Hz, 4kHz, 8kHz, or 32kHz — a useful feature for generating precise timing pulses for projects that need a timing reference independent of Arduino's internal clock.

Built-in EEPROM

A 24C32 memory chip shares the same I2C bus as the clock chip, at a fixed factory-programmed address of 0x50, providing extra permanent storage that can be used to save project settings without losing them on restart.

For the full practical details on wiring and code, see our earlier article on the two RTC modules. You can find the DS1307 module and CR2032 batteries at Juthour Tech.

اترك تعليقا

*
*
يمكن للأعضاء المسجلين فقط ترك تعليقات.