You are on page 1of 66

CONTENTS

SNO TITLE PAGENO

1. ABSTRACT
2. INTRODUCTION
3. SYSTEM CONFIGURATION
3.1 HARDWARE SPECIFICATION
3.2 SOFTWARE SPECIFICATION
4. SYSTEM REQUIREMENT
4.1 HARDWARE REQUIREMENT
4.2 SOFTWARE REQUIREMENT
5. SYSTEM ANALYSIS
5.1 EXISTING SYSTEM
5.2 PROPOSED SYSTEM
5.3 FLOW DIAGRAM

6. SYSTEM DESIGN
6.1 INPUT DESIGN
6.2 OUTPUT DESIGN
6.3 CODING
7. SAMPLE SCREEN

8. CONCLUSION

9. FUTURE ENHANCEMENTS

10. BIBIOGRAPHY
ABSTRACT
ABSTRACT:

Injuries to train passengers, environmental damage, and property


loss can all be caused by the interruption of the rail crossing's right of
way. Therefore, there's a need to look into alternate techniques to
prevent or mitigate these mishaps, such as using an Arduino-based
safety system

As a result most of the loss of lives can be avoided, most of the


people are careless in crossing the overpasses, by using this technology I
have developed I can make people aware of the coming of the train in
advance and save their lives.
INTRODUCTION
Introduction:
Transport plays a vital role because it enables the act of buying and
selling goods and services between persons which is a pre-requisite for
the development of a Nation. Transportation has throughout history been
a spur to expansion as better transport leads to more trade. The stage in
an economic cycle has always been dependent on increasing the capacity
and rationality of transport. But the infrastructure and operation of
transport has a great effect on the land and is the largest drainer of
energy, making transport sustainability and safety a major issue.
Derailment occurs when a vehicle such as a train runs off its rails.
Usually, the derailment of a train can be caused by a collision with
another object, an operational error, the mechanical failure of the tracks,
such as broken rails, or mechanical failure of the wheels. In Ethiopia, the
Ethiopian Railway Corporation has in the recent past experienced
monetary loss due to train derailment on the Djibouti- Ethiopia line
caused by collision with animals and block materials in the country side
areas of Ethio-Djibouti line. Obstacles on the right of way of the train,
smoke on the train and flooding on the track can cause derailment,
collision, injuries to train passengers, environmental damage and loss of
properties. So there is a need to look at various ways to prevent or
reduce the frequency and severity of the accidents by using Arduino
based safety system to mitigate this accidents.

Therefore, there's a need to look into alternate techniques to prevent or


mitigate these mishaps, such as using an Arduino-based safety system
As a result most of the loss of lives can be avoided, most of the people
are careless in crossing the overpasses, by using this technology I have
developed I can make people aware of the coming of the train in
advance and save their lives.
SYSTEM CONFIGURATION
SYSTEM REQUIRMENTS
3. SYSTEM CONFIGURATION

3.1 HARDWARE SPECIFICATION

 Arduino uno
 Ultrasonic sensor
 Buzzer and led
 Jumber wires(M to F)
 Sunboard sheet
 7.4v Battery or cable

Hardware Requirements
 Processor : Intel i3 4th gen or newer
 Hard Disk : 10 GB.
 Monitor: LCD Color.
 Mouse: Optical.
 RAM : 4Gb.

3.2 SOFTWARE SPECIFICATION

Operating System : Windows 10


