4 Digit 7-Segment Timer With Reset Button

Introduction: 4 Digit 7-Segment Timer With Reset Button

This Instructable will teach you how to create a countdown timer using a 4 Digit 7-Segment Display that can reset with a button.

Included in this Instructable is the required materials, the correct wiring, and a downloadable file of the code that was to program the function of the 4 Digit 7-Segment Display.

Step 1: Required Materials

To create the 4 Digit 7-Segment Display timer, you will need the following:

  • 4 Digit 7-Segment Display
    • The model used was 5641AS
  • 14 Wires
    • 11 wires are used to connect the 4 Digit 7-Segment Display to the Arduino
    • 2 wires are used to connect the Push Button to the Arduino
    • 1 wire was left as a spare for the option to include decimal points on your 4 Digit 7-Segment Display
  • Arduino Uno with its Connection Cable
  • Push Button

Step 2: Identifying the LED's of the 4 Digit 7-Segement Display

To help wire the 4 Digit 7-Segment Display, I first identified the pins of the 4 Digit 7-Segment Display and what they control.

After identifying the pins of the 4 Digit 7-Segment Display, I created my own schematic to decide how I was going to Wire the Arduino to the 4 Digit 7-Segment Display. Adding onto that, I made a chart to help identify the 4 Digit 7-Segment Display pin, its function, and what that pin was connected to on the Arduino.

Step 3: Wiring the 4 Digit 7-Segment Display and Push Button to Arduino

After placing the 4 Digit 7-Segement and Push Button on your Breadboard, the first step is to wire the 4 different digit pins to the first four pins to the Arduino as the chart says.

After this, continue to wire the remaining 4 Digit 7-Segment Display pins to the Arduino as the chart suggests. To make it easier for myself, I started with wiring the Digit Pins then finished with the individual light segments as the addition of those wires becomes messy.

Next, the remaining pins of the Arduino (13 and 5), will be used to wire the Push Button. These wires will be on the same side of the button.

Step 4: Writing the Code

Attached to this step of the Instructable is the code I used to program the 4 Digit 7-Segment Display.

This code highlights the previous step with identifying the pins of the 4 Digit 7-Segment Display, their function, and where they are wired on the Arduino.

Also, parts of the code highlight the areas that can be modified to change the starting time being counted down, as well as the time that the button restarts to after the button is pressed.

Reminder: 1 second = 1000

Step 5: Watch It Work

With the correct wiring and downloaded code, the timer will work.

Attached is a video of the 4 Digit 7-Segment display working. Whenever the button is pressed, all four digits will display a '0'.

2 People Made This Project!

Recommendations

  • Make it Glow Contest

    Make it Glow Contest
  • First Time Author Contest

    First Time Author Contest
  • PCB Challenge

    PCB Challenge

7 Discussions

1
HanrongR
HanrongR

2 years ago

Hi, I'm having trouble doing the countdown, everything lights up and it doesnt display 0000 but 8888.
I am unable to download your video too.

0
LED pencil
LED pencil

Reply 9 months ago

Did you double check your wiring?

0
AiJie
AiJie

Reply 1 year ago

Yeah, same for me as well...

0
mamtaza
mamtaza

Reply 2 years ago

same here

0
LED pencil
LED pencil

9 months ago

What if I only want minutes and seconds? I'm trying to make a timer that counts down from 3 minutes.

0
SethM69
SethM69

Question 2 years ago

Nice project. I am looking to use this as a counter (I changed the n-- to n++). My question: Is there a way to make the button stop the timer and post the time?