tire pressure measurement

Embed Size (px)

DESCRIPTION

project report

Citation preview

Shri Vaishnav Institute of Technology and Science, Indore (M.P.)

A Major Project Report onTYRE PRESSURE MONITORING SYSTEMsubmitted as a partial fulfilment for Degree of

Bachelor of EngineeringInELECTRONICS & INSTRUMENTATION ENGINEERING (Session: 2013-2014)

Guided by Submitted by

Mr Namit Gupta Shruti Gajbhiye Head of Department (0802EI101079) S.V.I.T.S. Indore

Mr Chintan Patel Assistant Professor Rachana Jatwa S.V.I.T.S. Indore (0802EI101079)

Shri Vaishnav Institute of Technology and Science Indore (M.P.)

CERTIFICATEThis is to certify that the project entitledTIRE PRESSURE MONITORING SYSTEM which is being submitted by Shruti Gajbhiye(0802EI101070),Rachana Jatwa (0802EI101063), in the partial fulfilment for the award of degree of Bachelor of Engineering from Rajiv Gandhi Proudyogiki Vishwavidhyalaya, Bhopal M.P., is a record of students own work carried by them under my guidance and supervision.

Prof. Namit Gupta External Examiner Mr. Chintan PatelHead of Department Project GuideS.V.I.T.S. Indore S.V.I.T.S. Indore

Ms Ishita Bhatnagar Mrs Neha MaheshwariProject Co-ordinator Project Co-ordinatorS.V.I.T.S Indore S.V.I.T.S IndoreShri Vaishnav Institute of Technology and Science Indore (M.P.)

DECLARATION

The project report entitledTYRE PRESSURE MONITORING SYSTEMsubmitted by Shruti Gajbhiye (0802EI101070) and Rachana Jatwa (0802EI101063), in the partial fulfilment for the award of degree of Bachelor of Engineering from Rajiv Gandhi Proudyogiki Vishwavidhyalaya, Bhopal M.P., is a record of our own work carried by us under the guidance and supervision of our guide in the Electronics and Instrumentation Department, S.V.I.T.S Indore .

SHRUTI GAJBHIYE RACHANA JATWA(0802EI101079) (0802EI101063)

Prof. Namit Gupta External Examiner Mr. Chintan patel Head of Department Project GuideS.V.I.T.S. Indore S.V.I.T.S. Indore

ACKNOWLEDGMENT

We take great pleasure in expressing our deep sense of gratitude to our esteemed institute Shri Vaishnav Institute of Technology and Science for providing us the opportunity to complete this project.

We are grateful to our project guide Mr. Chintan Patel, project co-ordinator Ms. Ishita Bhatnagar and Mrs Neha Maheshwari and our HOD Prof. Namit Gupta and our Director Dr. ING V.P. Singh for their benevolence, kindness, help and guidance.

We also thank all the faculty members of our department for helping us in completing the project successfully and for their motivation.

Shruti Gajbhiye (0802EI101079) Rachana Jatwa (0802EI101063)

ABSTRACT

The project proposes a method to implement Tire Pressure Monitoring System (TPMS) in vehicles. TPMS measures the air pressure inside pneumatic tires of automobiles. The proposed TPMS has an electronic unit that directly screws onto the stem of tire. The unit includes a pressure transducer, microcontroller, RF communication unit. Main components need to be calibrated to ensure the consistency and precision of the prototype in reporting the pressure. Calibration for pressure sensor is performed by simply applying a known value of pressure and the output voltage is measured. An on-board RF receiver communicates with the TPMS unit and displays real-time tire pressure of all tires. The unit can be easily detached and re-attached to the tire. Modification to the tire is not required. Improper tire pressure is a safety issue that is often overlooked or ignored. A drop in tire pressure by just a few pounds per square inch (PSI) can result in the reduction of gas mileage, tire life, safety, and vehicle performance. Correct tire pressure is a critical factor in the safe operation and performance of a motor vehicle. Over inflated tires often result in unnecessary tire wear.Ease of use and understanding will create a system that will minimize some of the possible dangers drivers face on the road each day. System measures Pressure Wireless RF communications Tire Interchangeability Light and Low Power Sensor System

