Professional Documents
Culture Documents
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:
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.
SRAM is 2 KB
EEPROM is 1 KB
In Built LED
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.
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.
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.
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.
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.
6. This sensor is used in a car washing system for detecting and washing
the car automatically.
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.
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.
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.
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:
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 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.
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.
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.
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.
Serial Plotter:
The Serial Plotter button is used to display the serial data in a plot. It
comes preinstalled in the Arduino IDE.
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.
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:
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