Can based collision aviodance system for automobiles
CAN BASED COLLISION
BRIEF OVERVIEW :
DC Motor and L293D
What is CAS?
CAN, MCP2515 and MCP2551
Objective of the Project :
• This project CAN BASED COLLISION AVOIDANCE
SYSTEM is intended for secure and smooth journey.
• If the driver himself is not concentrating on driving or any
other parameters, which may cause damage to vehicle
as well a life, this intelligent car/ vehicle warn the driver
regarding the danger ahead.
Embedded system :
An Embedded System is one that has computer
hardware with software embedded in it as one of its
Its software embeds in ROM (Read Only Memory).
It does not need secondary memories as in a
What is CAS ?
A collision avoidance system is that which is placed
within a car to warn its driver of any dangers that may lie
ahead on the road.
• how close the car is to other cars surrounding it
• how much its speed needs to be reduced while
around the curve
• how close the car is to going off the road
• uses visual and audio warnings to prompt the driver
• initiates braking if the driver fails to respond to the
Existing system :
• Power train management system
• Antilock braking system (ABS)
• Acceleration skid control (ASC) system, etc,
• The functionality and wiring of these electric control units
(ECU) are getting more complicated.
• A high-level protocol CAN is adopted to interconnect those
CAN nodes with reliable communications among sensors.
Block Diagram :
Power Supply :
ATMEGA 32 CONTROLLER :
• High-performance, Low-power AVR 8 - bit Microcontroller
• Advanced RISC Architecture
• High Endurance Non-volatile Memory segments
• JTAG Interface
• Peripheral Features
• Special Microcontroller Features
• I/O and Packages - 40-pin
• Operating Voltages - 4.5-5.5V
• Speed Grades - 0-16 MHz
• Power Consumption - 1.1mA
• It is an Analog distance sensor that uses infrared to
detect an object between 10 cm and 80 cm away.
• Consists of PSD and infrared emitting diode and
signal processing circuit.
• High immunity to ambient light and colour of object
• No external control circuitry required
CONTROL AREA NETWORK :
• CAN is a multi-master broadcast serial bus standard for
connecting electronic control units (ECUs)
• CAN is one of the best choices for embedded networking
• Each node is able to send and receive messages, but not
• A message consists primarily of an ID (identifier), which
represents the priority of the message, and up to eight data
• The devices that are connected by a CAN network are
typically sensors, actuators and other control devices.
• These devices are not connected directly to the bus, but
through a host processor and a CAN controller.
• Bit rates up to 1 Mbit/s are possible at network lengths
• Each node requires a
• It is a stand-alone Controller Area Network (CAN) controller that implements
the CAN specification, version 2.0B
• MCP2515 has two acceptance masks and six acceptance filters that are used
filter out unwanted messages, thereby reducing the host MCUs overhead.
• It is capable of transmitting and receiving both standard and extended data an
• Operates from 2.7V – 5.5V
• It interfaces with microcontrollers (MCUs) via an industry standard Serial
Peripheral Interface ( 10MHz)
• The device consists of three main blocks:
CAN Module ---- Control logic ---
SPI Protocol block
MCP2551 : is a high-speed CAN, fault-tolerant device that serves as
• The MCP2551
interface between a CAN protocol controller and the physical bus.
It will operate at speeds of up to 1 Mb/s.
It converts the digital signals generated by a CAN controller to signals
for transmission over the bus cabling.
It also provides a buffer between the CAN controller and the high-voltage
spikes that can be generated on the CAN bus by outside sources.
• Protection against damage due to short-circuit conditions (positive or
negative battery voltage)
• Protection against high-voltage transients
• Automatic thermal shutdown protection
• Up to 112 nodes can be connected
• High noise immunity due to differential bus Implementation
Liquid crystal display :
Liquid crystal displays (LCDs)
have materials which combine
the properties of both liquids
They have a temperature range within which the molecules are
almost as mobile as they would be in a liquid, but are grouped
together in an ordered form similar to a crystal.
Since the LCD’s consume less power, they are compatible with
low power electronic circuits and can be powered for long
DC Motor :
A DC motor is electromechanical device that coverts
energy into mechanical energy
Motor gives power to the MCU
Power to do physical works - to move robot
It can be controlled easily with microcontrollers
But the MCUs port are not powerful enough to drive DC
motors directly , we need some kind of drivers.
Very easy and safe is to use L293D chips
L293D is a motor driver integrated circuit (IC).
Motor drivers act as current amplifiers since they take a
lowcurrent control signal and provide a higher-current signal.
higher current signal is used to drive the motors.
This chip is designed to control 2 DC motors
L293D has output current of 600mA
The output supply has a wide range from 4.5V to 36V
Input logic 00 or 11 will
stop the corresponding
Logic 01 and 10 will
rotate it in clockwise
Enable pins 1 and 9
must be high for
motors to start
PROGRAMMING IN EMBEDDED C
CODEVISION AVR C COMPILER
Embedded C :
Embedded C is a set of language extensions for the C Programming language
by the C Standards committee to address commonality issues that exist
between C extensions for different embedded systems.
Historically, embedded C programming requires nonstandard extensions to the
C language in order to support exotic features such as fixed-point arithmetic,
multiple distinct memory banks, and basic I/O operations.
In 2008, the C Standards Committee extended the C language to includes a
number of features not available in normal C, such as, fixed-point arithmetic,
named address spaces, and basic I/O hardware addressing.
Embedded C use most of the syntax and semantics of standard C, e.g., main()
function, variable definition, data type declaration, conditional statements (if,
switch. case), loops (while, for), functions, arrays and strings, structures and
union, bit operations, macros, etc.
Codevision AVR :
• CodeVisionAVR is a complete set of tools designed for rapid and
software development for the Atmel AVR microcontrollers.
Keil C cross compiler :
• Keil Software provides software development tools for the family of
microcontrollers, they are
• IDE (Integrated Development environment)
• Project Manager
• C Cross Compiler , Cross Assembler, Locator/Linker
Compilers are programs used to convert a High Level Language
object code i.e source code into object code.
A cross compiler is similar to the compilers but we write a
for the target processor (like 8051 and its derivatives) on the
processors (like computer)
It means being in one environment you are writing a code for
environment is called cross development.
Here we are :
each node Contain
ATMEGA 16 (AVR CONTROLLER), MCP2515 (CAN CONTROLLER),
MCP2551 (CAN TRANSRECEVER).
• In first node we are interfacing GP2D12 to find the object,
node contains DC motor.
• Initially motor is rotating with maximum speed. If any object is
found in front of GP2D12 in node1 motor will stop in node2
using CAN protocol.
• For this we have to develop two different application
Collision Mitigation by Braking
Injury and Accident Prevention
Commercially marketable technical systems
Product Excellence due to Minimum Requirements
High Alert system
The technical challenges for current collision avoidance systems lie in
achieving high detection rates given an acceptable false alarm rate,
under real-life driving situations.
The problem with curved roads is that sensors might mistake a car
running in the opposite direction for a hazard on the lane where the
CAS equipped vehicle is driving.
Cars Equipped with sensors running in
the opposite direction.
• Used as a Warning System to avoid Collision in National Highways.
• Used by Police to Track the speed of the approaching vehicles.
• Used to detect an object in Extreme conditions like Fog and misty areas.
• Can be implemented in Robotic Applications.
• Can be used in large vehicles like Trucks and buses.
• Can be implemented in Aircraft and aerospace electronics.
• Can be used in Passenger and cargo trains.
• Can be implemented in Maritime electronics.
FUTURE SCOPE :
• Future car collision-avoidance systems may be smart phonebased
• You could stick your cell phone on the dashboard, and it would
[its onboard sensors] to provide the feedback needed by the
briefly reviewed the automobile collision avoidance problem in
order to achieve safer transportation on highways.
Once achieved, this will not only save lives, but result in a considerable
amount of financial gains as well.
In order to develop the so-called smart highways and smart cars, it is
stated that the most importance difference from the old practice is the
fact that new design approach attempts to completely avoid collision
instead of minimizing the damage by over-designing cars.
Text Books :
 Steven F Barrett, ‘‘Embedded Systems Design With The Atmel AVR
Microcontroller’’, Morgan and Claypool Publishers,2008 .
Web Portal :