CONTENTS

1) Introduction 1.1 Objective 1.2 Background 1.3 Project Scope 1.4 Components used

2) Block Diagram & Working

3) Technological Overview 3.1Pressure Transducer3.2 Microcontroller used3.3 RF communication unit

4) Hardware and Software specification 4.1 Introduction 4.2 Hardware 4.3 Software

5) Layout Design 5.1 Circuit Diagram 5.2 PCB Layout

6) Conclusion 7) Bibliography 8) Data Sheets

Chapter 1

INTRODUCTION

1.1 OBJECTIVE The objective of the project is to develop and implement a tire pressure monitoring system.

1.2 BACKGROUND

A tire pressure monitoring system (TPMS) monitors air pressure in the tires of a motor vehicle, and that generates a signal indicative of the tire pressure in each of the tires to increase the vehicle performance and safety. Correct tire pressure is a critical factor in the safe operation and performance of a motor vehicle. Over inflated tires often result in unnecessary tire wear, reduced gas mileage and less than optimal vehicle performance as well as vehicle safety.

This system is based on direct method of tire pressure measurement. This system contains a direct tire pressure monitoring principle, RF communication link and display unit for monitoring the pressure of the tire. TPMS was introduced by General Motors in March 1997 for the 5th generation (C5) Corvette in conjunction with Goodyear run flat tires. The system uses sensors in the wheels and a driver display which can show tire pressure at any wheel, plus warnings for both high and low pressure.

1.3 PROJECT SCOPEThere are many ways to design and develop a TPMS. This project requires extensive research that might widen up the scope. Hence, the projects scope needs to be defined first in order for this project to reach its objectives. Transmitting and detection unit could be installed outside the tire, but this will increases the risk of being damaged by external environment and even get stolen. Hence, the proper position of the unit would be inside the tyre where the measurement of the pressure value is directly obtained. In order to place the transmitting and detection unit inside the tire, considerations of size of the unit needs to be taken. The size should be small enough to fit in inside the tire. There are many ways to achieve wireless transmission. But this project will be dedicated in using radio frequency method, where receiver and transmitter are needed. Sensor is integrated with the transmitting and detection unit, thus it requires power supply. Traditional direct TPMS using battery as the solution but it has a few problems. Hence, this project will design a system that does not require battery. One of the alternatives is by using piezoelectric method. When stress or pressure is applied on the piezoelectric material, electric current will be produced. This current will be used to power the transmitting and detection unit.

1.4COMPONENTS USED:

1) PRESSURE TRANSDUCER(MPX2010DP)

2) MICROCONTROLLER(PIC16F877A)

3) RF COMMUNICATION UNIT(CC2500)

RF MODULE

PRESSURE TRANSDUCER

Chapter 2BLOCK DIAGRAM & WORKING

Display (lcd 16*2)Receiver RF module(cc2500)Microcontoller Lcd Driver(PIC16F877A)

RECIEVER SECTION

WORKING

The sensor in the transmitting converts variation of the tyre pressure into electric parameters which vary accordingly to electronic component induction. Then, the electric parameters are processed by a MCU in the transmitting and detection unit into digital code signals. After identification of the ID of the digital code signals in this unit) is completed, these code signals are transmitted via a carrier frequency by a transmitter.

PIC16F877A microcontroller IC, PIC16F877A is an 8-bit microcontroller with 8k14-bit flash program memory, 368 bytes of RAM and many other extra peripherals like ADC, universal synchronous asynchronous receiver transmitter, master synchronous serial port, timers, compare capture and pulse-width modulation modules, and analogue comparators. It is based on the reduced instruction set computer (RISC) architecture.

The original data is recovered after the radio signals are received and demodulated by the receiver antenna . Then, after being processed by the MCU of receiving and display unit, the data is displayed on the display screen. When the received data shows the pressure in the tire lower or higher than the set limit, the MCU will show on the display screen.

Chapter 3

TECHNOLOGICALOVERVIEW

