Visualize your projects. Realize your dreams.

Menu

Time and calendar functions with a real time clock module based on the DS1307 and an Arduino

Since Arduinos have not directly the possibility to save time, we expand our Arduino with a small DS1307 Real-Time-Clock (RTC) board. Which can, battery powered, “remember and count” the time and the date.

Tiny RTC (DS1307) Real Time Clock module and an Arduino Uno

We connect with a few cables our Arduino with the real-time clock, as in the following wiring circuit:

Then we start the serial monitor (with 9600 baud rate) and should get the following output:

DS1307 real-time clock – Serial Monitor

Now it is possible for us, even after a power failure (or after disconnecting the Arduino from the power supply and reconnecting it again later) display and use the exact time and date. If the clock (which may even happen) is going incorrect after some time, we have to remove the battery for a short time, reinsert it and then upload the sketch again.