Sie sind auf Seite 1von 94

Intelligent Vehicle Diagnostics & Monitoring System

B.M.S COLLEGE OF ENGINEERING


Department of Electrical & Electronics Engineering BANGALORE- 560019

CERTIFICATE
Certified that the project work entitled INTELLIGENT VEHICLE DIAGNOSTICS AND MONITORING SYSTEM USING ARM7 TDMI-S carried out by Seemalakshmi. A. Chandrakala. R. Manukumar. H.V. Prathap. K.S. 1BM06EE052 1BM07EE400 1BM07EE402 1BM07EE404

are bonafide students of B.M.S College Of Engineering in a partial fulfilment for the award of degree of Bachelor of Engineering in Electrical & Electronics of the Visvesvaraya Technological University, Belgaum during the year 2009-2010. The project report has been approved as it satisfies the academic requirements in respect of Project Work prescribed for the Bachelor of Engineering degree.

Signature of the Project Guide HOD External Viva Name of the Examiner: date 1. 2.

Signature of the

Signature with

Department of EEE, BMSCE Bangalore -19

Page 1

Intelligent Vehicle Diagnostics & Monitoring System

COMPANY PROFILE
Knowx innovations a global solutions company providing custom solutions to high technology companies worldwide. Combining proven expertise in technology, vast knowledge of hardware product design cycle, system design cycle (Board design / development), Embedded software services and an understanding of emerging business domains. Range of services that includes Embedded Systems, DSP development, Device Drivers, Industrial automation, Wireless, Firmware, Application software. At knowx life is all about delivering the highest quality to customers. Reduced costs, quicker time-to-market, huge value-adds and enhanced productivity are the way of life. The very cornerstone of success has been unerring path to ensuring that QA processes and procedures are met with unwavering dedication. The focus areas are Embedded Systems Real time solutions Device Driver Development, Protocols Development, Embedded Testing, Telecom testing VLSI

Department of EEE, BMSCE Bangalore -19

Page 2

Intelligent Vehicle Diagnostics & Monitoring System

ACKNOWLEDGEMENT
We are thankful to our institution BMS College of Engineering and Knowx Innovation (p) Ltd. for providing us with all the facilities, which have made this project success. Its my duty to render my sincere gratitude to our esteemed Principal, Dr. K. Mallikarjun Babu. for granting me an opportunity to undertake the project work as a part of the BE course. With immense pleasure, we express our gratitude. regards and thanks to our Head of the Department, Dr. Ravishankar Deekshit for his excellent encouragement, valuable suggestions and continuous encouragement at all the stages of our project work. We are grateful to our internal guide Professor. Usha A for her guidance in carrying out this project. We are thankful to her for their valuable guidance, assistance, moral support rendered in their capacity as my internal guide for this project and in the preparation of this project and in the preparation of this report. I would like to extend my profound gratitude to external guide Mr. Alagar swami. A for his enthusiastic encouragement and courtesy for the help they rendered me for the successful completion of the Project. We are thankful to the faculty of Electrical and Electronics department for inspiring and enlightening us at every step of our project. Above all we are blessed with such caring parents. We extend our deepest gratitude to our parents for their valuable love, affection, encouragement and support. It is great pleasure in thanking the people who have been kind enough in supporting me to complete this project successfully.

Department of EEE, BMSCE Bangalore -19

Page 3

Intelligent Vehicle Diagnostics & Monitoring System

CONTENTS Page No.


Chapter 1. PREAMBLE
1.1

Introduction................................................................................1

1.2 Motivation..................................................................................1 1.3 Document Conventions..............................................................2 1.4 Objective of the Project..............................................................2 1.5 Project Report Organization.......................................................3 Chapter 2. SYSTEM OVERVIEW 2.1 Block Diagram 2.1.1 Receiver side Block Diagram..................................................4 2.1.2 Transmitter side Block Diagram.............................................7 Chapter 3. HARDWARE DESCRIPTION 3.1KNOWX Board 3.1.1 LPC 2129..........................................................................9 3.1.1.1 General description 3.1.1.2 Features 3.1.1.3 Jumper Settings 3.1.1.4 ARM 7 3.1.2 CAN Controller...............................................................17 3.1.3 EEPROM........................................................................21 3.1.3.1 I2C 3.1.4 LCD Display...................................................................24 3.1.6 MAX 232.......................................................................25 3.1.6 RELAYS.........................................................................28 3.2 Sensors.....................................................................................29 3.2.1 Pressure Sensor 3.2.2 Ultratonic Sensor 3.2.3 Temperature Sensor 3.2.4 Proximity Sensor
Department of EEE, BMSCE Bangalore -19 Page 4

Intelligent Vehicle Diagnostics & Monitoring System 3.3 DC Motors................................................................................33 3.4 GSM Module............................................................................34 3.5 Ignition key , Brake Module & Seat-Belt................................37 3.6 RF Communication System.....................................................37 3.6.1 RFTransmitter.......................................................................39 3.6.1.1 AT89S52 3.6.1.2 Encoder 3.6.2 RF Receiver..........................................................................42 3.6.2.1 Decoder 3.7 Power Supply Unit..................................................................43 3.8 Components used....................................................................45 Chapter 4. WORKING PRINCIPLE 4.1 Principle of Operation.............................................................46 4.2 Flow Chart...............................................................................46 4.3 Internal Circuits.......................................................................51 4.3.1 RF-Receiver & Main Block Internal Circuits......................51 4.3.2 RF-Transmitter Block Internal Circuits...............................55 Chapter 5. SOFTWARE USED & SOURCE CODE 5.1 Software & Protocols used....................................................56 5.2 Source Code............................................................................57 5.2.1 Source Code for 32-bit C 5.2.2 Source Code for 8-bit C Chapter 6. PHOTOGALLERY......................................................................59 Chapter 7. CONCLUSION.............................................................................62 7.1 Features 7.2 Advantages 7.3 Applications 7.4 Future Implementation Chapter 8. BIBLIOGRAPHY..........................................................................64 APPENDIX........................................................................................................65

Department of EEE, BMSCE Bangalore -19

Page 5

Intelligent Vehicle Diagnostics & Monitoring System

ABSTRACT
This project is an implementation of vehicular safety system using ARM7TDMI(S) a 32-bit Architecture and GSM technology. Here we have used a 32-bit microcontroller LPC-2129 which is having the architecture of ARM7-TDMI(S). To simulate the speed control of a vehicle we have used RF-technology. This system performs diagnostic check of vehicle failure parameters such as brake failure, engine temperature, bumpers pressure, & precaution parameters such as lane detection, obstacle distance detection & control devices failure such as CAN bus, GSM module. Depending upon the failure of foresaid parameters , it will take the further actions such as switching on/off of the motor, sending SMS to the concerned persons & finally stores all parameter values in memory & displays them on LCD

Department of EEE, BMSCE Bangalore -19

Page 6

Intelligent Vehicle Diagnostics & Monitoring System

1.1 INTRODUCTION
Black Box
With any airplane crash, there are many unanswered questions as to what brought the plane down. Investigators turn to the airplane's flight data recorder (FDR) and cockpit voice recorder (CVR), also known as "black boxes," for answers. The FDR contains parameters of flight data, and the CVR recorded a little more than 30 minutes of conversation and other audible cockpit noises. These recording devices, which reveal details of the events immediately preceding the accident. Boxes are sealed in insulated titanium boxes to protect them from fire, impact and water pressure. Each Black box has a Pinger, an electronic sounding device to help locate the box. Here we are implementing the some of the features of the Black Box to a Car using LPC 2129(A 32-bit Microcontroller) which has ARM7 TDMI-S - A 32-bit architecture (Which is embedded in the KNOWX Board) and GSM technology. Here the KNOWX Board is a Kit Designed by an embedded and telecom company KNOWX. It incorporates Microcontroller, CAN Controllers, EEPROM, MAX 232, Crystal of 12 MHz & Relays. At Ignition ON, it checks each vehicle critical failure parameters such as Brake, Seat Belt, CAN bus, & GSM module and display the status of each failure parameter on the LCD. If any one of the four parameters fails it doesnt allow the motor to switch ON and goes back to the diagnose loop to check each parameter again. It continues to check all the parameters until they are tested as OK. At Power ON, the system allows the motor to switch-on. Here we have used the RF technology to control the motor. When the vehicle is under running condition , the system checks the four minor parametrs such as Engine temperature, Bumpers pressure, Lane detection & obstacle detection. If any minor failure occurs, it informs the driver by displaying its status on the LCD. If an accident occurs, the change in the Bumpers pressure is sensed by the pressure sensor. If the sensed pressure exceeds the limit, the system will switch-off the motor and simultaneously sends an SMS to the concerned person and retrive the data from the EEPROM and display on the LCD.
Department of EEE, BMSCE Bangalore -19 Page 7

Intelligent Vehicle Diagnostics & Monitoring System

1.2 Motivation
The motivation behind this project is, since the standard of living of our country is increasing day by day, the trend of owning a car has increased. So it is necessary to adopt a safety system to these vehicles which is a step towards a cutting edge technology. It helps us to know the reason of accident and to take future precaution to avoid its reoccurrence.

1.3 Document Conventions


The following are the list of conventions & acronyms used in this document & the project as well. ARM 7: Advanced RISC Machine. It is a 32-bit architecture, released by ACORN Ltd. RISC: Reduced Instruction Set Computer. LPC 2129: Low Power Consumption is a 32-bit micro-controller released by Philips. GSM: Global System for Mobile Communication is the most popular standard for mobile communication in the world. GSM Modem: It is a wireless modem that works with a GSM wireless network. It can be an external device, such as Wavecom FASTTRACK Modem. By Inserting a SIM card into this modem, & connecting the modem to a serial port a wireless communication has been set up. CAN: Control Area Network is a two-wire multi-transmitter serial data bus and is designed by Bosch as automobile network. RF technology: Radio Frequency technology used for wireless communication. Jumper: Its a link to connect the open terminals which is used to enable the multifunction of ports.

