Railway Track Crack Detection

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 31

RAILWAY TRACK CRACK DETECTION

USING ARDUINO

ABSTRACT

Nowadays the railway department facing in railway track problem. But In


this project, we are using the sensor to monitoring the railway track. If it’s
any crack on the track means the IR sensor finds and sending to the
microcontroller the controller transmitted the data’s through Lora
communication to the receiver part. Lora communication means two types of
section’s one is the transmitter and receiver part. Lora is a bidirectional
device. Automatically IR sensor and ultrasonic sensor using to find the crack
and obstacle detection then data’s are transmitted through the Lora
transmitter. Another end we having the receiver part of Lora that the receiver
receives the data’s and it sends to the microcontroller. This system we added
the buzzer if any abnormal value is received by the transmitter buzzer will
make alert.
TABLE OF CONTENTS

1.Introduction Pg.no:8-9

1.1 Motivation

1.2 Proposed System

1.3 Scope

1.4 Objective

2.Basic Definitions Pg.no:10-33

2.1 Digital image Processing

2.2Image Acquisition

2.3 Image Enhancement

2.4 Image Restoration

2.5 Colour image processing

2.6 Segmentation
2.7 Image compression

2.8 Classification of images

3. Existing System Pg.no:34-36

3.1 Pre processing

3.2 Back ground subtraction

4. Software used Pg.no:36-48

4.1 Python Introduction

4.2 Execution

5. Result Pg.no:49-52

6. Conclusion Pg.no:52

7. References Pg.no:53
RAILWAY TRACK CRACK DETECTION
USING ARDUINO

1. INTRODUCTION

Railway transportation is one of the most commonly used means of transportation


throughout the world. Structural integrity of the rail tracks is of paramount
importance in order to avoid accidents. Structural health monitoring (SHM) refers
to the process of determining and detecting damage in engineering structures such
as buildings, bridges and railway tracks. Once a structure has been observed over
time using a combination of sensor nodes, meaningful data can be extracted from
the collected sensor data. This helps in determining the health condition of the
structure, and ultimately it assists in avoiding disasters related to the structural
health. track monitoring system that includes various sensors, which monitor
variations and vibrations in the track. Cracks being a defect, can cause the normal
strain response of a structure to vary [7]. These variations can be measured by
using piezo sensors and strain gauge sensor. Data acquired by these sensors is used
for railway track monitoring. A smart phone application has also been developed
and integrated with the system to provide remote monitoring.

1.1 MOTIVATION
At present our Indian Railway System mostly use manual detection of
cracks at the railways which is time consuming and inaccurate. In recent
days various new systems are evolved which use robust technologies such
as LED-LDR, Raspberry Pi, Eddy Currents etc which have their own
drawbacks. This proposed system is used to overcome these drawbacks.
1.2 SCOPE

The complete railway track cannot be managed and handled by a single system
setup.So,multiple setups are required.

1.3 OBJECTIVE

To build a iot based application for detecting the crack.Besides crack detection
this also aims at detecting obstacles present on the railway track in order to
prevent railway accidents. Reduce the need of manpower.Provides real time
monitoring of and detection of any crack or objects on railway tracks and incase
of detection sends information with the location to the receiver side using gps
module via gsm.

1.4 PROPOSED SYSTEM

Proposed system is implemented in embedded C with an objective to detect the