3. TECHNOLOGICAL OVERVIEW:

3.1 PRESSURE SENSOR

The MPX2010DP silicon piezoresistive pressure sensors provide a very accurate and linear voltage output directly proportional to the applied pressure. These sensors house a single monolithic silicon die with the strain gauge and thin film resistor network integrated. The sensor is laser trimmed for precise span, offset calibration.

Voltage Output versus Applied Differential PressureThe output voltage of the differential or gauge sensor increases with increasing pressure applied to the pressure side (P1) relative to the vacuum side (P2). Similarly, output voltage increases as increasing vacuum is applied to the vacuum side (P2) relative to the pressure side (P1)

The Freescale MPX2010DP differential pressure sensor is electrically equivalent to the 4-arm bridge circuit. From this circuit, it can be seen that the output voltage from the pressure sensor (taken between pins 2 and 4) is proportional to the DC power supply voltage (applied between pins 3 and 1):

The pressure sensor is specified to output 25 mV when a full-scale differential pressure of 1.45 psi is applied, when the sensor is powered up by 10.0 VDC. However, only a +9.0 V battery is available to operate the circuit.

The essence of piezoresistive pressure sensors is the Wheatstone bridge. Bridge resistors R1,R2, R3 and R4 are arranged on a thin silicon diaphragm such that when pressure is applied R1 and R2 increase in value while R3 and R4 decrease a similar amount. Pressure on the diaphragm, therefore, unbalances the bridge and produces a differential output signal. One of the fundamental properties of this structure is that the differential output voltage is directly proportional to bias voltage B+

OUTPUT VS PRESSURE

3.2 MICROCONTROLLER-PIC16F877A:PICis a family ofmodified Harvard architecturemicrocontrollersmade byMicrochip Technology, derived from the PIC1650originally developed byGeneral Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral Interface Controller'" now it is "PIC'" only.PICs are popular with both industrial developers and hobbyists alike due to their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and re-programming with flash memory) capability.The PIC16F887 is one of the latest products fromMicrochip. It features all the components which modern microcontrollers normally have. For its low price, wide range of application, high quality and easy availability, it is an ideal solution in applications such as: the control of different processes in industry, machine control devices, measurement of different values etc. Some of its main features are listed below. RISC architecture Only 35 instructions to learn All single-cycle instructions except branches Operating frequency 0-20 MHz Precision internal oscillator Factory calibrated Software selectable frequency range of 8MHz to 31KHz Power supply voltage 2.0-5.5V Consumption: 220uA (2.0V, 4MHz), 11uA (2.0 V, 32 KHz) 50nA (stand-by mode) Power-Saving Sleep Mode Brown-out Reset (BOR) with software control option 35 input/output pins High current source/sink for direct LED drive software and individually programmablepull-upresistor Interrupt-on-Change pin 8K ROM memory in FLASH technology Chip can be reprogrammed up to 100.000 times In-Circuit Serial ProgrammingOption Chip can be programmed even embedded in the target device 256 bytes EEPROM memory Data can be written more than 1.000.000 times 368 bytes RAM memory A/D converter: 14-channels 10-bit resolution 3 independent timers/counters Watch-dog timer Analogue comparator module with Two analogue comparators Fixed voltage reference (0.6V) Programmable on-chip voltage reference PWM output steering control Enhanced USART module Supports RS-485, RS-232 and LIN2.0 Auto-Baud Detect

BLOCK DIAGRAM

Central Processor Unit (CPU) It is important to state that the CPU is manufactured with in RISC technology an important factor when deciding which microprocessor to use.RISCReduced Instruction Set Computer, gives the PIC16F887 two great advantages: The CPU can recognize only 35 simple instructions (In order to program some other microcontrollers it is necessary to know more than 200 instructions by heart). The execution time is the same for all instructions except two and lasts 4 clock cycles (oscillator frequency is stabilized by a quartz crystal). The Jump and Branch instructions execution time is 2 clock cycles. It means that if the microcontrollers operating speed is 20MHz, execution time of each instruction will be 200nS, i.e. the program will be executed at the speed of 5 million instructions per second!

