Easy Countdown With Buzzer

About the project

How to make an easy and adaptable countdown.

Project info

Difficulty: Easy

Platforms: ArduinoSparkFun

Estimated time: 2 hours

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

MINI 7-SEGMENT COMMON CATHODE MINI 7-SEGMENT COMMON CATHODE x 1
Resistor Network - 10K Ohm (6-pin bussed) Resistor Network - 10K Ohm (6-pin bussed) x 5
Resistor Network - 10K Ohm (6-pin bussed) Resistor Network - 10K Ohm (6-pin bussed) x 7
Momentary Pushbutton Switch - 12mm Square Momentary Pushbutton Switch - 12mm Square x 3
RedBot Buzzer Buzzer RedBot Buzzer Buzzer x 1
Transistor NPN (2N3904) Transistor NPN (2N3904) x 2
Genuino Uno Rev3 Genuino Uno Rev3 x 1
Tiny Breadboard Tiny Breadboard x 1

View all

Story

Countdown Timer.

This project consists in an easy countdown with three buttons and a buzzer. I wanted to do this because often I need a countdown for different things, so I ask myself: "Why don't I build one?"

In this project there are three buttons:

  • The first button sets the time. 
  • The second button starts up the countdown.
  • The third button reset the time.

Technique of the Multiplexer.

I use the technique of the Multiplexer to display the numbers. The two displays are connected by connecting together the segments identified by the same letter. The correct view of the digit is available by activating one at a time the display. The command on each display saturates the transistor so turns on the display.

The user doesn't see one display at time but the whole digit. This is possible because the human eye fix what he sees for 25 ms, but all the cycle lasts less than 25 ms, so the two images are fix in the retina.

Unsigned long

I have used an unsigned long variable for not having 'overflowing' problems. This variable doesn't contains negative numbers and goes from 0 to 4,294,967,295.

With an 'int' variable, I would had only 32 seconds before overflowing. But with an unsigned long the problem is solved.

int

 -32,768 to 32,767
32,767 * 1ms → 32 seconds

unsigned long

4,294,967,295 * 1ms→ 4,294,967 seconds →71,582 minutes → 1,193 hours → 49 days.

Then, 49 days must pass before overflowing.

caption (optional)

Schematics, diagrams and documents

layout.jpg

connection diagram

CAD, enclosures and custom parts

Countdown

Go to download

Code

Countdown

Credits

Leave your feedback...