Sie sind auf Seite 1von 51

Arduino based collision detection warning system

CHAPTER-1
INTRODUCTION

According to the world accident report, India has the very highest number of road
accidents within the world. Road accidents have earned India a dubious distinction. With
over 130,000 deaths annually, the country has overtaken China and now has the worst
road traffic accident rate worldwide. As many as 1, 39, 091 people lost their lives in 4,
40,042 road accidents in the country last year. The statistics released by the National
Crime Records Bureau (NCRB) 1, 18, 533 of the victims were male. They include 11,571
pedestrians. The 28 States together accounted for 1, 36, 771 deaths and the seven Union
Territories for the remaining. Tamil Nadu tops the list of with 16,175 deaths in 67,757
accidents, followed by Uttar Pradesh with 15,109 deaths in 24,478 accidents. Andhra
Pradesh is third with 14,966 deaths in 39,344 accidents and Maharashtra fourth with
13,936 deaths in 45,247 accidents. The Capital city of Delhi accounts for about 1,866
deaths in 6,937 accidents. The states in India like Tamil Nadu, Uttar Pradesh and Andhra
Pradesh accounted annually for 15.4%, 10.3% and 10.1% of the road accidents in the
country.

Reason there is no way to determine the exact distance of automobiles travelling


behind as that will be responsible for accident We are not sure that we will have a safe
travel to reach our destination-even a small distraction may bad to an accident
Drowsiness have larger role in accidents.Most of the accidents occurs due to driven
inattention since they doesn’t have a way to get alert According to the national crime
record, India bears nearly 30% of the world’s total accident rates A 2012 study by the
Insurance Institute for Highway Safety examined how particular eatures of crash-
avoidance systems affected the number of claims under various forms of insurance
coverage. The findings indicate that two crash-avoidancefeatures provide the biggest
benefits: (a) autonomous braking that would brake on its own, if the driver does not, to
avoid a forward collision, and (b) adaptive headlights that would shift the headlights in
the direction the driver steers. They found lane departure systems to be not helpful, and
perhaps harmful, at the circa 2012 stage of development. A 2015 Insurance Institute

DEPT.OF ECE, PEC,HYD. 1


Arduino based collision detection warning system

forSafety Highway study found forward collision warning and automatic braking systems
reduced rear collisions.These systems feature to measure the distances to nearby objects
via sensors located in the front and/or rear or visually minimized within adjacent grills or
recesses.The sensors emit acoustic pulses, with a control unit measuring the return
interval of each reflected signal and calculating object distances The system in turns
warns the driver with acoustic tones, theindicating object distance, with faster tones
indicating closer proximity and a continuous tone indicating a minimal pre-defined
distance. Systems may also include visual aids, such as LED or LCD readouts to indicate
object distance. A vehicle may include a vehicle pictogram on the car's infotainment
screen, with a representation of the nearby objects as coloured blocks.Rear sensors may
be activated when reverse gear is selected and deactivated as soon as any other gear is
selected. Front sensors may be activated manually and deactivated automatically when
the vehicle reaches a pre-determined speed to avoid subsequent nuisance warnings.

As an ultrasonicsystems relies on the reflection of sound waves, the system may


not detect flat objects or object insufficiently large to reflect sound e.g., a narrow pole or
a longitudinal object pointed directly at the vehicle or near an object. Objects with flat
surfaces angled from the vertical may deflect return sound waves away from the sensors,
hindering detection. Also soft object with strong sound absorption may have weaker
detection, e.g. wool or moss.The Parking Sensor, originally called as ReverseAid, was a
spin-off from the Sonic Pathfinder,an Electronic Guidance Device for the Blind. Both
devices were invented in the late 1970s by Tony Heyes while working at the Blind
Mobility Research Unit at Nottingham University in the UK. After patenting the device
in 1983 Heyes offered it to Jaguar Cars in Coventry. After test driving the prototype on
Heyes's car they very politely told him that, "You like it because you are a one-eyed
driver who cannot judge distances. Real people would not want a thing like this.heyes
teamed up with a local manufacturer and some 150 units were made and fitted to petrol
tankers, trucks and delivery vehicles. Very few were fitted to private cars since few
people wanted to drill holes in their cars.a collision avoidance system, also known as
a precrash system, forward collision warning system, or collision mitigation system, is
an automobile safety system designed to prevent or reduce the severity of a collision. It
uses rader and sometimes laser and camera to detect an imminent crash. sensors can

DEPT.OF ECE, PEC,HYD. 2


Arduino based collision detection warning system

