Smaet Vehicle Detector Using Arduino Uno & Ultrasonic Sensor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

SMAET VEHICLE DETECTOR USING

ARDUINO UNO & ULTRASONIC SENSOR

ABSTRACT:
A winter morning is a cold morning of the winter season. The environment is dull and dismal. It
is covered with mist and fog. One can hardly see and identify things at a distance. So the
vehicle drivers also can’t see objects at a small distance. So, in a winter morning road accidents
frequently happen. In our project we have developed a Smart Vehicle detector which can
detect objects or vehicles within a given range of distance in the foggy winter morning where
we used ARDUINO and some other sensors. This system is highly efficient with high accuracy
and low cost. It consumes low power which makes it a resource efficient technology.

1. INTRODUCTION: uploading codes to the microcontroller. It


has input and output pins for interaction
In recent years there are a lots of road with the outside world such as with sensors,
accidents in the winter mornings because of switches, motors and so on. To be precise it
the high density of fog. In this project we has 14 digital input/output pins (of which 6
used Ultrasonic sensor to measure the can be used as PWM outputs), 6 analog
distance of the nearest objects and vehicles inputs, a 16 MHz quartz crystal, a USB
for which accidents might occur. We take connection, a power jack, an ICSP header
input in ARDUINO from heat sensor and and a reset button. It contains everything
Ultrasonic sensor and give a warning to the needed to support the microcontroller .It
driver when some objects or vehicles can take supply through USB or we can
appear within the given range in ultrasonic power it with an AC-to-DC adapter or a
sensor. When the driver gets the warning battery ARDUINO acts as the processing
he will be aware of the danger. From this module of the system.
process we can reduce the percentage of
accidents. It takes data from LM-35 heat sensor and
HC-SR04 ultrasonic sensor and gives output
2. COMPONENTS USED : in a LCD display, Pizeo Buzzer and in LED.
2.1 ARDUINO UNO: ARDUINO is open-source computer
hardware and software company, project
ARDUINO is an open-source physical
and user community that designs and
platform based on microcontroller board
manufactures microcontroller-based kits for
having the ATmega32 series controllers and
building digital devices and interactive
Integrated Development Environment for
objects that
writing and
can sense and control objects in the
physical world. The project is based on
microcontroller board designs,
manufactured by several vendors, using
various microcontrollers. These systems
provide sets of digital and analog I/O pins
that can be interfaced to various expansion
boards ("shields") and other circuits. The
boards feature serial communications
interfaces, USB on some models, for loading
programs from personal computers. The
microcontrollers are primarily programmed
Figure1: ARDUINO UNO board
using a dialect of features from the C and
C++ programming languages. In addition to
using traditional compiler tool chains, the
ARDUINO project provides an integrated
2.2 LED:
development environment (IDE) based on Light Emitting Diode (LED) A light-emitting
the Processing project. The ARDUINO diode (LED) is a p-n junction diode, which
project started in 2005 as a program for emits light when activated. When we apply
students at the Interaction Design Institute voltage across its leads, electrons are able
Ivrea in Ivrea, Italy, aiming to provide an to recombine with holes within the LED,
inexpensive and easy way for novices and releasing energy in the form of photons
professionals to create devices that interact which gives the light.
with their environment using sensors and
actuators. Common examples of such
devices intended for beginner hobbyists
include simple robots, thermostats, and
motion detectors. ARDUINO boards are
available commercially in preassembled
form, or as do-it-yourself kits.

Figure2: LED
2.3 ULTRASONIC SENSOR: measured and displayed.