Fig. 1-4 CPU Memory

MemoryThis microcontroller has three types of memory- ROM, RAM and EEPROM. All of them will be separately discussed since each has specific functions, features and organization.ROM MemoryROM memory is used to permanently save the program being executed. This is why it is often called program memory. The PIC16F887 has 8Kb of ROM (in total of 8192 locations). Since this ROM is made with FLASH technology, its contents can be changed by providing a special programming voltage (13V).

ROM Memory Concept

EEPROM MemorySimilar to program memory, the contents of EEPROM is permanently saved, even the power goes off. However, unlike ROM, the contents of the EEPROM can be changed during operation of the microcontroller. That is why this memory (256 locations) is a perfect one for permanently saving results created and used during the operation.

RAM MemoryThis is the third and the most complex part of microcontroller memory. In this case, it consists of two parts: general-purpose registers and special-function registers (SFR).Even though both groups of registers are cleared when power goes off and even though they are manufactured in the same way and act in the similar way, their functions do not have many things in common.

SFR and General Purpose Registers

General-Purpose RegistersGeneral-Purpose registers are used for storing temporary data and results created during operation. For example, if the program performs a counting (for example, counting products on the assembly line), it is necessary to have a register which stands for what we in everyday life call sum. Since the microcontroller is not creative at all, it is necessary to specify the address of some general purpose register and assign it a new function. A simple program to increment the value of this register by 1 after each product passes through a sensor, should be created.Therefore, the microcontroller can execute that program because it now knows what and where the sum which must be incremented is. Similarly to this simple example, each program variable must be preassigned some of general-purpose register.SFR RegistersSpecial-Function registers are also RAM memory locations, but unlike general-purpose registers, their purpose is predetermined during manufacturing process and cannot be changed. Since their bits are physically connected to particular circuits on the chip (A/D converter, serial communication module, etc.), any change of their contents directly affects the operation of the microcontroller or some of its circuits. For example, by changing the TRISA register, the function of each port A pin can be changed in a way it acts as input or output. Another feature of these memory locations is that they have their names (registers and their bits), which considerably facilitates program writing. Since high-level programming language can use the list of all registers with their exact addresses, it is enough to specify the registers name in order to read or change its contents.RAM Memory BanksThe data memory is partitioned into four banks. Prior to accessing some register during program writing (in order to read or change its contents), it is necessary to select the bank which contains that register. Two bits of the STATUS register are used for bank selecting, which will be discussed later. In order to facilitate operation, the most commonly used SFRs have the same address in all banks which enables them to be easily accessed.

I/O PORTS Features and FunctionsOne of the most important features of the microcontroller is a number of input/output pins used for connection with peripherals. In this case, there are in total of thirty-five general purpose I/O pins available, which is quite enough for the most applications. In order pins operation can match internal 8-bit organization, all of them are, similar to registers, grouped into five so called ports denoted by A, B, C, D and E. They all have several features in common: For practical reasons, many I/O pins have two or three functions. If a pin is used as any other function, it may not be used as a general purpose input/output pin; and

Every port has its satellite, i.e. the corresponding TRIS register: TRISA, TRISB, TRISC etc. which determines performance, but not the contents of the port bits.

By clearing some bit of the TRIS register (bit=0), the corresponding port pin is configured as output. Similarly, by setting some bit of the TRIS register (bit=1), the corresponding port pin is configured as input. This rule is easy to remember 0 = Output, 1 = Input.

I/O Ports

Port A and TRISA RegisterPort A is an 8-bit wide, bidirectional port. Bits of the TRISA and ANSEL control the PORTA pins. All Port A pins act as digital inputs/outputs. Five of them can also be analog inputs (denoted as AN):

Port A and TRISA RegisterAnalog Modules

