0% found this document useful (0 votes)
13 views8 pages

Train Track Crack Alert System

1. The document describes a circuit diagram for an Arduino-based home security system with two infrared sensors, an alarm, relay, LCD display, and power supply. 2. The circuit uses an Arduino Uno microcontroller board connected to two infrared sensors to detect motion, an alarm, relay to control external devices, and a 16x2 LCD display to show system status. 3. Power is supplied to the system from a 5V power supply and distributed through the Arduino board to the various components including the sensors, alarm, relay, and LCD display.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views8 pages

Train Track Crack Alert System

1. The document describes a circuit diagram for an Arduino-based home security system with two infrared sensors, an alarm, relay, LCD display, and power supply. 2. The circuit uses an Arduino Uno microcontroller board connected to two infrared sensors to detect motion, an alarm, relay to control external devices, and a 16x2 LCD display to show system status. 3. Power is supplied to the system from a 5V power supply and distributed through the Arduino board to the various components including the sensors, alarm, relay, and LCD display.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BLOCKDIAGRAM:

POWER SUPPLY

IR ALARM

SEN1

R RELAY

U
IR I
DC
SEN2 N
MOTORS
O

U 16x2

N LCD DISPLAY

O
CIRCUIT DIAGRAM:
VCC

10uf
IOREF 13 ALARM
SW1 1
GND
5K 2
VCC
RESET 12 RELAY
3
VEE
4
RST 10 RS
3.3V 11 5
EN PIN GND RW
6
11 EN
5V 10 8.2K 7
VCC RS PIN D0
8
9 D1
GND .
9
D2
4.7K 10
D3
GND GND 8
. GND 4
11
D4
ARDUINO UNO R3 5
12
D5
Vin 7 13
D7 6 D6
14
VCC 7 D7
A0 6
SEN1 D6 GND GND
5 LS1
SEN2 A1 D5 J2
VCC VCC

1N4007
4 2 5
A2 D4 1 3
3 4
A3 . 1
2 LOAD 2
A4 .
10K VCC
1K
A5 1 TXD TXD RELAY
PIN12

8
0 BC109
RXD RXD
3
+
1
2 A0A
GND -
IR SEN1
LM358

4
1

BRIDGE RECTIFIER

VCC
J2 7805REGULATOR
2 2 - + 4 1 3
GND

1 VIN VOUT

220 ohms
1000uf

BATTERY 10K VCC


2

104pf ALARM
3

33pf 13TH PIN

8
LED
3
+
VCC 1
33pf 2 A0A
-
XTAL-1 IRSEN2
12 MHz LM358

4
33pf CRY STAL

GND

GND

GND
CODE:

#include<LiquidCrystal.h>

LiquidCrystal lcd(10, 11, 4, 5, 6, 7);

int sen1 = 14;

int sen2 = 15;

int relay = 12;

//unsigned long int duration = 0;

int BUZZ = 13; //Connect LED 2 To Pin #7 ///////buzzer

/////////////////////////////////////////////////////////

void setup()

[Link](16, 2);

[Link](9600);

[Link](9600);
pinMode(BUZZ, OUTPUT);

pinMode(relay, OUTPUT);

pinMode(sen1,INPUT);

pinMode(sen2,INPUT);

digitalWrite(BUZZ,LOW);

digitalWrite(relay,LOW);

//digitalWrite(relay1,LOW);

[Link](16,2);

[Link](0,0);

[Link]("TRAIN TRACK CRACK ");

[Link](0,1);
[Link]("ALERT SYSTEM ");

delay (3000);

[Link]();

delay(2000);

digitalWrite(relay,HIGH);

[Link]();

///////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////

void loop()

[Link](16,2);

[Link](0,0);
[Link]("TRAIN TRACK CRACK ");

[Link](0,1);

[Link]("ALERT SYSTEM ");

delay (100);

if ((digitalRead(sen1)==1))

//distance1 =0;

[Link]();

digitalWrite(BUZZ,HIGH);

digitalWrite(relay,LOW);

[Link](0,0);[Link]("TRACK DAMAGED ");


[Link](0,1);[Link]("TRAIN STOPS ");

delay(2000);

delay(5000);//delay(5000);
digitalWrite(BUZZ,LOW);

delay(1000);

//while(1);

if ((digitalRead(sen2)==1))

//distance1 =0;

[Link]();

digitalWrite(BUZZ,HIGH);

digitalWrite(relay,LOW);

[Link](0,0);[Link]("TRACK DAMAGED ");


[Link](0,1);[Link]("TRAIN STOPS ");

delay(2000);
delay(5000);//delay(5000);

digitalWrite(BUZZ,LOW);

delay(1000);

//while(1);

//goto st;

//delay(10);

/////////////////////////////////////////////////////////////

You might also like