1.4 Objective of the Project


With the well known proverb Necessity is the Mother of

Invention We aim at the design & implementation of the Vehicle Diagnostics


& Monitoring System for Car using ARM-7 Processor technology. After the successful demonstration of the algorithm with simulation, the project development
Department of EEE, BMSCE Bangalore -19 Page 8

Intelligent Vehicle Diagnostics & Monitoring System would be implemented on Embedded C platform. A low cost implementation would mark the successful completion of this project.

1.5 Project Report Organization


The report has been segregated into chapters to make the reader to realize the project description user friendly. This report consists of Eight Chapters, references & datasheets. The frame work for this project report is described as follows.

Chapter 1 tells about What is Black Box & Introduces about the project with a brief explanation of working of the Vehicle Diagnostics & Monitoring System for Car using ARM-7 Processor technology .It gives the details about the document conventions. Chapter 2 gives the complete details of each & every blocks of Transmitter side Block Diagram. Receiver &

Chapter 3 has the description of all the Hardware used in the project with their technical details. Chapter 4 explains the working principle of the System & control flow of its operation using Flow chart. It also presents the internal circuits of all blocks. Chapter 5 gives the list of the software & protocols used in the implementation of project. Chapter 6 presents all system hardware & complete understanding model pictures for better

Chapter 7 puts Conclusions for the System covering the Features, Advantages, Applications & Future Implementations. Chapter 8 covers the Source & References of all data presented in the Report. Appendix has the Data Sheets of the main Hardware of the System
Department of EEE, BMSCE Bangalore -19 Page 9

Intelligent Vehicle Diagnostics & Monitoring System

This chapter gives overview of the system & block diagram of Receiver & Transmitter side.

2.1 Block Diagram


In this project we have used 2 Microcontrollers, One is of 32-bit & other is of 8-bit. The 32-bit micro-controller is used in the receiver side & the 8-bit is used on the transmitter side.

2.1.1 Receiver side Block Diagram


The below diagram is a receiver side block diagram, which depicts the sensors, motors, CAN, RF Receiver & GSM interface to the LPC 2129 Microcontroller as shown. To implement this project we have used the KNOWX Board which is provided by KNOWX An Embedded Company.

Department of EEE, BMSCE Bangalore -19

Page 10

Intelligent Vehicle Diagnostics & Monitoring System

LPC 2129
This 32-bit micro-controller is the heart of the Receiver Module, which controls each and every activities of the system. It is a 64 pin quad package, having 2 i/o ports P0 and P1. P0 is of capacity 32-bit and P1 is of 16 bit. It has 16 kB on-chip Static RAM & 256 kB on-chip Flash Program Memory. In-System Programming (ISP), In- Application Programming (IAP) & Flash programming are the main features of it. It has 2 interconnected CAN interfaces, 4 channel 10-bit A/D converter, two 32bit timers, PWM unit (6 outputs), RTC and Watchdog, Multiple serial interfaces including two UARTs, Fast I2C(400 kbits/s) and two SPIs. Its On-chip crystal oscillator is of 12MHz. It needs dual power supply.

Ignition Key: It is a Push Button switch used to Simulate the insertion of key into
the Car. The switch is connected to P0.15 of controller.

Sensors
Department of EEE, BMSCE Bangalore -19 Page 11

Intelligent Vehicle Diagnostics & Monitoring System The sensor converts any physical quantity in to electrical signal. Here we have used four sensors. Pressure sensor: This measures the pressure in the Bumper of the car. In this system we have connected this to Port 0.30 pin of controller. Temperature sensor: This measures the Engine temperature of the Car. It is interfaced to the Port 0.27 pin. Ultrasonic sensor: This detects the obstacle in & around the car and measures the distance between the car and the obstacle. It is interfaced to Comport 1 of the KNOWX Board. Proximity sensor: This is used for lane detection. It is interfaced to Port 0.22 pin. Brake & Seat Belt are interfaced to P0.4 & P0.5 respectively & they are simulated as jumpers. The Jumpers are sensed by the controller to decide the status of them.

Motors
Here we have used two DC motors for motion control of the vehicle. They can be driven from a variable supply of anything up to 9V. We are controlling these motors using relays. The speed and direction of the Car is controlled using wireless RF communication.

CAN
It is a two-wire multi-transmitter serial data bus and designed by Bosch as automobile network. It uses 2 lines namely CAN High (CANH) and CAN Low (CANL). These 2 buses are carrying signals opposite to each other (to overcome noise interruption that simultaneously interferes on the bus). A CAN refers to a network of independent controllers. Its a serial communication that efficiently supports distributed real-time control with high level of security

EEPROM
It is a memory device of capacity 512 x 8 (4K). It operates at 2.7 to 5.5V . It can be interfaced using 2-wire Serial Interface. It has a Bi-directional data transfer protocol & write protect pin for hardware data protection.

GSM
Department of EEE, BMSCE Bangalore -19 Page 12

Intelligent Vehicle Diagnostics & Monitoring System GSM is global system for mobile communication. We have used this technology to inform the concern person in case of an accident. It is the most popular standard for mobile phones in the world. One of the key features of GSM is the SIM (Subscriber Identity Module) commonly known as a SIM card. AT COMMANDS forms the basic communication between MODEM and the target device. Target device can be a microcontroller, processor, PC hyperterminal or a mobile. These commands are used in all the mobiles where the modem and the processor interact. In our project, using AT Commands message is sent to the specified number. If in case accident occurs means, sends a message to the specified number stored in the program. So that immediate action could be taken to save the life.

LCD-LM016L
Here we have used 16*2 (16 characters x 2 lines) LCD display to display the characters and integers. Its a 16 pin device & it has the Controller LSI HD44780. It works with +5v single power supply.

RF Receiver
This is interfaced to the controller through P0.17 to P0.20 using a decoder HD12D. It receives the RF encoded signal by its antenna, which has sent by the RF transmitter located at the transmitter side with a personal computer.

Power Supply Unit


Here to power the system we have used 2 adaptors of capacity 12V/2A & 9V/1A. The controller needs two different voltage levels for its operation, 1.8V for its CPU & 3.3V for its on chip peripherals. These voltages are obtained by 2 regulators. The other peripherals like LCD, Relays, Proximity sensor, Ultrasonic sensor, Temperature sensor & EEPROM needs 5V, it is derived from a regulator of 5V. The GSM Module & Pressure sensor needs 9V for its operation so it is also derived from a regulator of 9V.
Department of EEE, BMSCE Bangalore -19 Page 13

Intelligent Vehicle Diagnostics & Monitoring System

2.1.2 Transmitter side Block Diagram


The below diagram gives the complete details of transmitter side module. Here the 8 bit micro-controller AT89S52 is the heart of the module which controls serial communication of the module with the PC. The particular key pressed in the keyboard is sent from the PC to the RF transmitter through the 8-bit micro-controller. The ASCII code sent from the PC is encoded in the HT12E Encoder and sent to the RF Transmitter. This encoded data is sent to the RF Receiver later through Antenna.

PC
The PC which we are going to use should have the HyperTerminal to send the pressed key from the PC to the RF transmitter serially.

RS232
Its a serial cable used to connect the Micro-controller to the PCs Comport 0/1. Here the pins 2 & 3 of Comport are connected to P3.0 and P3.1 port pins of microcontroller.

Micro-controller
Here we have used a 8 bit micro-controller 89S52 which controls the serial communication between PC & RF Transmitter & the RF signal transmission.

Encoder
Here we have used HT12E Encoder of four word transmission capacity. The data
Department of EEE, BMSCE Bangalore -19 Page 14

Intelligent Vehicle Diagnostics & Monitoring System pins of encoder are connected to P0.0 to Po.3 port pins of micro-controller. It encodes the data sent from micro-controller to the RF Transmitter.

RF transmitter
This transforms the encoded data in to RF signal and sends at 453-454MHz through Antenna.

This Chapter presents the details of complete Hardware used in our System.

3.1 KNOWX BOARD


3.1.1 LPC 2129 3.1.1.1 GENERAL DESCRIPTION
The LPC2119/2129/2194/2292/2294 are based on a 16/32 bit ARM7TDMI STM CPU with real-time emulation and embedded trace support, together with 128/256 kilobytes of embedded high speed flash memory. A 128-bit wide internal memory interface and a unique accelerator architecture enable 32-bit code execution at maximum clock rate. For critical code size applications, the alternative 16-bit Thumb Mode reduces code by more than 30% with minimal performance penalty. With their compact 64 and 144 pin packages, low power consumption, various 32-bit timers, combination of 4-channel 10-bit ADC and 2/4 advanced CAN channels or 8-channel 10-bit ADC and 2/4 advanced CAN
Department of EEE, BMSCE Bangalore -19 Page 15

Intelligent Vehicle Diagnostics & Monitoring System channels (64 and 144 pin packages respectively), and up to 9 external interrupt pins these microcontrollers are particularly suitable for industrial control, medical systems, access control and point-of-sale. Number of available GPIOs goes up to 46 in 64 pin package. Being equipped wide range of serial communications interfaces, they are also very well suited for communication gateways, protocol converters and embedded soft modems as well as many other general-purpose applications.

Technical Specifications
1. Micro processor : 2. Electrical characteristics : LPC 2129 (ARM 7 TDMI). Uses dual power supply - CPU operating voltage range of 1.65V to 1.95V (1.8V +/- 8.3%). - I/O power supply range of 3.0V to 3.6V (3.3V +/- 10%). 3. Device type 4. Memory 5. Out put format 6. Frequency used : : : : CMOS technology. On chip RAM 16KB, on chip flash 256KB. Digital. 60MHz.

3.1.1.2. IMPORTANT FEATURES OF LPC 2129


