CACC based on UART Protocol using Microcontroller 2015-16
CHAPTER 1
INTRODUCTIONSignificant developments in advanced driver assistance systems (ADAS) have been achieved
during the last decade. Intelligent systems based on on-board perception/ detection devices
have contributed to improving road safety. The next step in the development of ADAS points
toward vehicle-to-vehicle (V2V) communications to obtain more extensive and reliable
information about vehicles in the surrounding area, representing cooperative intelligent
transportation systems (ITS).Using wireless communication, potential risk situations can be
detected earlier to help avoid crashes, and more extensive information about other vehicles’
motions can help improve vehicle control performance.
1.1 INTRODUCTION TO COOPERATIVE ADAPTIVE CRUISE CONTROL
Research projects have been conducted throughout the world to define the requirements for
an appropriate vehicular communication system and its possible applications. Although most
of the V2V cooperative ITS applications have been focused on improving collision avoidance
and safety, the extension of the commercially available adaptive cruise control (ACC) system
toward the cooperative ACC (CACC) system has a high potential to improve traffic flow
capacity and smoothness, decreasing obstruct on express highways. By introducing
V2Vcommunications, the vehicle gets information not only from its preceding vehicle—as
occurs in ACC—but also from the vehicles in front of the preceding one. Due to this preview
information, oscillations due to speed changes by preceding vehicles can be drastically
reduced.
The present CACC framework is used to distinguish the crash of the vehicle. There were
various troubles to overcome in doing this gadget particularly controlling the speed and
cruise the vehicle. To the association, it was a major up-lift. This kind of sign is used to
manufacture a ultrasonic gadget which can recognize the deterrents and exchange the
same over UART channel.
Department of E&CE, SJCE, Mysuru Page 1
CACC based on UART Protocol using Microcontroller 2015-16
1.2 MOTIVATION
CA (Collision Avoidance) systems are being used in a wide range of different areas and under
very different circumstances. Typical sensors used to detect obstacles are radar, lidar or vision
sensors. This section presents an overview of some of the important areas of application and
highlights important issues.
Automotive Collision Avoidance Traffic accidents are one of the major causes of death and injuries
in today’s society. Automotive manufactures have started to introduce more and more driver
support systems to help prevent accidents. The first step in CA systems for automotive applications
is adaptive cruise control (ACC), which is currently available as an option for several car models. ACC
systems adapt the speed to any in-path vehicle, should it travel slower than the set speed of the host
vehicle. The cruise control system is only allowed to exert limited deceleration (typically −3 m/s2);
some systems also issue a warning to the driver when this acceleration is not sufficient to avoid
collision. Current ACC systems are sold as a comfort system and can be switched on and off by the
driver; they also disengage at low speeds (below 40 km/h). The next step in automotive CA is to
introduce systems that are always active and perform autonomous braking and/or give warning
when a collision is imminent. Such systems are starting to emerge on the market]. A big challenge in
automotive collision avoidance is that even in normal driving, the traffic situation might be very
complex from a sensing view point, with numerous obstacles to be detected and classified. In
addition to this, sensors and computational resources must be low-cost. Another issue is that often
the tire-to-road friction is unknown and might change rapidly.
Aerospace Applications Radar-based air traffic control (ATC) systems have been in use for several
decades. Traffic alert and collision avoidance system (TCAS) has been used on board US transport
aircraft since the beginning of 1990s. These systems typically aim at helping pilots and air traffic
controllers in keeping a regulated minimum separation between any two aircraft. A breach of this
distance is referred to as a conflict. This area becomes ever more interesting as the airspace
surrounding large airports becomes more crowded. There exist different types of systems both in
cockpit and on the ground to provide decision-support to pilots and air traffic controllers. Other
applications of airborne collision avoidance are mid-air collision avoidance for fighter aircrafts. Here,
the CA system also attempts to maintain a regulated minimum separation between aircrafts. Apart
from issuing a warning the system may also be authorized to take over steering controls to perform
a sneaky move to avoid collision.
Department of E&CE, SJCE, Mysuru Page 2
CACC based on UART Protocol using Microcontroller 2015-16
1.3 OBJECTIVES
Safe and collision-free travel is vital in today’s society. It is also an important issue in many industrial
processes. In aerospace and naval applications, radar based support systems to avoid collisions have
been used for several decades.
•To build up a prototype to Safe and affect free travel is fundamental in today's overall
population.
•To execute a vehicle with cruise control works by adaptive cruising and auto speed
reduction when sensing is in collision course using ultrasonic.
•Dual control to do the process collision free cruising system.
•pulse width based speed control to dc motors.
1.4 PROBLEM STATEMENT
Using wireless communication, potential risk situations can be detected earlier to
avoid crashes and more extensive information about other vehicles’ motions can help
improve vehicle control performance.
FEATURES
• Ultrasonic sensor is used to measure the speed of the front vehicle.
• Speed reduction will be motorized over pwm.
1.5 SCOPE OF THE WORK
Collision Mitigation (CM) systems are given some perception of the environment surrounding the
vehicle. Based on this perception the system takes steps to avoid or mitigate imminent collisions.
The main scope of this thesis falls in this field. It must be pointed out that these systems are often
called Collision Avoidance systems. The term “avoidance” might imply that accidents should be
completely avoided by these systems. For a couple reasons, Collision Avoidance Overview systems
that avoid all accidents are unattainable for auto applications. This thesis will therefore talk about
CM systems. Generally, a CM system will try to reduce the severity of the accident as much as
possible under some constraints. In the best case, accidents might be avoided altogether whilst in
Department of E&CE, SJCE, Mysuru Page 3
CACC based on UART Protocol using Microcontroller 2015-16
the worst cases the systems have no positive effect at all. The perception of a CM system can come
from several sources. The environment may be perceived with radar sensors, laser radar, vision
sensors, ultrasonic sensors, GPS sensors and inter-vehicle communication. Based on the information
acquired from the sensors, the vehicle itself acts to prevent or mitigate collisions. Typical actions the
systems can take to mitigate a collision are issuing a warning to the driver, applying the brakes, and
changing the course of the vehicle by applying torque to the steering wheel. Other possible
countermeasures might be activating the brake lights to avoid being hit from behind, early airbag
inflation or adjusting the vehicle’s height to increase crash compatibility. Several systems exist or
have been proposed with CM functionality:
1. Lane keeping aid system monitors the lane markings. Using the observations of the lane
markings an estimate of the vehicle’s position in the lane can be obtained. Should the vehicle
swerve out of the lane a warning can be issued or a steering intervention executed.
2. Lane change helps systems screen ( monitor) the blind spot and some partition ( distance)
behind the car. The system can then alert or intervene by adding controlling (steering) wheel
torque to keep up a vital separation from an accident while trading way
3. Forward collision mitigation systems monitor what is in front of the host vehicle and
intervene to prevent or mitigate a frontal collision.
Adaptive cruise control works like normal cruise control, but adapts the speed to the vehicle in front;
if the driver is closing in on a vehicle in the same lane. ACC is really a CM system. The reason that it is
dealt with separately here is that it is marketed as a comfort system that is switched on and off by
the driver examples of ACC system on the market are: Toyota’s Radar cruise control which is based
on a lidar and was introduced in 1997; Merced’s Distronic which is based on a mm-radar and was
introduced in 1998; Jaguar’s Adaptive cruise control which is based on a mm-radar and was
introduced in 1999, and BMW’s Active Cruise Control which is based on a mm-radar and was
introduced in 2002 .
Department of E&CE, SJCE, Mysuru Page 4
CACC based on UART Protocol using Microcontroller 2015-16
1.6 ORGANIZATION OF THE REPORT
This report is organized as follows
Chapter 2 portrays about the writing review taken from the specialized papers distributed in
IEEE exchanges and reputed websites related to cruise control of vehicle.
Chapter 3 clarifies about different equipment segments and programming software required.
Chapter 4 portrays the structure of versatile journey framework and equipment execution.
Chapter 5 gives the clarification of flowcharts of different modules of the project utilized for
computerizing and controlling client module.
Chapter 6 portrays the results of different test condition to check dependability of
framework.
Appendix A gives data about the microcontroller atmega-8 and atmega-16.
Appendix B gives information about ultrasonic and motor driver.
Department of E&CE, SJCE, Mysuru Page 5
CACC based on UART Protocol using Microcontroller 2015-16
Chapter2
Literature Survey
This chapter gives a broad of writings alluded from various IEEE papers and different papers
published in various journals
Profits by consolidating correspondences in ACC structures have been by and large focused
on of late. Prior exploratory results using vehicle–vehicle joint effort to improve vehicle-
taking after execution were proficient by the California Partners-for-Advanced-Transit-
Highways (PATH) in 1997 when a platooning maneuver including eight totally automated
automobiles was done using remote correspondence among vehicles, in a general sense for
longitudinal control, and alluring markers in the establishment, essentially for sidelong
control. Considering the likelihood of a fundamental vehicle coordinating a couple of
disciples, the Safe-Road-Trains-Environment (SARTRE) European Union undertaking has
made virtual trains of vehicles in which a principle vehicle with a specialist driver accept
obligation for each organization, That thought of the master driver in the essential vehicle
was at first made in the European endeavor called CHAUFFEUR. Especially related to
CACC executions in progress cars, two basic undertakings were starting late drove in the
Netherlands. The Connect and Drive wander, financed by the Dutch Ministry of Economic
Affairs, finished a CACC demo using six explorer vehicles grasping an enduring time gap
scattering game plan. [1]
Nine heterogeneous vehicles from different European examination associations endeavored
to perform a two-way CACC organization. This resistance revealed without a doubt the most
basic issues to be clarified before bringing this development into era, including
correspondence structures constancy. From the control point of view, most of the executions
relied on upon comparing relative subordinate feedback/reinforce forward controllers or
model insightful control frameworks. As to illustrating a CACC system, string security
expects a key part. [2]
Department of E&CE, SJCE, Mysuru Page 6
CACC based on UART Protocol using Microcontroller 2015-16
A circulated issue analysis, separation and estimation plan for the situating arrangement of a
gathering of associated vehicles is exhibited in this paper. The decentralized technique for
operation empowers each vehicle to perform its own particular shortcoming diagnostics
outfitting the information exchange the related vehicle structure. The philosophy used as a
piece of this paper exploits the vehicle-to-vehicle (V2V) system in vehicle state estimation
and uses a Dedicated Observer Design arrangement for the flaw discovery and separation
process. A flaw estimation methodology is likewise received in this paper which is
encouraged back to the. A defect estimation procedure is in like manner got in this paper
which is urged back to the estimation/control structure for ensured and strong operation of the
vehicle in closeness of inadequacy. The inadequacy diagnostics approach focuses on the
vehicle limitation and closeness estimation sensors which are utilized by various independent
functionalities of cutting edge vehicles, for instance, Adaptive-Cruise-Control (ACC). The
reenactment results displayed in this paper demonstrates the capacity of the diagnostics
arrangement in the disclosure and separation of various issues in the structure. The execution
of the inadequacy estimation framework is also displayed in this paper. [3]
The probability to scatter the balance power in a creamer electric vehicle power train over
different prime movers and imperativeness recoverability by method for recuperative
braking and furthermore buffering the essentialness on rechargeable batteries, lead to the
subject of how electrical, mechanical or compound essentialness should stream among
various blend portions of the power train. It is presently understood that any information
about the future driving condition over either a short or long division horizon is
fundamentally imperative to redesign the hybrid system. ACC is a definitely comprehended
driving assistant system that licenses keeping up a safe longitudinal between vehicle velocity
and division with other movement objects. Model-Predictive-Control (MPC) based ACC
structure normally predicts the vehicle speed and expanding speed profile. This information
together with sensor data can be used to make the perfect cream control especially while
moving closer a slower vehicle, which suggests a recuperation potential for the battery and
cross breed essentialness organization structure. To fulfill this, second demand twist fitting
is associated with the cost limit of Equivalent-Consumption-Minimization-Strategy (ECMS)
conduct. The approximated variety is then used to evaluate the look-ahead battery
imperativeness and if fundamental. [4]
Department of E&CE, SJCE, Mysuru Page 7
CACC based on UART Protocol using Microcontroller 2015-16
This paper proposes a blueprint procedure for voyage control structures by method for
reference speed change considering road and movement information. In the midst of the
headway a couple of components are seen as, for instance, road inclines, crossing focuses,
movement lights, going before vehicles, reduce its cruising , engine surges & voyaging
duration. The reason behind rate arrangement is to diminish the longitudinal imperativeness,
fuel use and engine releases in a way that the cruising duration does not augment inside and
out. The information heap of development lights moreover affects the setup method. The
signs from the road and action are dealt with together with the dynamic states of the vehicle
and consolidated with the control setup of reference rate. An overwhelming control is
sketched out, which can think about both unsettling impacts and vulnerabilities. The system
is laid out through reenactment cases. [5]
These paper mains an isolating control means the framework (ACC) utilizing between
vehicle correspondences. An essential thought in ACC controller setup is string quality,
which ought to be ensured in the control calculation; that is, the amplitudes of the confining
vibration ought not to find the opportunity to be updated as they cause upstream from
vehicle to vehicle. Precisely when the controller utilizes between vehicle division and
relative speed data, overwhelming duty vehicles may lose string security under brief time-
progress control by virtue of their moderate reaction extending speed qualities. For example,
the restricting progression time of an amazing duty vehicle is 1 s. Under convincing
conditions, isolating vibrations and extending speed vibrations are neither overhauled nor
decreased. As a centrality sparing technique, our estimation plausibly stifles restoring
vibrations under the convincing states of ACC by apportioning control utilizing data got by
between vehicle correspondences. The proposed controller is embraced by entertainments.
[6]
The paper displays an effective trip control layout methodology for a test vehicle, which can
guarantee speed taking after execution. The longitudinal stream and the considered model
hazards, for instance, parameters assortment and actuator components are figured in the
vehicle model. The proposed controller has a nourishment forward term, which diminishes
the conservativeness of the control structure in the midst of the compensation of the planned
unsettling impacts. The information term is arranged using healthy Linear Parameter-Varying
procedures, in which the slip-up of the sustenance forward control is considered. The purpose
behind the information control is to guarantee the capable execution and to handle the
Department of E&CE, SJCE, Mysuru Page 8
CACC based on UART Protocol using Microcontroller 2015-16
actuator submersion. The profitability of the system is displayed through entertainment
circumstances. [7]
Cooperative-ACC structures are seen as a potential development as far as possible and
prosperity inside Intelligent-Traffic-Systems (ITS). In this investigation, association mediums
of the driver for both admonitory and autonomous stages are analyzed. Two unmistakable
guiding and automated frameworks with three extraordinary interfaces including a visual
dashboard appear, a Head-Up-Display (HUD) and a haptic gas pedal are focused on. It is
exhibited that the arranged admonitory interfaces don't achieve colossal change in pace
control however subjective appraisal demonstrates a slant for haptic feedback. For the
independent pleasant voyage control, the created HUD interface results in around half
diminishing of undesired human mediation which is foremost for some conditions. Next
adjustments of the HMI systems will be attempted with more subjects, more circumstances
and more test lengths to gain learning into assortment and settlement. [8]
Recent headway in instrumentation and sensor advancement, together with all the more
exceptional microcomputers presented in vehicles, that give attractive plans to the usage of
figuring’s of growing innovation, rouses the utilization of Control systems to auto issues. The
objectives of the resulting controllers are associated with the reducing of tainting surges,
better proficiency and voyager comfort. In this structure, the present paper addresses the issue
of illustrating trip control figuring’s, in perspective of Pontriagyn Maximum Principle, that
region prepared to execute a couple of fundamental moves of velocity trade. Remembering
the deciding objective to be bound to issues with an investigative course of action, the vehicle
stream is approximated by low demand straight models. Recreation tests are then performed
utilizing a one-dimensional nonlinear auto model. [9]
Department of E&CE, SJCE, Mysuru Page 9
CACC based on UART Protocol using Microcontroller 2015-16
Chapter 3
Software and Hardware Requirement
Software system
It is a remedies which plays a main role over the project integrating, actuating the hardware with automatic manner ,the software required for development are mentioned below.
Hardware system
It is a group of electronic devices put together to achieve the physical actions with a automatic manner based on the requirement under repetitive manner of loop.
3.1 Software details
Below specified software are used in developing printed circuit board and firmware to cruise
the vehicle.
Eagle cad
Avr Studio
Sina programmer
3.1.1 Eagle cad
Eagle stand for Easy Applicable Graphical Layout Editor is a successful PCB programming
tool which is intended to satisfy the requirements of the expert planners of the system. For
more than 25 years, this software tool has been the PCB plot device of choice for an immense
number of electronic setup planners and designers around the globe. With a tremendous and
element building and reinforce bunch and an expansive domain, EAGLE offers significantly
more than faultless circuit plot.
Department of E&CE, SJCE, Mysuru Page 10
CACC based on UART Protocol using Microcontroller 2015-16
Features:
1. Can be extended up to 999 sheets for building a schematic design
2. For all the sheets there are pre-viewing of the icon
3. Easy sorting of the designed sheets by just dragging and dropping the sheets.
4. reflexive prompting of contact cross references
5. Effective regeneration of parts by copying.
6. There is stability between both the schematic and the layout that is maintained.
7. The details or the comments on the schematic and the board can be given where
needed.
Eagle-software can be divided into 3 parts: 1. Schematic-editor. 2. Layout-editor 3. Auto-
router.
1. Schematic editor: Here it grants us to make typical representation of any of our own
outline. The significant point is to give great records of the whole outline and even it
grants different clients to see effortlessly.
Features:
Each and every line of schematic contains about 999 sheets per layout.
Individual sheets is associated with preview-icon
The supply or the power connections are generated automatically.
When a schematic is designed, the board is generated consequently.
The advantage of the hierarchical feature of schematic is that it will permit to divide
the schematic design for easy analysis
Department of E&CE, SJCE, Mysuru Page 11
CACC based on UART Protocol using Microcontroller 2015-16
2. Layout editor: Here we can make our own particular format for our own schematic
configuration. Here we can effectively put the segments as indicated by our
necessities and copper-follows can be steered between those parts.
Features:
4X4m is the size of each board
Even we can place surface-device components
Rotation can be possible in 360-degree
Texts/words can be placed according to our convenient
DRC is used to check for the wrong connections
3. Auto router: This is a capable device so as to point the copper ways between the 2
parts. It prompts in giving fruitful results in time without influencing the control
components. It keeps running on the various applications.
Features:
0.02mm is the dimension of single grid
Possible to generate is changed by adjusting the price issues.
Buried-paths are supported here.
16-layers can be supported at a time
Department of E&CE, SJCE, Mysuru Page 12
CACC based on UART Protocol using Microcontroller 2015-16
3.1.2 Avr StudioAtmel® AVR Studio® 5 is the Integrated Development Environment (IDE) for creating and
troubleshooting implanted Atmel AVR® applications.
Fig 3.1 Shows Front View of AVR Studio Version 5
The AVR Studio 5 IDE gives you a consistent and simple to-use environment to compose,
construct, and troubleshoot your C/C++ and constructing agent code. Which is utilized to
produce a hex document which is to composed to microcontroller with an assistance of
developer and developer programming.
Steps involved to code and generate project hex file:
Step1:
Department of E&CE, SJCE, Mysuru Page 13
CACC based on UART Protocol using Microcontroller 2015-16
Fig3.2Create a New Project
Step 2:
Fig 3.3 Select the Target Device for Which the Hex File is to be generated
Step3:
Department of E&CE, SJCE, Mysuru Page 14
CACC based on UART Protocol using Microcontroller 2015-16
Fig 3.4 Write Code With C.
Step4: click on run compile, no errors result.
Step5: build target generate hex file.
3.1.3 Sina-ProgrammerSinaProg is burner programming with straightforward client likewise consolidates an AVR
Fuse mini-computer.
Fig 3.5 Shows Front View of Sina Programmer
It utilizes enhanced AVRDUDE 5.10 and underpins new ic and new records just the
accessible ports and baud rate choice is conceivable. It is a standalone basic programming
and no establishment is select the ic sort as ATmega16 and set the Programmer to USB asp
and port to USB (as seen at the base of window).Click on browse under Hex File and find the
.Hex document to click Program button under bits can also be programmed .
3.2 Hardware Details
Department of E&CE, SJCE, Mysuru Page 15
CACC based on UART Protocol using Microcontroller 2015-16
Following specified hardware components which include sensors, motors, and controller are
used in design of prototype.
Ultrasonic Sensor
L293d h-bridge motor driver
60rpm gear dc motor
Lcd 16x2
Battery
Atmega-8
Atmega-16
3.2.1 Ultrasonic Sensor
Ultrasonic sensors (generally called transceivers when they both send and get be that as it
may all the more generally called transducers) manage a rule like radar or sonar does the
process for a goal by deciphering the echoes from electromagnetic or sound waves solely.
Ultrasonic sensors make repeat sound waves and evaluate the resonation which is gotten back
by the sensor. Sensors figure the time break between sending the sign and tolerating the
resonation to decide the range of the target. Frameworks more often than not utilize a
transducer which makes sound waves in the ultrasonic degree, above 18,000 hertz, by
changing electrical vitality into sound, then in the wake of getting the reverberation change
the sound waves into electrical centrality which can be measured and showed up.
Figure 3. 6 Ultrasonic Sensor
3.2.2 L293d h-bridge motor driver
Motor driver plays very important role when it comes to controlling the movement of
vehicle with pay load on it as the motor is analog mechanical device consumes more current
Department of E&CE, SJCE, Mysuru Page 16
CACC based on UART Protocol using Microcontroller 2015-16
then the microcontroller can supply on its i/o line main problem of the motors is it generates
back electromagnetic flux which will be in analog form and effects the function of
microcontroller
When vehicle needs to turn depends on the direction motors need to be rotated in clockwise
and anticlockwise which makes the current to flow in opposite direction below table shows
the working direction of h-bridge.
Truth Table
High Left High Right Low Left Low Right Description
1 0 0 1 clockwise
0 1 1 0 anticlockwise
1 1 0 0 halt
0 0 1 1 halt
H-bridge design can be done using transistors and additionally MOSFETs; the main thing is
to keep motor running by considering the power of circuit. On the off chance that motors are
expected to keep running with high current then part of scattering is there. So thermal cooling
are expected to reduce the temperature of the device.
L293D Dual H-Bridge Motor Driver
L293D is a double H-Bridge motor driver this ic can drive two dc motors in both direction
with fix course of movement by interfacing all i/o to microcontroller and up to four motors
can be controlled in fixed direction this driver has yield current of 600ma and up to 1.2A for
every line connected to motors mainly this ic have internal freewheeling diode which protects
from back emf generated during the rotation and works with wide input from 4.5v to 36v.
Department of E&CE, SJCE, Mysuru Page 17
CACC based on UART Protocol using Microcontroller 2015-16
Below shows the connection diagram of motor driver.
fig.3.7 L293d connection to motor with table
to connect a single motor to driver and to microcontroller o/p1 and o/p2 are connected to
motor i/p pin a,b and en will be connected to microcontroller direction signal will be given to
Department of E&CE, SJCE, Mysuru Page 18
CACC based on UART Protocol using Microcontroller 2015-16
a and b input en signal must be high additionally vcc1 must be connected to 5volts vcc2 must
be connected to 12 volt and all four ground additional pull of 10k must be connected to i/o
line of microcontroller to ensure the perfect operation of driver.
3.2.3 60rpm gear dc motorAt whatever point a mechanical autonomy
specialist discuss making a robot, the primary thing
rings a bell is making the robot precede onward the
ground. What's more, there are constantly two choices
before the architect need to utilize a DC or stepper motor. With regards to speed, weight, size,
cost. DC motors are constantly favored over stepper motor. There are numerous things which
can be done when dc motors are connected with microcontroller. For instance rate of motor
can be controlled and control the heading of revolution, can likewise do encoding of the turn
made by DC motor i.e. monitoring what numbers revolution are made by motor .
Fig.3.8 internal structure of dc motor
As dc motor don’t have much torque to drive a payload with desired rpm to avoid this
problem sets of gear are used to drive the motor which consist of driver gear idle linking gear
and driven gear which will be connected to shaft of the motor then it can be connected to
wheel to drive the pay load.
Department of E&CE, SJCE, Mysuru Page 19
CACC based on UART Protocol using Microcontroller 2015-16
Fig. 3.9 gear combination
This computation shows the relation of rotation power pr with torque and speed of rotation.
Mathematical interpretation: Rotational power (Pr) is given by:
Pr =Torque (T) * Rotational Speed ()
Pr is constant for DC motor for a constant input electrical power. Thus torque (T) is inversely proport
ional speed (). Thus to increase the value of torque we have to lose speed.
3.2.4 LCD 16x2
LCD screen is an electronic showcase and has broad variety of uses. These modules are superior more than 7 portions and added multi fragment LEDs. LCD is prudent.
Department of E&CE, SJCE, Mysuru Page 20
CACC based on UART Protocol using Microcontroller 2015-16
Fig 3.10: LCD display 4bit mode Fig 3.11: pin functions of LCD
Easily programmable; have no detention of showing distinctive characters. A 16x2 LCD
surmises it can demonstrate 16 characters for each line. In this each character is in 5x7 pixel
frameworks. This LCD has 2 registers i.e., Cmd and Data.
The Cmd register stores guidelines that are given to LCD. The data register stores the
information that is visible on LCD.
3.2.5 Battery
Power bank are major source to run the prototype here 12volt 1.2ampere/hour sealed lead
acid battery is used to give constant supply for continuous operation of the system compared
to conventional lead acid battery this bank won’t spill and acid and no need to put distilled
water an additional charger need to charge the battery 14.1 volts is knows as battery full and
10 volts is known as low battery discharging the battery beyond the level make the battery
unusable. Additional voltage reducer ic 7805 must be used to drive the digital part.
3.2.6 Voltage regulator
To give the correct voltage to the circui not intend to damage the controller or any other
digital or analog parts ists mandotry to provide the required power no more or less than the
anticapated to achive this a set of five volt regulators are used which can power up the corresponding
device as the motor runs form 9 volt to 12volt there is no need of reducing the incoming voltage to do
with this 7805 constant 5volt 1 amp load driving capability and input range from 6 to 36 voltage is
used it has three terminal pin one is input pin two is common pin three is output from where constant
5 volt is supplied to the devices in order to keep the constant supply without thermal run away
additional heat desipater must be attached to the device
Figure 3.12 Voltage Regulators (7805)
Department of E&CE, SJCE, Mysuru Page 21
CACC based on UART Protocol using Microcontroller 2015-16
3.2.7 Atmega8 and atmega16 Microcontroller
Atmega-8
In 1997, Atmega-8 was introduced which is 8-bit Microcontroller. It is the 1st MC used to
store the on-chip program memory rather than 1-time PROM, EPROM/EEPROM utilized by
different microcontrollers at the time.
Fig3.13 Atmega-8 microcontroller
Pin diagram of Atmega-8
Fig 3.14 Pin configuration of Atmega-8
Here Pin-6 is used to reset the Microcontroller while performing the operation
Pin no 2 and 3 is used for serial transmission and reception. Pin no 4 and 5 is used to
call interrupt 0 and 1. Pin no 7 is connected to VCC and Pin no 8 is connected Gnd.
Pin no 9 is connected to Crystal-oscillator-1 and 10 is connected to crystal-oscillator-2
Pin 23-28 are connected to Analog channels and Pin no-19 is connected to SCK to
shift the clock cycles
Department of E&CE, SJCE, Mysuru Page 22
CACC based on UART Protocol using Microcontroller 2015-16
Pin no 18 is connected to MISO i.e. to data output and pin no 17 is connected to
MOSI i.e. to data input.
Features
It contains the flash memory of 0.5k-16kb
It consists pin package of 6-32
Peripheral components is limited here
Operated at 16MHz frequency
Atmega-16-Atmega-16 also belongs to same family. It also performs the same function of
ATmega-8. ATmega16 is an 8-bit-microcontroller. Atmega16-is mainly depends RISC and
CISC Architecture which includes 135 set of instructions. Oscillation frequency is of 16MHz.
Fig3.15 Atmega-16
Pin diagram of Atmega-16
Department of E&CE, SJCE, Mysuru Page 23
CACC based on UART Protocol using Microcontroller 2015-16
Fig 3.16 Pin configuration of atmega-16
Pin no 1 and 2 is connected to timer 0 and 1. Pin no 3 and 4 is connected to
positive and negative inputs.
Pin no 5 to 8 are connected to Serial-Peripheral-Interface. Pin no 9, 10 and 11 are
connected to reset, VCC and to gnd. Pin no 18 and 19is connected to PWM
channels
Pin no 22 and 23 are connected to interface of TWI and 24 to 27 are connected to
interface of JTAG
ADC channels are connected from Pin no 33 to 40.
Features:
Flash memory is of 32KB
1KB of static Ram
512-bytes of EEPROM
EEPROM flash memory is 10,000-100,000, individually.
Department of E&CE, SJCE, Mysuru Page 24
CACC based on UART Protocol using Microcontroller 2015-16
Chapter 4
System ArchitectureThe below schematic architecture describes the connection of the proto module of CACC system where it contains two blocks of controllers , namely
1. Obstacle detective block ( ODB)
2. Speed automotive block ( SAB)
4.1 Circuit Diagram
There are two microcontroller used. One microcontroller is used is atmega-8 is connected to
ultrasonic sensor and LCD to display the range in cm for visible indication. Another
microcontroller is used is atmega-16 connected to L293d motor driver to turn on and off the
motor and is connected to LCD for display speed in %.
The pins used in atmega-8 is pc0,pc1,pc2,pc3 configured as output connected to LCD
d4,d5,d6,d7 operating in 4bit mode and in port-b pb3,pb4,pb5 is configured as output
connected to LCD rs(register select),r/w(read or write),en(enable)and LCD pin 1 is connected
to ground ,pin2 is connected to vcc,pin3 vee is connected to 10k pot which acts as voltage
divider for adjusting the contrast of LCD ,pd2 is configured as input and interrupt 0
connected from echo pin of ultrasonic to read the high time from echoed signal,pb0 is
Department of E&CE, SJCE, Mysuru Page 25
CACC based on UART Protocol using Microcontroller 2015-16
configured as output connected to trigger pin of sonar for 10ms to generate burst signal,pd0
and pd1 is configured as uart transmission and reception operating at 9600 baud rate 8 bit
data 1 stop bit no start no parity from this port command will be sent to speed control
microcontroller uart port in speed control part atmega16 microcontroller is used to which
pa0,pa1,pa2,pa3 is configured as output and connected to lcd d4,d5,d6,d7 in 4bit mode and in
portb pb4,pb5,pb6 are connected to rs,r/w,en pin of lcd to display information regarding the
speed pb2,pb3,pd6,pd7 is configured as output connected to in1,in2,in3,in4 of l293d to turn
on and turn off of motor depending on the command given by sonar unit out1,out2,out3,out4
of l293d is connected to 60 rpm geared dc motor to give the movement to vehicles here
l293d plays a vital role because motor is analog mechanical consumes 400ma @ 12volt while
rotating but microcontroller is digital and can provide maximum of 5v @ 40 ma which may
damage microcontroller permanently so l293d takes the command in the format of digital and
controls the motor and last port pd0,pd1 is configured as uart to accept the command from the
sensor controller both controller operates @ 16mhz frequency generated by crystal oscillator
with harmonic reduction capacitor 22p for stable oscillation 5 volts from a constant regulator
is provided for both microcontroller and power source for the system is 12 volt 1.2ah
rechargeable sla battery.
Department of E&CE, SJCE, Mysuru Page 26
CACC based on UART Protocol using Microcontroller 2015-16
Fig 4.1: Schematic diagram of Microcontroller interfaced to peripherals
4.2 Ultrasonic ranging module HC - SR04 gives 0.02m - 4m non invasive estimation work, the going extending up to 3mm. The component fuses transmitter of 40 kHz, beneficiary and processing. The key guideline of work:
(1) Ten microsecond burst signal need to be generated by device
(2) The device subsequently sends eight 40 kHz and perceive whether there is a response.
(3) When response is received the on time of pulse to off time of pulse is computed Test distance = (high level time*velocity of sound (340M/S)/2,
Hardwire for the operation is as follows
Timing diagram The signal is exhibited as takes after. Ten microsecond burst contribution
to begin the running, soon after eight periodic signal at 40 kHz and raise its resonation. The
Echo separation question that is pulse width and the extent in extent. Can compute the reach
Department of E&CE, SJCE, Mysuru Page 27
CACC based on UART Protocol using Microcontroller 2015-16
through the time interim between sending trigger flag and getting resonation signal.
Condition: uS/58 = centimeters or uS/148 =inch; or: the extent = abnormal state time * speed
(340M/S)/2
Fig 4.2: Timing diagram for ultrasonic
4.3 Pulse Width Modulation – Utilizing discrete pulses to make some analog value
other than simply "1" and "0" conditions. Numerous advanced frameworks are controlled by
a 5-Volt power supply, so on the off chance that you channel signals that have a half
obligation cycle you get a normal voltage of 2.5 Volts. Other obligation cycles create any
voltage in the scope of 0 to 100% of the "high" voltage, contingent on the PWM
determination. The obligation cycle is characterized as the rate of advanced "high" to
computerized "low" flags present amid a PWM period. The PWM determination is
characterized as the greatest number of heartbeats that you can pack into a PWM period. The
PWM period is a discretionarily time period in which PWM happens. It is given best results
for your specific use.
Fig 4.3: Pwm with duty cycle
Uses for PWM:
1) To digitally make a simple yield voltage level to control process and source of power.
2) To digitally make analog signals for subjective waveforms, sounds, music and discourse.
Department of E&CE, SJCE, Mysuru Page 28
CACC based on UART Protocol using Microcontroller 2015-16
Utilizing PWM to produce a analog voltage level: A typical use is in power supplies. The
PWM resolution is chosen to be equivalent to or more prominent than the resolution
prerequisites of the power supply. A 5-Volt power supply that can be changed in accordance
with +/ - 1 milli-Volt ought to utilize a PWM resolution of 5,000 or more prominent. The
PWM output is then filtered using low pass filter.
Fig 4.4: hardware configuration for pwm
The above figure exhibits a microcontroller making a half cycle PWM signal at 5,000 Hz, a
two-section 5,000 Hz low pass channel and a pass-transistor with an immediate current
contribution of +2.5 Volts. The recurrence of channel = 1/2 pi RC for each region.
Utilizing PWM to produce a simple waveform: Any shape waveform can be created by
yielding a grouping of PWM qualities that relate to various focuses on the waveform. When
you utilize more focuses, heavier sifting and more prominent PWM determination, you can
speak to quick waveforms with awesome exactness. By and by, a PIC microcontroller can
without much of stretch yield sensibly tolerable sine waveforms in the voice recurrence
range. The 4 KHz sine waveform underneath utilizations a 16 level determination PWM sign
and 16 focuses on the sine wave. The PWM recurrence is around 30 KHz utilizing an 'on/off'
cycle, and around 500 KHz
utilizing an "appropriated" cycle. The "circulated" cycle produces smoother results, as
Department of E&CE, SJCE, Mysuru Page 29
CACC based on UART Protocol using Microcontroller 2015-16
Fig 4.5: sine wave wrt to pwm
Chapter 5
MethodologyIn the designed model, 40khz ultrasonic transceiver is connected to atemega-8 which gives
trigger signal and waits for echo and four commands are sent to speed controlling controller
and lcd is used 16x2 functioned at 4bit mode second microcontroller is atmega16 which
accepts the commands from atmega8 and control the speed of the dc motor by means of pwm
and its applied to l293d motor controller which is h-bridge batter is used as power source to
do all function
Department of E&CE, SJCE, Mysuru Page 30
CACC based on UART Protocol using Microcontroller 2015-16
5.1 Block Diagram
The proposed design is described in the Fig 5.1 which tells about the design of the system and
their purposes. The design is generally implemented automobile to avoid collision. This
mainly contains 2 block which will be installed in vehicle .these two block are inter
connected by uart to exchange the information. both the block have two microcontroller first
one is atmega-8 operating at 16 MHz frequency and is connected to sonar to trigger the burst
signal and wait for echo to return and read the total high time of echo Then calculate the
time with respect to sound travel time and convert it to cm if range of the obstacle is >50cm
send command ‘A’ through uart for speed control microcontroller like this other three
commands sent are ’B’ for the range between 30cm to 20cm ‘C’ for 20cm to 10cm and the
last command is ‘D’ for the range less than 10cm lcd connected to this controller displays
range in cm second microcontroller accepts the command given by the sonar controller if the
received command is ”A” then it generates pwm at 100% duty cycle saying full speed if
command is”B” the 75%pwm, then if the command is”C” pwm will be 50% if the command
is “D” then it indicates obstacle is very near need to stop vehicles so pwm generation will be
halted lcd is used to give visible information about speed in % if none above command is
received the vehicle will be in moving state at max speed.
TRIGGER
ECHO
Department of E&CE, SJCE, Mysuru Page 31
LCD 16X2
ATMEGA-8 MICROCONTROLLER
HC-SR04 ULTRASONIC
TRANSRECIVER
UART
UART
ATMEGA-16 MICROCONTROLLER
LCD 16X2L293D H-BRIDGE MOTOR DRIVERM1 M2
CACC based on UART Protocol using Microcontroller 2015-16
Fig 5.1: Block diagram of the proposed Architecture
5.2 Flow Charts
ULTRASONIC SENSISNG FLOW
Department of E&CE, SJCE, Mysuru Page 32
START
INITIALIZE INPUT AND OUTPUT
INITIALIZE UART AT 9600 BAUDRATE 8BIT DATA ONE STOP
BIT NO START NO PARITY
B
CACC based on UART Protocol using Microcontroller 2015-16
NO
YES
NO
YES
NO
YES
NO
Department of E&CE, SJCE, Mysuru Page 33
SEND TRIGGER SIGNAL TO ULTRASONIC SENSOR
WAIT UNTIL
ECHO IS RECIVED
IF ECHO IS <30CM
IF ECHO IS
>30CM AND
<20CM
SEND ‘B’ TO SPEED CONTROL UNIT
IF ECHO IS >20CM
AND <10CM
SEND ‘C’ TO SPEED CONTROL UNIT
IF ECHO IS >10CM
A
A
C
C
SEND ‘A’ TO SPEED CONTROL UNIT
CACC based on UART Protocol using Microcontroller 2015-16
YES
NO
Ultra sonic sensing flow diagram describes the analysis of the distance from the coursing
vehicle & close loop control for the vehicle depending on the range of the coursing vehicle.
Vehicle control flow diagram describes the generated vents for actions with respect to events
obtained by sensing unit
VECHILE CONTROL FLOW
Department of E&CE, SJCE, Mysuru Page 34
SEND ‘D’ TO SPEED CONTROL UNIT
B
START
INITIALIZE INPUT
INITIALIZE UART AT 9600 BAUDRATE 8BIT DATA ONE STOP
BIT NO START NO PARITY
CACC based on UART Protocol using Microcontroller 2015-16
YES
NO
YES
NO
YES
NO
YES
NO
Chapter 6
Results and Discussion
Most vehicles are equipped with abs but mainly time taken by a driver to control the vehicle
speed may have delay of some seconds this system is equipped with adaptive cruising
technique based on sonar operating at 40Khz main choice of using ultrasonic is due to
Department of E&CE, SJCE, Mysuru Page 35
IF RECIVED COMMAN
D IS ‘A’
IF RECIVED COMMAN
D IS ‘B’
IF RECIVED COMMAN
D IS ‘C’
IF RECIVED COMMAN
D IS ‘D’
100% SPEED
75% SPEED
50% SPEED
STOP VECHILE
CACC based on UART Protocol using Microcontroller 2015-16
ultrasound and speed is more compared to other conventional sensors which acts as
secondary monitoring system
The signal acquired and it gets processed for the speed control is listed below.
Fig 6.1: full integrated prototype
Step-1:
Here the full speed operation is displayed on first lcd and second lcd display shows the range
of the obstacle in 50cm and vehicle will be moving in full speed 100% pwm is given to h-
bridge For motor rotation.
Department of E&CE, SJCE, Mysuru Page 36
CACC based on UART Protocol using Microcontroller 2015-16
Fig 6.2: speed 100% distance 50cm
Step-2:
Here the 75% speed operation is displayed on first lcd and second lcd display shows the
range of the obstacle in 25cm and vehicle will be moving in speed 75% pwm is given to h-
bridge For motor rotation.
Fig 6.3: speed 75% distance 25cm
Department of E&CE, SJCE, Mysuru Page 37
CACC based on UART Protocol using Microcontroller 2015-16
Step-3:
Here the 50% speed operation is displayed on first lcd and second lcd display shows the
range of the obstacle in 13cm and vehicle will be moving in speed 50% pwm is given to h-
bridge For motor rotation.
Fig 6.4: speed 50% distance 13cm
Department of E&CE, SJCE, Mysuru Page 38
CACC based on UART Protocol using Microcontroller 2015-16
Step-4:
Here the 0% speed operation is displayed on first Lcd and second lcd display shows the range
of the obstacle in 7cm and vehicle will be stop speed and speed will be 0% pwm is given to
h-bridge to stop motor
Fig 6.5: speed 0% distance 7cm
Result & Analysis
Distance Command Speed PWM
These all are scaling
frequency
50-30 cm A 100% 254
30-20 cm B 75% 175
20-10 cm C 50% 150
>10 cm D 0% 0
Applications:
Advanced cruise control
All kind of automobiles
Collision avoiding system
Department of E&CE, SJCE, Mysuru Page 39
CACC based on UART Protocol using Microcontroller 2015-16
Advantages:
Compact in size
Fast response system
Adaptive control of speed
Dark parked vehicles identification
Less affected to environmental condition
poor visibility accident avoidance
better usage in hill road cruising
Department of E&CE, SJCE, Mysuru Page 40
CACC based on UART Protocol using Microcontroller 2015-16
Chapter 7
Conclusion and Future Enhancement
7.1 Conclusion
Many fatal collision occurs every day due to over speed driver neglect and major accidents
take place during the time of night between 2 to 6 which may leave commuter as well as
other passenger stranded creating a panic shock mainly due to poor visibility due to fog
condition dark parking of vehicles without any indication high beam also do major role in
this process so this system helps the driver for controlling the vehicles. Ultrasound can travel
in fog condition helps the driver to keep vehicles in control and also steer aside to avoid
collision.
To analyze the structure and function of a modern-cruise control system used in automobiles.
The cruise control system interacts with the driver, the speed control device (throttle) and the
external environment despite various interfaces in order to keep the speed of the car as
desired by the driver. These interactions may be one way or both ways. Different kinds of
signals may be needed to build this system. The user requests activation of the cruise control.
The cruise control system accepts inputs from the sensor and gives a signal to the throttle
mechanism for adjustment in the desired position. After the throttle is set, the cruise control
system gives the user a feedback that it is now active and set. Various commonly occurring
operating scenarios are described in words first, and then translated into an external systems
diagram after identifying the main functional blocks. The external systems diagram fulfills all
interactions between the functional blocks as stated in the scenarios. Based on the external
systems diagram, written requirements, including those for cost and performance trade-offs
are generated for the understanding of all stakeholders involved. Then, the first level
functional level decomposition is used to analyze the functioning of the main functional
block – ‘Provide Cruise Control Services’. Then, the physical architecture is explained in its
general and instantiated form and interactions are shown using interfaces. Finally, there is a
risk analysis done along with an integration and qualification plan.
Department of E&CE, SJCE, Mysuru Page 41
CACC based on UART Protocol using Microcontroller 2015-16
7.2 Future Enhancement
The impacts of Adaptive Cruise Control on the efficiency of the road network are likely to be
small in the next 10 years. Indications that market penetration levels of at least 20% will be
required before any change to efficiency will be realized. It is important to accept that ACC is
a comfort based driving aid and that the system was not designed to improve road capacity.
However, the potential for ACC to moderate capacity has been identified. If drivers select,
and are allowed to select, headways of 1.2 seconds or less, then small increases in capacity
will be possible. If however, users select headways above those typically observed on
motorways today of about 1.2 to 1.4 seconds, then a negative impact on capacity may occur.
The main benefit of ACC appears to be for the individual driver in performing the
longitudinal control task much better than the average driver is able to. Significant reductions
in acceleration variation during car-following processes have been identified. This will
reduce fuel consumption and harmful exhaust emissions. The safety of the systems has been
carefully considered in the design of the systems and this has contributed to the delay of the
widespread system introduction with fears of bad publicity and liability claims. Some studies
have estimated safety benefits whilst others recommend a monitoring of driver skill levels
which may depreciate with automation of the driving task. Considerable research has been
conducted into the legal implications of ACC. The largest issue with the introductions of
ACC is the need to set the system headway below current nationally recommended safe limits
(of around 2 seconds) to avoid losing capacity and to avoid vehicles cutting in, in front of an
ACC user. The potential liability of the driver and manufacturer in the result of an accident
whilst using a system set below the nationally recommended following headway is a concern.
Finally, it should be noted that there is a general acceptance of the desirability of an ACC
system or some other driver assistance devices (such as Collision Warning) amongst the
driving population. Evidence from a US field trial had very positive feedback regarding the
system. ACC will reach the market shortly and further monitoring during the early stages of
deployment is essential to assess the long term impacts of such systems.
This system helps to acquire and process the signal from to control the speed of vehicles.
After the multiple trials on different condition, it can be more enhanced by connecting up rare
sensing control with high beam and low beam change over. Drowsy driver detection.
Department of E&CE, SJCE, Mysuru Page 42
CACC based on UART Protocol using Microcontroller 2015-16
References
[1] Integrated Adaptive Cruise Control for Parallel Hybrid Vehicle Energy management
Emre Kural*, Bilin Aksun Güvenç** (2015) 313–319
[2] Secure Vehicle Localization and Cruise Control for Connected Vehicles Baisravan
HomChaudhuri _ Pierluigi Pisu (2015) 1192–1197
[3] Design of optimal cruise control considering road and traffic information Bal´azs N
´emeth _ Alfr´ed Csik´os February 4-6, 2013
[4] Spacing Control of Cooperative Adaptive Cruise Control for Heavy-Duty Vehicles
Manabu Omae, Ryoko Fukuda, Takeki Ogitsu September 4-7, 2013. Tokyo, Japan
[5] Adaptive Cruise Control System: Comparing Gain-Scheduling PI and LQ Controllers P.
Shakouri ∗ A. Ordys August 28 - September 2, 2011
[6] LPV-based Control Design of an Adaptive Cruise Control System for Road Vehicles
Bal´azs N´emeth Michel Basset (2015) 062–067
[7] Optimal cruise control with reduced complexity models Jo˜aoM. Lemos _ Miguel S.
Bar˜ao July 12-14, 2010
[8] A comparison of optimal control methods for minimum fuel cruise at constant altitude
and course with fixed arrival time.Javier GARC’IA-HERASa, Manuel SOLERb 80 (2014)
231 – 244
[9] Robust H_ Design of an Automotive Cruise Control System Bal´azs N´emeth _ P´eter G
´asp´ar 48-15 (2015) 341–346
Department of E&CE, SJCE, Mysuru Page 43
Top Related