Ultrasonic Sensor: Ultrasonic sensors (also


known as transceivers when they both send
and receive, but more generally called
transducers) work on a principle similar to
radar or sonar which evaluates attributes of
a target by interpreting the echoes from
radio or sound waves respectively.
Ultrasonic sensors generate high frequency
sound waves and evaluate the echo which
is received back by the sensor. Sensors
calculate the time interval between sending
the signal and receiving the echo to
determine the distance to an object. This
technology can be used for measuring wind
Figure2: HC-SR04 Ultrasonic Sensor.
speed and direction (anemometer), tank or
channel level, and speed through air or
water. For measuring speed or direction a
device uses multiple detectors and 2.4 LM-35 HEAT SENSOR:
calculates the speed from the relative
The LM35 series are precision integrated-
distances to particulates in the air or water.
circuit temperature devices with an output
To measure tank or channel level, the
voltage linearly proportional to the
sensor measures the distance to the
Centigrade temperature. The LM35 device
surface of the fluid. Further applications
has an advantage over linear temperature
include: humidifiers, sonar, medical ultra
sensors calibrated in Kelvin, as the user is
sonography, burglar alarms and non-
destructive testing. Systems typically use a not required to subtract a large constant
transducer which generates sound waves in voltage from the output to obtain
the ultrasonic range, above 18,000 hertz, by convenient Centigrade scaling. The LM35
turning electrical energy into sound, then device does not require any external
upon receiving the echo turn the sound calibration or trimming to provide typical
waves into electrical energy which can be accuracies of ±¼°C at room temperature
and ±¾°C over a full −55°C to 150°C
temperature range.
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
Figure4: LM-35 Heat Sensor. characters (unlike in seven segments),
animations and so on.

A 16x2 LCD means it can display 16


characters per line and there are 2 such
2.5 PIEZO BUZZER: lines. In this LCD each character is
displayed in 5x7 pixel matrix. This LCD has
PIEZO buzzers are used for making beeps, two registers, namely, Command and
tones and alert. We use a PIEZO buzzer in Data.
this project to make a warning for the
drivers.

3. WORKING PROCESS:
The working process of our system is very
Figure5: PIEZO Buzzer. simple. The supply is given through the
power jack. From the ARDUINO we take a
5V power supply and connect with the
Ultrasonic sensor’s VCC and also connect
2.6 LCD: the ground pin with ARDUINO’s ground.
Next we connect the trigger pin and echo will be lighten up and the driver will be
pin with the digital pins of ARDUINO. warned by the sound made by the buzzer.
& the distance of the object will be shown
The trigger pin is in OUTPUT MODE and on the LCD display.
Echo pin is in the INPUT MODE of the The maximum range of this project is 4
ARDUINO. The trigger pin generates sound meter. However here we have made a
wave after some time. Let the echo pin prototype of the model. It can detect
receives the sound wave after every ‘t’ objects or vehicles from more than 4
time. So this time ‘t’ is an input of the meters distance if we can use powerful
ARDUINO. Ultrasonic sensor or if we use laser sensor.
This distance can increase up to 100 meter
We have to divide this t by 1000000 to if we use Powerful Ultrasonic sensors or
convert it into seconds. laser sensors.
t = (t/1000000);
4. APPLICATIONS:
Next we use LM-35 heat sensor to measure
the temperature of the environment. It has 4.1 DETECTING OBJECTS
3 pins. We connect the VCC pin with the 5v Since we already know that every year a
power supply of the ARDUINO and ground large number of road accidents occur in the
with ground and its Output pin is connected winter season because of high fog density.
to one of the analog pins of ARDUINO. The Our main purpose was to reduce the
LM-35 sensor will calculate the percentage of road accidents by detecting
temperature. Let us save the temperature any vehicle or object within a given range &
in a variable ‘temp’. We have to multiply making aware the driver during the foggy
the output with (500/1024) to convert it in winter season.
degree.
4.2 NO PARKING SLOT
So temp = (temp*500/1024);
Drivers sometimes illegally park their cars
So we can calculate the velocity of sound by or other staffs in the no parking slot. Using
the given formula, smart vehicle detector will help to detect
the presence of any kind of vehicles in the
v = (332+0.61*temp);
no parking slot through making sounds
Now we can calculate the object distance by when any vehicle is parked. Thus it will help
using the formula, the authority know about the driver who
parked his/her vehicle in the no parking
S = (v*t)/2;
zone.
So this is how we can know the distance of
the object or vehicle that might cause any
kind of accident.

So when a object is detected within the


range of the Ultrasonic sensor, the RED LED

You might also like