0% found this document useful (0 votes)
45 views4 pages

Arduino Digital Clock Project

This document outlines a project for building a digital clock using an Arduino UNO, featuring a 4-digit display for hours and minutes and a 2-digit display for seconds. It details the components used, software requirements, and the functioning of the clock, including timekeeping, display multiplexing, and user input through buttons. The project serves as an educational tool for understanding microcontroller applications and can be expanded for practical uses such as alarm clocks or timers.

Uploaded by

dashritikesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views4 pages

Arduino Digital Clock Project

This document outlines a project for building a digital clock using an Arduino UNO, featuring a 4-digit display for hours and minutes and a 2-digit display for seconds. It details the components used, software requirements, and the functioning of the clock, including timekeeping, display multiplexing, and user input through buttons. The project serves as an educational tool for understanding microcontroller applications and can be expanded for practical uses such as alarm clocks or timers.

Uploaded by

dashritikesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Digital Clock Using Arduino with 4-Digit

and 2-Digit 7-Segment Displays


1. Introduction

Time is one of the most essential parameters in day-to-day life, and digital clocks are one of
the most common applications of microcontrollers. In this project, I have built a digital clock
using Arduino UNO that displays the current hours, minutes, and seconds on two 7-segment
display modules:

- A 4-digit display to show hours and minutes (HH:MM)


- A 2-digit display to show seconds (SS)

This project gives practical exposure to working with 7-segment displays, multiplexing
techniques, and button-based user input for setting time manually.

2. Components Used

Component Quantity Description

Arduino UNO 1 Main microcontroller for


logic control

4-Digit 7-Segment Display 1 Common cathode display


for hours and minutes

2-Digit 7-Segment Display 1 Common cathode display


for seconds

Push Buttons 2 To set hour and minute


3. Software Used

Proteus 7 Microcontroller simulation, Schematic


electronic design automation, PCB layout

Arduino IDE Writing, compiling, and uploading the code

Arduino Libraries No external libraries used; only basic


Arduino functions

4. Manual Calculation
The digital clock uses the Arduino's internal timing function `millis()` which returns the
number of milliseconds since the board started running the program.

To count 1 second:
- 1 second = 1000 milliseconds
- When `millis() - prevMillis >= 1000`, one second has passed.
- We then increment the seconds variable and update the display.

Display Multiplexing:
- The 6 digits are multiplexed using a small delay (about 2ms per digit).
- Total cycle = 6 digits × 2ms = 12ms per full refresh cycle.
- Approximate refresh rate = 1000ms / 12ms ≈ 83 cycles per second.
- This is fast enough that the human eye perceives all digits as continuously ON.

5. Observation
After uploading the code and wiring the circuit correctly:

- The display shows the current time in HH:MM:SS format.


- The seconds count automatically increases every second.
- Pressing the hour button increases the hour value correctly (0 to 23).
- Pressing the minute button increases the minute value correctly (0 to 59).
- Pressing the seconds button resets the seconds to 0.
- The decimal point blinks between HH:MM and MM:SS every half second to mimic colons.
- All digits are visible without flickering, indicating correct multiplexing.

6. How It Works
This digital clock works by continuously updating and displaying time using the Arduino.
Here's how the system works:

Time Keeping
- The Arduino uses the millis() function to count real time.
- Every 1000 milliseconds (1 second), it increments the seconds counter.
- When seconds reach 60, it resets to 0 and increments minutes.
- Similarly, when minutes reach 60, hours is incremented, and wraps around after 24.
Multiplexing the Display :
- The 6 digits on the 7-segment displays are not all lit at the same time.
- Instead, the Arduino lights one digit at a time very quickly.
- This fast switching makes all digits appear to be ON simultaneously to the human eye.

Button Input :
- Three buttons are used:
- One to increase the hour
- One to increase the minute
- Buttons are connected with internal pull-up resistors and are active LOW (pressed =
LOW).

Blinking Colon Effect :


- The decimal point (DP) segment is used to simulate colons (:) between hours and minutes,
and between minutes and seconds.
- It blinks every half-second for a realistic clock effect.

5. Impacts of the Project


This project has several educational and practical benefits:

Educational Impact:
- Helps understand how microcontrollers interact with displays and inputs.
- Demonstrates multiplexing, a core concept in embedded systems.
- Introduces basic concepts of digital timekeeping and hardware control.

Practical Applications:
- Can be developed further into a fully functional alarm clock.
- Useful for making low-cost timer or display systems.
- Can be integrated with RTC modules for long-term accuracy.

6. Conclusion
This Arduino-based digital clock project demonstrates the use of 7-segment displays for
building real-time systems. The use of a 4-digit and 2-digit display provides a clear and
efficient way to display HH:MM:SS. The project also showcases important embedded
concepts like timing with millis(), display multiplexing, and manual user input with push
buttons. It is a strong foundation for learning digital electronics, and can be expanded with
features like alarms, RTC modules, or brightness control.

You might also like