Software : Arduino IDE
Language : Arduino script
SYSTEM ANALYSIS
4.SYSTEM REQUIREMENT
4.1 HARTWARE REQUIREMENT:
Arduino UNO R3 :
The Arduino UNO R3 is frequently used microcontroller board in the
family of an Arduino. This is the latest third version of an Arduino board
and released in the year 2011. The main advantage of this board is if we
make a mistake we can change the microcontroller on the board. The
main features of this board mainly include, it is available in DIP (dual-
inline-package), detachable and ATmega328 microcontroller. The
programming of this board can easily be loaded by using an Arduino
computer program. This board has huge support from the Arduino
community, which will make a very simple way to start working in
embedded electronics, and many more applications. Please refer the link
to know about Arduino – Basics, and Design
Arduino Uno R3 is one kind of ATmega328P based microcontroller
board. It includes the whole thing required to hold up the
microcontroller; just attach it to a PC with the help of a USB cable, and
give the supply using AC-DC adapter or a battery to get started. The
term Uno means “one” in the language of “Italian” and was selected for
marking the release of Arduino’s IDE 1.0 software. The R3 Arduino
Uno is the 3rd as well as most recent modification of the Arduino Uno.
Arduino board and IDE software are the reference versions of Arduino
and currently progressed to new releases. The Uno-board is the primary
in a sequence of USB-Arduino boards, & the reference model designed
for the Arduino platform.
Arduino Uno R3 Specifications
The Arduino Uno R3 board includes the following specifications.
 It is an ATmega328P based Microcontroller

 The Operating Voltage of the Arduino is 5V

 The recommended input voltage ranges from 7V to 12V

 The i/p voltage (limit) is 6V to 20V

 Digital input and output pins-14

 Digital input & output pins (PWM)-6

 Analog i/p pins are 6

 DC Current for each I/O Pin is 20 mA

 DC Current used for 3.3V Pin is 50 mA

 Flash Memory -32 KB, and 0.5 KB memory is used by the


boot loader

 SRAM is 2 KB

 EEPROM is 1 KB

 The speed of the CLK is 16 MHz

 In Built LED

 Length and width of the Arduino are 68.6 mm X 53.4 mm

 The weight of the Arduino board is 25 g


Arduino Uno R3 Pin Diagram
The Arduino Uno R3 pin diagram is shown below. It comprises 14-
digit I/O pins. From these pins, 6-pins can be utilized like PWM outputs.
This board includes 14 digital input/output pins, Analog inputs-6, a USB
connection, quartz crystal-16 MHz, a power jack, a USB connection,
resonator-16Mhz, a power jack, an ICSP header an RST button.
Power Supply:

The power supply of the Arduino can be done with the help of an
exterior power supply otherwise USB connection. The exterior power
supply (6 to 20 volts) mainly includes a battery or an AC to DC adapter.
The connection of an adapter can be done by plugging a center-positive
plug (2.1mm) into the power jack on the board. The battery terminals
can be placed in the pins of Vin as well as GND. The power pins of
an Arduino board include the following.

Vin: The input voltage or Vin to the Arduino while it is using an


exterior power supply opposite to volts from the connection of USB or
else RPS (regulated power supply). By using this pin, one can supply
the voltage.

5Volts: The RPS can be used to give the power supply to the
microcontroller as well as components which are used on the Arduino
board.
This can approach from the input voltage through a regulator.

3V3: A 3.3 supply voltage can be generated with the onboard regulator,
and the highest draw current will be 50 mA.

GND: GND (ground) pins


Memory:
The memory of an ATmega328 microcontroller includes 32 KB and 0.5
KB memory is utilized for the Boot loader), and also it includes SRAM-
2 KB as well as EEPROM-1KB.

Input and Output:


We know that an arguing Uno R3 includes 14-digital pins which can be
used as an input otherwise output by using the functions like pin Mode
(), digital Read(), and digital Write(). These pins can operate with 5V,
and every digital pin can give or receive 20mA, & includes a 20k to 50k
ohm pull up resistor. The maximum current on any pin is 40mA which
cannot surpass for avoiding the microcontroller from the damage.
Additionally, some of the pins of an Arduino include specific functions.

Serial Pins:
The serial pins of an Arduino board are TX (1) and RX (0) pins
and these pins can be used to transfer the TTL serial data. The
connection of these pins can be done with the equivalent pins of the
ATmega8 U2 USB to TTL chip.

External Interrupt Pins:


The external interrupt pins of the board are 2 & 3, and these pins can be
arranged to activate an interrupt on a rising otherwise falling edge, a
low-value otherwise a modify in value

PWM Pins:
The PWM pins of an Arduino are 3, 5, 6, 9, 10, & 11, and gives an
output of an 8-bit PWM with the function analog Write ().
SPI (Serial Peripheral Interface) Pins:
The SPI pins are 10, 11, 12, 13 namely SS, MOSI, MISO, SCK, and
these will maintain the SPI communication with the help of the SPI
library.