It has ARM7 TDMI-S CPU. Comes in 64 pin package with 46 GPIO port pins. 16KB of On-chip Static RAM to store Code &/or Data. 256KB of flash memory. External 8, 16, or 32 bit BUS. ARM supports 1 port concept. On chip crystal oscillator 1 to 30MHz. 60MHz max CPU clock available from programmable on chip PLL. Supports ISP& IAP via boot loader. Embedded ICE for real time debugging using break points and watch points. Embedded Trace Macro cell ( Support of JTAG interface to debug the program on the hardware level) 2 CAN Controllers with Acceptance Filters. 4 Channel 10 Bit ADC with conversion time of 2.44micro sec. Two, 32 Bit Timers (4 capture and 4 compare channels).
Department of EEE, BMSCE Bangalore -19 Page 16

Intelligent Vehicle Diagnostics & Monitoring System


PWM with 6 outputs. RTC 1 Watch Dog Timer. Two UARTs. Two SPI Interface. Fast I2C at 400kbps. Two low power modes IDLE and Power-Down mode. CPU operating voltage +1.8V (1.65 to 1.95) Peripherals operate at +3.3V (3.00 to 3.60) I/O pins operate at +5V. Supports ARM and THUMB mode. Programming the flash memory can be done in the following ways. Using serial JTAG interface Using ISP & UART0. Using IAP. Supports 3 stage pipeline. By default this supports LITTLE ENDIAN, but can be configured as BIG ENDIAN.

EXPLANATION OF MAIN FEATURES IN DETAIL

1 Port concept

There are basically 2 ports in LPC2129, Port0 and Port1. Port0 has 32 pins reserved for it. And Port1 has 16 pins. So total it comes to 32+16 = 48 pins. If it were really 2 ports then the number of port pins should have been 32 + 32 = 64. The features of LPC 2129 tells that the controller has 46 pins but w en we count we get 48 pins...? Out of 48 pins 46 are used for GPIO purpose, and the remaining 2 pins are used for JTAG purpose.

On chip crystal oscillator 1 to 30MHz?


The user cannot go to the extreme value specified by the manufacturer. The user has to limit the oscillator frequency to 24MHz max for proper operation of the controller.

ISP & IAP? ISP: In System Programming


In a simple way, ISP can be defined as a programming concept where the controller is programmed without removing it from the board and without using

Department of EEE, BMSCE Bangalore -19

Page 17

Intelligent Vehicle Diagnostics & Monitoring System any external programming device. ISP needs an UART for programming the controller. In older systems and 8 bit controllers the user had to carefully remove the controller from the target device and mount it on a separate device called programmer, use custom software for the programmer to copy the hex file to the flash of the controller. In this kind of programming all the external peripheral devices will be non functional at the time of programming the controller. After the programming is done the controller is reset so that it communicates with the external devices.

IAP: In Application Programming


This is a unique programming technique and a feature provided by latest controllers where the user could program the controller when the application code is under execution. This gives the user a flexibility to change the value of a variable when the program is executing, and the user can see that the program will take the new modified value from the variable register when-ever it access the variable in the program. There is no need to reset the program. This needs a dedicated and a very costly hardware. Using this, the user can stop the program execution wherever he needs to check the value of the variable. i.e. the user can debug the program as he likes. The IAP is not restricted to changing the variable in the program, but user can erase / program the complete flash while the application is running. Both ISP and IAP needs boot loader software to be inside the controller.

ARM and thumb mode

ARM mode: Always executed in the 32 bit data format, word-aligned ARM instructions. The ARM Instruction Set is selected after CPU reset or an interrupt. The data or the opcode are accessed as 32 bit data. ARM mode is executed for all the modes available in 6 modes except USER mode. The execution is always faster and is always seen in privileged mode.

Thumb mode: Always executed in User mode and is always executed by accessing the data and code in the 16bit format and are half wordPage 18

Department of EEE, BMSCE Bangalore -19

Intelligent Vehicle Diagnostics & Monitoring System aligned. Always seen in unprivileged mode. Execution is slower compared to ARM mode. This is of great importance as the main feature of the Thumb, increasing the code density. Code density is much more efficient and is 65% more compared to ARM mode. The registers in the THUMB mode differs slightly compared to ARM mode. Instruction word length shrunk to 16-bits. Instructions follow their own syntax but each instruction has its native ARM instruction counterpart. Due to shrinking some functionality is lost. 19 different Thumb instruction formats.

4 Channel 10-Bit ADC


The Microcontroller has four channel 10-Bit Analogue to Digital Converter connected to the port pins P0.27 to P0.30. When we connect the analogue signal to any of these port pins, the converted data can be retrieved from the Register ADDR & the conversion can be controlled by bits of Register ADSR

Two UARTs
The Microcontroller has Two inbuilt UARTs UART0 & UART1. The UARTs purpose is to convert bytes from the PC's parallel bus to a serial bit-stream. The cable going out of the serial port is serial and has only one wire for each direction of flow. The serial port sends out a stream of bits, one bit at a time. Conversely, the bit stream that enters the serial port via the external cable is converted to parallel bytes that the computer can understand. UARTs deal with data in byte-sized pieces, which is conveniently also the size of ASCII characters. We have make use of UART0 for Serial Communication with Ultrasonic Sensor & GSM Module of our System.

Boot Loader Procedure?


At the starting phase of the Programming the C, it doesnt have capability to allow the programming through ISP/IAP Mode, but the Boot Loader makes it possible

Department of EEE, BMSCE Bangalore -19

Page 19

Intelligent Vehicle Diagnostics & Monitoring System

APPLICATIONS OF LPC2129
Industrial control Medical systems Access control Point-of-sale Communication gateway Embedded soft modem general purpose applications

3.1.1.3 Jumper settings for ARM tests


Top, middle and bottom pins of each jumper are denoted as 1, 2 and 3 respectively.
Sl. No. Tests Jumper Names Short the pins

Department of EEE, BMSCE Bangalore -19

Page 20

Intelligent Vehicle Diagnostics & Monitoring System


1 Blinking LEDs J1 to J6 J14 J15 1 and 2 2 and 3 1 and 2 (caution: if 2 and 3 are shorted in J15, you will get 12V instead of 5V for driving LEDs and stepper motor RM7 pins: 5 and 6) 2 and 3 1 and 2 1 and 2 2 and 3 1 and 2 2 and 3 2 and 3 1 and 2 (caution: if 2 and 3 are shorted in J15, you will get 12V instead of 5V for driving LEDs and stepper motor RM7 pins: 5 and 6) -

2 3 4 5 6 7 8

Relays J5 and J6 Keypad LCD backlight J11 I2C J12 and J13 CAN J7 and J8 (takes analog input from J16 pot P2) UART1 Stepper motor J1 to J4 J14 J15

9 10 11

SPI UART0 JTAG

3.1.1.4 ARM& TDMI-S Some Basic Facts of ARM


ARM was founded by formerly known as ACORN RISC Machine founded by ACORN COMPUTERS LTD in 1983-85, later named as Advanced Risc Machine in 1990. ARM is basically a general purpose 32 bit processor. ARM is incorporated with the 32 bit controllers manufactured by Philips with the banner name LPC series controllers. ARM family started with the series number from ARM 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. The series till ARM 6 were basically 16 bit microcontrollers. ARM 7 was the first 32 bit controller given by ARM. The even number of series was reserved for the companys R&D purpose and the odd version was released to the market for commercial purpose. ARM 10 is the only even series that was released to the market. Knowing the Nomenclature of ARM Family. ARM-XYZ TDMI - S X - series of ARM processor Y - Support of CACHE MEMORY Z Support of Memory management and Memory protection Unit.
Department of EEE, BMSCE Bangalore -19 Page 21

Intelligent Vehicle Diagnostics & Monitoring System T Thumb architecture Support of 16 bit instruction. D Debugger support M Fast Multiplier I Embedded ICE - In Circuit Emulator S Synthesizable version means the ARM is a set of software instruction engine that can be compiled on a suitable compiler.

ARM Processor Family

Features of ARM7 TDMI S


1. It is a general purpose 32 bit controller. 2. Follows Von- Neumann Architecture i.e program and data memory are in the same area of memory. 3. Supports 3 stage of pipelining. 4. Supports Load and Store Architecture. 5. By default it is Little Endian memory organization. 6. Supports AMBA bus architecture LPC 21XX series of microcontroller are based on ARM 7 TDMI S architecture. LPC stands for Low Power Consumption, because for the reason it have different voltages for operation and not like other controllers where the entire controller (CPU + peripherals of controller operate at +5V VCC)

ARM7 TDM-S Core Diagram

Department of EEE, BMSCE Bangalore -19

Page 22

Intelligent Vehicle Diagnostics & Monitoring System

Operating Modes in ARM


ARM supports 7 modes of operation. ARM core modes of operation: User (usr) : Normal program execution state FIQ (fiq) : Data transfer state (fast irq, DMA-type transfer) IRQ (iqr) : Used for general interrupt services Supervisor (svc) : Protected mode for operating system support Abort mode (abt) : Selected when data or instruction fetch is aborted System (sys) : Operating system privilege-mode for user Undefined (und) : Selected when undefined instruction is fetched.

Department of EEE, BMSCE Bangalore -19

Page 23

Intelligent Vehicle Diagnostics & Monitoring System

CPU Registers
The ARM CPU provides in user mode 16 general purpose registers (R0 - R15) and a Program Status Register (PSR). By software and hardware conventions, the following registers have a special meaning:

R13 is used as stack pointer (SP) that holds the current stack address R14 is used as link register (LR) that saves return address for the BL and BLX instruction, R15 is used as program counter (PC) that points to the executed instruction.

The ARM CPU provides shadow registers which are selected on a Operation Mode switch. These shadow registers reduce interrupt latency. All CPU Register are shown in the following picture.

3.1.2 CAN CONTROLLER


CAN is an acronym for Control Area Network, it is a protocol & its operation is controlled by a CAN Controller. What is a protocol? Protocol is a set of RULES. These rules are not limited to the only software. So the protocol are defined as Set of hardware and software rules based on some standards used for governing the communication of the device or the hardware which is a part of communication.
Department of EEE, BMSCE Bangalore -19 Page 24