detect fixed dangers such as approaching stop signs through a location database.once an
impending collision is detected, these systems provide a warning to the driver. When the
collision becomes imminent, they can take action autonomously without any driver input.
Collision avoidance by braking is appropriate at low vehicle speeds (e.g. below 50 km/h ,
while collision avoidance by steering may be more appropriate at higher vehicle speeds if
lanes are clear. Cars with collision avoidance may also be equipped with Adaptive Cruise
Controlusing the same forward-looking sensors.
In March 2016, the National Highway Traffic Safety Administration(NHTSA)
and the Insurance Institute for Highway Safety announced the manufacturers of 99% of
U.S. automobiles had agreed to include automatic emergency braking systems as
standard on virtually all new cars sold in the U.S. by 2022. In Europe, there was a related
agreement about an advancedemergency braking system (AEBS) or autonomous
emergency braking (AEB) in 2012. United Nations Economic Commission for
Europe (UNECE) has announced that this kind of system will become mandatory for new
heavy vehicles starting in 2015.NHTSA projected that the ensuing accelerated rollout of
automatic emergency braking would prevent an estimated 28,000 collisions and 12,000
injuries.In India, Autonomous Emergency Braking system (AEB) could become
mandatory on new cars by 2022.AEB differs from Forward Collision Warning: FCW
alert the driver with a warning but does not by itself brake the vehicle.
According to Euro NCAP, AEB has three characteristics:Autonomous the system
acts independently of the driver to avoid or mitigate the accident.Emergency the system
will intervene only in a critical situation.Braking the system tries to avoid the accident by
applying the brakes.Early warning systems were attempted as early as the late 1950s. An
example is Cadillac, which developed a prototype vehicle named the Cadillac
Cyclone which used the new radar technology to detect objects in front of the car with the
radar sensors mounted inside "nose cones". It was deemed too costly to manufacture.The
first modern forward collision avoidance system was demonstrated in 1995 by a team of
scientists and engineers at Hughes Research Laboratories in Malibu, California. The
project was funded by Delco Electronics, and was led by HRL physicist Ross D. Olney.
The technology was marketed as Forewarn. The system was radar based a technology
that was readily available at Hughes Electronics, but not commercially elsewhere. A

DEPT.OF ECE, PEC,HYD. 3


Arduino based collision detection warning system

small custom fabricated radar antenna was developed specifically for this automotive
application at 77 GHz. In August 1997, the first production laser adaptive cruise control
on a Toyota vehicle was introduced on the Celsior model.In 2008, AEB was introduced
in the British market.Between 2010 and 2014, Euro-ncap rewarded various constructors
whose system had AEB features.
Being specific, people in ages between 18-29 is easily distracted and was
responsible for many accidents in recent days. Men are responsible for major accident
rates then women because their ratio varies gradually as 10:1. Adults are easily distracted
since they can measure the exact distance of the vehicle of moving from and coming
behind them. They feel that they are safe. But it was no so bad that it was man’s attitude
and when the speed increases at bit reads to major accidents.can be a credit headache.
that dispute provides exactly how up to find a blow no cost structure in place of a
amenable electric starting with a throw setting up to an proffered dispassionate placing
though shunning several kind in reference to limitations. sensational selected mechanized
is ready that one may do self sustaining relocating a drill reaction encounter group
upstairs constant prevent materialize areas and likewise focuses sensational excavate.
startling house has in actuality a automatize mechanical plan in pursuance of mines
esteem and likewise replacement.

The accident avoidance system helps to avoid the regular accidents that will
normally occurring on highways and in city traffic. These accidents are mainly happened
by distraction, unconsciousness, distance unknown between our vehicles. So let us
consider the Indian roads and we will have 2 ultrasonic sensors where one is placed in the
front and another one behind the car. Due to this sensor, we can calculate the distance of
other automobiles nearing us. Thus we can locate other cars and we can protect ourselves
from accidents

DEPT.OF ECE, PEC,HYD. 4


Arduino based collision detection warning system

CHAPTER-2

LITERATURE SERVEY
2.1 EXISTING SYSTEMS
A microcontroller is a computer. All computers whether we are talking about
personal desktop computer or a large mainframe computer or a microcontroller have
several things in common computers have a CPU (central processing unit) that executes
programs. If you are sitting at a desktop computer right now reading this article, the CPU
in that machine is executing a program that implements the Web browser that is
displaying this page. The CPU loads the program from somewhere. On your desktop
machine, the browser program is loaded from the disk. The computer has
some RAM (random-access memory) where it can store "variables. “And the computer
has some input and output devices so it can talk to people. On your desktop machine,
the keyboard and mouse are input devices and the monitor and printer are output devices.
A hard disk is an I/O device it handles both input and output.

The desktop computer you are using is a "general purpose computer" that can run
any of thousands of programs. Microcontrollers are "special purpose computers."
Microcontrollers do one thing well. There are a number of other common characteristics
that define microcontrollers. If a computer matches a majority of these characteristics,
then you can call it a "microcontroller".

2.2PROPOSED SYSTEM

Microcontrollers are "embedded" inside some other device (often a consumer


product) so that they can control the features or actions of the product. Another name for
a microcontroller, therefore, is "embedded controller. “Microcontrollers are dedicated to
one task and run one specific program. The program is stored in ROM (read-only
memory) and generally does not change. Microcontrollers are often low-power devices.
A desktop computer is almost always plugged into a wall socket and might consume 50
watts of electricity. for output. A microcontroller also takes input from the device it is
controlling and controls the device by sending signals to different components .

DEPT.OF ECE, PEC,HYD. 5


Arduino based collision detection warning system

For example, the microcontroller inside a TV takes input from the remote
control and displays output on the TV screen. The controller controls the channel
selector, the speaker system and certain adjustments on the picture tube electronics such
as tint and brightness. The engine controller in a car takes input from sensors such as the
oxygen and knock sensors and controls things like fuel mix and spark plug timing.
A microwave oven controller takes input from a keypad, displays output on an LCD
display and controls a relay that turns the microwave generator on and off.

A microcontroller is often small and low cost. The components are chosen to
minimize size and to be as inexpensive as possible.a microcontroller is often, but not
always, ruggedized in some way. The microcontroller controlling a car's engine, for
example, has to work in temperature extremes that a normal computer generally cannot
handle. A car's microcontroller in Alaska has to work fine in -30 degree F (-34 C)
weather, while the same microcontroller in Nevada might be operating at 120 degrees F
(49 C). When you add the heat naturally generated by the engine, the temperature can go
as high as 150 or 180 degrees F (65-80 C) in the engine compartment. On the other hand,
a microcontroller embedded inside a VCR hasn't been ruggedized at all.

2.3 REQUIRED COMPONENTS

 Arduino UNO
 LCD
 Ultra sonic sensor
 LED
 Buzzer
 Potentiometer
 Bread board
 Battery
 Jumping wires

DEPT.OF ECE, PEC,HYD. 6


Arduino based collision detection warning system

2.3.1 MICRO CONTROLLER


The actual processor used to implement a microcontroller can vary widely. For
example, the cell phone shown on Inside a Digital Cell Phone contains a Z-80 processor.
The Z-80 is an 8-bit microprocessor developed in the 1970s and originally used in home
computers of the time. The Garmin GPS shown in How GPS Receivers Work contains a
low-power version of the Intel 80386, I am told. The 80386 was originally used in
desktop computers.

Figure 2.1 Micro Controller

In many products, such as microwave ovens, the demand on the CPU is fairly low
and price is an important consideration. In these cases, manufacturers turn to dedicated
microcontrollerchips chips that were originally designed to be low-cost, small, low-
power, embedded CPUs. The Motorola 6811 and Intel 8051 are both good examples of
such chips. There is also a line of popular controllers called "PIC microcontrollers"
created by a company called Microchip. By today's standards, these CPUs are incredibly
minimalistic; but they are extremely inexpensive when purchased in large quantities and
can often meet the needs of a device's designer with just one chip.

A typical low-end microcontroller chip might have 1,000 bytes of ROM and 20
bytes of RAM on the chip, along with eight I/0 pins. In large quantities, the cost of these
chips can sometimes be just pennies. You certainly are never going to run Microsoft
Word on such a chip Microsoft Word requires perhaps 30 megabytes of RAM and a
processor that can run millions of instructions per second. But then, you don't need

DEPT.OF ECE, PEC,HYD. 7


Arduino based collision detection warning system

Microsoft Word to control a microwave oven, either. With a microcontroller, you have
one specific task you are trying to accomplish, and low-cost, low-power performance is
what is important.

 Roduct so that they can control the features or actions of the product.
Another name for a microcontroller, therefore, is "embedded controller."

 Microcontrollers are dedicated to one task and run one specific program.
The program is stored in ROM (read-only memory) and generally does not
change.

 Microcontrollers are often low-power devices. A desktop computer is


almost always plugged into a wall socket and might consume 50 watts of
electricity. A battery-operated microcontroller might consume 50
milliwatts.

 A microcontroller has a dedicated input device and often has a small LED
orLCD display for output. A microcontroller also takes input from the
device it is controlling and controls the device by sending signals to
different components in the device. For example, the microcontroller
inside a TV takes input from the remote control and displays output on the
TV screen. The controller controls the channel selector,
the speaker system and certain adjustments on the picture tube electronics
such as tint and brightness. The engine controller in a car takes input from
sensors such as the oxygen and knock sensors and controls things like fuel
mix and spark plug timing. A microwave oven controller takes input from
a keypad, displays output on an LCD display and controls a relay that
turns the microwave generator on and off.

 A microcontroller is often small and low cost. The components are chosen
to minimize size and to be as inexpensive as possible.

 A microcontroller is often, but not always, ruggedized in some way. The


microcontroller controlling a car's engine, for example, has to work in
temperature extremes that a normal computer generally cannot handle. A
car's microcontroller in Alaska has to work fine in -30 degree F (-34 C)

DEPT.OF ECE, PEC,HYD. 8


Arduino based collision detection warning system

weather, while the same microcontroller in Nevada might be operating at


120 degrees F (49 C). When youadd the heat naturally generated by
the engine, the temperature can go as high as 150 or 180 degrees F (65-80
C) in the engine compartment.

On the other hand, a microcontroller embedded inside a VCR hasn't been


ruggedized at all.The actual processor used to implement a microcontroller can vary
widely. For example, the cell phone shown on Inside a Digital Cell Phone contains
a Z-80 processor. The Z-80 is an 8-bit microprocessor developed in the 1970s and
originally used in home computers of the time. The Garmin GPS shown in How GPS
Receivers Work contains a low-power version of the Intel 80386, I am told. The
80386 was originally used in desktop computers.

In many products, such as microwave ovens, the demand on the CPU is fairly low
and price is an important consideration. In these cases, manufacturers turn to dedicated
microcontroller chips -- chips that were originally designed to be low-cost, small, low-
power, embedded CPUs. The Motorola 6811 and Intel 8051 are both good examples of
such chips. There is also a line of popular controllers called "PIC microcontrollers"
created by a company called Microchip. By today's standards, these CPUs are incredibly
minimalistic; but they are extremely inexpensive when purchased in large quantities and
can often meet the needs of a device's designer with just one chip.

A typical low-end microcontroller chip might have 1,000 bytes of ROM and 20
bytes of RAM on the chip, along with eight I/0 pins. In large quantities, the cost of these
chips can sometimes be just pennies. You certainly are never going to run Microsoft
Word on such a chip -- Microsoft Word requires perhaps 30 megabytes of RAM and a
processor that can run millions of instructions per second. But then, you don't need
Microsoft Word to control a microwave oven, either. With a microcontroller, you have
one specific task you are trying to accomplish, and low-cost, low-power performance is
what is important.

DEPT.OF ECE, PEC,HYD. 9


Arduino based collision detection warning system

2.3.2 ABOUT ARDUINO


Arduino is an open-source electronics platform based on easy-to-use hardware
and software. Arduino boards are able to read inputs - light on a sensor, a finger on a
button, or a Twitter message and turn it into an output - activating a motor, turning on an
LED, publishing something online. You can tell your board what to do by sending a set
of instructions to the microcontroller on the board. To do so you use the Arduino
programming language, and the Arduino Software (IDE), based on Processing.

Over the years Arduino has been the brain of thousands of projects, from
everyday objects to complex scientific instruments. A worldwide community of maker
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 boardstarted changing to adapt to new needs
and challenges, differentiating its offer from simple 8-bit boards to
productsfor 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.

2.3.3 WHY ARDUINO


Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-use for
beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux.
Teachers and students use it to build low cost scientific instruments, to prove chemistry
and physics principles, or to get started with programming and robotics. Designers and
architects build interactive prototypes, musicians and artists use it for installations and to
experiment with new musical instruments. Makers, of course, use it to build many of the

DEPT.OF ECE, PEC,HYD. 10


Arduino based collision detection warning system

projects exhibited at the Maker Faire, for example. Arduino is a key tool to learn new
things. Anyone children, hobbyists, artists, programmers can start tinkering just following
the step by step instructions of a kit, or sharing ideas online with other members of the
Arduino community.

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.

 Inexpensive - Arduino boards are relatively inexpensive compared to other

microcontroller platforms. The least expensive version of the Arduino module


can be assembled by hand, and even the pre-assembled Arduino modules cost
less than $50
 Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh

OSX, and Linux operating systems. Most microcontroller systems are limited
to Windows.
 Simple, clear programming environment - The Arduino Software (IDE) is

easy-to-use for beginners, yet flexible enough for advanced users to take
advantage of as well. For teachers, it's conveniently based on the Processing
programming environment, so students learning to program in that
environment will be familiar with how the Arduino IDE works.
 Open source and extensible software - The Arduino software is published as

open source tools, available for extension by experienced programmers. The


language can be expanded through C++ libraries, and people wanting to
understand the technical details can make the leap from Arduino to the AVR C
programming language on which it's based. Similarly, you can add AVR-C
code directly into your Arduino programs if you want to.

DEPT.OF ECE, PEC,HYD. 11


Arduino based collision detection warning system

 Open source and extensible hardware - The plans of the Arduino boards are

published under a Creative Commons license, so experienced circuit


designerscan make their own version of the module, extending it and
improving it. Even relatively inexperiencedusers can build the breadboard
version of the module in order to understand how it works and save money.

2.3.4 ARDUINO UNO


The Arduino Uno is an open-source microcontroller board based on
the Microchip ATmega328P microcontroller and developed by Arduino.cc. The board is
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards (shields) and other circle The board has 14 Digital pins, 6
Analog pins, and programmable with the Arduino IDE (Integrated Development
Environment) via a type USB cable.It can be powered by the USB cable or by an
external 9-volt battery, though it accepts voltages between 7 and 20 volts. It is also
similar to the Arduino Nano and Leonardo. The hardware reference design is distributed
under a Creative Commons Attribution Share-Alike 2.5 license and is available on the
Arduino website. Layout and production files for some versions of the hardware are also
available.

Figure 2.2 Arduino Uno

The word "uno" means "one" in Italian and was chosen to mark the initial release
of the Arduino Software. The Uno board is the first in a series of USB-based Arduino

DEPT.OF ECE, PEC,HYD. 12


Arduino based collision detection warning system

boards, and it and version 1.0 of the Arduino IDE were the reference versions of Arduino,
now evolved to newer releases. The ATmega328 on the board comes preprogrammed
with a bootloader that allows uploading new code to it without the use of an external
hardware programmer.While the Uno communicates using the original STK500
protocol, it differs from all preceding boards in that it does not use the FTDI USB-to-
serial driver chip. Instead, it uses the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converter.

The Arduino project started at the Interaction Design Institute Ivrea (IDII)
in Ivrea, Italy. At that time, the students used a BASIC Stamp microcontroller at a cost of
$100, a considerable expense for many students. In 2003 Hernando Barragán created the
development platform as a Master's thesis project at IDII, under the supervision of
Massimo Banzi and Casey Reas, who are known for work on the Processing language.
The project goal was to create simple, low-cost tools for creating digital projects by non-
engineers. The Wiring platform consisted of a printed circuit board (PCB) with
an ATmega168 microcontroller, an IDE based on Processing and library functions to
easily program the microcontroller. In 2003, Massimo Banzi, with David Mellis, another
IDII student, and David Cuartielles, added support for the cheaper ATmega8
microcontroller to Wiring. But instead of continuing the work on Wiring, they forked the
project and renamed it. Early arduino boards used the FTDI USB-to-serial driver chip and
an ATmega168. The Uno differed from all preceding boards by featuring the
ATmega328P microcontroller and an ATmega16U2 programmed as a USB-to-serial
converter.

 Microcontroller: Microchip ATmega328P


 Operating Voltage: 5 Volts
 Input Voltage: 7 to 20 Volts
 Digital I/O Pins: 14 (of which 6 provide PWM output)
 Analog Input Pins: 6
 DC Current per I/O Pin: 20 mA
 DC Current for 3.3V Pin: 50 mA
 Flash Memory: 32 KB of which 0.5 KB used by bootloader

DEPT.OF ECE, PEC,HYD. 13


Arduino based collision detection warning system

 SRAM: 2 KB
 EEPROM: 1 KB
 Clock Speed: 16 MHz
 Length: 68.6 mm
 Width: 53.4 mm

2.3.5GENERAL PIN FUNCTIONS

 LED: There is a built-in LED driven by digital pin 13. When the pin is high
value, the LED is on, when the pin is low, it's off.
 VIN: The input voltage to the Arduino/Genuino 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 - 20V),