LED Pin:
An arguing board is inbuilt with a LED using digital pin-13. Whenever
the digital pin is high, the LED will glow otherwise it will not glow.

TWI (2-Wire Interface) Pins:


The TWI pins are SDA or A4, & SCL or A5, which can support the
communication of TWI with the help of Wire library.

AREF (Analog Reference) Pin:


An analog reference pin is the reference voltage to the inputs of an
analog i/ps using the function like analog Reference().

Reset (RST) Pin:


This pin brings a low line for resetting the microcontroller, and it is very
useful for using an RST button toward shields which can block the one
over the Arduino R3 board.

Communication:
The communication protocols of an Arduino Uno include SPI, I2C,
and UART serial communication.

UART:An Arduino Uno uses the two functions like the transmitter
digital pin1 and the receiver digital pin0. These pins are mainly used in
UART TTL serial communication.
I2C:
An Arduino UNO board employs SDA pin otherwise A4 pin & A5 pin
otherwise SCL pin is used for I2C communication with wire library. In
this, both the SCL and SDA are CLK signal and data signal.

SPI Pins:
The SPI communication includes MOSI, MISO, and SCK.

MOSI (Pin11):
This is the master out slave in the pin, used to transmit the data to the
devices

MISO (Pin12):
This pin is a serial CLK, and the CLK pulse will synchronize the
transmission of which is produced by the master.

SCK (Pin13):
The CLK pulse synchronizes data transmission that is generated by the
master. Equivalent pins with the SPI library is employed for the
communication of SPI. ICSP (in-circuit serial programming) headers can
be utilized for programming ATmega microcontroller directly with the
boot loader.

Arduino Uno R3 Programming:


The programming of an Arduino Uno R3 can be done using IDE
software. The microcontroller on the board will come with pre-burned
by a boot loader that permits to upload fresh code without using an
exterior hardware programmer.The communication of this can be done
using a protocol like STK500.We can also upload the program in the
microcontroller by avoiding the boot loader using the header like the In-
Circuit Serial Programming.
Ultrasonic sensor:
An ultrasonic sensor is an electronic device that measures the distance of
a target object by emitting ultrasonic sound waves and converts the
reflected sound into an electrical signal. Ultrasonic waves travel faster
than the speed of audible sound (i.e. the sound that humans can hear).
Ultrasonic sensors have two main components: the transmitter (which
emits the sound using piezoelectric crystals) and the receiver (which
encounters the sound after it has traveled to and from the target).
To calculate the distance between the sensor and the object, the sensor
measures the time it takes between the emission of the sound by the
transmitter to its contact with the receiver. The formula for this
calculation is D = ½ T x C (where D is the distance, T is the time, and C
is the speed of sound ~ 343 meters/second).
Types and varieties of ultrasonic sensors:
There are four major different types of ultrasonic sensors are currently in
used,
1. Ultrasonic Proximity Sensors: In this ultrasonic proximity sensor, a
special type of sonic transducer is used for alternate transmission and
reception of sound waves.
2. Ultrasonic 2 Point Proximity Switches: This sensor consists of 2
points for switching, therefore it is called 2-point proximity switches.
It is almost similar to standard sensor only differ the 2-touch set up
key and this function is called Tech-in function.
3. Ultrasonic Retro-reflective Sensors: The operation of the ultrasonic
retro-reflective sensor is similar to an ultrasonic proximity sensor. The
only difference, in this sensor the distance between sensor to the
reflector is measured by measuring the propagation time.
4. Ultrasonic Through Beam Sensors: Ultrasonic thru-beam sensors are
always comprised of two separate components: the emitter and the
receiver. The evaluation and switching output electronics are in the
receiver.

Usage of the ultrasonic sensor:


1. The ultrasonic sensor is used in oil, chemical, milk, or water tanks for
level measurements or for liquid level control.

2. This sensor is used in thru beam detection for high-speed counting.

3. This sensor is used in the robotic industry for robot sensing.


This sensor is used in a car parking system where car entry is
controlled through the barrier system, the barrier must not be lowered
when there is beneath a vehicle. This whole process is controlled
through the ultrasonic sensor.
4. This sensor is used with bottle cutting and drink filling machines,
where the bottle is detecting at serval points and for this continuous
monitoring the ultrasonic sensor is used.

