Subscribe to Arduino Academy and start learning today for FREE!

IC Station DS1307 Real Time Clock

In this tutorial, we will be using the IC Station DS1307 Real Time Clock Module. This will allow you to not only build a clock display, but add date and time stamping functions to your projects, so you know when a particular value was recorded by a sensor.


Code: steveics Discount Amount: 15% Max Use: 1 No Min Order Started Date: 16th Mar, 2015 Ended Date: 16th May, 2015

This module does not include a battery, or the pin headers. You will need to order those:

Become the Maker you were born to be. Try Arduino Academy for FREE!

LI2032 (rechargeable, non-rechargeable CR2032 will also work)
Right Angle Breakaway Headers (you can never have too many)

Solder the header to the module. I used the 5 hole side of the module. Only 4 pins are used. VCC to Arduino +5, GND to Arduino GND, SCL to Arduino SCL (A5), and SDA to Arduino SDA (A4).

You will need to download a library to use this module. I prefer the Adafruit library:


Download and install into your IDE using the Sketch, Import Library, Add Library function.

Now load the File, Examples, RTClib-master, DS1307 example sketch.

Because we are using the Arduino Micro, we need to add the Serial delay in setup:

while (!Serial) ; //needed for Leonardo and Micro

Now you can upload to the Arduino. The time and date will be set from your computer during the compile and upload process.

When you run the Serial Monitor, you should see something similar to this:

We will show you how to use this for data logging and LCD display in a upcoming blog post.

Become the Maker you were born to be. Try Arduino Academy for FREE!

Notify of
Inline Feedbacks
View all comments


Would love your thoughts, please comment.x