Intelligent Vehicle Diagnostics & Monitoring System The CAN bus was developed by Robert BOSCH GmBH during mid 80s in Germany, for connecting electronic control units (ECUs). It is a Two-wire multitransmitter serial data bus with a Configurable data rate of 5 kBits/s to 1MBits/s. It can have more than 200 bus masters with the Bus length of 0.2m to 10.000m.

Department of EEE, BMSCE Bangalore -19

Page 25

Intelligent Vehicle Diagnostics & Monitoring System

Basics of CAN protocol

Department of EEE, BMSCE Bangalore -19

Page 26

Intelligent Vehicle Diagnostics & Monitoring System

Unlike a traditional network such as USB or Ethernet, CAN does not send large blocks of data point-to-point from node A to node B under the supervision of a central bus master. In a CAN network many short messages like temperature or RPM are broadcast to the entire network, which allows for data consistency in every node of the system. The below figures explains about the life before & after CAN
Department of EEE, BMSCE Bangalore -19 Page 27

Intelligent Vehicle Diagnostics & Monitoring System

Life before CAN

Life after CAN came to existence

Some CAN applications


Cars: Mercedes-Benz, Audi, Volkswagen, BMW, Porsche, Volvo, Saab. Trucks: Mercedes-Benz, General Motors. Escalators (O&K),Elevators (OTIS), Hospital intensive care control (Sulzer), Computer tomographs (Siemens), X-Ray systems (Philips), U-Bahn Wien, Straenbahn Bremen (Kiepe Elektrik), Garbage trucks (Moba), Milking machines (Impulsa),Textile machines, weaving machines (Dornier),Industrial roboters (Moog, Bosch), Flight simulators (EUROCOPTER). Furthermore, CAN can be found as embedded network in tree-cutting machines, vending machines, wheelchairs, quality control systems, In the Knowx Innovations company board we have two on board CAN controllers-MCB2155.
Department of EEE, BMSCE Bangalore -19 Page 28

Intelligent Vehicle Diagnostics & Monitoring System

3.1.3 EEPROM
EEPROM stands for Electrically Erasable and Programmable Read-Only Memory. Serial memory devices offer significant advantages over parallel devices in applications where lower data transfer rates are acceptable. In addition to requiring less board space, serial devices allow microcontroller I/O pins to be conserved. This is especially valuable when adding external memory to low-pin count microcontrollers. Here we have used the AT24C04 EEPROM which provides 4096 bits of serial EEPROM organized as 128/256/512/1024/2048 words of 8 bits each. The device is optimized for use in many industrial and commercial applications where low-power and low-voltage operation are essential. It is internally organized with 32 pages of 16 bytes each, the 4K requires a 9-bit data word address for random word addressing.

AT24C04 EEPROM Technical Specifications


1. Specification 2. Operating voltage 3. Operating frequency 4. Time for write cycle 5. Protocol : : : : : AT24C04 4k EEPROM. Low-voltage and Standard-voltage operation 2.7 (VCC = 2.7V to 5.5V) 1.8 (VCC = 1.8V to 5.5V). 100 kHz (1.8V) and 400 kHz (2.7V, 5V) 5 ms max I2C

The below diagram shows the pin details of EEPROM

SERIAL CLOCK (SCL): The SCL input is used to positive edge clock data into each EEPROM device and negative edge clock data out of each device.
Department of EEE, BMSCE Bangalore -19 Page 29

Intelligent Vehicle Diagnostics & Monitoring System SERIAL DATA (SDA): The SDA pin is bi-directional for serial data transfer. This pin is open-drain driven and may be wire-ORed with any number of other open-drain or open collector devices. DEVICE/PAGE ADDRESSES (A2, A1, A0): The A2, A1 and A0 pins are device address inputs that are hard wired for the AT24C01A and the AT24C02. As many as eight 1K/2K devices may be addressed on a single bus system The AT24C04 uses the A2 and A1 inputs for hard wire addressing and a total of four 4K devices may be addressed on a single bus system. The A0 pin is a no connect. The AT24C08 only uses the A2 input for hardwire addressing and a total of two 8K devices may be addressed on a single bus system. The A0 and A1 pins are no connects. The AT24C16 does not use the device address pins, which limits the number of devices on a single bus to one. The A0, A1 and A2 pins are no connects. WRITE PROTECT (WP): The AT24C01A/02/04/16 has a Write Protect pin that provides hardware data protection. The Write Protect pin allows normal read/write operations when connected to ground (GND). When the Write Protect pin is connected to VCC, the write protection feature is enabled and operates as shown in the

3.1.3.1 I2C Protocol


The I2C Stands for Inter Integrated Communication Protocol. Basically it is a serial protocol for the purpose of communication. Many devices or components are integrated with in the system. History of I2C Protocol The problem of connecting limited devices using RS-232 protocol was getting bigger limitation and threat as the technologies was expanding at an alarming rate. The latest market demanded the need to interface more number of devices to the meet needs of the newer technologies. A Protocol that could solve most of the problems faced by the most of the fields was underway. Philips laid foundation and came up with a lot of promises to solve the problems seen in RS-232 protocol. In 1980 Philips raised the curtain and presented the protocol much awaited to solve most of the problems. They named it as I2C, Inter Integrated Communication Protocol. This protocol is also referred by other names namely IIC, Hard Wired Software Controlled Protocol.

Department of EEE, BMSCE Bangalore -19

Page 30

Intelligent Vehicle Diagnostics & Monitoring System

A Master-Slave System connection of I2C

Things to Know about I2C protocol I2C is synchronous serial, Half Duplex, 2 wired bus communication protocol. I2C supports MASTER AND SLAVE CONCEPT. It has 2 lines or bus namely SDA,SCL (Serial Data, Serial Clock). SDA is bi-directional and SCL is uni-directional. In some cases SCL is bidirectional where master and slave are both microcontrollers. Clock is software generated. Slaves are those devices which support or which have inbuilt I2c protocol. Not all the ICs available in the market support I2C. We identify the IC whether it supports I2C or not by verifying the presence of SDA and SCL pins on the IC hardware. I2C communication is of broadcast type at the beginning, but once the communication starts it is only ONE TO ONE communication. Always the master begins the communication. When there is no communication all the slaves are in idle state. At any point of time the master has the complete control of the I2C. I2C supports multi master concept. I2C operates is 3 different speeds. a. 100Kbps with max distance of 10mts. b. 400Kbps with max distance of 6mts. c. 1.4Mbps with max distance of 1 to 2mts. I2C supports 7 bit and 10 bit addressing format. Data is valid only when the clock is in high state. Multi Master connection of I2C

Department of EEE, BMSCE Bangalore -19

Page 31

Intelligent Vehicle Diagnostics & Monitoring System When clock is low the data is placed on the SDA line. When the clock is HIGH The data start moving in the SDA line and reaches the slave or the master depending on who is the destination.

3.1.4 LCD DISPLAY


The LCD is an acronym for Liquid Crystal Display, it is used to display the characters and integers on 16*2 matrix (16 characters x 2 lines). In our system we have used LM016L LCD Display, it has built in Controller LSI HD44780. It needs +5v single power supply for its operation with the Operating Temperature of about 25C. Technical Specifications 1. 2. 3. 4. 5. 6. LCD Display Supply Voltage Input Current Device Type Communication Output Format : : : : : : 16*2 5V DC 40mA (Ideal Mode),140mA (Working Mode) Liquid Crystal Display Parallel Characters & Integers

Internal pin configuration


Pin no 1 2 3 Symbol Vss Vdd RS Level H/L Function 0V +5V L: Instruction code input H: Data input H: Data read L: Data write Enable signal Data bus line

4 5 6 7 8 9 10 11 12 13

R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7

H/L H,H to L H/L H/L H/L H/L H/L H/L H/L H/L

3.1.5 MAX 232


Department of EEE, BMSCE Bangalore -19 Page 32

Intelligent Vehicle Diagnostics & Monitoring System The MAX3232 is a line driver IC, which is used for serial communication. It consists of two line drivers, two line receivers, and a dual charge-pump circuit (capacitor circuits) with 15-kV ESD protection pin to pin (serial-port connection pins, including GND). The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals.

Technical Specifications
1. Operating voltage 2. Operating Speed 3. Current rating 4. Input levels 5. Communication type : : : : : Operate With Single 5-V Power Supply. 120 Kbit/s. 8mA. 30-V Input Levels serial communication

The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical hysteresis of 0.5 V. The later MAX232A is backwards compatible with the original MAX232 but may operate at higher baud rates and can use smaller external capacitors 0.1 F in place of the 1.0 F capacitors used with the original device. The newer MAX3232 is also backwards compatible, but operates at a broader voltage range, from 3 to 5.5V voltage levels it is helpful to understand what occurs to the voltage levels. When a MAX232 IC receives a TTL level to convert, it changes a TTL Logic 0 to between +3 and +15V, and changes TTL Logic 1 to between -3 to -15V, and vice
Department of EEE, BMSCE Bangalore -19 Page 33

Intelligent Vehicle Diagnostics & Monitoring System versa for converting from RS232 to TTL. This can be confusing when you realize that the RS232 Data Transmission voltages at a certain logic state are opposite from the RS232 Control Line voltages at the same logic state. The table below specify these levels RS232 Line Type & Logic Level Data Transmission (Rx/Tx) Logic 0 Data Transmission (Rx/Tx) Logic 1 Control Signals (RTS/CTS/DTR/DSR) Logic 0 Control Signals (RTS/CTS/DTR/DSR) Logic 1 RS232 Voltage +3 V to +15V -3V to -15V -3V to -15V +3V to +15V TTL Voltage MAX232 0V 5V 5V 0V to/from

Typical Operating Circuit & Capacitor Values