Apart from a large number of digital I/O lines, the PIC16F887 contains 14 analog inputs. They enable the microcontroller to recognize, not only whether a pin is driven to logic zero or one (0 or +5V), but to precisely measure its voltage and convert it into a numerical value, i.e. digital format. The whole procedure takes place in the A/D converter module which has the following features: The converter generates a 10-bit binary result using the method of successive approximation and stores the conversion results into the ADC registers (ADRESL and ADRESH); There are 14 separate analog inputs; The A/D converter allows conversion of an analog input signal to a 10-bit binary representation of that signal; and By selecting voltage references Vref- and Vref+, the minimal resolution or quality of conversion may be adjusted to various needs.ADC Mode and RegistersEven though the use of A/D converter seems to be very complicated, it is basically very simple, simpler than using timers and serial communication module, anyway.

ADC Mode and RegistersThe module is under the control of the bits of four registers: ADRESH - Contains high byte of conversion result; ADRESL - Contains low byte of conversion result; ADCON0 - Control register 0; and ADCON1 Control register 1

ADRESH and ADRESL RegistersWhen converting an analog value into a digital one, the result of the 10-bit A/D conversion will be stored in these two registers. In order to deal with this value easier, it can appear in two formats- left justified and right justified. The ADFM bit of the ADCON1 register determines the format of conversion result (see figure 7-2). In the event that A/D converter is not used, these registers may be used as general-purpose registers.

ADRESH and ADRESL RegistersA/D Acquisition RequirementsFor the ADC to meet its specified accuracy, it is necessary to provide a certain time delay between selecting specific analog input and measurement itself. This time is called "acquisition time" and mainly depends on the source impedance. There is an equation used for accurately calculating this time, which in the worst case amounts to approximately 20uS..ADCON0 Register

CHS3-CHS0 - Analog Channel Select bitsselect a pin or an analog channel for conversion, i.e. voltage measurement:CHS3CHS2CHS1CHS0CHANNELPIN

00000RA0/AN0

00011RA1/AN1

00102RA2/AN2

00113RA3/AN3

01004RA5/AN4

01015RE0/AN5

01106RE1/AN6

01117RE2/AN7

10008RB2/AN8

10019RB3/AN9

101010RB1/AN10

101111RB4/AN11

110012RB0/AN12

110113RB5/AN13

1110CVref

1111Vref = 0.6V

Analog Channel Status Bits

GO/DONE - A/D Conversion Status bitdetermines current status of conversion: 1 - A/D conversion is in progress; and 0 - A/D conversion is complete. This bit is automatically cleared by hardware when the A/D conversion is completed.ADON - A/D On bitenables A/D converter. 1 - A/D converter is enabled; and 0 - A/D converter is disabled.ADCON1 Register

ADFM - A/D Result Format Select bit 1 - Conversion result right justified. Six most significant bits of the ADRESLH are not used; and 0 - Conversion result left justified. Six least significant bits of the ADRESL are not used.VCFG1 - Voltage Reference bitselects negative voltage reference source needed for A/D converter operating. 1 - Negative voltage reference is applied on the Vref- pin; and 0 - Voltage power supply Vss is used as negative voltage reference source.VCFG0 - Voltage Reference bitselects positive voltage reference source needed for A/D converter operating. 1 - Positive voltage reference is applied on the Vref+ pin; and 0 - Voltage power supply Vdd is used as positive voltage reference source.In Short:In order to measure voltage on an input pin by A/D converter the following should be done:Step 1- Configuring port: Write logic one (1) to the corresponding bit of the TRIS register to configure it as input; and Write logic one (1) to the corresponding bit of the ANSEL register to configure it as analog input.Step 2- Configuring ADC module: Configure voltage reference in the ADCON1 register; Select ADC conversion clock in the ADCON0 register; Select one of input channels CH0-CH13 of the ADCON0 register; Select data format using the ADFM bit of the ADCON1 register; and Enable A/D converter by setting the ADON bit of the ADCON0 register.Step 3- Configuring ADC interrupt (optionally): Clear the ADIF bit; and Set the ADIE, PEIE and GIE bits.Step 4- Wait for the required acquisition time (approximately 20uS) to pass.Step 5- Start conversion by setting the GO/DONE bit of the ADCON0 register.Step 6- Wait for ADC conversion to complete. It is necessary to check in program loop whether the GO/DONE pin is cleared or wait for an A/D interrupt (must be previously enabled).Step 7- Read ADC results: Read the ADRESH and ADRESL registers.

