Professional Documents
Culture Documents
RAILWAY TRACK SECURITY SYSTEM DOCUMENTATION 23 (2) - For Merge
RAILWAY TRACK SECURITY SYSTEM DOCUMENTATION 23 (2) - For Merge
CHAPTER 1
OVERVIEW OF PROJECT
Railway track security system project is to avoid rail accidents by using latest
communication technologies.
Removing the jumpers result in driving transistors delivering a different logic to the
controller. An LCD and LED are also interfaced to the MC to display the track condition.
Thus the proposed model is designed to recognize the cracks in the railway tracks and
provides instant information to the concerned railway authorities.
CHAPTER 2
EMBEDDED SYSTEMS
2.1 INTRODUCTION
An Embedded system is a special-purpose system in which the computer is
completely encapsulated by or dedicated to the device or system it controls. Unlike a
general-purpose computer, such as a personal computer, an embedded system performs
one or a few predefined tasks, usually with very specific requirements. Since the system
is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost
of the product.
In terms of complexity embedded systems can range from very simple with a
single microcontroller chip, to very complex with multiple units, peripherals and
networks mounted inside a large chassis or enclosure
2.2 CHARACTERISTICS
• An embedded system is any computer system hidden inside a product other than a
computer.
• They will encounter a number of difficulties when writing embedded system
software in addition to those we encounter when we write applications
Throughput – Our system may need to handle a lot of data in a short
period of time.
Response–Our system may need to react to events quickly
Testability–Setting up equipment to test embedded software can be
difficult
Debugability–Without a screen or a keyboard, finding out what the
software is doing wrong (other than not working) is a troublesome
problem
Reliability – embedded systems must be able to handle any situation
without human intervention
Memory space – Memory is limited on embedded systems, and you must
make the software and the data fit into whatever memory exists
Program installation – you will need special tools to get your software into
embedded systems
Power consumption – Portable systems must run on battery power, and the
software in these systems must conserve power
Processor hogs – computing that requires large amounts of CPU time can
complicate the response problem
Example: Railway reservation system – takes a few extra seconds the data remains valid.
The operating system runs above the hardware, and the application software runs
above the operating system. The same architecture is applicable to any computer
including a desktop computer. However, there are significant differences. It is not
compulsory to have an operating system in every embedded system. For small appliances
such as remote control units, air conditioners, toys etc., there is no need for an operating
system and you can write only the software specific to that application. For applications
involving complex processing, it is advisable to have an operating system. In such a case,
you need to integrate the application software with the operating system and then transfer
the entire software on to the memory chip. Once the software is transferred to the
memory chip, the software will continue to run for a long time you don’t need to reload
new software
The details of the various building blocks of the hardware of an embedded system. As
shown in Fig. the building blocks are;
· Central Processing Unit (CPU)
· Memory (Read-only Memory and Random Access Memory)
· Input Devices
· Output devices
· Communication interfaces
.Application –specific circuitry
Read only Random
memory access
memory
Central processing
Input devices (CPU) Output devices
Application-
specific Communicati
circuitry on interfaces
2.6 HARDWARE
CENTRAL PROCESSING UNIT (CPU)
The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is
a low-cost processor. Its main attraction is that on the chip itself, there will be many other
components such as memory, serial communication interface, analog-to digital converter
etc. So, for small applications, a micro-controller is the best choice as the number of
external components required will be very less. On the other hand, microprocessors are
more powerful, but you need to use many external components with them. D5P is used
mainly for applications in which signal processing is involved such as audio and video
processing.
MEMORY
The memory is categorized as Random Access 11emory (RAM) and Read Only
Memory (ROM). The contents of the RAM will be erased if power is switched off to the
chip, whereas ROM retains the contents even if the power is switched off. So, the
firmware is stored in the ROM. When power is switched on, the processor reads the
ROM; the program is program is executed.
INPUT DEVICES
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the
embedded system is no easy task. Many embedded systems will have a small keypad-you
press one key to give a specific command. A keypad may be used to input only the digits.
Many embedded systems used in process control do not have any input device for user
interaction; they take inputs from sensors or transducers 1’fnd produce electrical signals
that are in turn fed to other systems.
OUTPUT DEVICES
The output devices of the embedded systems also have very limited capability.
Some embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the
health status of the system modules, or for visual indication of alarms. A small Liquid
Crystal Display (LCD) may also be used to display some important parameters.
2.7 SOFTWARE
COMMUNICATION INTERFACES
The embedded systems may need to, interact with other embedded systems at
they may have to transmit data to a desktop. To facilitate this, the embedded systems are
provided with one or a few communication interfaces such as RS232, RS422, RS485,
Universal Serial Bus (USB), and IEEE 1394, Ethernet etc.
APPLICATION-SPECIFIC CIRCUITRY
Sensors, transducers, special processing and control circuitry may be required fat
an embedded system, depending on its application. This circuitry interacts with the
processor to carry out the necessary work. The entire hardware has to be given power
supply either through the 230 volts main supply or through a battery. The hardware has to
design in such a way that the power consumption is minimized.
CHAPTER 3
HARDWARE DESCRIPTION
LCD DISPLAY
POWER SUPPLY
SUPPLYUPPLY
MICRO
INDICATOR-1
RED CONTROLLER TRACKCRACK
RED
SENSING
CIRCUIT
INDICATOR-2
GREEN
LED display of a TI-30 scientific calculator (ca. 1978), which uses plastic lenses
to increase the visible digit size Most LEDs were made in the very common 5 mm T1¾
and 3 mm T1 packages, but with rising power output, it has grown increasingly necessary
to shed excess heat to maintain reliability, so more complex packages have been adapted
for efficient heat dissipation. Packages for state-of-the-art high-power LEDs bear little
resemblance to early LEDs.
WORKING PRINCIPLE
A P-N junction can convert absorbed light energy into a proportional electric
current. The same process is reversed here (i.e. the P-N junction emits light when
electrical energy is applied to it). This phenomenon is generally
called electroluminescence, which can be defined as the emission of light from a semi-
conductor under the influence of an electric field. The charge carriers recombine in a
forward-biased P-N junction as the electrons cross from the N-region and recombine with
the holes existing in the P-region. Free electrons are in the conduction band of energy
levels, while holes are in the valence energy band. Thus the energy level of the holes will
be lesser than the energy levels of the electrons. Some portion of the energy must be
dissipated in order to recombine the electrons and the holes. This energy is emitted in the
form of heat and light.
The electrons dissipate energy in the form of heat for silicon and germanium
diodes but in gallium arsenide phosphide (GaAsP) and gallium phosphide (GaP)
semiconductors, the electrons dissipate energy by emitting photons. If the semiconductor
is translucent, the junction becomes the source of light as it is emitted, thus becoming a
light-emitting diode, but when the junction is reverse biased no light will be produced by
the LED and, if the potential is great enough, the device will be damaged.
3.3 LCD 16x2 ( Liquid Crystal Display)
LCD (Liquid Crystal Display) screen is an electronic display module and find a
wide range of applications. A 16x2 LCD display is very basic module and is very
commonly used in various devices and circuits. These modules are preferred over seven
segments and other multi segment LEDs. The reasons being: LCDs are economical;
easily programmable; have no limitation of displaying special & even custom characters ,
PIN DESCRIPTION
DEPARTMENT OF ECE, S.R.T.I.S.T Page 11
Railway Track Security System
7 DB0
8 DB1
9 DB2
10 DB3
8-bit data pins
11 DB4
12 DB5
13 DB6
14 DB7
WORKING PRINCIPLE
A 16x2 LCD means it can display 16 characters per line and there are 2 such
lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two
registers, namely, Command and Data. The command register stores the command
instructions given to the LCD. A command is an instruction given to LCD to do a
predefined task like initializing it, clearing its screen, setting the cursor position,
controlling display etc. The data register stores the data to be displayed on the LCD. The
data is the ASCII value of the character to be displayed on the LCD. Click to learn more
about internal structure of a LCD.
COMMANDS
Required components
S.No Component Name Quantity Ratings
4 Filter 1 1000uF
5 Filter 1 100uF
Step-Down Transformer
A transformer is an electrical device that transfers electrical energy
between two or more circuits through electromagnetic induction. Commonly,
transformers are used to increase or decrease the voltages of alternating current in
electric power applications.
BRIDGE RECTIFIER:
application and for any other technical guidance. A Bridge rectifier is an Alternating
Current (AC) to Direct Current (DC) converter that rectifies mains AC input to DC
output. Bridge Rectifiers are widely used in power supplies that provide necessary DC
voltage for the electronic components or devices. They can be constructed with four or
more diodes or any other controlled solid state switches.
Depending on the load current requirements, a proper bridge rectifier is selected.
Components’ ratings and specifications, breakdown voltage, temperature ranges,
transient current rating, forward current rating, mounting requirements and other
considerations are taken into account while selecting a rectifier power supply for an
appropriate electronic circuit’s application..A bridge rectifier circuit is a common part of
the electronic power supplies. Many electronic circuits require rectified DC power
supply for powering the various electronic basic components from available AC mains
supply. We can find this rectifier in a wide variety of electronic AC power devices like
home appliances, motor controllers, modulation process, welding applications, etc. The
main advantage of bridge rectifier is that it produces almost double the output voltage as
with the case of a full wave rectifier using center-tapped transformer. But this circuit
doesn’t need center tapped transformer so it resembles low-cost rectifier. The bridge
rectifier circuit diagram consists of various stages of devices like transformer, Diode
Bridge, filtering and regulators. Generally all these blocks combination is called
as regulated DC power supply that powers various electronic appliances.
7805:
A regulated power supply is very much essential for several electronic devices
due to the semiconductor material employed in them have a fixed rate of current as well
as voltage. The device may get damaged if there is any deviation from the fixed rate. The
AC power supply gets converted into constant DC by this circuit. By the help of a voltage
regulator DC, unregulated output will be fixed to a constant voltage. The circuit is made
up of linear voltage regulator 7805 along with capacitors and resistors with bridge
rectifier made up from diodes. From giving an unchanging voltage supply to building
confident that output reaches uninterrupted to the appliance, the diodes along with
capacitors handle elevated efficient signal conveyable.
CAPACITOR:
The rectifier diode supplies current to charge a reservoir capacitor on each cycle
of the input wave. The reservoir capacitor is large electrolytic, usually of several hundred
or even a thousand or more microfarads, especially in mains frequency PSUs. This very
large value of capacitance is required because the reservoir capacitor, when charged,
must provide enough DC to maintain a steady PSU output in the absence of an input
current; i.e. during the gaps between the positive half cycles when the rectifier is not
conducting.
CHAPTER 4
ARDUINO PROCESSOR
4.1 ARDUINO DESCRIPTION
• What is Arduinio?
• Why Arduino?
• How do I use Arduino?
Over the years Arduino has been the brain of thousands of projects, from
everyday objects to complex scientific instruments. A worldwide community of makers -
students, hobbyists, artists, programmers, and professionals - has gathered around this
open-source platform, their contributions have added up to an incredible amount of
accessible knowledge that can be of great help to novices and experts alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As
soon as it reached a wider community, the Arduino board started changing to adapt to
new needs and challenges, differentiating its offer from simple 8-bit boards to products
for IoT applications, wearable, 3D printing, and embedded environments. All Arduino
boards are completely open-source, empowering users to build them independently and
eventually adapt them to their particular needs. The software, too, is open-source, and it
is growing through the contributions of users worldwide.
There are many other microcontrollers and microcontroller platforms available for
physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's
Handyboard, and many others offer similar functionality. All of these tools take the
messy details of microcontroller programming and wrap it up in an easy-to-use package.
Arduino also simplifies the process of working with microcontrollers, but it offers some
advantage for teachers, students, and interested amateurs over other systems
Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers
can make their own version of the module, extending it and improving it. Even
relatively inexperienced users can build the breadboard version of the module in
order to understand how it works and save money.
Overview
5V
8-bit
16 MHz
AVR
4.2 OVERVIEW
Arduino/Genuine Uno is a microcontroller board based on the ATmega328P
(datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs),
6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP
header and a reset button. It contains everything needed to support the microcontroller;
simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter
or battery to get started.. You can tinker with your UNO without worring too much about
doing something wrong, worst case scenario you can replace the chip for a few dollars
and start over again.
"Uno" means one in Italian and was chosen to mark the release of Arduino
Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved to newer releases. The Uno board is the first
in a series of USB Arduino boards, and the reference model for the Arduino platform; for
an extensive list of current, past or outdated boards see the Arduino index of boards.
You can find here your board warranty information’s.
The Uno differs from all preceding boards in that it does not use the FTDI USB-
to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2up to version R2)
programmed as a USB-to-serial converter. Revision 2of the Uno board has a resistor
pulling the 8U2 HWB line to ground, making it easier to put into DFU mode. Revision
3of the board has the following new features:
1.0 pin out: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible both with the board
that uses the AVR, which operate with 5V and with the ArduinoDue, that operate with
3.3V. The second one is a not connected pin that is reserved for future purposes.
At mega 16U2 replace the 8U2. "Uno" means one in Italian and is named to mark the
upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions
of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards,
and the reference model for the Arduino platform; for a comparison with previous
versions, see the index of Arduino boards
SUMMERY
Schematic:
Arduino-uno-Rev3-schematic
Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models
use an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin
configuration is identical on all three processors.
Power:TheArduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB) power
can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be
connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads
from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than
7V, however, the 5V pin may supply less than five volts and the board may be unstable.
If using more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts. The power pins are as follows
VIN.The input voltage to the Arduino board when it's using an external power source
(as opposed to 5 volts from the USB connection or other regulated power source). You
can supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 -12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses
the regulator, and can damage your board. We don't advise it.
3V3.A 3.3 volt supply generated by the on-board regulator. Maximum current draw is
50 mA.
Memory The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has
2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the
EEPROM library). Input and Output Each of the 14 digital pins on the Uno can be used
as an input or output, using pin Mode (), digital Write (), and digital Read () functions.
They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an
internal pull-up resistor (disconnected by default) of 20-50 ohms. In addition, some pins
have specialized functions:
Serial: 0 (RX) and 1 (TX).Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-to-
TTL Serial chip.
PWM: 3, 5, 6, 9, 10, and 11.Provide 8-bit PWM output with the analog Write ()
function.
LED: 13.There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off. The Uno has 6 analog inputs, labeled
A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values).
By default they measure from ground to 5 volts, though is it possible to change the upper
end of their range using the AREF pin and the analog Reference
() function. Additionally, some pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library. There are a couple of other pins on the board:
DEPARTMENT OF ECE, S.R.T.I.S.T Page 23
Railway Track Security System
AREF.Reference voltage for the analog inputs. Used with analog Reference ().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board. See also the mapping between
Arduino pins and ATmega328 ports. The mapping for the Atmega8, 168, and 328 is
identical. Communication The Arduino Uno has a number of facilities for communicating
with a computer, another Arduino, or other microcontrollers.
4.4 PROGRAMMING
The Arduino Uno can be programmed with the Arduino software (download).
Select "Arduino Uno from the Tools > Board menu (according to the microcontroller on
your board). For details, see the reference and tutorials
The ATmega328 on the Arduino Uno comes pre burned with a boot loader that
allows you to upload new code to it without the use of an external hardware programmer.
It communicates using the original STK500 protocol (reference, C header files). You can
also bypass the boot loader and program the microcontroller through the ICSP (In-Circuit
Serial Programming) header; see these instructions for details. The ATmega16U2 (or
8U2 in the rev1 and rev2 boards) firmware source code is available. The
ATmega16U2/8U2 is loaded with a DFU boot loader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map
of Italy) and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode. You can then use Atmel's FLIP software
(Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware. Or
you can use the ISP header with an external programmer (overwriting the DFU boot
loader). See this user-contributed tutorial for more information.
USB Over current Protection TheArduino Uno has a resettable poly fuse that protects
your computer's USB ports from shorts and over current. Although most computers
provide their own internal protection, the fuse provides an extra layer of protection. If
more than 500 mA is applied to the USB port, the fuse will automatically break the
connection until the short or overload is removed.
This page is obsolete. You should instead see the Windows Howto or the Mac OS
X howto (both in the Arduino guide).
These are the steps you need to follow in order to be up and running:
1. Get an Arduino board
2. Download the Arduino environment
3. Install the USB drivers
4. Connect the board
5. Upload a program
Build your own board. If you want you can build your own PCB just by
downloading the CAD files from the Hardware page. Extract the .brd file and
send it to a PCB manufacturer. Be aware that manufacturing a single pcb will be
very expensive. It's better to get together with other people and make 20 or 30 at a
time. Since you get the full CAD files you can make your own customised version
of Arduino. if you make modifications or fix bugs please send us your changes!
o Purchase parts. purchase the parts from any electronics store. The Serial
version in particular has been designed to use the most basic parts that can
be found anywhere in the world. The USB version on the other hand
requires some advanced soldering
o Skills because of the FTDI chip that is ansmd part. Here is a list of parts
for the serial board.
Linux note: For help getting the Arduino IDE running on Debian, please see the FAQ
("How can I run the Arduino IDE under Linux?").
Mac OS X note: After downloading the IDE, run the macosx_setup.command. It corrects
permission on a few files for use with the serial port and will prompt you for your
password. You may need to reboot after running this script.
The latest version of the drivers can be found on the FTDI website.
On the USB boards, the power source is selected by the jumper between the USB
and power plugs. To power the board from the USB port (good for controlling low power
devices like LEDs), place the jumper on the two pins closest to the USB plug. To power
the board from an external power supply (needed for motors and other high current
devices), place the jumper on the two pins closest to the power plug. Either way, connect
the board to a USB port on your computer. On Windows, the Add New Hardware wizard
will open; tell it you want to specify the location to search for drivers and point to the
folder containing the USB drivers you unzipped in the previous step.
The power LED should go on.
5 .Upload a Program
Open the LED blink example sketch: File > Sketchbook > Examples >led_blink.
Here's what the code for the LED blink example looks like.
Select the serial device of the Arduino board from the Tools | Serial Port menu. On
Windows, this should be COM1 or COM2 for a serial Arduino board, or COM3, COM4,
or COM5 for a USB board. On the Mac, this should be something like /dev/cu.usbserial-
1B1 for a USB board, or something like /dev/cu.USA19QW1b1P1.1 if using a Keyspan
adapter with a serial board (other USB-to-serial adapters use different names).
Push the reset button on the board then click the Upload button in the IDE. Wait a few
seconds. If successful, the message "Done uploading." will appear in the status bar.
If the Arduino board doesn't show up in the Tools | Serial Port menu, or you get
an error while uploading, please see the FAQ for troubleshooting suggestions.
A few seconds after the upload finishes, you should see the amber (yellow) LED
on the board start to blink.
CHAPTER 5
SOFTWARE IMPLEMENTATION
5.1 DATA TYPES
You people have already come across the word “Data types” in C- Language.
Herealso the functionality and the meaning of the word is same except a small change in
the prefix of their labels. Now we will discuss some of the widely used data types for
embedded C- programming.
Unsigned char:
The unsigned char is an 8-bit data type that takes a value in the range of 0-255(00-
FFH). It is used in many situations, such as setting a counter value, where thereis no need
for signed data we should use the unsigned char instead of the signed char.Remember
that C compilers use the signed char as the default if we do not put the keyword .
Signed char:
The signed char is an 8-bit data type that uses the most significant bit (D7of D7-
D0) to represent the – or + values. As a result, we have only 7 bits for themagnitude of
the signed number, giving us values from -128 to +127. In situationswhere + and – are
needed to represent a given quantity such as temperature, the use ofthe signed char data
type is a must.
Unsigned int:
The unsigned int is a 16-bit data type that takes a value in the range of 0 to65535
(0000-FFFFH). It is also used to set counter values of more than 256. We mustuse the int
data type unless we have to. Since registers and memory are in 8-bit chunks,the misuse of
int variables will result in a larger hex file. To overcome this we can usethe unsigned char
in place of unsigned int.
Signed int:
Signed int is a 16-bit data type that uses the most significant bit (D15 of D15-D0)
to represent the – or + value. As a result we have only 15 bits for the magnitude ofthe
number or values from -32,768 to +32,767.
Sbit (single bit):
The sbit data type is widely used and designed specifically to access single bit
addressable registers. It allows access to the single bits of the SFR registers.
16. The next screen will be as shown in next page, and just maximize it by
double clicking on its blue boarder.
19. Now right click on Source group 1 and click on “Add files to Group Source”
20. Now you will get another window, on which by default “C” files will
appear.
21. Now select as per your file extension given while saving the file
23. Now Press function key F7 to compile. Any error will appear if so happen.
28. Drag the port a side and click in the program file.
29. Now keep Pressing function key “F11” slowly and observe.
30. You are running your program successfully.
CHAPTER 6
ADVANTAGES AND APPLICATIONS
6.1 ADVANTAGES:
6.2 APPLICATIONS:
Railway Departments
CHAPTER 7
RESULT, CONCLUTION AND FUTURE SCOPE
7.1 RESULT
Hence, we had designed a crack detection system for the security of railways to
avoid accidents.
7.2 CONCLUSION
The proposed Arduino based railway track security system has the potential for
detecting the cracks in the rail track including minor cracks automatically without any
human intervention. There are many advantages with the proposed system as compared
with traditional detection techniques. The advantages includes fast detect and reporting
system, less cost, low power consumption and less analysis time. Also the easy
availability of the components and the simplicity of idea make the proposed system ideal
for implementation on a large scale with very little initial investment. Therefore it can
work efficiently and effectively under working condition. By this proposed model, we
will easily avoids the accidents occurs by the track side crack which will help us for
saving many lives.
The crack detection system can be enhanced using Anti Collision Device (ACD)
is a self-acting microprocessor based data communication device designed and developed
by Konkan Railway (KR). The network of ACD system prevents high-speed head on
collision in mid-sections, station areas and at level-crossing gates, thereby saving the
lives of rail passengers and road users. This device can be integrated with the Anti-
Collision Device for better sophistication and optimization.
APPENDIX
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int ledPin = 9;
const int ledPin1 = 10;
const int ledPin2= 13;
const int buttonPin = 6;
const int buttonPin1 = 7;
const int buttonPin2= 8;
int buttonState = 0;
int buttonState1 = 0;
int buttonState2= 0;
void setup()
{
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("...WELCOME TO...");
lcd.setCursor(0,1);
lcd.print("...PROJECT...");
delay(4000);
pinMode(buttonPin, INPUT);
pinMode(buttonPin1, INPUT);
pinMode(buttonPin2, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
}
void loop()
{
buttonState = digitalRead(buttonPin);
buttonState1 = digitalRead(buttonPin1);
buttonState2 = digitalRead(buttonPin2);
if (buttonState == HIGH&&buttonState1== LOW&&buttonState2== LOW)
{
// turn LED on:
digitalWrite(ledPin,LOW);
digitalWrite(ledPin1,LOW);
lcd.clear();
delay(1000);
lcd.setCursor(0, 0);
lcd.print(".FAULT DETECTED");
lcd.setCursor(0,1);
lcd.print(".AT STAGE-1.");
delay(1000);
}
else if (buttonState == HIGH&&buttonState1== HIGH&&buttonState2== LOW)
{
digitalWrite(ledPin,HIGH);
digitalWrite(ledPin1,LOW);
lcd.clear();
delay(1000);
lcd.setCursor(0,0);
lcd.print(".FAULT DETECTED");
lcd.setCursor(0,1);
lcd.print(".AT STAGE-2.");
delay(1000);
}
else if(buttonState == HIGH&&buttonState1== HIGH&&buttonState2== HIGH)
{
digitalWrite(ledPin,HIGH);
digitalWrite(ledPin1,HIGH);
lcd.clear();
delay(1000);
lcd.setCursor(0, 0);
lcd.print(".FAULT ");
lcd.setCursor(0,1);
lcd.print(".NOT DETECTED.");
delay(1000);
}
}
BIBLIOGRAPHY
References
www.atmel.databook.com
www.keil.com
www.mitel.datbook.com