3.1.5.1 RS 232
Electronic data communications between elements will generally fall into two broad categories: single-ended and differential. RS232 (single-ended) was introduced in 1962 In telecommunications, RS-232 (Recommended Standard 232) is a standard for serial binary data signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. The RS-232 interface presupposes a common ground between the DTE and DCE Independent channels are established for two-way (full-duplex)
Department of EEE, BMSCE Bangalore -19 Page 34

Intelligent Vehicle Diagnostics & Monitoring System communications. The RS232 signals are represented by voltage levels with respect to a system common (power / logic ground). The high state (logic 1) has the signal level negative with respect to common, and the low state (logic0) has the signal level positive with respect to common. Modern computer equipment ignores the negative level and accepts a zero voltage level as the "OFF" state. In fact, the "ON" state may be achieved with lesser positive potential. This means circuits powered by 5 VDC are capable of driving RS232 circuits directly, however, the overall range that the RS232 signal may be transmitted/received may be dramatically reduced. The output signal level usually swings between +12V and -12V. An RS-232 port can supply only limited power to another device. The number of output lines, the type of interface driver IC, and the state of the output lines are important considerations. RS232 has numerous handshaking lines (primarily used with modems), and also specifies a communications protocol. In this project both the ultrasonic sensor and GSM modules are communicated via serial communication itself which uses RS232 for this purpose and its line driver IC MAX232 The below figure shows the Male & Female Connector Serial Cable.

This is a standard 9 pin cable layout for asynchronous data on a PC AT serial cable
Description Carrier Detect Receive Data Transmit Data
Signal 9-pin DTE Source DTE or DCE

CD RD TD

1 2 3 4 5 6 7 8

Data Terminal Ready DTR Signal Ground Data Set Ready Request to Send Clear to Send

SG DSR RTS CTS

From modem From modem From terminal/computer From terminal/computer From modem From modem From terminal/computer From modem
Page 35

Department of EEE, BMSCE Bangalore -19

Intelligent Vehicle Diagnostics & Monitoring System


Ring Indicator

RI

From modem

3.1.6 RELAYS
A relay is an electrically operated switch. It consists of a coil of wire surrounding a soft iron core, an iron yoke, which provides a low reluctance path for magnetic flux, a movable iron armature, and a set, or sets, of contacts .The armature is hinged to the yoke and mechanically linked to a moving contact or contacts. It is held in place by a spring so that when the relay is de-energized there is an air gap in the magnetic circuit. In this condition, one of the two sets of contacts in the relay is closed, and the other set is open. Other relays may have more or fewer sets of contacts depending on their function.

Many relays use an electromagnet to operate a switching mechanism, but other operating principles are also used. Relays find applications where it is necessary to control a circuit by a low-power signal, or where Several circuits must be controlled by one signal. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. In this project we are using two relays with driver for controlling the speed and direction of motor through RF technology, as controller output signal level is not sufficient to drive the relays directly, so we are driving relay through the driverULN2803.

Technical Specifications
1.

Supply voltage : 5v 2. Current : 30mA

RELAY DRIVER
Page 36

Department of EEE, BMSCE Bangalore -19

Intelligent Vehicle Diagnostics & Monitoring System As the Microcontroller output Current level is not possible to drive the relays directly & the energy stored in the Relay coil may be discharged through Microcontroller Pins. To overcome from this we have used the Relay Driver circuit. These Drivers has inbuilt anti-parallel Diode which is helpful for discharging the stored energy.

Technical Specifications
1. 2. 3. 4. 5. 6. 7. 8.

Specification : ULN2803 Output Voltage VO : 50 V Input Voltage (Except ULN2801) VI : 30 V Collector Current Continuous IC :500 mA Base Current Continuous IB :25 mA Operating Ambient Temperature Range TA :0 to +70 C Storage Temperature Range :55 to +150 C Junction Temperature TJ :125

3.2 SENSORS
Sensor is a device which converts any non electrical quantity in to an electrical quantity. In our system we have used totally four Sensors, they are Ultrasonic Sensor, Pressure Sensor, Temperature Sensor & Proximity Sensor.

3.2.1 PRESSURE SENSOR


In this project we used this sensor to detect the pressure changes which occur during accidents in the Bumper. The Sensor continuously measures the Pressure in the Bumper while the Vehicle is moving. We have set the limiting value of Pressure to 45kg/cm in the program. When the pressure exceeds the set value it takes an appropriate measures like Switching OFF the Motors, Retrieving the data from EEPROM & Sending an SMS to concerned Person. Pressure metrology is the technology of transducing pressure into an electrical quantity. Normally, a diaphragm construction is used with strain gauges either bonded to , or diffused into it, acting as resistive elements. Under the pressure-induced strain, the resistive values change.

Department of EEE, BMSCE Bangalore -19

Page 37

Intelligent Vehicle Diagnostics & Monitoring System

3.2.2 ULTRA SONIC SENSOR


In our System we have used this Sensor to measure the Obstacle distance. In our Vehicle we have placed this sensor in the front.

Ultrasonic sensors (also known as transducers when they both send and receive) work on a principle similar to radar or sonar which evaluate attributes of a target by interpreting the echoes from radio or sound waves respectively. Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo to determine the distance to an object. This technology can be used for measuring: wind speed and direction (anemometer), fullness of a tank, and speed through air or water. For measuring speed or direction a device uses multiple detectors and calculates the speed from the relative distances to particulates in the air or water. To measure the amount of liquid in a tank, the sensor measures the distance to the surface of the fluid. Further applications include: humidifiers, sonar, medical ultrasonography, burglar alarms, and nondestructive testing.
Department of EEE, BMSCE Bangalore -19 Page 38

Intelligent Vehicle Diagnostics & Monitoring System Systems typically use a transducer which generates sound waves in the ultrasonic range, above 20,000 hertz, by turning electrical energy into sound, then upon receiving the echo turn the sound waves into electrical energy which can be measured and displayed. The technology is limited by the shapes of surfaces and the density or consistency of the material. In this project we used this sensor to measure the distance of obstacles when the vehicle is subjected to accident, only one sensor has been interfaced at the front side of vehicle but we can interface for back ,left & right side of the vehicle also. Technical Specifications
1. 2. 3. 4. 5. 6. 7. 8.

ULTRA SONIC SENSOR Mode of Communication Input DC voltage Frequency Range of detection Units Size Current Consumption

: : : : :

9.

: SRF02. UART/I2C. + 5V 0.5V. 40k Hz 500Hz. 15cm to 6 m. : Range reported in cm or inches. 24mm w x 20mm d x 17mm h. : 4mA (typical).

3.2.3 TEMPERATURE SENSOR


The LM35 is an integrated circuit sensor that can be used to measure temperature with an electrical output proportional to the temperature (in oC) .In this project we used this sensor to measure the engine temperature

Why Use LM35s to Measure Temperature? o You can measure temperature more accurately than a using a thermistor. o The sensor circuitry is sealed and not subject to oxidation, etc. o The LM35 generates a higher output voltage than thermocouples and may not require that the output voltage be amplified.
o

What Does an LM35 Do? How does it work? o It has an output voltage that is proportional to the Celsius temperature. o o The scale factor is .01V/ C o The LM35 does not require any external calibration or trimming and maintains an accuracy of +/-0.4 oC at room temperature and +/- 0.8 oC over a range of 0oC to +100oC. o Another important characteristic of the LM35DZ is that it draws only 60 micro amps from its supply and possesses a low self-heating capability. The sensor self-heating causes less than 0.1oC temperature rise in still air.
Page 39

Department of EEE, BMSCE Bangalore -19

Intelligent Vehicle Diagnostics & Monitoring System

How Can we Use An LM35? (Electrical Connections) o Here is a commonly used circuit. For connections refer to the picture above. o In this circuit, parameter values commonly used are: Vc = 4 to 30v 5v or 12 v are typical values used. -6 Ra = Vc /10 Actually, it can range from 80 KW to 600 KW, but most just use 80 KW.

3.2.4 PROXIMITY SENSOR


A proximity sensor is a sensor able to detect the presence of nearby objects without any physical contact. A proximity sensor often emits an electromagnetic or electrostatic field, or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed is often referred to as the proximity sensor's target. Different proximity sensor targets demand different sensors. For example, a capacitive or photoelectric sensor might be suitable for a plastic target; an inductive proximity sensor requires a metal target. An inductive proximity sensor has four components; The coil, oscillator, detection circuit and output circuit. The oscillator generates a fluctuating magnetic field the shape of a doughnut around the winding of the coil that locates in the devices sensing face. When a metal object moves into the inductive proximity sensors field of detection, Eddy circuits build up in the metallic object, magnetically push back, and
Department of EEE, BMSCE Bangalore -19 Page 40

Intelligent Vehicle Diagnostics & Monitoring System finally dampen the Inductive sensors own oscillation field. The sensors detection circuit monitors the oscillators strength and triggers an output from the output circuitry when the oscillator becomes dampened to a sufficient level.

Here Proximity sensor is used as a Lane Detector. It is a inductive type sensor able to detect the presence of nearby object without any physical contact. It is used for the Lane detection. 1 - Means car out off lane. 0- Means in the lane. It is connected to the port pin P0.22.

3.3 DC MOTORS
In any electric motor, operation is based on simple electromagnetism. A current-carrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field .The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. Every DC motor has six basic parts -- axle, rotor, stator, commutates, field magnet(s), and brushes. In most common DC motors, the external magnetic field is produced by high-strength permanent magnets. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -- with the rotor inside the stator (field) magnets.

Department of EEE, BMSCE Bangalore -19

Page 41

Intelligent Vehicle Diagnostics & Monitoring System

They can be reversed simply by reversing the supply and speed is controlled through on chip PWMs of processor. The two wheels are controlled separately and hence need controls independent of each other. A left turn for the car calls for the right wheel to be driven, with the left wheel stationary, and vice versa for the right turn. In case this does not produce satisfactory results, we can have bi-directional control of the motors, by reversing the wheel that was stationary. Regardless of that, what is clear is that both motors need to be controlled independently of each other. Also, since the motors need to be started and stopped very fast, the control circuit needs to be adequately fast.