MCLR pinLogic zero (0) on the MCLR pin causes immediate and regular reset. It is recommended to be connected as shown in figure below. The function of additional components is to sustain pure logic one (1) during normal operation. If their values are such to provide high logic level on the pin only upon T reset is over, the microcontroller will immediately start operating. This feature may be very useful when it is necessary to synchronize the operation of the microcontroller with additional electronics or the operation of several microcontrollers. Master Clear Pin

3.3 RF MODULE: CC2500

CC2500 RF Module is a transreceiver module which provides easy to use RF communication at 2.4 Ghz. It can be used to transmit and receive data at 9600 baud rates from any standard CMOS/TTL source. This module is a direct line in replacement for your serial communication it requires no extra hardware and no extra coding toIt works in Half Duplex mode i.e. it provides communication in both directions, but only one direction at same time .

Features: Supports Multiple Baud rates ( 9600 ) Works on ISM band (2.4 GHz) No complex wireless connection software or intimate knowledge of RF is required to connect our serial devices. Designed to be as easy to use as cables. No external Antenna required. Plug and play device. Works on 5 DC supply.

Specifications: Input Voltage - 5Volts DC Baud Rate - 9600 RS 232 Interface & TTL Interface Range Max 30 Mtrs - Line of Sight

BLOCK DIAGRAM

Chapter 4Hardware and Software Description

4.SOFTWARE

4.1EAGLE 5.6EAGLE by CadSoft Computer is a flexible, expandable and scriptableEDAapplication with schematic capture editor, PCB layout editor, auto-router and CAMandBOMtools developed byCadSoft Computer GmbH, Germany, since 1988. EAGLE was originally developed to run as a 16-bit application underDOS, with support forOS/2andWindowsadded later on. Starting with version 4.0, EAGLE was converted to 32-bit. EAGLE version 4.0 also dropped support for DOS and OS/2, but was among the first professional electronic CAD tools available for Linux. A 32-bitDPMIversion of EAGLE 4.0 running under DOS was available on special request in order to help support existing customers, but was not released commercially. Starting with version 4.13, EAGLE became available forMac OS X, with versions before 5.0.0 still requiringX11. Version 5.0.0 officially dropped support forWindows 9xandWindows NT3.x/4.x. EAGLE 6.0.0 no longer supports Mac OS X on thePower PCplatform (only on Intel Macs), and the minimum requirements have been changed to Mac OS X 10.6, Linux 2.6 and Windows XP.

EAGLE is popular among smaller design houses and in academia for its favourable licensing terms and rich availability of component libraries on the web. Hobbyists are attracted by the availability of freeware licenses. ThePCBlayout editor allows back annotation to the schematic and auto-routing to automatically connect traces based on the connections defined in the schematic.

2.MPLAB IDE

MPLABX IDE is a software program that runs on a PC (Windows, Mac OS, Linux) to develop applications for Microchip microcontrollers and digital signal controllers. It is called an Integrated Development Environment (IDE), because it provides a single integrated environment to develop code for embedded microcontrollers.MPLABX Integrated Development Environment brings many changes to the PICmicrocontroller development tool chain. Unlike previous versions of MPLABwhich were developed completely in-house, MPLABX is based on the open source NetBeans IDE from Oracle. Taking this path has allowed us to add many frequently requested features very quickly and easily while also providing us with a much more extensible architecture to bring you even more new features in the future.COMPILER USED: MPLABC30 CCOMPILER V2.0BURNER: PICKIT2

CODE DISCRIPTION:

TRANSMITTER SECTION#include#DEVICE ADC=10#fuses NOLVP, NOWDT, XT#define RS232_XMIT PIN_C6#define RS232_RCV PIN_C7 // PIC line which receives PC transmission #use delay(clock=4000000) // 4 MHz OSC#use rs232(baud=9600, xmit=RS232_XMIT, rcv=RS232_RCV)

