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
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'.