Technical Specification
1. Supply voltage 2. Current limit : 5V : 120mA (min) - 350mA (max)

3.4 GSM MODULE


GSM is an acronym for global system for mobile communication is one of the most widely used technologies in todays world. The main reason for acceptance is its unique feature of SMS service with roaming and Integrated Service Digital Network (ISDN). GSM (global system for mobile communication), GSM is a digital cellular telephone technology that is based on TDMA (Time Division Multiple Access). GSM is one of the most widely used techniques in todays world. The main reason for acceptance is its unique features of SMS service with roaming and integrated Service Digital Network (ISDN).

Department of EEE, BMSCE Bangalore -19

Page 42

Intelligent Vehicle Diagnostics & Monitoring System The operation of wireless technology is developed in digital text message and the continues increases in the device density of integrated circuit have made completely digital system viable. One of the key features of GSM is the Subscriber Identity Module (SIM), commonly known as a SIM card. A variety of data services is offered. GSM users can send and receive data, at rates up to 9600 bps. Since GSM is a digital network, a modem is not required between the user and GSM network, although an audio modem is required inside the GSM network to interwork with POTS. SMS is a bidirectional service for short alphanumeric (up to 160 bytes) messages. Messages are transported in a store-and-forward fashion. For point-to-point SMS, a message can be sent to another subscriber to the service, and an acknowledgement of receipt is provided to the sender. SMS can also be used in a cellbroadcast mode, for sending messages such as traffic updates or news updates. Messages can also be stored in the SIM card for later retrieval. In our System we have used it to send an SMS to the concerned person in case of an Accident by initialising the GSM Module with the help of AT Commands. The AT Commands corresponding to Sending a Message are used later to send an SMS to one or many Cell phone number of Relatives, Owner, Police, Hospital etc to inform about the Accident for further action.

Architecture of the GSM network


A GSM network is composed of several functional entities, whose functions and interfaces are specified. Figure 1 shows the layout of a generic GSM network. The GSM network can be divided into three broad parts. The Mobile Station is carried by the subscriber. The Base Station Subsystem controls the radio link with the Mobile Station. The Network Subsystem, the main part of which is the Mobile services Switching Centre (MSC), performs the switching of calls between the mobile users, and between mobile and fixed network users. The MSC also handles the mobility management operations. Not shown is the Operations and Maintenance Centre, which oversees the proper operation and setup of the network. The Mobile Station and the Base Station Subsystem communicate across the Um interface, also known as the air interface or radio link. The Base Station Subsystem communicates with the Mobile services Switching Centre across the Air interface.

Department of EEE, BMSCE Bangalore -19

Page 43

Intelligent Vehicle Diagnostics & Monitoring System

The following are the abbreviation used to define GSM network architecture SIM- SUBSCRIBER IDENTITY MODULE BSC- BASE STATION CONTROLLER MSC- MOBILE SERVICE SWITCHING CENTER ME- MOBILE EQUIPMENT HLR HOME LOCATION REGISTER EIR- EQUIPMENT IDENTITY REGISTER BTS- BASE TRANSCEIVER STATION VLR- VISITOR LOCATION REGISTER AUC- AUTHENTICATION CENTER In this project we utilised this technology using external GSM modem, which acts as both transmitter and receiver interfaced through the serial communication with the user friendly ATCOMMANDS INSTRUCTION SET (ATTENTION COMMANDS) AT COMMANDS forms the basic communication between MODEM and the target device. Target device can be a microcontroller, processor, PC hyperterminal or a mobile. These commands are used in all the mobiles where the modem and the processor interact. Right from powering ON the mobile to any thinkable operation in the mobile till it is switched off, everything is based on AT COMMANDS.
AT COMMANDS

Power ON

Call

SIM

SMS Phonebook Dial

Alarm Network Antenna

GPRS

Headphone

area Power off Indication

Department of EEE, BMSCE Bangalore -19

Page 44

Intelligent Vehicle Diagnostics & Monitoring System The GSM modem has to be initialized at Power ON. 1. This is done by sending AT to the modem from the application. 2. After getting this command the modem responds with a response sending OK to the application. 3. The application has to send ATE0 indicating echo is OFF. ATE1 is Echo ON. 4. The modem sends back OK to the application. 5. Then onwards the application has to send suitable AT command to initialize the modem as per the requirement.

3.5 IGNITION KEY, SEAT BELT & BRAKE CONTROL


In our project we simulated the ignition key through a push button, seat belt and brake control module of a vehicle using a jumper basically it is a switch.

3.6 RF COMMUNICATION SYSTEM


RF communication works by creating electromagnetic waves at a source and being able to pick up those electromagnetic waves at a particular destination. These electromagnetic waves travel through the air at near the speed of light. For Remote control applications 433 MHz frequency range is used. These waves are sent to the receiver from the transmitter by an antenna.
Department of EEE, BMSCE Bangalore -19 Page 45

Intelligent Vehicle Diagnostics & Monitoring System

RF Communication System
1. Simplex RF System A radio technology that allows only one-way communication from a transmitter to a receiver Examples: FM radio, Pagers, TV, One-way AMR systems 2. Half-duplex RF Systems Operation mode of a radio communication system in which each end can transmit and receive, but not simultaneously Examples: Walkie-talkie, wireless keyboard mouse 3. Full-duplex RF Systems Radio systems in which each end can transmit and receive simultaneously Example: Cellular phones, satellite communication

Basic Building Blocks of an RF System

RF-IC
Transmitter Receiver Transceiver System-on-Chip (SoC); typically transceiver with integrated microcontroller Crystal Reference frequency for the LO and the carrier frequency

Balun
Balanced to unbalanced Converts a differential signal to a single-ended signal or vice versa
Department of EEE, BMSCE Bangalore -19 Page 46

Intelligent Vehicle Diagnostics & Monitoring System

Filter

Used if needed to pass regulatory requirements / improve selectivity

Antenna
Transmit/Receives the RF signals

3.6.1 RF TRANSMITTER
RF Transmitter transmits the signal to the particular destination using RF Technology. It works at Radio Frequency range. In our project we have used this phenomenon to control the motor speed and direction through the computer. It houses the 8-bit C & an Encoder where the data sent through the computer is pickup by the 8-bit C and is encoded in the encoder to transmit the data using RF technology. The following are the technical details of the RF Transmitter used in the project.

Technical Specification 1. RF Transmitter 2. Operating Voltage


3.Peak Current 4. Input High Voltage 5. Input Low Voltage 6. Absolute Frequency 7. RF Output Power (50ohm) 8. Data Rate 9. Modulation

: TLP434A : 2 to 12 V : 1.64mA : Vcc-0.5 to Vcc+0.5 V : 0.3 V : 315 MHz : Vcc 9V-12V : 200Kbps : AM, FM

3.6.1.1 AT89S52
The IC AT89S52 is a 8-bit C, in our System we have used this to control the Serial communication between the PC & C & RF Communication between RF Transmitter & RF Receiver.

Pin diagram of AT89S52


We have make use of only pin P3.0 (RXD) & P3.1 (TXD) for Serial Communication with the PC, P0.0 to P0.4 ( Data to Encoder) to send the Data to be Encoded for RF Transmission.

Department of EEE, BMSCE Bangalore -19

Page 47

Intelligent Vehicle Diagnostics & Monitoring System

Programming AT89S52 for Serial data transmission


In programming the 8051 to transfer character bytes serially, the following steps must be taken. 1. The TMOD register is loaded with the value of 20H, indicating the use of Timer 1 in mode2 (8-bit auto-reload) to set the baud rate. 2. TH1 is loaded with one of the values from the below table , to set the baud rate(with XTAL crystal frequency of 11.0592 MHz) 3. The SCON register is loaded with the value 50H, indicating serial mode-1, where 8-bit data is framed with start and stop bits. 4. TR1 (Timer-1 ready bit in TCON register) is set to 1 to start timer 1. 5. TI flag is cleared with the CLR TI instruction. 6. The character byte to be transferred serially is written into the SBUF register. 7. The TI flag bit is monitored with the use of the instruction JNB RI, xx to see if the entire character has been received completely. 8. To receive the next character, go to step 5.
BAUD RATE 9600 4800 2400 1200 TH1 (DECIMAL) -3 -6 -12 -24 TH1 (HEX) FD FA F4 E8

Department of EEE, BMSCE Bangalore -19

Page 48

Intelligent Vehicle Diagnostics & Monitoring System

Technical Specification
1. Microcontroller : 2. Electrical characteristics : 3. Device type 4. Memory 5. Output format : : : AT89C51 Minimum VCC for Power-down is 2V. Low-voltage Mode (VPP = 5V), High voltage Mode (VPP=12V) CMOS technology 128 Bytes of RAM, 4K Bytes of Flash Digital.

3.6.1.2 ENCODER
The Encoder we have used in our system is HT12E, which encodes the data sent by the C. The Encoded data later sent to the RF Transmitter for wireless data transmission. Features Operating voltage - 2.4V~12V for the HT12E Low power and high noise immunity CMOS technology Minimum transmission word - Four words for the HT12E Data code has positive polarity Low standby current of < 1A at 5V supply HT12A/E: 18-pin DIP/20-pin SOP package General Description The HT12E encoder is a CMOS IC built especially for remote control system applications. It is capable of encoding 8 bits of address (A0-A7) and 4 bits of data (AD8-AD11) information. Each address/data input can be set to one of the two logic states, 0 or 1. Upon reception of transmit enable (TE-active low), the programmed address/data are transmitted together with the header bits via an RF medium. Applications Burglar alarm system Smoke and fire alarm system Garage door controllers Car door controllers Car alarm system Security system Cordless telephones Other remote control systems
Department of EEE, BMSCE Bangalore -19 Page 49