//void command(unsigned char);//void display(unsigned char);//void hex_ascii(int16 d);//void dis_array(char a[]);

//----------------------------display------------------------------

void int_adc();int16 read_ch0();//int16 read_ch1();

#int_rda

void serial_isr(){ disable_interrupts(int_rda); enable_interrupts(int_rda);}

void send_pc( int16);

void main(){ int16 pre_value; //enable_interrupts(global); //enable_interrupts(int_rda); set_tris_a(0b00000000); while(1) { pre_value = read_ch0(); send_pc(pre_value); delay_ms(200); } }

void send_pc( int16 value ){ int8 d_1000,d_100,d_10,d_1; d_1000 = value%10; value = value/10; d_100 = value%10; value = value/10; d_10 = value%10; value = value/10; d_1 = value; putc(d_1+0x30); delay_ms(10); putc(d_10+0x30); delay_ms(10); putc(d_100+0x30); delay_ms(10); putc(d_1000+0x30); delay_ms(10); }

int16 read_ch0(){ int16 value; set_adc_channel(0); delay_ms(10); read_ADC(ADC_START_ONLY); delay_ms(10); value = read_adc( ADC_READ_ONLY); return(value);}

void port_int(){// SET_TRIS_A(0b00000011); set_tris_b(0b00000000); set_tris_d(0b00000000); set_tris_c(0b00000000);}

void int_adc(){ setup_adc_ports(ALL_ANALOG); setup_adc(ADC_CLOCK_INTERNAL); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE);

}

/* void hex_ascii(int16 d){ int8 d_1000,d_100,d_10,d_1; d_1000 = d%10; d = d/10; d_100 = d%10; d = d/10; d_10 = d%10; d = d/10; d_1 = d; display(d_1+0x30); display(d_10+0x30); display(d_100+0x30); display(d_1000+0x30);

}

void int_lcd(){ command(0x38); delay_ms(2); command(0x01); delay_ms(2); command(0x0e); delay_ms(2); command(0x06); delay_ms(2); command(0x82); delay_ms(2);

display('*'); delay_ms(100); display('S'); delay_ms(100); display('V'); delay_ms(100); display('I'); delay_ms(100); display('T'); delay_ms(100); display(' '); delay_ms(100); display('*'); delay_ms(100); command(0xc6); delay_ms(2); display('*'); delay_ms(100); command(0xc6); delay_ms(2); display('I'); delay_ms(100); display('N'); delay_ms(100); display('D'); delay_ms(100); display('O'); delay_ms(100); display('R'); delay_ms(100); display('E'); delay_ms(100);

}

void command(unsigned char c){

output_b(c); output_low(PIN_D5); output_high(PIN_D6); delay_ms(2); output_low(PIN_D6); delay_ms(10); }

void display(unsigned char d){

output_b(d); output_high(PIN_D5); output_high(PIN_D6); delay_ms(2); output_low(PIN_D6); delay_ms(10);}

RECEIVER SECTION#include#DEVICE ADC=10#fuses NOLVP, NOWDT, XT#define RS232_XMIT PIN_C6#define RS232_RCV PIN_C7 // PIC line which receives PC transmission #use delay(clock=4000000) // 4 MHz OSC#use rs232(baud=9600, xmit=RS232_XMIT, rcv=RS232_RCV)

void command(unsigned char);void display(unsigned char);void hex_ascii(int16 d);void dis_array(char a[]);

//----------------------------display------------------------------void int_lcd();void int_adc();int16 read_ch0();int16 read_ch1();

char d_rec[4];

#int_rda

void serial_isr() {

disable_interrupts(int_rda);

d_rec[0] = getChar(); d_rec[1] = getChar(); d_rec[2] = getChar(); d_rec[3] = getChar();

enable_interrupts(int_rda);

}

void send_pc( int16);

void main(){ int16 pre_value; enable_interrupts(global); enable_interrupts(int_rda);

set_tris_d(0b11111111); set_tris_b(0b11111111); delay_ms(100); int_lcd(); int_adc(); command(0x01); display('P'); display('r'); display('e'); display('s'); display('s'); display('u'); display('r'); display('e'); display(':'); display(' '); while(1) { command(0x8a); display(d_rec[0]); display(d_rec[1]); display(d_rec[2]); display(d_rec[3]); } }

/*void send_pc( int16 value ){ int8 d_1000,d_100,d_10,d_1; d_1000 = value%10; value = value/10; d_100 = value%10; value = value/10; d_10 = value%10; value = value/10; d_1 = value; putc(d_1+0x30); delay_ms(10); putc(d_10+0x30); delay_ms(10); putc(d_100+0x30); delay_ms(10); putc(d_1000+0x30); delay_ms(10); }

void port_int(){// SET_TRIS_A(0b00000011); set_tris_b(0b00000000); set_tris_d(0b00000000); set_tris_c(0b11111111);}

*/void int_adc(){ setup_adc_ports(ALL_ANALOG); setup_adc(ADC_CLOCK_INTERNAL);// setup_psp(PSP_DISABLED);// setup_spi(FALSE);// setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);// setup_timer_1(T1_DISABLED);// setup_timer_2(T2_DISABLED,0,1); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE);

}

void hex_ascii(int16 d){ int8 d_1000,d_100,d_10,d_1; d_1000 = d%10; d = d/10; d_100 = d%10; d = d/10; d_10 = d%10; d = d/10; d_1 = d; display(d_1+0x30); display(d_10+0x30); display(d_100+0x30); display(d_1000+0x30);

}

int16 read_ch0(){ int16 value; set_adc_channel(0); delay_ms(1); read_ADC(ADC_START_ONLY); delay_ms(1); value = read_adc( ADC_READ_ONLY); return(value);}

int16 read_ch1(){ int16 value; set_adc_channel(2); delay_ms(1); read_ADC(ADC_START_ONLY); delay_ms(1); value = read_adc( ADC_READ_ONLY); return(value);}void int_lcd(){ command(0x38); delay_ms(2); command(0x01); delay_ms(2); command(0x0e); delay_ms(2); command(0x06); delay_ms(2); command(0x82); delay_ms(2);}

void command(unsigned char c){

output_d(c); output_low(PIN_B7); output_low(PIN_B6); output_high(PIN_B5); delay_ms(2); output_low(PIN_B5); delay_ms(10); }

void display(unsigned char d){

output_d(d); output_high(PIN_B7); output_low(PIN_B6); output_high(PIN_B5); delay_ms(2); output_low(PIN_B5); delay_ms(10);}

Chapter 5

Layout Design

CIRCUIT DESIGNING

TRANSMITTER SCHEMATIC

RECIEVER SCHEMATIC

PCB LAYOUT DESIGNING

TRANSMITTER LAYOUT

RECIEVER LAYOUT

ORIGINAL PCB

TRANSMITTER PCB

RECIEVER PCB

ORIGINAL CIRCUIT AFTER ASSEMBLING COMPONENTS

TRANSMITTER SECTION

RECIEVER SECTION

Chapter 6CONCLUSION

Conclusion

Direct tire pressure was accomplished with the design presented here. The team has completed the design and construction after completing the rigorous of investigating the problem from several different perspectives. This investigation has led the team to consider many different possibilities involving hardware, software, design, and complication.

The system is also fairly inexpensive. There were significant problems encountered during the construction of the project. The alignment of the pressure sensor was the most difficult part. Then the pressure sensor was calibrated for different readings from the tire. The second problem was software problem. It took far longer to diagnose and fix than we could have possibly anticipated.It was a problem with the internal A/D converters in the microcontroller of transmitter side. The A/D converter was not properly referencing the incoming signals and causing Problem with the output. Also the project is just a prototype of tire pressure monitoring system which now measures the pressure of 1 tire and displays it on LCD.

The team had tried its best to complete the project and present it in a working conditions. Faults were diagnosed and corrected.

Chapter 7BIBLOGRAPHY

Reference Links:

Electronics Today Radio Frequency know how Instructables PICmicrocontroller tutorial Mplab x IDE tutorial

Chapter 8DATA SHEETS

1 | Page