ahmad-abumurad
Published © GPL3+

Delay timer for faults protection

It is a timer that measures the delay time required for protection before the relay trips

IntermediateFull instructions provided253
Delay timer for faults protection

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
LDR, 5 Mohm
LDR, 5 Mohm
×1
I2C 16x2 Arduino LCD Display Module
DFRobot I2C 16x2 Arduino LCD Display Module
×1
Resistor 1k ohm
Resistor 1k ohm
×3
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Story

Read more

Schematics

un_TjG3L2kC19.png

Code

Untitled file

Arduino
#include "timer.h"
  #include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);

int x = 0;

Timer timer;

void setup()
{  
  lcd.init();
  lcd.backlight();
  lcd.print("Dr-Ayman Quraan");
  delay(250);
  lcd.setCursor(0,1);  
  lcd.print("Eng.Moh Alawneh");
  delay(1100);
  lcd.clear();
  lcd.begin(16,2);
  lcd.print("Eng. ");
  lcd.setCursor(0,1);
  lcd.print("Ahmad AbuMurad");
  delay(1100);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Press Test Start ");

   
     // timer.start();
}

void loop()
{
     if (analogRead(A0)>20){
          //start the timer
          if (x == 0) {
            lcd.clear();
            lcd.print("Delay Time Is ");
              timer.start();
              x++;
          }

          
          long m=timer.getElapsedTime();
          
          lcd.setCursor(4,1);
         
          lcd.println(m/1000);
          
          lcd.println(m%1000);
          timer.update();
     }
}

Credits

ahmad-abumurad
0 projects • 0 followers

Comments