Stopwatch Using Arduino & LCD with Start, Stop & Reset Button

Stopwatch Using Arduino & LCD (Last Updated On: February 22, 2019)

Stopwatch Using Arduino & LCD Display:

In this project we have designed Simple Stopwatch Using Arduino & LCD with Start, Stop & Reset Button. A stopwatch will always have 2 buttons or modes, a start and a stop mode. It may have other features but it will always have these. Additionally we have added reset function too. This can be done with pressing reset button of Arduino.

The milliseconds feature of Arduino Code allows the Arduino to display the functions up to the value in milliseconds to 100% accuracy.


Components Required:

We just need few of these components to assemble the circuit as given below.

1. Arduino UNO Board (Buy Online from Amazon)
2. 16*2 LCD Display (Buy Online from Amazon)
3. Push Buttons - 2
4. Breadboard 
5. Connect jumpers wires




Circuit Diagram & Connections:

Assemble the circuit as shown in the figure below and make the following connections.

Stopwatch Using Arduino & LCD

Connect Pin no 4,6,11,12,13,14 of LCD to Pin no 7,6,5,4,3,2 of Arduino.

Connect the two push buttons to digital pin 8 and 9 of Arduino.


Working & Operations:

Once the code is uploaded to Arduino Board, it will display press start. So just press the start button and then the time elapsing starts. To stop the time elapsed just press the another button, i.e Stop button. Hence the stopwatch will stop. Now if you want to reset the circuit, then simply press the reset button of Arduino UNO Board.

Stopwatch Using Arduino & LCD

Stopwatch Using Arduino & LCD


Source Code/Program:

Here is the code for Stopwatch Using Arduino & LCD Display. Copy it and upload to your Arduino UNO Board.

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

void setup()
{
lcd.begin(16, 2);
lcd.clear();

Serial.begin(9600);

pinMode(8, INPUT);
digitalWrite(8, HIGH);
pinMode(9, INPUT);
digitalWrite(9, HIGH);
}
double i = 0;
double a = millis();
double c ;

void loop()
{
lcd.clear();
lcd.print("press start");
delay(100);

if(digitalRead(8) == LOW)
{

lcd.clear();
a = millis();
while(digitalRead(9) == HIGH)
{

c = millis();
i = (c - a) / 1000;
lcd.print(i);
lcd.setCursor(7,0);
lcd.print("Sec's");
lcd.setCursor(0,0);
Serial.println(c);
Serial.println(a);
Serial.println(i);
Serial.println("......");
delay(100);
}

if(digitalRead(9) == LOW)
{
while(digitalRead(8) == HIGH)
{
lcd.setCursor(0,0);
lcd.print(i);
lcd.setCursor(11,0);
lcd.print("");
lcd.setCursor(0,0);
delay(100);
}
}
}
}

Video Demonstration:

Recommended For You

Ask A Question .......

Close