Intelligent Vehicle Diagnostics & Monitoring System

Pin Description Encoder HT12E

3.6.2 RF RECEIVER RF Receiver demodulates the received signal sent from the transmitter & converts to the original data. In this project we have placed this module in the host side of the vehicle in addition to which it has a decoder which decodes the data & sends it to the C for further process. Technical Specification 1. RF Receiver 2. Operating Voltage 3. Operating Current 4. Operating frequency 5. Sensitivity 6. Channel width 7. Noise Equivalent BW 8. Receiver turn On time 9. Operation temperature 10.Base band data rate : RLP434A : 3.3 to 6V : 4.5 mA : 315,418 and 433.92 MHz : -110dBm : 500 KHz : 4 KHz : 5ms : -20 to 80 oC : 4.8 KHz

3.6.2.1 DECODER The Decoder we have used in our system is HT12D, which decodes the data sent at 453-454MHz by the RF Transmitter. The Decoded data later sent to the C for further action to be taken for the particular Key Pressed in the PCs Keyboard & sent by the RF Transmitter Block.

Department of EEE, BMSCE Bangalore -19

Page 50

Intelligent Vehicle Diagnostics & Monitoring System Features Operating voltage: 2.4V~12V Low power and high noise immunity CMOS technology - Low standby current - Capable of decoding 12 bits of information Binary address setting Received codes are checked 3 times Address/Data number combination -HT12D: 8 address bits and 4 data bits General Description The HT12D is a decoder IC made especially to pair with the HT12E encoder. It is a CMOS IC made for remote control system applications. The decoder is capable of decoding 8 bits of address (A0-A7) and 4 bits of data (AD8-AD11) information. The decoder receives serial addresses and data from a programmed encoder transmitted by a carrier using RF or an IR transmission medium.

3.7 POWER SUPPLY UNIT The Power Supply Unit is the last & very important Hardware Unit which Power each & every Block of the System. The block diagram shows a typical power supply which has 1. Transformer 3. Filter 2. Rectifier 4. Regulator

Department of EEE, BMSCE Bangalore -19

Page 51

Intelligent Vehicle Diagnostics & Monitoring System

The first section is the TRANSFORMER which steps down the input line voltage and isolates the power supply from the power line. The RECTIFIER section converts the alternating current input signal to a pulsating direct current, as pulsating dc is not desirable. For this reason a FILTER section is used to convert pulsating dc to a purer, more desirable form of dc voltage. The final section, the REGULATOR maintains the output of the power supply at a constant level in spite of large changes in load current or input line voltages. So we used two adaptors for this purpose 12V, 2A and 9V, 1A and separate voltages of lower than this is obtained by on board regulators. The voltages specification for different modules and microcontroller as follows

Regulators Board 12V/2A: From an Adaptor KNOWX Innovationss Board 7.5/9V : From a 9V Regulator On Board Regulators o 5V For LCD, Relays, IO ports o 3.3V For On-Chip Peripherals o 1.8V For CPU RF Receiver 5V: From a 5V Regulator GSM Module 9V: From a 9V Regulator Proximity Sensor 5V: From a 5V Regulator Ultrasonic Sensor 5V: From a 5V Regulator Pressure Sensor 9V: From a 9V Regulator RF Transmitter Board 9V/1A: From an Adaptor AT89S525V: From a 5V Regulator RF Transmitter: From a 5V Regulator
Page 52

Department of EEE, BMSCE Bangalore -19

Intelligent Vehicle Diagnostics & Monitoring System

3.8 COMPONENTS USED RECEIVER REQUIREMENTS: SL Components Quantity no 1. ARM7 CPU based 1 LPC2129 Microcontroller 2. GSM Module 1 3. SIM Card 1 4. CAN 2 Controllers(MCP2551) 5. Ultrasonic 1 Sensor(SRF-02) 6. Brake control 1 Module(Jumper) 7. Proximity Sensor 1 8. Temperature Sensor 1 (LM35) 9. Relay(+5V) 2 10. Seat Belt(Jumper) 1 11. Ignition ON 1 key(button switch) 12. DC Motors (5v) 2 13. LCD 16*2 14. RF Receiver 433MHz 15. RF Decoder( HT12D) 16. Power Supply Unit (+12V/2A) 17. RS-232 Cable 1 1 1 1 1 TRANSMITTER REQUIREMENTS: Sl.no Components 1. 2. 3. 4. 5. 6. Microcontroller (AT89S52) Quantity 1

RF Transmitter 1 433MHz RF Encoder (HT12E) 1 Power Supply Unit 1 (+12V) RS-232 Cable Personal with XP 1

Computer 1

and HYPERTERMINAL 7. MAX232 1

18. ULN2803 for relay 1 driver 19. EEPROM(24C04) 1


Department of EEE, BMSCE Bangalore -19 Page 53

Intelligent Vehicle Diagnostics & Monitoring System

This chapter gives the complete working principle of the Intelligent Vehicle Diagnostics & Monitoring System.

4. Working Principle
4.1 Principle of Operation
The working of the system has divided into two stages, one is Ignition ON & other is Power ON. When the supply is Switched ON & after we pressed the Reset Button of the kit, the dumped code in the 32 bit c starts executing. In the beginning the LCD displays WELCOME TO BLACK BOX FOR VEHICLES. In the next step it waits for the Ignition Key to be pressed by displaying Waiting For Key. When we pressed the Ignition Key, the Ignition ON stage initializes. At Ignition ON, it checks each vehicle critical failure parameters such as Brake, Seat Belt, CAN bus, & GSM module and display the status of each failure parameter on the LCD as PASS if it in right condition else it displays FAIL. Once all the four critical failure parameters are checked , it checks for the overall status & display as PASS if all the parameters are in right condition, if not it displays as FAIL & it doesnt allow the Motors to Switch ON & waits for the Ignition Key to be pressed again. This check continues untill all the four parameters to be in a right condition. At Power ON, the system allows the motor to switch-on. Here we have used the RF technology to control the motion of the motor. When the vehicle is under running condition , the system checks the four minor failure parametrs such as Engine Temperature, Bumpers Pressure, Lane detection & Obstacle detection. If any minor failure occurs, it informs the driver by displaying its status on the LCD. If an accident occurs, the change in the Bumpers pressure is sensed by the pressure sensor. If the sensed pressure exceeds the limit which is set by the programmer, the system displays on the LCD as ACCIDENT OCCURRED & suddenly Switch-OFF the motor first by displaying as MOTOR IS SWITCHED OFF & simultaneously sends an SMS to the concerned person whose Cell phone number is stored in the program and retrive the data from the EEPROM & display them on LCD as TEMP =XX, PRESSURE =XX , LANE =XX & ULTRASONIC =XX. Here the temperature measured is in C, pressure is in kg/cm, lane distance is in mm & obstacle distance measured by Ultrasonic Sensor is in cm.

4.2 Flow Chart


The Flow Chart gives the step by step operation of our system diagrammatically. It is very easy for a person to analyse and understand the process involved in the project.
Department of EEE, BMSCE Bangalore -19 Page 54

Intelligent Vehicle Diagnostics & Monitoring System The flow of operation is divided as Diagnose of Critical failure Parameters, Motion control of Motors & Diagnose of Minor failure Parameters.

Diagnose of Critical failure Parameters

Department of EEE, BMSCE Bangalore -19

Page 55

Intelligent Vehicle Diagnostics & Monitoring System

Star t INITIALIZATION FOR


LCD (2*16) Checks the status of critical parameters Critical sensor. No Display failure of the module as FAIL on the LCD

Is Brake Module plugged? Ye s Display the Brake Module is OK as PASS on the LCD Is Seat Belt plugge d? Ye Display the SeatBelt is OK ass PASS on the LCD Display as PASS Is CAN Bus is OK? Ye Display the SeatBelt is OKsas PASS on the LCD No

No A

Department of EEE, BMSCE Bangalore -19

Page 56

Intelligent Vehicle Diagnostics & Monitoring System


B Is GSM Modul e OK? No Initializ Ye ed Display the GSM s Module is OK as Yes PASS on the LCD If Status

No

Ye s Display Success of Status check as PASS on the LCD Wait for start command for the DC Motors No

== Pass

Syste m Reset

Is Start Command received? START Ye the DC s Motors DC MOTOR

Diagnose of Minor failure Parameters


Department of EEE, BMSCE Bangalore -19 Page 57

Intelligent Vehicle Diagnostics & Monitoring System


E G Waiting for the key to be pressed Ye If s key= =O H

No

The DC Motors are turned ON

If key= =P

If key= =N No No G Ye s DISPLAY MOVING DC MOTOR REVERSE 1 & 2 ON DC MOTOR 2 ON G

If key= =R No Ye s DISPLAY MOVING DC MOTOR RIGHT 1 OFF , 2 ON


DC MOTOR 2 ON

If key= =L No G Ye s DISPLAY DC MOTOR MOVING LEFT 1 ON , 2 OFF


DC MOTOR 2 OFF

Yes DISPLAY MOVING DC MOTOR FORWARD 1 & 2 ON


DC MOTOR 2 ON

If key= =0 Yes DC MOTORS are Switched OFF

No H

Motion control of Motors


Department of EEE, BMSCE Bangalore -19 Page 58

Intelligent Vehicle Diagnostics & Monitoring System


D

Read the values of All four Sensors

If any Sensor value changes Yes Store the value in EEPROM If Bumper is hit /Accident occurs No Store the new values of sensor in the EEPROM

No

Syste m Reset

Ye s

Display ACCIDENT OCCURRED on the LCD

Switch OFF the Motors & display Motor is Switched OFF.

Send message of accident to the stored number using GSM

Display all the Sensor values on the LCD.

4.3. INTERNAL CIRCUITS


Department of EEE, BMSCE Bangalore -19 Page 59

Intelligent Vehicle Diagnostics & Monitoring System