the USB connector (5V), or the VIN pin of the board (7-20V). Supplying
voltage via the 5V or 3.3V pins bypasses the regulator, and can damage the
board.
 3V3: A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
 GND: Ground pins.
 IOREF: This pin on the Arduino/Genuino board provides the voltage
reference with which the microcontroller operates. A properly configured
shield can read the IOREF pin voltage and select the appropriate power source
or enable voltage translators on the outputs to work with the 5V or 3.3V.
 Reset: Typically used to add a reset button to shields which block the one on
the board.

2.3.6SPECIAL PIN FUNCATIONS


Each of the 14 digital pins and 6 analog pins on the Uno can be used as an input or
output, using pinMode, digitalWrite, and digitalRead functions. They operate at 5 volts.

DEPT.OF ECE, PEC,HYD. 14


Arduino based collision detection warning system

Each pin can provide or receive 20 mA as recommended operating condition and has an
internal pull-up resistor (disconnected by default)of 20-50k ohm. A maximum of 40mA
is the value that must not be exceeded on any I/O pin to avoid permanent damage to the
microcontroller. The Uno has 6 analog inputs, labeled A0 through A5, each of which
provide 10 bits of resolution (i.e. 1024 different values). By defaul they measure from
ground to 5 volts, though is it possible to change the upper end of their range using .

 Serial / UART: pins 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.
 External interrupts: pins 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value.
 PWM (pulse-width modulation): 3, 5, 6, 9, 10, and 11. Can provide 8-bit
PWM output with the analogWrite function.
 SPI (Serial Peripheral Interface): 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).
These pins support SPI communication using the SPI library.
 TWI (two-wire interface) / I²C: A4 or SDA pin and A5 or SCL pin. Support
TWI communication using the Wire library.
 AREF (analog reference): Reference voltage for the analog inputs.

2.3.7 COMMUNICATIONS
The Arduino/Genuino Uno has a number of facilities for communicating with a
computer, another Arduino/Genuino board, or other microcontrollers. The ATmega328
provides UART TTL (5V) serial communication, which is available on digital pins 0
(RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication
over USB and appears as a virtual com port to software on the computer. The 16U2
firmware uses the standard USB COM drivers, and no external driver is needed.
However, on Windows, a .inf file is required. The Arduino Software (IDE) includes a
serial monitor which allows simple textual data to be sent to and from the board. The RX
and TX LEDs on the board will flash when data is being transmitted via the USB-to-
serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1). A SoftwareSerial library allows serial communication on any of the Uno's

DEPT.OF ECE, PEC,HYD. 15


Arduino based collision detection warning system

digital pins.Rather than requiring a physical press of the reset button before an upload,
the Arduino/Genuino Uno board is designed in a way that allows it to be reset by
software running on a connected computer. One of the hardware flow control lines (DTR)
of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100
nanofarad capacitor. When this line is asserted (taken low), the reset line drops long
enough to reset the chip.

This setup has other implications. When the Uno is connected to a computer
running Mac OS X or Linux, it resets each time a connection is made to it from software
(via USB). For the following half-second or so, the bootloader is running on the Uno.
While it is programmed to ignore malformed data (i.e. anything besides an upload of new
code), it will intercept the first few bytes of data sent to the board after a connection is
opened.

2.3.8HC-SR04 ULTRASONIC
Ultrasonic sensors are a type of acoustic sensor divided into three broad
categories: transmitters, receivers and transceivers. Transmitters convert electrical
signals into ultrasound, receivers convert ultrasound into electrical signals, and
transceivers can both transmit and receive ultrasound.In a similar way to radar and sonar,
ultrasonic transducers are used in systems which evaluate targets by interpreting the
reflected signals. For example, by measuring the time between sending a signal and
receiving an echo the distance of an object can be calculated. Passive ultrasonic sensors
are basically microphones that detect ultrasonic noise that is present under certain
conditions. Ultrasonic probes and ultrasonic baths apply ultrasonic energy to agitate
particles in a wide range of materials.

DEPT.OF ECE, PEC,HYD. 16


Arduino based collision detection warning system

Figure 2.3 Ultrasonic Sensor


