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.