Professional Documents
Culture Documents
"Countdown Timer With Reset Button and Potentiometer": Divine Word College of Laoag
"Countdown Timer With Reset Button and Potentiometer": Divine Word College of Laoag
"Countdown Timer With Reset Button and Potentiometer": Divine Word College of Laoag
Under
Microproccesor System
Submitted by:
Raymund Layugan
Submitted to:
INTRODUCTION
1
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
A basic mechanical countdown timer is usually very easy to use. The user manually sets
the countdown timer to indicate the amount of time that needs to be counted down and turns it
on. These types of timers are very useful for baking, when some dishes require timing so that
you can keep track of them. Simple electronic countdown timers are designed to be used again
and again in the same way: the user opens the program that runs the countdown timer, enters the
necessary information, and starts it running.
Timers were originally designed to fulfill a need in industry for a means of keeping time
on certain devices. Originally, these timers were mechanical devices and used clockwork
mechanisms as a means of keeping a regular time (Timer, 2006). The invention of two
electromechanical timer designs allowed for more precise time measurement. The first uses the
principle of heat expansion to increase the temperature of a metal finger made of two different
metals with differing rates of thermal expansion (Timer, 2006). As electric current flows through
the metal, it begins to heat and one side expands more quickly than the other which, in turn,
moves the electrical contact away from an electrical switch contact. The second uses a small AC
motor which turns at a predetermined rate due to the application of an alternating current (Timer,
2006). Finally, digital timers were invented. Digital logic circuits are now so cheap that it has
become a better investment to buy a digital timer than a mechanical or electromechanical timer.
Individual timers are implemented with single chip circuits, similar to a watch (Timer, 2006).
MATERIALS
ARDUINO UNO
2 DIGITS 7 SEGMENT DISPLAY LED
POTENTIOMETER
PUSHBUTTON
2
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
PROCEDURE
DIAGRAM
3
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
FLOWCHART
START
SET TIME
4
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
BEGIN COUNTDOWN
DID THE
COUNTDOW
N REACHED
ZERO?
YES
YES
RESET
TIME?
PLUG OUT
SUPPLY?
YES
END
MECHANISM
Connect to the power supply and it will automatically run the timer. The potentiometer is used as
a time setter for the time duration. If the push button is tapped, the time automatically resets to
the declared time by the potentiometer.
CODE
5
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
char no[10]={
0b0111111, //number 0
0b0000110, //number 1
0b1011011, //number 2
0b1001111, //number 3
0b1100110, //number 4
0b1101101, //number 5
0b1111101, //number 6
0b0000111, //number 7
0b1111111, //number 8
0b1101111, //number 9
};
6
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
digitalWrite(digit1, HIGH);
digitalWrite(digit2, HIGH);
number(no[w]);
digitalWrite(digit1, LOW);
digitalWrite(digit2, HIGH);
delay(3);
digitalWrite(digit1, HIGH);
digitalWrite(digit2, HIGH);
number(no[x]);
digitalWrite(digit1, HIGH);
digitalWrite(digit2, LOW);
delay(3);
void setup(){
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c, OUTPUT);
pinMode(d, OUTPUT);
pinMode(e, OUTPUT);
pinMode(f, OUTPUT);
pinMode(g, OUTPUT);
7
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
pinMode(digit1, OUTPUT);
pinMode(digit2, OUTPUT);
pinMode(pot, INPUT);
pinMode(number, INPUT);
void loop(){
hit=analogRead(pot);
//hit=constrain(hit, 99,0);
int s1=hit/10;
int s2=hit%10;
puluhan(s1);
unit(s2);
int start=digitalRead(start);
if
for (unsigned long elapsed=0; elapsed < 800; elapsed = millis() - startTime) {
int d1=count/10;
int d2=count%10;
8
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
puluhan(d1);
unit(d2);
DOCUMENTARY
9
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
TABULATION OF EXPENSESPOTENTIOMETER
MATERIALS COST
7 PCS PUSHBUTTON 70
POTENTIOMETER 78
10
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECHTURE
General Segundo Avenue, Laoag City, 2900 Philippines
_________________________________________________________________________________________________________________________________________
REFERENCES
- https://www.tinkercad.com/things/dvHLs4lWDQA-copy-of-copy-of-countdown-timer/
editel?tenant=circuits
- https://www.tinkercad.com/things/ezPkE3y7O0L-copy-of-timer-dengan-button-
stopwatch/editel?tenant=circuits
11