Ultrasonic ranging module HC - SR04 provides 2cm - 700cm non-contact
measurement function, the ranging accuracy can reach to 3mm.Ensured stable signal
within 5m, gradually faded signal outside 5m till disappearing at 7m position.
The modules includes ultrasonic transmitters, receiver and control circuit. The basic
principle of work:Using IO trigger for at least 10us high level signal The Module
automatically sends eight 40 kHz and detect whether there is a pulse signal back. IF the
signal back, through high level , time of high output IO duration is the time from sending
ultrasonic to returning. Test distance = (high level time×velocity of sound (340M/S) / 2.

TRIG: Trigger Pulse Input


ECHO: Echo Pulse Output
GND: Ground
VCC: 5V Suppl

Working Voltage DC5V

Working Current 16Ma

Working
40Hz
Frequency

DEPT.OF ECE, PEC,HYD. 17


Arduino based collision detection warning system

700cm, Ensured stable signal within 5m, gradually faded signal outside
Max Range
5m till disappearing at 7m position.

Min Range 2cm

Trigger Input
10uS TTL pulse
Signal

Echo Output
Input TTL lever signal and the range in proportion
Signal

Dimension 46x20.5x15 mm

Table 2.1 Fearures of Ultrasonic sensor


The Timing diagram is shown below. You only need to supply a short 10uS pulse
to the trigger input to start the ranging, and then the module will send out an 8 cycle burst
of ultrasound at 40 kHz and raise its echo. The Echo is a distance object that is pulse
width and the range in proportion.you can calculate the range through the time interval
between sending trigger signal and receiving echo signal. Formula: uS / 58 = centimeters
or uS / 148 =inch; or: the range = high level time * velocity (340M/S) / 2 we suggetuse
over 60ms measurement cycle, in order to prevent trigger signal to the echo signal.

Figure 2.4 Timing Diagram

DEPT.OF ECE, PEC,HYD. 18


Arduino based collision detection warning system

The modules includes ultrasonic transmitters, receiver and control circuit. The
basic principle of work:Using IO trigger for at least 10us high level signal The Module
automatically sends eight 40 kHz and detect whether there is a pulse signal back. IF the
signal back, through high level , time of high output IO duration is the time from sending
ultrasonic to returning. Test distance = (high level time×velocity of sound (340M/S) / 2.

Figure 2.5 Ultra Sonic Sensor Working

2.3.9 LIQUID-CRYSTAL DISPLAY

History:

The origins and the complex history of liquid-crystal displays from the perspective of an
insider during the early days were described by Joseph A. Castellano in Liquid Gold: The
Story of Liquid Crystal Displays and the Creation of an Industry. Another report on the
origins and history of LCD from a different perspective until 1991 has been published by
Hiroshi Kawamoto, available at the IEEE History Center. A description of Swiss
contributions to LCD developments, written by Peter J.

DEPT.OF ECE, PEC,HYD. 19


Arduino based collision detection warning system

Background:
In 1888, Friedrich Reinitzer (1858–1927) discovered the liquid crystalline nature
of cholesterol extracted from carrots (that is, two melting points and generation of colors)
and published his findings at a meeting of the Vienna Chemical Society on May 3, 1888
(F. Reinitzer: Beiträge zur Kenntniss des Cholesterins, Monatshefte für Chemie (Wien) 9,
421–441 (1888)). In 1904, Otto Lehmann published his work "Flüssige Kristalle" (Liquid
Crystals). In 1911, Charles Mauguinfirst experimented with liquid crystals confined
between plates in thin layers.In 1922, Georges Friedel described the structure and
properties of liquid crystals and classified them in 3 types (nematics, smectics and
cholesterics). In 1927, VsevolodFrederiks devised the electrically switched light valve,
called the Fréedericksz transition, the essential effect of all LCD technology. In 1936,
the Marconi Wireless Telegraph companypatented the first practical application of the
technology, "The Liquid Crystal Light Valve". In 1962, the first major English language
publication on the subject "Molecular Structure and Properties of Liquid Crystals", by
Dr. George W. Gray. In 1962, Richard Williams of RCA found that liquid crystals had
some interesting electro-optic characteristics and he realized an electro-optical effect by
generating stripe-patterns in a thin layer of liquid crystal material by the application of a
voltage. This effect is based on an electro-hydrodynamic instability forming what are
now called "Williams domains" inside the liquid crystal.

The MOSFET (metal-oxide-semiconductor field-effect transistor) was invented


by Mohamed M. Atalla and Dawon Kahng at Bell Labs in 1959, and presented in
1960. Building on their work with MOSFETs, Paul K. Weimer at RCA developed
the thin-

Today, most LCD screens are being designed with an LED backlight instead of
the traditional CCFL backlight, while that backlight is dynamically controlled with the
video information (dynamic backlight control). The combination with the dynamic
backlight control, invented by Philips researchers Douglas Stanton, Martinus Stroomer
and Adrianus de Vaan, simultaneously increases the dynamic range of the display system
(also marketed as HDR, high dynamic range television or called Full-area Local Area
Dimming Mini-LED: Backlighting with Mini-LEDs can support over a thousand of Full-

DEPT.OF ECE, PEC,HYD. 20


Arduino based collision detection warning system

area Local Area Dimming (FLAD) zones. This allows deeper blacks and higher contract
ratio. (Not to be confused with MicroLED.)

The LCD backlight systems are made highly efficient by applying optical films
such as prismatic structure to gain the light into the desired viewer directions and
reflective polarizing films that recycle the polarized light that was formerly absorbed by
the first polarizer of the LCD (invented by Philips researchers Adrianus de Vaan and
Paulus Schaareman), generally achieved using so called DBEF films manufactured and
supplied by 3M. These polarizers consist of a large stack of uniaxial oriented birefringent
films that reflect the former absorbed polarization mode of the light. Such reflective
polarizers using uniaxial oriented polymerized liquid crystals (birefringent polymers or
birefringent glue) are invented in 1989 by Philips researchers Dirk Broer, Adrianus de
Vaan and Joerg Brambring. The combination of such reflective polarizers, and LED
dynamic backlight controlmake today's LCD televisions far more efficient than the CRT-
based sets, leading to a worldwide energy saving of 600 TWh (2017), equal to 10% of the
electricity consumption of all households worldwide or equal to 2 times the energy
production of all solar cells in the world.Due to the LCD layer that generates the desired
high resolution images at flashing video speeds using very low power electronics in
combination with these excellent LED based backlight technologies, LCD technology has
become the dominant display technology for products such as televisions, desktop
monitors, notebooks, tablets, smartphones and mobile phones. Although competing
OLED technology is pushed to the market, such OLED displays do not feature the HDR
capabilities like LCDs in combination with 2D LED backlight technologies have, reason
why the annual market of such LCD-based products is still growing faster (in volume)
than OLED-based products while the efficiency of LCDs (and products like portable
computers, mobile phones and televisions) may even be further improved by preventing
the light to be absorbed in the colour filters of the LCD. Although until today such
reflective colour filter solutions are not yet implemented by the LCD industry and did not
made it further than laboratory prototypes, such reflective colour filter solutions still
likely will be implemented by the LCD industry to increase the performance gap with
OLED technologies).

DEPT.OF ECE, PEC,HYD. 21


Arduino based collision detection warning system

A liquid-crystal display (LCD) is a flat-panel display or other electronically


modulated optical device that uses the light-modulating properties of liquid crystals.
Liquid crystals do not emit light directly, instead using a backlight or reflector to produce
images in color or monochrome. LCDs are available to display arbitrary images (as in a
general-purpose computer display) or fixed images with low information content, which
can be displayed or hidden, such as preset words, digits, and seven-segment displays, as
in a digital clock. They use the same basic technology, except that arbitrary images are
made up of many small pixels, while other displays have larger elements. LCDs can
either be normally on (positive) or off (negative), depending on the polarizer
arrangement. For example, a character positive LCD with a backlight will have black
lettering on a background that is the color of the backlight, and a character negative LCD
will have a black background with the letters being of the same color as the backlight.
Optical filters are added to white on blue LCDs to give them their characteristic
appearance.
These polarizers consist of a large stack of uniaxial oriented birefringent films
that reflect the former absorbed polarization mode of the light. Such reflective polarizers
using uniaxial oriented polymerized liquid crystals (birefringent polymers or birefringent
glue) are invented in 1989 by Philips researchers Dirk Broer, Adrianus de Vaan and Joerg
Brambring. The combination of such reflective polarizers, and LED dynamic backlight
controlmake today's LCD televisions far more efficient than the CRT-based sets, leading
to a worldwide energy saving of 600 TWh (2017), equal to 10% of the electricity

Figure 2.6Liquid Crystal Display(LCD)

DEPT.OF ECE, PEC,HYD. 22


Arduino based collision detection warning system

LCDs are used in a wide range of applications, including LCD


televisions, computer monitors, instrument panels, aircraft cockpit displays, and indoor
and outdoor signage. Small LCD screens are common in portable consumer devices such
as digital cameras, watches, calculators, and mobile telephones, including smartphones.
LCD screens are also used on consumer electronics products such as DVD players, video
game devices and clocks. LCD screens have replaced heavy, bulky cathode ray
tube (CRT) displays in nearly all applications. LCD screens are available in a wider range
of screen sizes than CRT and plasma displays, with LCD screens available in sizes
ranging from tiny digital watches to very large television receivers. LCDs are slowly
being replaced by OLEDs, which can be easily made into different shapes, and have a
lower response time, wider color gamut, virtually infinite color contrast and viewing
angles, lower weight for a given display size and a slimmer profile (because OLEDs use a
single glass or plastic panel whereas LCDs use two glass panels; the thickness of the
panels increases with size but the increase is more noticeable on LCDs) and potentially
lower power consumption (as the display is only "on" where needed and there is no
backlight). OLEDs, however, are more expensive for a given display size due to the very
expensive electroluminescent materials or phosphors that they use. Also due to the use of
phosphors, OLEDs suffer from screen burn-in and there is currently no way to recycle
OLED displays, whereas LCD panels can be recycled, although the technology required
to recycle LCDs is not yet widespread. Attempts to increase the lifespan of LCDs
are quantum dot displays, which offer similar performance as an OLED display, but the
Quantum dot sheet that gives these displays their characteristics can not yet be recycled.

Since LCD screens do not use phosphors, they rarely suffer image burn-in when a
static image is displayed on a screen for a long time, e.g., the table frame for an airline
flight schedule on an indoor sign. LCDs are, however, susceptible to image
persistence. The LCD screen is more energy-efficient and can be disposed of more safely
than a CRT can. Its low electrical power consumption enables it to be used in battery-
powered electronic equipment more efficiently than CRTs can be. By 2008, annual sales
of televisions with LCD screens exceeded sales of CRT units worldwide, and the CRT
became obsolete for most purposes.Each pixel of an LCD typically consists of a layer
two polarizing filters (parallel and perpendicular), the axes of transmission of which are

DEPT.OF ECE, PEC,HYD. 23


Arduino based collision detection warning system

(in most of the cases) perpendicular to each other. Without the liquid crystal between the
polarizing filters, light passing through the first filter would be blocked by the second
(crossed) polarizer. Before an electric field is applied, the orientation of the liquid-crystal
molecules is determined by the alignment at the surfaces of electrodes. In a twisted
nematic (TN) device, the surface alignment directions at the two electrodes are
perpendicular to each other, and so the molecules arrange themselves in
a helical structure, or twist. This induces the rotation of the polarization of the incident
light, and the device appears gray. If the applied voltage is large enough, the liquid
crystal molecules in the center of the layer are almost completely untwisted and the
polarization of the incident light is not rotated as it passes through the liquid crystal layer.
This light will then be mainly polarized perpendicular to the second filter, and thus be
blocked and the pixel will appear black. By controlling the voltage applied across the
liquid crystal layer in each pixel, light can be allowed to pass through in varying amounts
thus constituting different levels of gray. Color LCD systems use the same technique,
with color filters used to generate red, green, and blue pixels.

The optical effect of a TN device in the voltage-on state is far less dependent on
variations in the device thickness than that in the voltage-off state. Because of this, TN
displays with low information content and no backlighting are usually operated between
crossed polarizers such that they appear bright with no voltage (the eye is much more
sensitive to variations in the dark state than the bright state). As most of 2010-era LCDs
are used in television sets, monitors and smartphones, they have high-resolution matrix
arrays of pixels to display arbitrary images using backlighting with a dark background.
When no image is displayed, different arrangements are used. For this purpose, TN LCDs
are operated between parallel polarizers, whereas IPS LCDs feature crossed polarizers. In
many applications IPS LCDs have replaced TN LCDs, in particular in smartphones such
as iPhones. Both the liquid crystal material and the alignment layer material contain ionic
compounds. If an electric field of one particular polarity is applied for a long period of
time, this ionic material is attracted to the surfaces and degrades the device performance.
This is avoided either by applying an alternating current or by reversing the polarity of
the electric field as the device is addressed (the response of the liquid crystal layer is
identical, regardless of the polarity of the applied field).

DEPT.OF ECE, PEC,HYD. 24


Arduino based collision detection warning system

Displays for a small number of individual digits or fixed symbols (as in digital
watches and pocket calculators) can be implemented with independent electrodes for
each segment. In contrast, full alphanumeric or variable graphics displays are usually
implemented with pixels arranged as a matrix consisting of electrically connected rows
on one side of the LC layer and columns on the other side, which makes it possible to
address each pixel at the intersections. The general method of matrix addressing consists
of sequentially addressing one side of the matrix.

for example by selecting the rows one-by-one and applying the picture
information on the other side at the columns row-by-row. For details on the various
matrix addressing schemes see passive-matrix and active-matrix addressed LCDs.LCDs,
along with OLED displays, are manufactured in large sheets of glass whose size has
increased over time. Several displays are manufactured at the same time, and then cut
from the sheet of glass, also known as the mother glass.

The increase in size allows more displays or larger displays to be made, just like
with increasing wafer sizes in semiconductor manufacturing.In a twisted nematic (TN)
device, the surface alignment directions at the two electrodes are perpendicular to each
other, and so the molecules arrange themselves in a helical structure, or twist. This
induces the rotation of the polarization of the incident light, and the device appears gray.

A monitors and smartphones, they have high-resolution matrix arrays of pixels to


display arbitrary images using backlighting with a dark background. When no image is
displayed, different arrangements are used. For this purpose, TN LCDs are operated
between parallel polarizers, whereas IPS LCDs feature crossed polarizers. In many
applications IPS LCDs have

DEPT.OF ECE, PEC,HYD. 25


Arduino based collision detection warning system

Figure 2.7LCD Generation Graph


The general method of matrix addressing consists of sequentially addressing one side of
the matrix, for example by selecting the rows one-by-one and applying the picture
information on the other side at the columns row-by-row. For details on the various
matrix addressing schemes see passive-matrix and active-matrix addressed LCDs. LCDs,
along with OLED displays, are manufactured in large sheets of glass whose size has
increased over time. Several displays are manufactured at the same time, and then cut
from the sheet of glass, also known as the mother glass. The increase in size allows more
displays or larger displays to be made, just like with increasing wafer sizes in
semiconductor manufacturing

DEPT.OF ECE, PEC,HYD. 26


Arduino based collision detection warning system

Generation Length [mm] Height [mm] Year of introduction

GEN 1 300 400 1990

GEN 2 370 470

GEN 3 550 650 1996-1998

GEN 3.5 600 720 1996

GEN 4 680 880 2000-2002

GEN 4.5 730 920 2000-2004

GEN 5 1100 1250-1300 2002-2004

GEN 6 1500 1800--1850 2002-2004

GEN 7 1870 2200 2006

GEN 7.5 1950 2250

GEN 8 2160 2460

GEN 8.5 2200 2500

GEN 10 2880 3130 2009

Table 2.2 Generation Table of LCD

DEPT.OF ECE, PEC,HYD. 27


Arduino based collision detection warning system

Until Gen 8, manufacturers would not agree on a single mother glass size and as a result,
different manufacturers would use slightly different glass sizes for the same generation.
The thickness of the mother glass also increases with each generation, so larger mother
glass sizes are better suited for larger displays. An LCD Module (LCM) is a ready-to-use
LCD. Thus, a factory that makes LCD Modules does not necessarily make LCDs, it may
only assemble them into the modules.

2.3.10 POTENTIOMETER
A potentiometer is a three-terminal resistor with a sliding or rotating contact that
forms an adjustable voltage divider. If only two terminals are used, one end and the
wiper, it acts as a variable resistor or rheostat.The measuring instrument called
a potentiometer is essentially a voltage divider used for measuring electric (voltage); the
component is animplementation of the same principle, hence its name.Potentiometers are
commonly used to control electrical devices such as volume controls on audio equipment.
Potentiometers operated by a mechanism can be used as position transducers, for
example, in a joystick. Potentiometers are rarely used to directly control significant
power (more than a watt), since the power dissipated in the potentiometer would be
comparable to the power in the controlled load.There are a number of terms in the
electronics industry used to describe certain types of potentiometers

Figure 2.8 Potentiometer

DEPT.OF ECE, PEC,HYD. 28


Arduino based collision detection warning system

Slide pot or slider pot: a potentiometer that is adjusted by sliding the wiper left or
right (or up and down, depending on the installation), usually with a finger or
thumbthumb pot or thumbwheel pot: a small rotating potentiometer meant to be adjusted
infrequently by means of a small thumbwheeltrimpot or trimmer pot:
a trimmer potentiometer typically meant to be adjusted once or infrequently for "fine-
tuning" an electrical signaPotentiometers consist of a resistive element, a sliding contact
(wiper) that moves along the element, making good electrical contact with one part of it,
electrical terminals at each end of the element, a mechanism that moves the wiper from
one end to the other, and a housing containing the element and wiper. See drawing. Many
inexpensive potentiometers are constructed with a resistive element formed into an arc of
a circle usually a little less than a full turn and a wiper sliding on this element when
rotated, making electrical contact. The resistive element can be flat or angled. Each end
of the resistive element is connected to a terminal on the case. The wiper is connected to
a third terminal, usually between the other two. On panel potentiometers, the wiper is
usually the center terminal of three. For single-turn potentiometers, this wiper typically
travels just under one revolution around the contact. The only point of ingress for
contamination is the narrow space between the shaft and the housing it rotates in.

Another type is the linear slider potentiometer, which has a wiper which slides
along a linear element instead of rotating. Contamination can potentially enter anywhere
along the slot the slider moves in, making effective sealing more difficult and
compromising long-term reliability. An advantage of the slider potentiometer is that the
slider position gives a visual indication of its setting. While the setting of a rotary
potentiometer can be seen by the position of a marking on the knob, an array of sliders
can give a visual impression of, for example, the effect of a multi-band equalizer (hence
the term "graphic equalizer").The resistive element of inexpensive potentiometers is often
made of graphite. Other materials used include resistance wire, carbon particles in plastic,
and a ceramic/metal mixture called cermet. Conductive track potentiometers use
conductive polymer resistor pastes that contain hard-wearing resins and polymers,
solvents, and lubricant, in addition to the carbon that provides the conductive properties.
Multiturn potentiometers are also operated by rotating a shaft, but by several turns rather
than less than a full turn. Some multiturn potentiometers have a linear resistive element

DEPT.OF ECE, PEC,HYD. 29


Arduino based collision detection warning system

with a sliding contact moved by a lead screw; others have a helical resistive element and
a wiper that turns through 10, 20, or more complete revolutions, moving along the helix
as it rotates. Multiturn potentiometers, both user-accessible and preset, allow finer
adjustments; rotation through the same angle changes the setting by typically a tenth as
much as for a simple rotary potentiometer.

A string potentiometer is a multi-turn potentiometer operated by an attached reel


of wire turning against a spring, enabling it to convert linear position to a variable
resistance.User-accessible rotary potentiometers can be fitted with a switch which
operates usually at the anti-clockwise extreme of rotation. Before digital electronics
became the norm such a component was used to allow radio and television receivers and
other equipment to be switched on at minimum volume with an audible click, then the
volume increased, by turning a knob. Multiple resistance elements can be ganged
together with their sliding contacts on the same shaft, for example, in stereo audio
amplifiers for volume control. In other applications, such as domestic light dimmers, the
normal usage pattern is best satisfied if the potentiometer remains set at its current
position, so the switch is operated by a push action, alternately on and off, by axial
presses of the knob. Others are enclosed within the equipment and are intended to be
adjusted to calibrate equipment during manufacture or repair, and not otherwise touched.
They are usually physically much smaller than user-accessible potentiometers, and may
need to be operated by a screwdriver rather than having a knob. They are usually called
"preset potentiometers" or "trim[ming] pots". Some presets are accessible by a small
screwdriver poked through a hole in the case to allow servicing without dismantling.The
relationship between slider position and resistance, known as the "taper" or "law", is
controlled by the manufacturer. In principle any relationship is possible, but for most
purposes linear or logarithmic (aka "audio taper") potentiometers are sufficient. A letter
code may be used to identify which taper is used, but the letter code definitions are not
standardized. Potentiometers made in Asia and the USA are usually marked with an "A"
for logarithmic taper or a "B" for linear taper; "C" for the rarely seen reverse logarithmic
taper. Others, particularly those from Europe, may be marked with an "A" for linear
taper, a "C" or "B" for logarithmic taper, or an "F" for reverse logarithmic taper. The
code used also varies between different manufacturers. When a percentage is referenced

DEPT.OF ECE, PEC,HYD. 30


Arduino based collision detection warning system

with a non-linear taper, it relates to the resistance value at the midpoint of the shaft
rotation. A 10% log taper would therefore measure 10% of the total resistance at the
midpoint of the rotation; i.e. 10% log taper on a 10 kOhm potentiometer would yield
1 kOhm at the midpoint. The higher the percentage, the steeper the log curve.

2.3.11 LINEAR TAPER POTENTIOMETER


A linear taper potentiometer (linear describes the electrical characteristic of the
device, not the geometry of the resistive element) has a resistive element of constant
cross-section, resulting in a device where the resistance between the contact (wiper) and
one end terminal is proportional to the distance between them. Linear taper
potentiometers are used when the division ratio of the potentiometer must be proportional
to the angle of shaft rotation (or slider position), for example, controls used for adjusting
the centering of the display on an analog cathode-ray oscilloscope. Precision
potentiometers have an accurate relationship between resistance and slider
position.A logarithmic taper potentiometer is a potentiometer that has a bias built into the
resistive element. Basically this means the center position of the potentiometer is not one
half of the total value of the potentiometer. The resistive element is designed to follow a
logarithmic taper, aka a mathematical exponent or "squared" profile. A logarithmic taper
potentiometer is constructed with a resistive element that either "tapers" in from one end
to the other, or is made from a material whose resistivity varies from one end to the other.
This results in a device where output voltage is a logarithmic function of the slider
position. Most (cheaper) "log" potentiometers are not accurately logarithmic, but use two
regions of different resistance (but constant resistivity) to approximate a logarithmic law.
The two resistive tracks overlap at approximately 50% of the potentiometer rotation; this
gives a stepwise logarithmic taper. A logarithmic potentiometer can also be simulated
(not very accurately) with a linear one and an external resistor. True logarithmic
potentiometers are significantly more expensive. Logarithmic taper potentiometers are
often used for volume or signal level in audio systems, as human perception of audio
volume is logarithmic.

DEPT.OF ECE, PEC,HYD. 31


Arduino based collision detection warning system

2.3.12 BUZZER
A buzzer or beeper be mechanical, electromechanical, or piezoelectric (piezo for
short). Typical uses of buzzers and beepers include alarm devices, timers, and
confirmation of user input such as a mouse click or keystroke.Early devices were based
on an electromechanical system identical to an electric bell without the metal gong.
Similarly, a relay may be connected to interrupt its own actuating current, causing
the contacts to buzz. Often these units were anchored to a wall or ceiling to use it as a
sounding board. The word "buzzer" comes from the rasping noise that electromechanical
buzzers made.a joy buzzer is an example of a purely mechanical buzzer and they require
drivers. Other examples of them are doorbells.Piezoelectric disk beeper.

Figure 2.9 Buzzer

2.3.13LIGHT-EMITTING DIODE (LED)


A light-emitting diode (LED) is a semiconductor light source that emits light
when current flows through it. Electrons in the semiconductor recombine with electron
holes, releasing energy in the form of photons. The color of the light (corresponding to
the energy of the photons) is determined by the energy required for electrons to cross
the band gap of the semiconductor. White light is obtained by using multiple
semiconductors or a layer of light-emitting phosphor on the semiconductor
device.Appearing as practical electronic components in 1962, the earliest LEDs emitted
low-intensity infrared light. Infrared LEDs are used in remote-control circuits, such as

DEPT.OF ECE, PEC,HYD. 32


Arduino based collision detection warning system

those used with a wide variety of consumer electronics. The first visible-light LEDs were
of low intensity and limited to red. Modern LEDs are available across
the visible, ultraviolet, and infrared wavelengths, with high light output. Early LEDs were
often used as indicator lamps, replacing small incandescent bulbs, and in seven-segment
displays. Recent developments have produced high-output white light LEDs suitable for
room and outdoor area lighting. LEDs have led to new displays and sensors, while their
high switching rates are useful in advanced communications technology.

Figure 2.10LED

LEDs have many advantages over incandescent light sources, including lower
energy consumption, longer lifetime, improved physical robustness, smaller size, and
faster switching. LEDs are used in applications as diverse as aviation lighting, automotive
headlamps, advertising, general lighting, traffic signals, camera flashes, lighted
wallpaper, plant growing light, and medical devices.

DEPT.OF ECE, PEC,HYD. 33


Arduino based collision detection warning system

CHAPTER-3

DESIGN AND IMPLEMENTATION

3.1 BLOCK DIAGRAM

Figure 3.1 Bblock Diagram of Collision Detection Warning System

3.1.1 ARDUIONO
An Arduino is actually a microcontroller based kit which can be either used
directly by purchasing from the vendor or can be made at home using the components,
owing to its open source hardware feature. It is basically used in communications and in
controlling or operating many devices. It was founded by Massimo Banzi and David
Cuartielles in 2005.Arduino’s processor basically uses the Harvard architecture where the
program code and program data have separate memory. It consists of two memories-
Program memory and the data memory.The code is stored in the flash program memory,

DEPT.OF ECE, PEC,HYD. 34


Arduino based collision detection warning system

whereas the data is stored in the data memory. The Atmega328 has 32 KB of flash
memory for storing code (of which 0.5 KB is used for the bootloader), 2 KB of SRAM
and 1 KB of EEPROM and operates with a clock speed of 16MHz.

A typical example of Arduino board is Arduino Uno. It consists of ATmega328- a


28 pin microcontroller. Arduino Uno consists of 14 digital input/output pins (of which 6
can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB
connection, a power jack, an ICSP header, and a reset buttonPower Jack: Arduino can be
power either from the pc through a USB or through external source like adaptor or a
battery. It can operate on a external supply of 7 to 12V. Power can be applied externally
through the pin Vin or by giving voltage reference through the IORef pin. Digital Inputs:
It consists of 14 digital inputs/output pins, each of which provide or take up 40mA
current. Some of them have special functions like pins 0 and 1, which act as Rx and Tx
respectively , for serial communication, pins 2 and 3-which are external interrupts, pins
3,5,6,9,11 which provides pwm output and pin 13 where LED is connected. Analog
inputs: It has 6 analog input/output pins, each providing a resolution of 10 bits. It
provides reference to the analog inputs Reset: It resets the microcontroller when low.

3.1.2 LCD

We always use devices made up of Liquid Crystal Displays (LCDs) like


computers, digital watches and also DVD and CD players. They have become very
common and have taken a giant leap in the screen industry by clearly replacing the use of
Cathode Ray Tubes (CRT). CRT draws more power than LCD and are also bigger and
heavier. LCD’s have made displays thinner than CRT’s. Even while comparing the LCD
screen to an LED screen, the power consumption is lesser as it works on the basic
principle of blocking light rather than dissipating. All of us have seen an LCD, but no
one knows the exact working of it. Let us take a look at the working of an LCD.

 Though the making of LCD is rather simple there are certain facts that should
be noted while making it.

DEPT.OF ECE, PEC,HYD. 35


Arduino based collision detection warning system

 The basic structure of an LCD should be controllably changed with respect to


the applied electric current.
 The light that is used on the LCD can be polarized.
 Liquid 0crystals should be able to both transmit and change polarized light.
 There are transparent substances that can conduct electricity.
To make an LCD, you need to take two polarized glass pieces. The glass which
does not have a polarized film on it must be rubbed with a special polymer which creates
microscopic grooves in the surface. It must also be noted that the grooves are on the same
direction as the polarizing film. Then, all you need to do is to add a coating of nematic
liquid crystals to one of the filters. The grooves will cause the first layer of molecules to
align with the filter’s orientation. At right angle to the first piece, you must then add a
second piece of glass along with the polarizing film. Till the uppermost layer is at a 90-
degree angle to the bottom, each successive layer of TN molecules will keep on twisting.
The first filter will naturally be polarized as the light strikes it at the beginning. Thus the
light passes through each layer and is guided on to the next with the help of molecules.
When this happens, the molecules tend to change the plane of vibration of the light to
match their own angle. When the light reaches the far side of the liquid crystal substance,
it vibrates at the same angle as the final layer of molecules. The light is only allowed an
entrance if the second polarized glass filter is same as the final layer. Take a look at the
figure below.They have become very common and have taken a giant leap in the screen
industry by clearly replacing the use of Cathode Ray Tubes (CRT). CRT draws more
power than LCD and are also bigger and heavier. LCD’s have made displays thinner than
CRT’s. Even while comparing the LCD screen to an LED screen, the power consumption
is lesser as it works on the basic principle of blocking light rather than dissipating. All of
us have seen an LCD, but no one knows the exact working of it. Let us take a look at the
working of an LCD.

DEPT.OF ECE, PEC,HYD. 36


Arduino based collision detection warning system

Figure 3.2 Working of LCD

The main principle behind liquid crystal molecules is that when an electric current
is applied to them, they tend to untwist. This causes a change in the light angle passing
through them. This causes a change in the angle of the top polarizing filter with respect to
it. So little light is allowed to pass through that particular area of LCD. Thus that area
becomes darker comparing to others.For making an LCD screen, a reflective mirror has
to be setup in the back. An electrode plane made of indium-tin oxide is kept on top and a
glass with a polarizing film is also added on the bottom side. The entire area of the LCD
has to be covered by a common electrode and above it should be the liquid crystal
substance. Next comes another piece of glass with an electrode in the shape of the
rectangle on the bottom and, on top, another polarizing film. It must be noted that both of
them are kept at right angles. When there is no current, the light passes through the front
of the LCD it will be refleted by the mirror and bounced back. As the electrode is
connected to a temporary battery the current from it will cause the liquid crystals between
the common-plane electrode and the electrode shaped like a rectangle to untwist. Thus
the light is blocked from passing through. Thus that particular rectangular area appears
blank.

DEPT.OF ECE, PEC,HYD. 37


Arduino based collision detection warning system

3.1.3 ULTRASONIC SENSOR

Ultrasonic sensors work by emitting sound waves at a frequency too high for
humans to hear. They then wait for the sound to be reflected back, calculating distance
based on the time required. This is similar to how radar measures the time it takes a radio
wave to return after hitting an object.

Figure 3.3 Working of Ultra Sonic Sensor


While some sensors use a separate sound emitter and receiver, it’s also
possible to combine these into one package device, having an ultrasonic element
alternate between emitting and receiving signals. This type of sensor can be
manufactured in a smaller package than with separate elements, which is
convenient for applications where size is at a premium. While radar and ultrasonic
sensors can be used for some of the same purposes, sound-based sensors are readily
available—they can be had for just a couple dollars in some cases—and in certain
situations, they may detect objects more effectively than radar. For instance, while
radar, or even light-based sensors, have a difficult time correctly processing clear
plastic, ultrasonic sensors have no problem with this. In fact, they’re unaffected by
the color of the material they are sensing.On the other hand, if an object is made
out of a material that absorbs sound or is shaped in such a way that it re flects the
sound waves away from the receiver, readings will be unreliable. If you need to
measure the specific distance from your sensor, this can be ca lculated based on this
formula:Distance = ½ T x C(T = Time and C = the speed of sound)At 20°C (68°F),
the speed of sound is 343 meters/second (1125 feet/second), but this varies

DEPT.OF ECE, PEC,HYD. 38


Arduino based collision detection warning system

depending on temperature and humidity.Specially adapted ultrasonic sensors can


also be used underwater. The speed of sound, however, is 4.3 times as fast in water
as in air, so this calculation must be adjusted significantly.

So where can we use these sensors? Robot navigation comes to mind, as


well as factory automation. Water-level sensing is another good use, and can be
accomplished by positioning one sensor above a water surface. Another aquatic
application is to use these sensors to “see” the bottom of a body of water, traveling
through the water, but reflecting off the bottom surface below. Though it might not
be immediately obvious, if configured correctly ultrasonic sensors ca n even
measure fluid flow rates. In the simplest case, an emitter and a receiver (separate in
this configuration) are aligned with the flow of a fluid. Since sound is traveling
through a moving medium, the speed of sound relative to these elements will be
increased or decreased by the velocity of the fluid. This can be applied to flow
inside pipes by aligning these two elements at an angle to each other, calculating
the effective velocity increase based on the trigonometric relations between the
two.Flowrate accuracy can be increased by using data from multiple ultrasonic
elements, giving results accurate to within a fraction of a percent.

3.1.4 BUZZER

Figure 3.4 Working of buzzer

DEPT.OF ECE, PEC,HYD. 39


Arduino based collision detection warning system

A buzzer is a small yet efficient component to add sound features to our


project/system. It is very small and compact 2-pin structure hence can be easily used
on breadboard, Perf Board and even on PCBs which makes this a widely used component
in most electronic applications.There are two types are buzzers that are commonly
available. The one shown here is a simple buzzer which when powered will make a
Continuous Beeeeeeppp.... sound, the other type is called a readymade buzzer which will
look bulkier than this and will produce a Beep. Beep. Beep. Sound due to the internal
oscillating circuit present inside it. But, the one shown here is most widely used because
it can be customised with help of other circuits to fit easily in our application This buzzer
can be used by simply powering it using a DC. power supply ranging from 4V to 9V. A
simple 9V battery can also be used, but it is recommended to use a regulated +5V or +6V
DC supply. The buzzer is normally associated with a switching circuit to turn ON or turn
OFF the buzzer at required time and require interval.

3.1.5 LED
A light-emitting diode is a two-lead semiconductor light source. It is a p–n
junction diode that emits light when activated. When a suitable voltage is applied to the
leads, electrons are able to recombine with electron holes within the device, releasing
energy in the form of photons.

Figure 3.5 Working of LED

DEPT.OF ECE, PEC,HYD. 40


Arduino based collision detection warning system

3.2 CIRCUIT DIAGRAM AND CONSTRUCTION

Figure 3.6 Circuit Diagram and Construction

Thisis an Arduino-based collision detection warning system. This kind of


system is the fastest growing safety feature in automotive industries. Such a system
enables vehicles to identify the chances of collision and give visual and audio
warning to driver, so that the driver can take necessary action to avoid collision. This
project idea is based on an Arduino controller and the whole project will give you
very good understanding of how this system works. The step-by-step method is
explained so that you can make this system. The hardware connection, pin
information and Arduino program is explained clearly.

Step 1: Please gather the following items


 LCD:Connect the lcd pin as per the circuit diagram
 Controller: I used Arduino micro-controller. This you can get from an
online seller like Amazon, etc.
 Sensor: I used HR SC-04 ultrasonic sensor.
 Piezo Buzzer: I used Piezo buzzer to make the audio warning.
 LED: There are two colors of LED I used - red and blue.

DEPT.OF ECE, PEC,HYD. 41


Arduino based collision detection warning system

 Wires: Jumper wires are required to make hardware connections. You


need to use all types of jumper wires like male-male, female-female and
female-male.

Step 2: Connect all hardware the hardware you gather in first step, now connect all
of them to the controller through wires.Sensor to controller pin informationThe
sensor has four pins: VCC, Trig, Echo, and GND. Connect:
 VCC pin to 5V on controller
 GND pin to GND on controller
 Trig pin to pin-7 on controller
 Echo pin to pin-4 on controller
Piezo Buzzer to controller pin information

Piezo buzzer has two pins:

 Connect one pin to pin-10 on controller


 Connect another pin to GND on controller
Red LED to controller pin information

The red LED has two pins:

 Connect one pin to pin-2 on controller


 Connect another pin to GND on controller
Blue LED to controller pin information

The blue LED has two pins:

 Connect one pin to pin-13 on controller


 Connect another pin to GND on controller
Controller to Computer connection information

You have a USB data cable that you get with buying the Arduino. With this data
cable, you connect the computer to the Arduino board. Now launch Arduino IDE.
After connecting the computer, you must select the board and port from the menu.
Please see the attached screen shot for the help.

DEPT.OF ECE, PEC,HYD. 42


Arduino based collision detection warning system

CHAPTER-4

PROJECT IMPLIMENTAION

4.1 RESULT AND ANALYSIS


The circuit of arduino based collision dection warning system is shown in below
figure.

Prototype built
The basic idea behind this project is to avoid acciendents. It is a precautionary measure
that alerts the driver .the initial stage begins from the ultrasonic sensor that identifies the
vehicle in the front and back side.

DEPT.OF ECE, PEC,HYD. 43


Arduino based collision detection warning system

Prototype alerting system


The distance between one vehicle and another vehicle was displayed in LCD.
Wire connections are made from the bread board to the LCD.aurdino kit to the ultrasonic
sensors and finally bread board to the aurdino kit it is aranaged on the car.if the vechile is
near to owner vechie suppose 20cm as per our project and range of ultra sonic sensors the
driver will alert using the LED and buzzer in the LCD display the distance of the vechile
can be shown

DEPT.OF ECE, PEC,HYD. 44


Arduino based collision detection warning system

Prototype output alert system


As in this picture we can see the LED glowing and the distance is shown in the
LCD and the buzzer making a sound
Distance between following and leading vehicle is very important in this project
that is why our testing is based on that factor. Also various system subsystems were also
testing to make sure their connection is firm and give desired result. Collision Distance
The distance measured by the ultrasonic sensor were found to vary from the actual
measurement
taken, since the reliability of the system is very much dependent on the distance
acquired
system is 10.1%. from the sensors it was calibrated to give the expected reading.

distance and measured distance average respectively From the graph in figure it

g can seen that in all five tests carried out the difference between the expected and

percentage error of the graph in figure 5 it can be seen that in all five tests carried out

DEPT.OF ECE, PEC,HYD. 45


Arduino based collision detection warning system

the difference between the expected and measure distance is not much and average of

2.8cm. It shows that the performance of the system is above average and at a safe

distance

the graph in figure 5 it can be seen that in all five tests carried out the difference
between the expected and measure distance is not much and average of 2.8cm. It shows
that the performance of the system is above average and
at a safe distance.

DEPT.OF ECE, PEC,HYD. 46


Arduino based collision detection warning system

ADVANTAGES , DISADVANTAGESANDAPPLICATIONS
 ADVANTAGES
 The basic idea behind this project is to avoid accidents.
 If the car reaches 10 meter, green color light will glow that will
show the notification.
 At the same time the distance between one vehicle and another
vehicle was displayed in LCD.
 This project will make easy calculation of an distance between one
vehicle and another vehicle for the driver.
 Use the knows the distance about following vehicle
 In future, we are going to reduce the speed of one vehicle
according to the following distance of other vehicle
 The system comprises, very low cost components such as
ultrasonic sensor,LCD and LEDs.

 DISADVANTAGE
 Ultrasonic sensors won’t give accurate results in some climatic
temperatures.
 APPLICATIONS
 Accidents can be reduced using Arduino based collision detection
system
 It is useful in “night times “for driver to identify which objects not
visible during night times
 It is useful in vehicles parking ,because driver can’t see down side
of the vehicles in parking
 Its very useful in winter season.

DEPT.OF ECE, PEC,HYD. 47


Arduino based collision detection warning system

 FUTURE SCOPE
In this paper we proposed and implement the accident avoidance system. Using
this system we may avoid many accidents happened due to the following system .The
system comprises, very low cost components such as ultrasonic sensor, LCD and LEDs.
This system might have many advantage such as,Use the knows the distance about
following vehicle In future, we are going to reduce the speed of one vehicle according to
the following distance of other vehicle. By this system, we may prevent many accidents
and INDIA will become a accident less country.

DEPT.OF ECE, PEC,HYD. 48


Arduino based collision detection warning system

 CONCLUSION
Arduino based collision detection and warning system is designed and
mounted on an RC car to demonstrate the system and it was found functional. The
ultrasonic sensor was able to read distances of shorter range accurately and alert the
driver if the car is in danger of collision. There were differences in the expected distance
and measure distance but the system is safe. A distance sensor capable of detecting long
distance is recommended for this to be applied in real vehicles. With the right materials,
it is possible to improve the system features so that is can be integrated in real vehicles.

DEPT.OF ECE, PEC,HYD. 49


Arduino based collision detection warning system

 REFERNCES
[1] Steven Loveday, (2018), "17 Safest Cars of 2018" Retrieved: August 02, 2018,
Available at: https://cars.usnews.com/cars-trucks/safest-cars-of-
the-year
[2] Benjie Song, Mengen Fu1, Yi Yang, Mailing Wang, Xingu Wang and Alain
Kornhauser, "Real-time lane detection and forward collision
warning system based on stereo vision", 2017 IEEE Intelligent Vehicles Symposium
(IV), pp. 493-498, June 2017, Redondo Beach, CA, USA
[3] Narayan Srinivasan “Vision-based vehicle detection and tracking method for forward
collision warning in automobiles”, IEEE Intelligent Vehicle
Symposium, 626-631, 17-21 June 2002, Versailles, France.
[4] Nagaoka, M., Raksincharoensak, P., & Nagai, M. (2008). “Study on forward
collision warning system adapted to driver characteristics and road
Environment”, Proceedings of International Conference on Control, Automation and
Systems. Korea.
[5] Woon-Sung Lee, Ji-Yong Lee, and Sang-Soo Park (2011), "A new approach to
forward collision avoidance", 3rd International Conference on
Road Safety and Simulation, Indianapolis Indiana, United States.
[6] Wenzhou Wang, Student Member, IEEE, Jungian Xi, and Ding Zhao, "Learning and
Inferring a Driver’s Braking Action in Car-Following
Scenarios", IEEE Transactions on Vehicular Technology January 2018.
[7] Anne Marie Helmenstine, Ph.D., (2018), "How to Calculate Percent Error" Retrieved:
September 11, 2018, Available at:
https://www.thoughtco.com/how-to-calculate-percent-error-609584

DEPT.OF ECE, PEC,HYD. 50


Arduino based collision detection warning system

DEPT.OF ECE, PEC,HYD. 51

Das könnte Ihnen auch gefallen