5. This sensor is used in transporting printed circuit boards (PCBs)


industry where smartphones, computer motherboards, and home
appliances circuit boards are designed and print.
This sensor is used in the car manufacturing industry for
manufacturing or assembles the car automatically.

6. This sensor is used in a car washing system for detecting and washing
the car automatically.

7. This sensor is used for detecting the speed of a motor or generator.

8. This sensor is also used in a presence detection system.


History of Ultrasonic sensor:
Soviet Scientist Sergei Y. Sokolov is considered the father of modern
ultrasonic testing. In 1928, Sokolov successfully demonstrated how to
use ultrasonics to detect flaws in metals. Unsurprisingly, Sokolov
proposed that this technique would be beneficial in the industrial arena
for testing irregularities in solid materials. Sokolov's experimentation
laid the groundwork for future developments in ultrasonic testing (Portal
of Non-Destructive Testing).

Similar Products to the Ultrasonic sensor:


There is a wide variety of sensors available that operate at different
frequencies and have different beam angles. In addition, systems can
have different electronics options such as temperature sensing and signal
averaging. Similar products are:

1. Cubic sensors—versatile in respect of design and application


2. Cylindrical sensors—maximum flexibility for diverse applications
3. Chemically resistant ultrasonic sensors
4. Double sheet sensors—safe process operation and high plant
availability.
Buzzer :
There are many ways to communicate between the user and a product.
One of the best ways is audio communication using a buzzer IC. So
during the design process, understanding some technologies with
configurations is very helpful. So, this article discusses an overview of
an audio signaling device like a beeper or a buzzer and its working with
applications.
An audio signaling device like a beeper or buzzer may be
electromechanical or piezoelectric or mechanical type. The main
function of this is to convert the signal from audio to sound. Generally, it
is powered through DC voltage and used in timers, alarm devices,
printers, alarms, computers, etc. Based on the various designs, it can
generate different sounds like alarm, music, bell & siren.
The pin configuration of the buzzer is shown below. It includes two
pins namely positive and negative. The positive terminal of this is
represented with the ‘+’ symbol or a longer terminal. This terminal is
powered through 6Volts whereas the negative terminal is represented
with the ‘-‘symbol or short terminal and it is connected to the GND
terminal.

History:
The history of an electromechanical buzzer and piezoelectric is
discussed below.

Advantages:
The advantages of a buzzer include the following.
 Simply Compatible
 Frequency Response is Good
 Size is small
 Energy Consumption is less
 The Range of Voltage usage is Large
 Sound Pressure is high

Disadvantages:
The disadvantages of the buzzer include the following.
 Controlling is a little hard
 Generates Annoying Sound
 Training is necessary to know how to repair the condition without just
turning off.
Specifications:
The specifications of the buzzer include the following.
 Color is black
 The frequency range is 3,300Hz
 Operating Temperature ranges from – 20° C to +60°C
 Operating voltage ranges from 3V to 24V DC
 The sound pressure level is 85dBA or 10cm
 The supply current is below 15mA

Types of Buzzer:
A buzzer is available in different types which include the following.

 Piezoelectric
 Electromagnetic
 Mechanical
 Electromechanical
 Magnetic

Piezoelectric:
As the name suggests, the piezoelectric type uses the piezoelectric
ceramic’s piezoelectric effect & pulse current to make the metal plate
vibrate & generate sound. This kind of buzzer is made with a resonance
box, multi resonator, piezoelectric plate, housing, impedance matcher,
etc. Some of the buzzers are also designed with LEDs.
The multi resonator of this mainly includes ICs and transistors. Once the
supply is given to this resonator, it will oscillate and generates an audio
signal with 1.5 to 2.kHz. The impedance matcher will force the
piezoelectric plate to produce sound.
Electromagnetic:
This type of buzzer is made with a magnet, solenoid coil, oscillator,
housing, vibration diaphragm, and magnet. Once the power supply is
given, the oscillator which produces the audio signal current will supply
throughout the solenoid coil to generate a magnetic field.
Sometimes, the vibration diaphragm will vibrate & generates sound
under the magnet & solenoid coil interaction. The frequency range of
this ranges from 2 kHz to 4kHz.

