Jaymish Pankhaniya
Published © GPL3+

Wire Fault Detector

The project is intended to detect the location of fault in underground cable lines from the base station to exact location in kilometers.

EasyProtip5 hours46
Wire Fault Detector

Things used in this project

Hardware components

RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Texas Instruments ULN2003A
×1
5 mm LED: Red
5 mm LED: Red
1 Red, 1 Yellow, 1 Green
×3
Amazon Web Services 12V Relay
×3
Resistor 10k ohm
Resistor 10k ohm
×5
Resistor 1k ohm
Resistor 1k ohm
×20
Amazon Web Services 5V Adapter
×1
Amazon Web Services 12V ada
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Mastech MS8217 Autorange Digital Multimeter
Digilent Mastech MS8217 Autorange Digital Multimeter

Story

Read more

Schematics

Schematic Diagram

Code

Arduino UNO Coding

Arduino
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

// define phase control pins
int phase[3] = {7, 8, 9};

//*********************************************************
int distance(int inputVoltage) {
  if (inputVoltage >= 890 && inputVoltage < 920) {
    return 8;
  }
  else if (inputVoltage >= 850 && inputVoltage < 890) {
    return 6;
  }
  else if (inputVoltage >= 750 && inputVoltage < 850) {
    return 4;
  }
  else if (inputVoltage >= 600 && inputVoltage < 750) {
    return 2;
  }

  else return 0 ;

}
//*********************************************************

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);

  // set pin mode for phase relays
  for (int j = 0; j < 3; j++) {
    pinMode(phase[j], OUTPUT);
  }

}

void loop() {
  digitalWrite(phase[0], HIGH);
  delay(500);
  int dist1 = distance(analogRead(A0));
  if (dist1 == 0) {
    lcd.setCursor(0, 0);
    lcd.write("R: ");
    lcd.setCursor(3, 0);
    lcd.write("NF   ");
  }
  else {
    lcd.setCursor(0, 0);
    lcd.write("R: ");
    lcd.setCursor(3, 0);
    lcd.print(dist1);
    lcd.setCursor(4, 0);
    lcd.write(" KM");
  }
  digitalWrite(phase[0], LOW);
  //================================================
  digitalWrite(phase[1], HIGH);
  delay(500);
  int dist2 = distance(analogRead(A0));
  if (dist2 == 0) {
    lcd.setCursor(8, 0);
    lcd.write("Y: ");
    lcd.setCursor(11, 0);
    lcd.write("NF   ");
  }
  else {
    lcd.setCursor(8, 0);
    lcd.write("Y: ");
    lcd.setCursor(11, 0);
    lcd.print(dist2);
    lcd.setCursor(12, 0);
    lcd.write(" KM");
  }
  digitalWrite(phase[1], LOW);
  //=================================================
  digitalWrite(phase[2], HIGH);
  delay(500);
  int dist3 = distance(analogRead(A0));
  if (dist3 == 0) {
    lcd.setCursor(0, 1);
    lcd.write("G: ");
    lcd.setCursor(3, 1);
    lcd.write("NF   ");
  }
  else {
    lcd.setCursor(0, 1);
    lcd.write("G: ");
    lcd.setCursor(3, 1);
    lcd.print(dist3);
    lcd.setCursor(4, 1);
    lcd.write(" KM");
  }
  digitalWrite(phase[2], LOW);
}

Credits

Jaymish Pankhaniya

Jaymish Pankhaniya

0 projects • 0 followers

Comments

Add projectSign up / Login