cracks on the railway tracks using IR Sensor,UV sensor,Aurdino Uno,LouRa.The
main ste[ps that are considered are:

 Track sensing using sensors


 Information transfer through LauRa
 Activation of Buzzer Alarm.
2.BLOCK DIAGRAM

2.1 OPERATION

In this project, we are used two Arduino Uno, IR sensor, and Ultrasonic
sensor this is using to find the crack and obstacle detection if any abnormal
condition will happen means the receiver side buzzer will blow
3.BASIC DEFINITIONS

HARDWARE COMPONENTS

3.1 ARDUINO
BASIC ARDUINO:

setup( ): A function present in every Arduino sketch. Run once before the loop(
) function. Often used to set pinmode to input or output. The setup( ) function
looks like:

void setup( ){

//code goes here

loop( ): A function present in every single Arduino sketch. This code happens
over and over again. The loop( ) is where (almost) everything happens. The one
exception to this is setup( ) and variable declaration. ModKit uses another type of loop
called “forever( )” which executes over Serial. The loop( ) function looks like:

void loop( ) {

//code goes here

input: A pin mode that intakes information.

output: A pin mode that sends information.


HIGH: Electrical signal present (5V for Uno). Also ON or True in boolean
logic.

LOW: No electrical signal present (0V). Also OFF or False in boolean logic.

digitalRead: Get a HIGH or LOW reading from a pin already declared as an


input.

digitalWrite: Assign a HIGH or LOW value to a pin already declared as an


output.

analogRead: Get a value between or including 0 (LOW) and 1023 (HIGH).


This allows you to get readings from analog sensors or interfaces that have more than
two states.

analogWrite: Assign a value between or including 0 (LOW) and 255 (HIGH).


This allows you to set output to a PWM value instead of just HIGH or LOW.

PWM: Stands for Pulse-Width Modulation, a method of emulating an analog


signal through a digital pin. A value between or including 0 and 255. Used with
analogWrite.
These boards below use the same micro-controller, just in a different
package. The Lilypad is designed for use with conductive thread instead of wire
and the Arduino Mini is simply a smaller package without the USB, Barrel Jack
and Power Outs.

It depends on what you want to do with it really. There are two different purposes
outlined above for the voltage divider, we will go over both.

If you wish to use the voltage divider as a sensor reading device first you need to
know the maximum voltage allowed by the analog inputs you are using to read the signal.
On an Arduino this is 5V. So, already we know the maximum value we need for Vout.
The Vin is simply the amount of voltage already present on the circuit before it reaches
the first resistor. You should be able to find the maximum voltage your sensor outputs by
looking on the Datasheet, this is the maximum amount of voltage your sensor will let
through given the voltage in of your circuit. Now we have exactly one variable left, the
value of the second resistor. Solve for R2 and you will have all the components of your
voltage divider figured out! We solve for R1's highest value because a smaller resistor
will simply give us a smaller signal which will be readable by our analog inputs.

Powering an analog Reference is exactly the same as reading a sensor except you
have to calculate for the Voltage Out value you want to use as the analog Reference.

All of the electrical signals that the Arduino works with are either Analog or
Digital. It is extremely important to understand the difference between these two types of
signal and how to manipulate the information these signals represent.

DIGITAL

An electronic signal transmitted as binary code that can be either the presence or absence
of current, high and low voltages or short pulses at a particular frequency.

Humans perceive the world in analog, but robots, computers and circuits use
Digital. A digital signal is a signal that has only two states. These states can vary
depending on the signal, but simply defined the states are ON or OFF, never in between.

In the world of Arduino, Digital signals are used for everything with the exception
of Analog Input. Depending on the voltage of the Arduino the ON or HIGH of the Digital
signal will be equal to the system voltage, while the OFF or LOW signal will always
equal 0V. This is a fancy way of saying that on a 5V Arduino the HIGH signals will be a
little under 5V and on a 3.3V Arduino the HIGH signals will be a little under 3.3V.
To receive or send Digital signals the Arduino uses Digital pins # 0 - # 13. You
may also setup your Analog In pins to act as Digital pins. To set up Analog In pins as
Digital pins use the command:

pinMode(pinNumber, value);

where pinNumber is an Analog pin (A0 – A5) and value is either INPUT or OUTPUT.
To setup Digital pins use the same command but reference a Digital pin for pinNumber
instead of an Analog In pin. Digital pins default as input, so really you only need to set
them to OUTPUT in pinMode. To read these pins use the command:

digitalRead(pinNumber);

where pinNumber is the Digital pin to which the Digital component is connected. The
digitalRead command will return either a HIGH or a LOW signal. To send a Digital
signal to a pin use the command:

digitalWrite(pinNumber, value);

where pinNumber is the number of the pin sending the signal and value is either HIGH or
LOW.

The Arduino also has the capability to output a Digital signal that acts as an
Analog signal, this signal is called Pulse Width Modulation (PWM). Digital Pins # 3, # 5,
# 6, # 9, # 10 and #11 have PWM capabilities. To output a PWM signal use the
command:

analogWrite(pinNumber, value);

where pinNumber is a Digital Pin with PWM capabilities and value is a number between
0 (0%) and 255 (100%). For more information on PWM see the PWM worksheets or
S.I.K. circuit 12.
THINGS TO REMEMBER ABOUT DIGITAL:

 Digital Input/Output uses the Digital pins, but Analog In pins can be used as
Digital
 To receive a Digital signal use: digitalRead(pinNumber);
 To send a Digital signal use: digitalWrite(pinNumber, value);
 Digital Input and Output are always either HIGH or LOW

All of the electrical signals that the Arduino works with are either Analog or
Digital. It is extremely important to understand the difference between these two types
of signal and how to manipulate the information these signals represent.

ANALOG

Humans perceive the world in analog. Everything we see and hear is a continuous
transmission of information to our senses. The temperatures we perceive are never 100%
hot or 100% cold, they are constantly changing between our ranges of acceptable
temperatures. (And if they are out of our range of acceptable temperatures then what are
we doing there?) This continuous stream is what defines analog data. Digital
information, the complementary concept to Analog, estimates analog data using only
ones and zeros.

In the world of Arduino an Analog signal is simply a signal that can be HIGH
(on), LOW (off) or anything in between these two states. This means an Analog signal
has a voltage value that can be anything between 0V and 5V (unless you mess with the
Analog Reference pin). Analog allows you to send output or receive input about devices
that run at percentages as well as on and off. The Arduino does this by sampling the
voltage signal sent to these pins and comparing it to a voltage reference signal (5V).
Depending on the voltage of the Analog signal when compared to the Analog Reference
signal the Arduino then assigns a numerical value to the signal somewhere between 0
(0%) and 1023 (100%). The digital system of the Arduino can then use this number in
calculations and sketches.

To receive Analog Input the Arduino uses Analog pins # 0 - # 5. These pins are
designed for use with components that output Analog information and can be used for
Analog Input. There is no setup necessary, and to read them use the command:

analogRead(pinNumber);

where pinNumber is the Analog In pin to which the the Analog component is connected.
The analogRead command will return a number including or between 0 and 1023.

The Arduino also has the capability to output a digital signal that acts as an
Analog signal, this signal is called Pulse Width Modulation (PWM). Digital Pins # 3, #
5, # 6, # 9, # 10 and #11 have PWM capabilities. To output a PWM signal use the
command:

analogWrite(pinNumber, value);

where pinNumber is a Digital Pin with PWM capabilities and value is a number between
0 (0%) and 255 (100%). On the Arduino UNO PWM pins are signified by a ~ sign. For
more information on PWM see the PWM worksheets or S.I.K. circuit 12.
3.2 ULTRASONIC SENSOR

Fig:- Ultrasonic Sensor

Ultrasonic sensors service the market by providing a cost effective sensing method
with unique properties not possessed by other sensing technologies. By using a
wide variety of ultrasonic transducers and several different frequency ranges, an
ultrasonic sensor can be designed to solve many application problems that are cost
prohibitive or simply cannot be solved by other sensors.

Long range detection: In industrial sensing, more and more applications require
detection over distance. Ultrasonic sensors detect over long ranges up to forty feet,
while limit switches and inductive sensors do not.

Broad area detection: While some photo electric sensors can detect over long
distances they lack the ability to detect over a wide area without using a large
number of sensors. The advantage of Migatron's ultrasonic sensors is that both
wide and narrow areas can be covered. All it takes is the proper ultrasonic
transducer selection. Widest range of target materials:Only ultrasonic sensors
are impervious to target material composition. The target material can be clear,
solid, liquid, porous, soft, wood and any color because all can be detected.

Non contact distance measuring: Because sound can be timed from when it
leaves the transducer to when it returns, distance measuring is easy and accurate to
.05% of range which equates to +or- .002 of an inch at a distance of 4 inches.
It is Migatron's continuing goal to provide ultrasonic sensors in industrially
hardened packages that are electrically and electronically compatible with standard
controls used in today's industrial marketplace.

Advantages of ultrasonics.
A:When used for sensing functions, the ultrasonic method has unique
advantages over conventional sensors...
 Measures and detects distances to moving objects.
 Impervious to target materials, surface and color.
 Solid-state units have virtually unlimited, maintenance-free lifespan.
 Detects small objects over long operating distances.
 Resistant to external disturbances such as vibration, infrared radiation, ambient
noise
and EMI radiation.

 Ultrasonic sensors are not affected by dust, dirt or high-moisture environments.


The Sound Course of Action!
Design for Applications
 High Volume, Low Cost Manufacturing
 Private Labeling
 Short Development Cycles
 Exclusive Custom Designs for OEMs
 Short Range Communications and Positioning
Collision Avoidance Systems
 Obstacle Detection and Ranging
 On/Off Road Vehicles, Tracked Vehicles
 Factory Automation

TRANSDUCERS

Massa Transducers and Sensors are used in a wide variety of applications:


 Range Finding
 Proximity Sensing
 Presence/Absence
 Converting Systems
 Level/Fill
 Warning Devices
3.3 IR SENSOR

An infrared sensor is an electronic device, that emits in order to sense


some aspects of the surroundings. An IR sensor can measure the heat of
an object as well as detects the motion. These types of sensors measures
only infrared radiation, rather than emitting it that is called as a passive
IR sensor. Usually in the infrared spectrum, all the objects radiate some
form of thermal radiations. These types of radiations are invisible to our
eyes, that can be detected by an infrared sensor. The emitter is simply an
IR LED (Light Emitting Diode) and the detector is simply an IR
photodiode which is sensitive to IR light of the same wavelength as that
emitted by the IR LED. When IR light falls on the photodiode, The
resistances and these output voltages, change in proportion to the
magnitude of the IR light received.
In this project, the transmitter section includes an IR sensor, which transmits
continuous IR rays to be received by an IR receiver module. An IR output terminal
of the receiver varies depending upon its receiving of IR rays. Since this variation
cannot be analyzed as such, therefore this output can be fed to a comparator circuit.
Here an operational amplifier (op-amp) of LM 339 is used as comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting input
goes higher than that non-inverting input of the comparator IC (LM339). Thus the
output of the comparator goes low, but the LED does not glow. When the IR
receiver module receives signal to the potential at the inverting input goes low.
Thus the output of the comparator (LM 339) goes high and the LED starts glowing.
Resistor R1 (100 ), R2 (10k ) and R3 (330) are used to ensure that minimum 10
mA current passes through the IR LED Devices like Photodiode and normal LEDs
respectively. Resistor VR2 (preset=5k ) is used to adjust the output terminals.
Resistor VR1 (preset=10k ) is used to set the sensitivity of the circuit Diagram.
Read more about IR sensors.
SOFTWARE TOOLS

3.4 ARDUINO IDE

Download Arduino Integrated Design Environment (IDE) here (Most recent version: 1.6.5):
https://www.arduino.cc/en/Main/Software

This is the Arduino IDE once it’s been opened. It opens into a blank sketch where you can start
programming immediately. First, we should configure the board and port settings to allow us to
upload code. Connect your Arduino board to the PC via the USB cable.

Board Setup
You have to tell the Arduino IDE what board you are uploading to. Select the Tools pull down
menu and go to Board. This list is populated by default with the currently available Arduino
Boards that are developed by Arduino. If you are using an Uno or an Uno-Compatible Clone (ex.
Funduino , Sain Smart, IEIK, etc.), select Arduino Uno. If you are using another board/clone,
select that board.

COM Port Setup

If you downloaded the Arduino IDE before plugging in your Arduino board, when you plugged
in the board, the USB drivers should have installed automatically. The most recent Arduino IDE
should recognize connected boards and label them with which COM port they are using. Select
the Tools pulldown menu and then Port.Here it should list all open COM ports, and if there is a
recognized Arduino Board, it will also give it’s name. Select the Arduino board that you have
connected to the PC. If the setup was successful, in the bottom right of the Arduino IDE, you
should see the board type and COM number of the board you plan to program. Note: the Arduino
Uno occupies the next available COM port; it will not always be COM3.

At this point, your board should be set up for programming, and you can begin writing and
uploading code.

Uploading Blink

One common procedure to test whether the board you are using is properly set up is to upload the
“Blink” sketch. This sketch is included with all Arduino IDE releases and can be accessed by the
Filepull-down menu and going to Examples, 01.Basics, and then select Blink. Standard Arduino
Boards include a surface-mounted LED labeled “L” or “LED” next to the “RX” and “TX” LEDs,
that is connected to digital pin 13. This sketch will blink the LED at a regular interval, and is an
easy way to confirm if your board is set up properly and you were successful in uploading code.
Open the “Blink” sketch and press the “Upload” button in the upper-left corner to upload
“Blink” to the board.
1.Download and install Arduino IDE (https://www.arduino.cc/en/Main/Software)

2. Plug in your Arduino Board

3. Select the proper board in the IDE (Tools>Boards>Arduino Uno)

4. Select the proper COM port (Tools>Port>COMx (Arduino Uno))

5. Open the “Blink” sketch (File>Examples>Basics>01.Blink)

6. Press the Upload button to upload the program to the board

7. Confirm that your board is working as expected by observing LED


Arduino has lots of community support and documentation. Your best bet when running into
unexpected problems is to search online for help. You should be able to find a forum where
someone had the same problem you are having, and someone helped them fix it. If you don’t
find results, try modifying your search, or post on the Arduino forums.

● My board isn’t listed under devices and is not recognized by IDE: ○ Most likely, this means
that the ATMega328p chip is not programmed with the Arduino firmware. If you have a separate
working Uno available, you can program the unprogrammed chip using this guide and a few
jumper cables: https://www.arduino.cc/en/Tutorial/ArduinoISP ○ If you don’t have a separate
Arduino available, let me know and I can use an Atmel Programmer to upload the firmware. ○
There may be hardware damage if you had the board plugged into USB and external power at the
same time. You may have to replace the chip if this is the case.

● Error Message: avrdude: stk500_recv(): programmer is not responding ○ Double-check that


you are using the correct COM port. ○ Make sure that your Arduino Board is plugged into the
computer.

● The IDE says “Uploading…” after pressing the upload button, but nothing is happening. ○
Double-check that you have the correct board selected in the Tools menu. ○ Depending on the
size of your program, it may take a few seconds to upload. If you feel like it is taking too long, it
may be encountering an error and you can try unplugging and plugging in the Arduino board.
4. EXISTING SYSTEM

The railway tracks in india are basically checked and cracks are detected
manually.This manual detection of cracks on railway tracks is a time consuming
process and also inaccurate.Due to this inaccuracy there is a high probability of
occurance of train accidents.
5. SOFTWARE USED

5.1 EMBEDDED C

1. What is embedded C?

Embedded C is a set of language extensions for the C programming


language by the C Standards Committee to address commonality issues
that exist between C extensions for different embedded systems.

Embedded C programming typically requires nonstandard extensions to


the C language in order to support enhanced microprocessor features
such as fixed-point arithmetic, multiple distinct memory banks, and
basic I/O operations. In 2008, the C Standards Committee extended the
C language to address such capabilities by providing a common standard
for all implementations to adhere to. It includes a number of features not
available in normal C, such as fixed-point arithmetic, named address
spaces and basic I/O hardware addressing. Embedded C uses most of the
syntax and semantics of standard C, e.g., main() function, variable
definition, datatype declaration, conditional statements (if, switch case),
loops (while, for), functions, arrays and strings, structures and union, bit
operations, macros, etc.[1]

2.Embedded C

3.Embedded C History
4.Embedded C Applications

5.2 EXECUTION
RESULT:-

Here Ir sensor detects the crack on railway tracks between tracks and ultrasonic
sensor detects the distance between the train and the track where crack detected. If
the train is getting near to the crack then Auto breaking system will apply and train
will get stopped .

CONCLUSION

Using this system when there is some obstacle present in front of the track or there
is a presence of gap between two joining tracks, the IR sensor will detect the gap
between the two tracks and indicate on Monitor display. With the help of Here Ir
sensor detects the Gap between tracks and ultrasonic sensor detects the distance
between the train and the track where crack detected. If the train is getting near to
the crack then Auto breaking system will apply and train will get stopped .

REFERENCES

[1] Ganeshan P, PurushottamShekhar,Ravi Shankar Shekhar “AUTOMATIC


DETECTION OF SQUATS IN RAILWAY TRACK ”, IEEE sponsored 2nd
International Conference on Innovations in Information Embedded and
Communication Systems ICIIECS‟15.

[2] Anil Kumar Verma, Dharmendra Kumar, Gopal Krishna Gole, Jitendra Kumar,
“INTELLIGENT TRAIN ENGINE FOR FASTEST NEW TECHNOLOGY”,
International Journal of Innovative Research in Computer and Communication
Engineering Vol.1, Issue 1,March2013 ISSN(print): 2320-9798
ISSN(online):2320-9801 S

[3] KawshikShikder, “INTELLIGENT SYSTEM FOR TRAIN ENGINE WITH


AUTOMATIC CONTROLLING USING WIRELESS TECHNOLOGY”,
International Journal of science and research(IJSR) ISSN (online):2319-7064
volume

[4] Archana A. Raut, Nisha S.Punekar “Improving Railway Safety with Obstacle
Detection and Tracking Sysstem using GPS-GSM Model”, International Journal of
Science & Engineering Research, Vol. 4, Issue 8, Aug 2013.

[5] Dibyayan Das Sharma,Sanjeev Kumar, Shweta Gupta “An Intelligent Train
Engine Based on Auto-Signal Following Scheme Using IR Technology”, The IUP
Journal of Electrical and Electronics Engineering, Vol. IV, No. 4, pp. 36-47,
October 2011

You might also like