Mechanical:
These types of buzzers are subtypes of electromagnetic, so
the components used in this type are also similar. But the main
difference is that the vibrating buzzer is placed on the outside instead of
the inside.

Electromechanical:
The designing of these types of buzzers can be done with a bare metal
disc & an electromagnet. The working principle of this is similar to
magnetic and electromagnetic. It generates sound throughout the disc
movement & magnetism.

Magnetic:
Like a piezo type, magnetic is also used to generate a sound but they are
different due to core functionality. The magnetic type is more fixed as
compared to the piezo type because they work through a magnetic field.

Magnetic buzzers utilize an electric charge instead of depending on


piezo materials to generate a magnetic field, after that it permits another
element of the buzzer to vibrate & generate sound.
The applications of magnetic buzzers are similar to the piezo
type in household devices, alarms such as watches, clocks & keyboards.
Working Principle:
The working principle of a buzzer depends on the theory that, once the
voltage is given across a piezoelectric material, then a pressure
difference is produced. A piezo type includes piezo crystals among two
conductors.

Once a potential disparity is given across these crystals, then they thrust
one conductor & drag the additional conductor through their internal
property. So this continuous action will produce a sharp sound signal.

4.2 SOFTWARE REQIRMENTS


Arduino IDE:
The Arduino IDE is an open-source software, which is used to write and
upload code to the Arduino boards. The IDE application is suitable for
different operating systems such as Windows, Mac OS X, and Linux.
It supports the programming languages C and C++. Here, IDE stands
for Integrated Development Environment.

The program or code written in the Arduino IDE is often called as


sketching. We need to connect the Genuino and Arduino board with the
IDE to upload the sketch written in the Arduino IDE software. The
sketch is saved with the extension '.ino.'
The Arduino IDE will appear as:
Toolbar Button:
The icons displayed on the toolbar are New, Open, Save,
Upload, and Verify.

It is shown below:

Upload:
The Upload button compiles and runs our code written on the screen. It
further uploads the code to the connected board. Before uploading the
sketch, we need to make sure that the correct board and ports are
selected.

We also need a USB connection to connect the board and the computer.
Once all the above measures are done, click on the Upload button
present on the toolbar.

The latest Arduino boards can be reset automatically before beginning


with Upload. In the older boards, we need to press the Reset button
present on it. As soon as the uploading is done successfully, we can
notice the blink of the Tx and Rx LED.

If the uploading is failed, it will display the message in the error


window.

We do not require any additional hardware to upload our sketch using


the Arduino Bootloader. A Bootloader is defined as a small program,
which is loaded in the microcontroller present on the board. The LED
will blink on PIN 13.

Open:
The Open button is used to open the already created file. The selected
file will be opened in the current window.

Save:
The save button is used to save the current sketch or code.

New:
It is used to create a new sketch or opens a new window.

Verify:
The Verify button is used to check the compilation error of the sketch or
the written code.

Serial Monitor:
The serial monitor button is present on the right corner of the toolbar. It
opens the serial monitor.

It is shown below:
When we connect the serial monitor, the board will reset on the
operating system Windows, Linux, and Mac OS X. If we want to
process the control characters in our sketch, we need to use an external
terminal program. The terminal program should be connected to the
COM port, which will be assigned when we connect the board to the
computer.
Menu Bar
o File

When we click on the File button on the Menu bar, a drop-down list will
appear. It is shown below:

Let's discuss each option in detail.

New:
The New button opens the new window. It does not remove the sketch
which is already present.

Open:
It allows opening the sketch, which can be browsed from the folders and
computer drivers.

Open Recent
The Open Recent button contains the list of the recent sketches.
Sketchbook:
It stores the current sketches created in the Arduino IDE software. It
opens the selected sketch or code in a new editor at an instance.

Examples:
It shows the different examples of small projects for a better
understanding of the IDE and the board. The IDE provides examples of
self-practice.

Close:
The Close button closes the window from which the button is clicked.

Save:
The save button is used to save the current sketch. It also saves the
changes made to the current sketch. If we have not specified the name of
the file, it will open the 'Save As...' window.

Save As...:
We can save the sketch with a different name using the 'Save
As...' button. We can also change the name accordingly.