4.3.1 RF-Receiver & Main Block Internal Circuits


The circuit description of each & every Block/Module are given below. The internal circuits of various sections of our system are KNOWXs Board LPC 2129 32-bit C, GSM Module , CAN controller, RF-Receiver, Pressure sensor, Ultrasonic sensor, Temperature sensor & Proximity sensor.

KNOWX Boards LPC 2129 32-bit C

Department of EEE, BMSCE Bangalore -19

Page 60

Intelligent Vehicle Diagnostics & Monitoring System

GSM Module

CAN Controller

RF-Receiver

Department of EEE, BMSCE Bangalore -19

Page 61

Intelligent Vehicle Diagnostics & Monitoring System

Pressure Sensor

Ultrasonic Sensor

Temperature Sensor

Proximity Sensor
Department of EEE, BMSCE Bangalore -19

LCD Display
Page 62

Intelligent Vehicle Diagnostics & Monitoring System

EEPROM

Brake, Seat-Belt & Ignition Key

Motor Driver

Power Supply Unit

Department of EEE, BMSCE Bangalore -19

Page 63

Intelligent Vehicle Diagnostics & Monitoring System

4.3.2 RF-Transmitter Block Internal Circuits

Department of EEE, BMSCE Bangalore -19

Page 64

Intelligent Vehicle Diagnostics & Monitoring System

RF- Transmitter

Power Supply for RF-Transmitter

Department of EEE, BMSCE Bangalore -19

Page 65

Intelligent Vehicle Diagnostics & Monitoring System

This chapter gives the details of the software & protocols used for our system implementation. 5.1 Software & Protocol Used
In our project we have used the software such as Windows XP, Keil microvision 3, Hyper-terminal, Embedded C & Philips Flash utility software and protocols used are I2C, Serial Communication, CAN, GSM AT commands Windows XP is used as a basic platform to analyze, write, read and do some changes in the required manner. Keil micro-vision 3 is used as a platform to develop a source code for a 32-bit & 8-bit micro-controller in Embedded C and execute it to get the final result. Embedded C is a language to write the program in C for micro-controllers. It is developing the code, analyzing and execution becomes quite easy to do. Philips Flash Utility is used as a tool to dump the source code from the PC to the board ( which has a 32-bit micro-controller) . Hyper Terminal is used to make the serial communication between the PC & any device using the RS 232 cable which is connected to the comport0/1 of PC. Here using this we are going to have the wireless control of the motor( say speed & direction ) using RF technology. This is done by sending some specific letters from the keyboard to the PC where these letters have the particular ASCII code which will be sent to RF Receiver in encoded form through RF Transmitter. CAN is a message oriented protocol designed by Bosch. It acts as a backbone for the data communication network. It uses serial communication at the data rate of 5kBits/s to 1MBits/s. Prioritisation of messages is the main feature of CAN. I2C supports any IC fabrication process (NMOS, CMOS, bipolar). Two wires, serial data (SDA) and serial clock (SCL), carry information between the devices
Department of EEE, BMSCE Bangalore -19 Page 66

Intelligent Vehicle Diagnostics & Monitoring System connected to the bus. Each device is recognized by a unique address (whether its a microcontroller, LCD driver, memory or keyboard interface) and can operate as either a transmitter or receiver, depending on the function of the device. Obviously an LCD driver is only a receiver, whereas a memory can both receive and transmit data. GSM AT Commands is used to do the specified action between two GSM devices such as sending a message, receiving a message, making a call etc,. These AT( Attention) commands are written in the source code for a particular action to be done by a device. In our project if any Accident occurs means a message is immediately sent to the specified number which is stored in the program.

5.2 Source Code


In our project we have two source codes one for 8 bit and other for 32 bit micro-controllers. Both the source codes are written in Embedded C using Keil-v3.

5.2.1 Source code for RF Receiver & Main Block


It is done by using 32 bit C. The 32 bit source code has written in such a way that the whole program has divided into many control loops corresponding to the different block/device. The control loops are main.c, lcd.c, gpio.c, brake.c, seatbelt.c, can.c, uart.c, gsm.c, pwm.c, adc.c, i2c.c, sensors.c & RF_rec.c main.c: Initialize the LCD routine, GSM modem, Timer and Serial Communication at Power ON. After Initialization an infinite loop is executed. lcd.c: It contains write data & write command functions to send data & commands to LCD gpio.c: Here the particular port pins are set or cleared to make as input or output port pins brake.c: It checks the status of Brake, if it is in proper condition it displays PASS on the LCD, if not FAIL on the LC D. seatbelt.c: It checks the status of SeatBelt, if it is in proper condition it displays PASS on the LCD, if not FAIL on the LC D. can.c: It checks the status of CAN Bus, if it is in proper condition it displays PASS on the LCD, if not FAIL on the LC D.
Department of EEE, BMSCE Bangalore -19 Page 67

Intelligent Vehicle Diagnostics & Monitoring System UART.c: This Program does initialisation of the uart speed of transmission, transmits char from the uart and also receives char from the serial receive line gsm.c: It checks the status of GSM Initialization, if it is in proper condition it displays PASS on the LCD, if not FAIL on the LC D. pwm.c: This driver is used to initialise PWM and run at various speed. adc.c: This function performs analog to digital conversion & this function performs hex to bcd conversion i2c.c: This Program selects the I2C Registers in which the data can be pass through on board communication and save data in EEPROM, this function is used to initialise I2C, to Start a communication & store the data in EEPROM. sensors.c: This program selects the different Sensors and read the values and send through can1 and recieve through can2 and store the data in EEPROM &The changed value of each sensor will be updated in EEPROM. RF_rec.c: This function is used to Recieve the RF data and wait for VT to become high and returns the corresponding data.

5.2.2 Source code for RF Transmitter Block


It is done by using 8bit C. The 8-bit source code is divided in to two control loops. They are main.c and uart.c . main.c: which is used for initialization of serial communication and transfer the control word for controlling of dc motor through RF modules. uart.c: which is used to set the mode, baud rate, and selection of timers for required time slices for serial communication.

Department of EEE, BMSCE Bangalore -19

Page 68

Intelligent Vehicle Diagnostics & Monitoring System

6. PHOTOGALLERY KNOWX INNOVATIONS BOARD

Department of EEE, BMSCE Bangalore -19

Page 69

Intelligent Vehicle Diagnostics & Monitoring System

GSM MODULE

RF RECEIVER

RF TRANSMITTER

Department of EEE, BMSCE Bangalore -19

Page 70

Intelligent Vehicle Diagnostics & Monitoring System

PRESSURE SENSOR

PROXIMITY SENSOR

ULTRASONIC SENSOR

TEMPERATURE SENSOR

POWER SUPLY UNIT

Department of EEE, BMSCE Bangalore -19

Page 71

Intelligent Vehicle Diagnostics & Monitoring System

COMPLETE MODEL

7. CONCLUSIONS
Department of EEE, BMSCE Bangalore -19 Page 72

Intelligent Vehicle Diagnostics & Monitoring System

7.1 FEATURES

Diagnostic check IGNITION ON.

of

vehicles

Critical

failure

parameters

at

Do not allow the vehicle to start in case of any major failure. Indicate the failure parameters on the car dash board (LCD) instantly. Diagnose the Minor failure parameters while vehicle is moving. Interfaced GSM to inform the concerned persons in case of an Accident. Store the recorded parameters in a Database (EEPROM) for future analysis.

7.2 ADVANTAGES
Because of LPC 2129, Low active power consumption. Code size reduction. Low cost. External connectivity. Efficient real time operation. Driver friendly, Indicate the failure parameters on the car dash board instantly. Do not allow the vehicle to start in case of any major failure. Take appropriate measures to avoid accident. Record the parameters in EEPROM. GSM provides on time information to concerned person.

7.3 APPLICATIONS

Can be implemented to any vehicle. Can be implemented even to an Electric Vehicle with much more Diagnostics Parameters.

Department of EEE, BMSCE Bangalore -19

Page 73

Intelligent Vehicle Diagnostics & Monitoring System

7.4 FUTURE IMPLIMENTATIONS


Implementation of GPS: To locate the place of Accident. Speed Sensor: To take care of Speed limit. Liquid level sensor: For Fuel & Water level (Radiator) Measurement. Alcohol Sensor: To avoid indiscipline usage of Vehicle.

Biometric Device: To avoid Unauthorized Person accessing the Vehicle.

Department of EEE, BMSCE Bangalore -19

Page 74

Intelligent Vehicle Diagnostics & Monitoring System

8. BIBLIOGRAPHY Websites
1. http://www.google.com 2. http://www.arm.com 3. http://www.datasheetscatlog.com 4. http://www.philips.com 5. http://www.atmel.com
6. 7. 8. 9. 10. 11.

http://www.knowxindia.com http://www.ni.com http://www. keil.com http://www.hitex.co.uk/arm http://www.howstuffworks.com http://www.8051.com

References
1. The insider guide to the Philips ARM 7 based micro-controller hand book 2. ARM& TDMI technical reference manual 3. ARM 7 architecture application level reference manual 4. Microcontrollers & Embedded Systems By Muhammad Ali Mazidi & Janice Gillispie Mazidi. 5. Programming in Embedded Systems in C & C++ By Michael Barr.

Department of EEE, BMSCE Bangalore -19

Page 75

Intelligent Vehicle Diagnostics & Monitoring System

APPENDIX

Department of EEE, BMSCE Bangalore -19

Page 76

Intelligent Vehicle Diagnostics & Monitoring System

LPC2129 PIN DIAGRAM

Department of EEE, BMSCE Bangalore -19

Page 77

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 78

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 79

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 80

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 81

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 82

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 83

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 84

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 85

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 86

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 87

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 88

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 89

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 90

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 91

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 92

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 93

Intelligent Vehicle Diagnostics & Monitoring System

Department of EEE, BMSCE Bangalore -19

Page 94

Das könnte Ihnen auch gefallen