Digital Clock on 7 Segment Display

Today I am going to share and explain about a mini project that I made during my free time, which is a Digital Clock displayed on 7 segment display. In this digital clock, there are a few functions available such as stopwatch, countdown timer, temperature display and time settings. Although I think I still can go more besides this 4 functions, which I will try to develop it in the future. Besides that, this clock also has keypad which allows user interface.

Well, I have divided this project into a few parts before I combined them into one.

First video here explains about Digital Clock on 7 Segment Display.

If you don’t understand how RTC Clock works, check out my Real Time Clock post. By setting the time once and 3V battery continuous supply to DS1307, the clock will keeps on counting even when the main supply is off.

Overall look on breadboard
Close look on 7 segment display

Second video here explains about Digital Stopwatch on 7 Segment Display.

To make a digital stopwatch, you need to have exact time counting. In this case, I am using the millis() function built in Arduino. millis() returns the number in milliseconds from the beginning of program.

7 Segment display
7 Segment display
Prototype on breadboard
Prototype on breadboard

Basically, the two videos above are part of what I am doing in this project. However, as you can see from the video, all the parts are prototyped on breadboard. So there are a lot of jumpers connecting and very complicated.

Finally, the video for Digital Clock on 7 Segment display.

Functions related to each keypad number:

(A) – Countdown Timer

(B) – Stopwatch

(C) – Time Settings

(D) – Temperature display

For this project, I have used quite a lot of pins from Arduino for 7 segment display purpose. But I want to include a keypad user interface. Therefore, the solution for this is by using a I/O Expander, particularly PCF8574A. One of the benefits using this is that it uses I2C bus interface. For I2C, I will have 2 devices connected on the SDA and SCK line which are DS1307 RTC Clock and PCF8574A IO Expander. For the keypad, I have to built my own code to read the input pressed since I am not connecting it directly from Arduino, so I can’t use the Keypad.h to simplify my job. (I will try to make a post on this soon.)

Some images of this project:

7 Segment Display on Stripboard
Close look on 7 Segment Display
4×4 Keypad with PCF8574A IO Expander
DS1307 Breakout Board
Connections to Arduino
Prototype on breadboard
Overall look on this project

To me, this project still has a lot of room of improvements, if you have any suggestion or comment, feel free to drop me a comment. Thanks and enjoy.

18 thoughts on “Digital Clock on 7 Segment Display

    1. Thanks. I will upload the schematic diagram once I am free. However, the project code are not available. Maybe you can try to look how to interface from each part from my previous post.

  1. hey thnx for that work i’ve tried it but things cant work out well. can you email me the schematics and codes for this pliz.

    1. One shift register might not sufficient to drive 4 seven segment display.

      Two shift register should be enough to drive all the anode and cathode of display.

    2. Hi Dishant,

      Sorry for the late reply. Yes, one shift register is enough to drive the 7 segments. Multiplexing is used to reduce the number of pins required to control 4 segment display.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s