Page Setup:
It allows setting the page margins, orientation, and size for printing. The
'Page Setup' window will appear as:
Print:
According to the settings specified in the 'Page Setup', it prepares the
current sketch for printing.

Preferences:
It allows the customization settings of the Arduino IDE.

Quit:
The Quit button is used to close all the IDE windows. The same closed
sketch will be reopened when we will open the Arduino IDE.

o Edit

When we click on the Edit button on the Menu bar, a drop-down list
appears. It is shown below:
Let's discuss each option in detail.

Undo:
The Undo button is used to reverse the last modification done to the
sketch while editing.

Redo:
The Redo button is used to repeat the last modification done to the
sketch while editing.

Cut:
It allows us to remove the selected text from the written code. The text is
further placed to the clipboard. We can also paste that text anywhere in
our sketch.
Copy:
It creates a duplicate copy of the selected text. The text is further placed
on the clipboard.

Copy for Forum:


The 'Copy for Forum' button is used to copy the selected text to the
clipboard, which is also suitable for posting to the forum.

Copy as HTML:
The 'Copy for Forum' button is used to copy the selected text as HTML
to the clipboard. It is desirable for embedding in web pages.

Paste:
The Paste button is used to paste the selected text of the clipboard to the
specified position of the cursor.

Select All:
It selects all the text of the sketch.

Go to line...
It moves the cursor to the specified line number.

The window will appear as:


Comment/Decomment:
The Comment/ Decomment button is used to put or remove the
comment mark (//) at the beginning of the specified line.

Increase Indent:
It is used to add the space at the starting of the specified line. The
spacing moves the text towards the right.

Decrease Indent:
It is used to subtract or remove the space at the starting of the specified
line. The spacing moves the text towards the left.

Increase Font Size:


It increases the font size of the written text.

Decrease Font Size:


It decreases the font size of the written text.

Find...
It is used to find the specified text. We can also replace the text. It
highlights the text in the sketch.
The window will appear as:

Find Next:
It highlights the next word, which has specified in the 'Find...' window.
If there is no such word, it will not show any highlighted text.

Find Previous:
It highlights the previous word, which has specified in the
'Find...' window. If there is no such word, it will not show any
highlighted text.

Sketch:
When we click on the Sketch button on the Menu bar, a drop-down list
appears. It is shown below:
Let's discuss each option in detail.

Verify/Compile:
It will check for the errors in the code while compiling. The memory in
the console area is also reported by the IDE.

Upload:
The Upload button is used to configure the code to the specified board
through the port.

Upload Using Programmer:


It is used to override the Bootloader that is present on the board. We can
utilize the full capacity of the Flash memory using the 'Upload Using
Programmer' option. To implement this, we need to restore the
Bootloader using the Tools-> Burn Bootloader option to upload it to
the USB serial port.

Export compiled Binary:


It allows saving a .hex file and can be kept archived. Using other tools,
.hex file can also be sent to the board.

Show Sketch Folder:


It opens the folder of the current code written or sketch.

Include Library:
Include Library includes various Arduino libraries. The libraries are
inserted into our code at the beginning of the code starting with the #.
We can also import the libraries from .zip file.
Add File...
The Add File... button is used to add the created file in a new tab on the
existing file.

For example, let's add 'Blink' file to the 'Javatpoint' file. The tab will
now appear as:

We can also delete the corresponding file from the tab by clicking on
the small triangle -> Delete option.

Tools:
When we click on the Tools button on the Menu bar, a drop-down list
appears. It is shown below:
Let's discuss each option in detail.

Auto Format:
The Auto Format button is used to format the written code. For example,
lining the open and closed curly brackets in the code.

Archive Sketch:
The copy of the current sketch or code is archived in the .zip format. The
directory of the archived is same as the sketch.

Fix Encoding and Reload:


This button is used to fix the inconsistency between the operating system
char maps and editor char map encoding.
Serial Monitor:
It allows the exchange of data with the connected board on the port.

Serial Plotter:
The Serial Plotter button is used to display the serial data in a plot. It
comes preinstalled in the Arduino IDE.

WiFi101/WiFiNINA Firmware Updater:


It is used to check and update the Wi-Fi Firmware of the connected
board.

Board:
We are required to select the board from the list of boards. The selected
board must be similar to the board connected to the computer.
SYSTEM ANALYSIS
5.1 EXISTING SYSTEM:
1. More than 12000 accidents are caused by trains in
India every year. 67.2 percent of the fatalities occur.
2. People normally cross over flyovers without any
warning about this.
3. The death of a man affects his family and the
surrounding community.

5.2 PROPOSED SYSTEM:


1. Most of the casualties can be avoided by using this
technology that I have developed.
2. Through this technology, people can be warned in
advance to prevent loss of life.
3. Traffic safety can be improved by using this
technology
5.3 FLOW DIAGRAM:
SYSTEM DESIGN
6.1 INPUT DESIGN:
6.2 OUTPUT DESIGN:
6.3 Coding:

const int trigPin = 12;


const int echoPin = 13;

const int LED1 = A0;


const int LED2 = A1;
const int LED3 = A2;
const int LED4 = A3;
const int LED5 = A4;
const int LED6 = A5;
const int LED7 = 2;

int duration = 0;
int distance = 0;

void setup()
{
pinMode(trigPin , OUTPUT);
pinMode(echoPin , INPUT);

pinMode(LED1 , OUTPUT);
pinMode(LED2 , OUTPUT);
pinMode(LED3 , OUTPUT);
pinMode(LED4 , OUTPUT);
pinMode(LED5 , OUTPUT);
pinMode(LED6 , OUTPUT);
pinMode(LED7 , OUTPUT);

Serial.begin(9600);

void loop()
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration/58.2;

if ( distance <= 7 )
{
digitalWrite(LED1, HIGH);
}
else
{
digitalWrite(LED1, LOW);
}
if ( distance <= 14 )
{
digitalWrite(LED2, HIGH);
}
else
{
digitalWrite(LED2, LOW);
}
if ( distance <= 21 )
{
digitalWrite(LED3, HIGH);
}
else
{
digitalWrite(LED3, LOW);
}
if ( distance <= 28 )
{
digitalWrite(LED4, HIGH);
}
else
{
digitalWrite(LED4, LOW);
}
if ( distance <= 35 )
{
digitalWrite1(LED5, HIGH);
}
else
{
digitalWrite(LED5, LOW);
}
if ( distance<= 42 )
{
digitalWrite(LED6, HIGH);
}
else
{
digitalWrite(LED6, LOW);
}
if ( distance <= 49 )
{
digitalWrite(LED7, HIGH);
}
else
{
digitalWrite(LED7, LOW);
}
delay(100);
}
SAMPLE SCREEN
CONCLUSION
CONCLUSION:

On this project, the Proteus simulation using Arduino based


safety system is done.

In this project, a cost effective, low-power embedded system,


was designed which facilitate better safety standards for rail
tracks for preventing railway accidents due to obstacles on
railway tracks, f The result shows that this new innovative
technology will increase the reliability of safety systems of
railway By implementing these features in real time application,
we can avoid accidents up to a very significant margin.
FUTURE ENHANCEMENTS
FUTURE SCOPE:

1. Automatic stopping system will be used in future.

2. Using sensors, the train can automatically stop itself by knowing in


advance the presence of people or animals on the tracks.

3. A weather sensor can be used to detect the weather and slow down the
train during inclement weather
BIBIOGRAPHY
References:
Journals:
Reference 1 :
https://www.ijert.org/research/usingraspberry-pi[-
IJERTCONV4IS22026.pdf - IEEE paper].

Reference 2 :
Department of EEE, Sri Krishna College of Engineering and
Technology - 2020 6th International Conference on [Advanced and
Communicating Systems (ICACCS)].

Reference 3 :
5th International Conference on Communication and Electronic Systems
(ICCES 2020) [IEEE Conference Record #4876].

Websites :
https://transmitter.ieee.org/makerproject/view/7feb1#:~:text=The%20sm
art%20stick%20for%20the,or%20the%20obstacles%20in%20between.
https://www.ijert.org/-2
https://www.youtube.com/watch?v=_RrpSaj9j-GY
https://www.youtube.com/watch?v=4aHunO02MdpE

You might also like