Introduction: Arduino Real Time Clock With Large 7-segment Displays

Picture of Arduino Real Time Clock With Large 7-segment Displays


I saw some RTC projects on the internet, but none of them were shown with 7-segment Displays.

This instructables is about my version of the RTC shown with 7-segment Displays.

I am using a RTC DS1307, to keep the correct time, to show this time I am using four large 7-segment Displays and an Arduino Uno with four 8-bit shiftregisters.

This project is concealed in a box, which displays are cut to size from the box and the back and top of this box are made out of plexiglass, so you can watch it from the inside.

Step 1: ​List of Materials Used

Picture of ​List of Materials Used

- 01 x RTC-module (DS1307)

- 01 x Arduino Uno

- 04 x 74HC595 Shiftregister (8-bit)

- 04 x 7-Segment Displays (Common Anode).

- 28 x 560 ohm resistors

- 01 x stripboard

- 04 x 16 pins IC socket

- 01 x set jumper wires

Step 2: Wire Up the RTC With the Arduino Uno

Picture of Wire Up the RTC With the Arduino Uno

Wire up the RTC, just like shown in the photograph.

Step 3: Arduino Script RTC

This is the Arduino script for programming the RTC with the right time. You can adjust the time and read it if you want in serial monitor.

Step 4: 74HC595 IC & 7-segment Displays

Picture of 74HC595 IC & 7-segment Displays

We use the 74HC595 IC, to minimalise the Arduino input pins needed for the four 7-segment Displays.

This IC can be used with more, you only have to connect the date pin with the next one.

Connect the 7-segment Displays:

  • Q0 - Q7 of the IC are there to connect the 7 inputs from your 7-segment Display. Q0 - Segment A, Q1 - Segment B, etc. (pin lay-out in the photograph).

Make sure you dont demolish your segments in the Displays, I am using 560 Ohm resistors for this.

  • If you connected your displays, you will notice that there are four pins remaining: 9, 11, 12, 14. Connect these pins like shown in the photograph. Now only pin 9 remains to connect, this is your data output you need to send to the next IC, this output goes to the next IC pin 14, etc. You need to connect pin 11 & 12 to your next IC also.

I minimalised the space, by solder these IC's on a stripboard.

Step 5: Arduino Script to Show the Time

This is the Arduino script to show the time from the RTC, on to your 7-segment Displays.

Step 6: Case

Picture of Case

I made my case with some help from

I really want to show the inside of my project, but I wanted it to look good too. That is why I chose to make the back and top out of plexiglass and the rest out of wood.

These two files are the files I used for laser cutting the box.

Step 7: The End

Picture of The End

This was my project! You have questions or something to mention, please feel free to leave a comment.


HàşibŘ (author)2017-01-29

need schematic ,i want to make it ,please send me schematic

Idan Warth (author)2017-01-24

Looks nice man!

jensvw (author)Idan Warth2017-01-24

Thanks kill

Asenkhan (author)2017-01-23

There is a typo

#include <Wire.h> // i2c wire libraries for RTC

#include "RTClib.h" // RTC libraries

RTC_DS1307 RTC; // define RTC variables

#define CLOCK 10

#define LATCH 9

#define DATA 8

byte digits [110]; // Definitions of the 7-bit values for displaying digits, digit [10] is turning the display completely off

const int shiftRegisters = 4; // Number of shift registers in use, 4

byte display [shiftRegisters]; // Array of numbers to pass to shift registers

int hour, minute, second;

int fnHour, snHour;

int fnMinute,snMinute;

int fnSecond, snSecond;

void setup()




pinMode(DATA, OUTPUT);

digits [0] = 0x40;

digits [1] = 0x79;

digits [2] = 0x24;

digits [3] = 0x30;

digits [4] = 0x19;

digits [5] = 0x12;

digits [6] = 0x2;

digits [7] = 0x78;

digits [8] = 0x0;

digits [9] = 0x18;





void loop()


DateTime now =; // This line needed for the database words from RTC_DS1307

Serial.print(now.year(), DEC); // You can use this Serial.print for serial monitoring


Serial.print(now.month(), DEC);


Serial.print(, DEC);

Serial.print(' ');

Serial.print(now.hour(), DEC);


Serial.print(now.minute(), DEC);


Serial.print(now.second(), DEC);


hour = now.hour(); // Multiplex hour from RTC

minute = now.minute(); // Multiplex Minute from RTC

fnHour = hour / 10; // First Number Hour

snHour = hour % 10; // Second Number Hour

fnMinute = minute / 10; // First Number Minute

snMinute = minute % 10; // Second Number Minute

second = now.second();

fnSecond = now.second() / 10;

snSecond = now.second() % 10;

display [2] = digits [fnHour]; // This step is to maintain the overvieuw and to keep track of which display view which digit

display [3] = digits [snHour]; // You can copy for example " digits [fnHour] " in the place where " display [0] " stands

display [0] = digits [fnMinute];

display [1] = digits [snMinute];

// display [3] = digits [snSecond];

// display [2] = digits [fnSecond];

/* display [0] = digits [snSecond];

display [1] = digits [snSecond];

display [2] = digits [snSecond];

display [3] = digits [snSecond];


digitalWrite(LATCH, LOW);

shiftOut(DATA, CLOCK, MSBFIRST, display [0]); // shiftOut(DATA, CLOCK, MSBFIRST, digits [fnHour]);

digitalWrite(LATCH, HIGH);

digitalWrite(LATCH, LOW);

shiftOut(DATA, CLOCK, MSBFIRST, display [1]);

digitalWrite(LATCH, HIGH);

digitalWrite(LATCH, LOW);

shiftOut(DATA, CLOCK, MSBFIRST, display [2]);

digitalWrite(LATCH, HIGH);

digitalWrite(LATCH, LOW);

shiftOut(DATA, CLOCK, MSBFIRST, display [3]);

digitalWrite(LATCH, HIGH);



jensvw (author)2017-01-23


RoyJackson (author)2017-01-21

Nice clock. I want to make one like this, but with the date always displayed. So with 10, not 4, digits basicaly.

RoyJackson (author)RoyJackson2017-01-21

Seems possible with littles adding to your code.

jensvw (author)RoyJackson2017-01-22

It is really posible, use the same stratagy I used in my code and you will get there

bkemps31 (author)2017-01-21

what size are the 7 segment displays and where die you get them?

jensvw (author)bkemps312017-01-22

length: 70mm

width: 48mm

I bought them from Conrad >

About This Instructable




More by jensvw:Arduino Real Time Clock with large 7-segment DisplaysArduino Real Time Clock met vier grote 7-segment Displays
Add instructable to: