a vehicular wireless sensor network for vehicle emissions monitoring
TRANSCRIPT
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
1. ABSTRACT
AIM:
The main aim of this project is to design a wireless sensor network for vehicle to calculate the
vehicle emissions using sensors.
PURPOSE:
The purpose of the project is to calculate the quantity of CO released from the vehicle and
to transmit this data to the concern R.T.A using GSM technologies.
BLOCK DIAGRAM:
1S.R.T.I.S.T-ECE
MICRO CONTOLLER
POWER SUPPLY
CO
SENSOR
ADC 0804
GSM
DC MOTOR DRIVERS
DC MOTORS
LCD
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
POWER SUPPLY:
DESCRIPTION:
In this project we are detecting gas released will be measured and given to the ADC as
input. ADC will convert this analogical data into digital format and forwards to the
controller. Microcontroller compares this data with predefined data; if it exceeds the
threshold then GSM is activated. GSM modules will transmits this data to the mobile no
which is located in the R.T.A office.
SOFTWARES:
1. EMBEDDED C
2. KEIL IDE
3. UC-FLASH
2S.R.T.I.S.T-ECE
Step DownTransformer
BridgeRectifier
FilterCircuit
Regulator section
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
HARDWARES:
1. MICRO CONTROLLER
2. POWER SUPPLY
3. GSM
4. LCD
5. DC MOTOR DRIVERS
6. DC MOTORS
RESULT:
As a result vehicular wireless sensor network is useful to monitor the vehicle emissions
and track the vehicle position. By this project information regarding vehicle is
transmitted to the RTA when they exceeds threshold.
3S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
2. I NTRODUCTION
An embedded system is a special-purpose system in which the computer is
completely encapsulated by or dedicated to the device or system it controls. Unlike a
general-purpose computer, such as a personal computer, an embedded system performs
one or a few pre-defined tasks, usually with very specific requirements. Since the system
is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost
of the product. Embedded systems are often mass-produced, benefiting from economies
of scale.
Introduction to GSM:
Global System for Mobile Communication (GSM) is a set of ETSI standards
specifying the infrastructure for a digital cellular service. The standard is used in approx.
85 countries in the world including such locations as India, Europe, Japan and Australia1.
GSM (Global System for Mobile communication) is a digital mobile telephone
system that is widely used in many parts of the world. GSM uses a variation of
Frequency Division Multiple Access (FDMA) and is the most widely used of the three
digital wireless telephone technologies (TDMA, GSM, and CDMA). GSM digitizes and
compresses data, then sends it down a channel with two other streams of user data, each
in its own time slot. GSM operates in the 900MHz, 1800MHz, or 1900 MHz frequency
bands.
GSM has been the backbone of the phenomenal success in mobile telecoms
over the last decade. Now, at the dawn of the era of true broadband services, GSM
continues to evolve to meet new demands. One of GSM's great strengths is its
international roaming capability, giving consumers a seamless service. This has been a
vital driver in growth, with around 300 million. In the Americas, today's 7 million
subscribers are set to grow rapidly, with market potential of 500 million in population,
4S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
due to the introduction of GSM 800, which allows operators using the 800 MHz band to
have access to GSM technology too.
GSM together with other technologies is part of an evolution of wireless mobile
telecommunication that includes High-Speed Circuit-Switched Data (HCSD), General
Packet Radio System (GPRS), Enhanced Data GSM Environment (EDGE), and
Universal Mobile Telecommunications Service (UMTS).
Architecture:
When a user dials a GSM mobile subscriber's MSISDN, the PSTN routes the call
to the Home MSC based on the dialed telephone number. The MSC must then query the
HLR based on the MSISDN, to attain routing information required to route the call to the
subscribers' current location.
The MSC stores global title translation tables that are used to determine the HLR
associated with the MSISDN. When only one HLR exists, the translation tables are
trivial. When more than one HLR is used however, the translations become extremely
challenging; with one translation record per subscriber (see the example below). Having
determined the appropriate HLR address, the MSC sends a Routing Information Request
to it.
When the HLR receives the Routing Information Request, it maps the MSISDN
to the IMSI, and ascertains the subscribers' profile including the current VLR at which
the subscriber is registered. The HLR then queries the VLR for a Mobile Station
Roaming Number (MSRN). The MSRN is essentially an ISDN telephone number at
which the mobile subscriber can currently be reached. The MSRN is a temporary number
that is valid only for the duration of a single call.
5S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
The HLR generates a response message, which includes the MSRN, and sends it
back across the SS7 network to the MSC. Finally, the MSC attempts to complete the call
using the MSRN provided.
GSM security issues such as theft of service, privacy, and legal interception
continue to raise significant interest in the GSM community. The purpose of this portal is
to raise awareness of these issues with GSM security.
The mobile communications has become one of the driving forces of the
digital revolution. Everyday, millions of people are making phone calls by pressing a few
buttons. Little is known about how one person's voice reaches the other person's phone
that is thousands of miles away. Even less is known about the security measures and
protection behind the system. The complexity of the cell phone is increasing as people
begin sending text messages and digital pictures to their friends and family. The cell
phone is slowly turning into a handheld computer. All the features and advancements in
cell phone technology require a backbone to support it. The system has to provide
security and the capability for growth to accommodate future enhancements. General
System for Mobile Communications, GSM, is one of the many solutions out there. GSM
has been dubbed the "Wireless Revolution" and it doesn't take much to realize why GSM
provides a secure and confidential method of communication.
The present project A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE
EMISSIONS MONITORING” is the one which gives the information of the parameters
if any sensed parameter is out of pre-defined threshold value indicating pre-disaster, then
microcontroller sends the SMS to pre-stored mobile no. indicating Pre-Disaster.
6S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
3. Block Diagram:
Fig.1: Block diagram
4.BLOCK DIAGRAM EXPLINATION
7S.R.T.I.S.T-ECE
MICRO CONTOLLER
POWER SUPPLY
CO
SENSOR
ADC 0804
GSM
DC MOTOR DRIVERS
DC MOTORS
LCD
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
MAX- 232:
To allow compatibility among data communication equipment made by various
manufactures, an interfacing standard called RS232 was set by the Electronic Industries
Association (EIA).This RS-232 standard is used in PCs and numerous types of equipment
.However, since the standard was set long before the advent of the TTL logic family, its
input and output voltage levels are not TTL compatible. In RS-232 ,a 1 is represented by
-3 to -25V,while a 0 bit is +3 to +25V,making -3 to +3 undefined. For this reason, to
connect any RS-232 to a microcontroller system we must use voltage converters such as
MAX232 to convert the TTL logic levels to the RS-232 voltage levels and vice versa.
So here we are using this MAX-232 to have compatibility between the GSM and
microcontroller.
GSM MODEM
Here we are using GSM MODEM to communicate with the mobile phone to
which we are going to send the message. Here modem is used to send the messages to the
concern person if any pre disaster is occurred in the industry.
GSM consists of some AT commands using which messages are generated.
POWER SUPPLY
A variable regulated power supply, also called a variable bench power supply, is
one where you can continuously adjust the output voltage to your requirements. Varying
the output of the power supply is the recommended way to test a project after having
double checked parts placement against circuit drawings and the parts placement guide.
8S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
This type of regulation is ideal for having a simple variable bench power supply. Actually
this is quite important because one of the first projects a hobbyist should undertake is the
construction of a variable regulated power supply. While a dedicated supply is quite
handy e.g. 5V or 12V, it's much handier to have a variable supply on hand, especially for
testing. Most digital logic circuits and processors need a 5 volt power supply. To use
these parts we need to build a regulated 5 volt source. Usually you start with an
unregulated power supply ranging from 9 volts to 24 volts DC (A 12 volt power supply is
included with the Beginner Kit and the Microcontroller Beginner Kit.). To make a 5 volt
power supply, we use a LM7805 voltage regulator IC.
The LM7805 is simple to use. You simply connect the positive lead of your
unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect
the negative lead to the Common pin and then when you turn on the power, you get a 5
volt supply from the Output pin.
CO SENSOR
Here a gas sensor is used to identify if any gas leakage. If any gas leakage occurs
then a message will be sent to the concern person.
9S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
5. Schematic
Fig.2: Schematic
10S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
6. Schematic Description
9th pin is connected reset circuit which includes a capacitor and a resister.
MAX232:
The 11th and 12th pins of MAX are interfaced to 11th and 10th pins of controller
respectively.
The 13th and 14th pins of MAX are interfaced to 3rd and 2nd pins of DB9 connector
which is indirectly fitted to GSM modem.
The 5th pin DB9 is GND.
CO sensor is connected to P1.0 and DC motor is connected to P1.1.
LCD is connected to P0. And lcd control pins are connected to P2.5, P2.6, P2.7
11S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
7. Hardware Components
INTRODUCTION TO 8051MICROCONTROLLER
In 1981,Intel corporation introduced an 8 bit microcontroller called the 8051.This
microcontroller had 128 bytes of RAM,4K bytes of on-chip ROM, two timers, one serial
port ,and 4 ports(each 8-bits wide)all on single chip. At that time it was also referred to as
a “system on a chip”.
The 8051 is an 8-bit processor, meaning that the CPU can work
on only 8-bits of data at a time. Data larger than 8-bits has to be broken into 8-bit pieces
to be processed by the CPU. The 8051 can have a maximum of 64K bytes of ROM, many
manufacturers have put only 4Kbytes on chip.
Features:
Compatible with MCS-51 Products
4K Bytes of In-System Reprogrammable Flash Memory – Endurance: 1000
Write/Erase Cycles.
Fully Static Operation: 0Hz to 24MHz
Three-level Program Memory Lock
128 x 8- bit Internal RAM
32 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial Channel
Low-power Idle and Power-down Modes
12S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
INTRODUCTION TO ATMEL MICROCONTROLLER:
SERIES: 89C51 Family, TECHNOLOGY: CMOS
The major Features of 8-bit Micro controller ATMEL 89C51 :
8 Bit CPU optimized for control applications
Extensive Boolean processing (Single - bit Logic ) Capabilities.
On - Chip Flash Program Memory
On - Chip Data RAM
Bi-directional and Individually Addressable I/O Lines
Multiple 16-Bit Timer/Counters
Full Duplex UART
Multiple Source / Vector / Priority Interrupt Structure
On - Chip Oscillator and Clock circuitry.
On - Chip EEPROM
SPI Serial Bus Interface
13S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
Fig.3: Block Diagram
14S.R.T.I.S.T-ECE
COUNTERINPUTS
EXTERNALINTERRUPT
S
INTERRUPTCONTROL
ON-CHIPFLASH ON-CHIP
RAM
TIMER 1
TIMER 0
CPU
OSC BUSCONTROL
4 I/O PORTS
SERILPORT
PO P2 P1 P3 TXD RXD
ON-CHIPRAM
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
For more information on the individual devices and features, refer to the
Hardware Descriptions and Data Sheets of the specific device.
Fig. 4: Oscillator Connection.
The P89C51 provides the following standard features: 4K bytes of Flash, 128
bytes of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition,
the P89C51 is designed with static logic for operation down to zero frequency and
supports two software selectable power saving modes. The Idle Mode stops the CPU
while allowing the RAM, timer/counters, serial port and interrupt system to continue
functioning. The Power-down Mode saves the RAM contents but freezes the oscillator
disabling all other chip functions until the next hardware reset.
15S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
Memory Organization
Fig.5: Memory Structure of the 8051
16S.R.T.I.S.T-ECE
External
EA = 0
External
EA = 1
External
FFFFH
0000
INTERNAL
FF
00
EXTERNAL
FFFFH
PROGRAM MEMORY
DATA MEMORY
RD WRPSEN
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
Memory Organization
Program Memory:
Figure 4 shows a map of the lower part of the program memory.
After reset, the CPU begins execution from location 0000H. As shown in fig.4, each
interrupt is assigned a fixed location in program memory. The interrupt causes the CPU
to jump to that location, where it executes the service routine. External Interrupt 0, for
example, is assigned to location 0003H. If External Interrupt 0 is used, its service routine
must begin at location 0003H. If the interrupt is not used, its service location is available
as general purpose.
Fig.6: Program Memory
Program memory addresses are always 16 bits wide, even though the actual
amount o program memory used may be less than 64Kbytes. External program execution
sacrifices two of the 8-bit ports, P0 and P2, to the function of addressing the program
memory.
17S.R.T.I.S.T-ECE
(0033)H
002BH
0023H
001BH
0013H
000BH
0003H
0000H
8 bytesINTERRUPT LOCATIONS
RESET
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
Data Memory
The right half of Figure 3 shows the internal and external data memory spaces
available on Philips Flash microcontrollers. Fig.6 shows a hardware configuration for
accessing up to 2K bytes of external RAM. In this case, the CPU executes from internal
flash. Port0 serves as a multiplexed address/data bus to the RAM, and 3 lines of Port 2
are used to page the RAM. The CPU generates RD and WR signals as needed during
external RAM accesses. You can assign up to 64K bytes of external data memory.
External data memory addresses can be either 1 or 2bytes wide. One-byte addresses are
often used in conjunction with one or more other I/O lines to page the RAM, as shown in
Fig.6. Two-byte addresses can also be used, in which case the high address byte is
emitted at Port2.
Internal data memory addresses are always 1 byte wide, which implies an address
space of only 256bytes. However, the addressing modes for internal RAM can infact
accommodate 384 bytes. Direct addresses higher than 7FH access one memory space and
indirect addresses higher than 7FH access a different memory space. Thus, Figure.7
18S.R.T.I.S.T-ECE
ACCESSIBLE BY INDIRECT ADDRESSING
ONLY.
ACCESSIBLE BY DIRECT
ADDRESSING ONLY
ACCESSIBLE BY INDIRECT ADDRESSING AND DIRECT ADDRESSING
Fig.7: Internal Data Memory
Upper 128
Lower 128
80H7FH
00
FFH FFH
80H
Special register function
PortsStatus and control bitsTimersRegistersStack pointerAccumulator(etc)
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
shows the Upper 128 and SFR space occupying the same block of addresses, 80H
through FFH, although they are physically separate entities. Figure.8 shows how the
lower 128 bytes of RAM are mapped. The lowest 32 bytes are grouped into 4 banks of 8
registers. Program instructions call out these registers as R0 through R7. Two bits in the
Program Status Word (PSW) select which register bank is in use. This architecture allows
more efficient use of code space, since register instructions are shorter than instructions
that use direct addressing.
Fig.8: The lower 128 bytes of Internal RAM
The next 16 bytes above the register banks form a block of bit-addressable
memory space. The microcontroller instruction set includes a wide selection of single-bit
instructions, and these instructions can directly address the 128 bits in this area. These bit
addresses are 00H through 7FH. All of the bytes in the Lower 128 can be accessed by
either direct or indirect addressing.
19S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
The major Features of 8-bit Micro controller ATMEL 89C51 :
8 Bit CPU optimized for control applications
Extensive Boolean processing (Single - bit Logic) Capabilities.
On - Chip Flash Program Memory
On - Chip Data RAM
Bi-directional and Individually Addressable I/O Lines
Multiple 16-Bit Timer/Counters
Full Duplex UART
Multiple Source / Vector / Priority Interrupt Structure
On - Chip Oscillator and Clock circuitry.
On - Chip EEPROM
SPI Serial Bus Interface
GLOBAL SYSTEM FOR MOBILE COMMUNICATIONS
Definition:
Global system for mobile communication (GSM) is a globally accepted standard
for digital cellular communication. GSM is the name of a standardization group
established in 1982 to create a common European mobile telephone standard that would
formulate specifications for a pan-European mobile cellular radio system operating at 900
MHz It is estimated that many countries outside of Europe will join the GSM partnership.
20S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
Description:
GSM, the Global System for Mobile communications, is a digital cellular
communications system, which has rapidly gained acceptance and market share
worldwide, although it was initially developed in a European context. In addition to
digital transmission, GSM incorporates many advanced services and features, including
ISDN compatibility and worldwide roaming in other GSM networks. The advanced
services and architecture of GSM have made it a model for future third-generation
cellular systems, such as UMTS. This paper will give an overview of the services offered
by GSM, the system architecture, the radio transmission
ISDN compatibility and worldwide roaming in other GSM networks. The advanced
services and architecture of GSM have made it a model for future third-generation
cellular systems, such as UMTS. This paper will give an overview of the services offered
by GSM, the system architecture, the radio transmission
Fig.9: structure of a GSM network
21S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
GSM Modems:
A GSM modem can be an external modem device, such as the Wavecom FASTRACK
Modem. Insert a GSM SIM card into this modem, and connect the modem to an
available serial port on your computer.
A GSM modem can be a PC Card installed in a notebook computer, such as the Nokia
Card Phone.
A GSM modem could also be a standard GSM mobile phone with the appropriate cable
and software driver to connect to a serial port on your computer. Phones such as the
Nokia 7110 with a DLR-3 cable, or various Ericsson phones, are often used for this
purpose.
A dedicated GSM modem (external or PC Card) is usually preferable to a GSM mobile
phone. This is because of some compatibility issues that can exist with mobile phones.
For example, if you wish to be able to receive inbound MMS messages with your
gateway, and you are using a mobile phone as your modem, you must utilize a mobile
phone that does not support WAP push or MMS. This is because the mobile phone
automatically processes these messages, without forwarding them via the modem
interface. Similarly some mobile phones will not allow you to correctly receive SMS text
messages longer than 160 bytes (known as “concatenated SMS” or “long SMS”). This is
because these long messages are actually sent as separate SMS messages, and the phone
attempts to reassemble the message before forwarding via the modem interface. (We’ve
observed this latter problem utilizing the Ericsson R380, while it does not appear to be a
problem with many other Ericsson models.)
When you install your GSM modem, or connect your GSM mobile phone to the
computer, be sure to install the appropriate Windows modem driver from the device
manufacturer. To simplify configuration, the Now SMS/MMS Gateway will
communicate with the device via this driver. An additional benefit of utilizing this driver
22S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
is that you can use Windows diagnostics to ensure that the modem is communicating
properly with the computer.
The Now SMS/MMS gateway can simultaneously support multiple modems, provided
that your computer hardware has the available communications port resources.
Fig.10: GSM smart modem
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 Center
(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 are the Operations
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. Subscriber carries the Mobile Station. 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 Center (MSC),
23S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
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 intendance Center, 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 Center across the A interface.
Fig.11: General architecture of a GSM network
Mobile Station:
The mobile station (MS) consists of the mobile equipment (the terminal) and a smart card
called the Subscriber Identity Module (SIM). The SIM provides personal mobility, so that
the user can have access to subscribed services irrespective of a specific terminal. By
inserting the SIM card into another GSM terminal, the user is able to receive calls at that
terminal, make calls from that terminal, and receive other subscribed services.
24S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
The mobile equipment is uniquely identified by the International Mobile Equipment
Identity (IMEI). The SIM card contains the International Mobile Subscriber Identity
(IMSI) used to identify the subscriber to the system, a secret key for authentication, and
other information. The IMEI and the IMSI are independent, thereby allowing personal
mobility. The SIM card may be protected against unauthorized use by a password or
personal identity number.
Base Station Subsystem:
The Base Station Subsystem is composed of two parts, the Base Transceiver Station
(BTS) and the Base Station Controller (BSC). These communicate across the
standardized Abis interface, allowing (as in the rest of the system) operation between
components made by different suppliers.
The Base Transceiver Station houses the radio transceivers that define a cell and handles
the radio-link protocols with the Mobile Station. In a large urban area, there will
potentially be a large number of BTSs deployed, thus the requirements for a BTS are
ruggedness, reliability, portability, and minimum cost.
The Base Station Controller manages the radio resources for one or more BTSs. It
handles radio-channel setup, frequency hopping, and handovers, as described below. The
BSC is the connection between the mobile station and the Mobile service Switching
Center (MSC).
Network Subsystem
The central component of the Network Subsystem is the Mobile services Switching
Center (MSC). It acts like a normal switching node of the PSTN or ISDN, and
additionally provides all the functionality needed to handle a mobile subscriber, such as
registration, authentication, location updating, handovers, and call routing to a roaming
subscriber. These services are provided in conjunction with several functional entities,
25S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
which together form the Network Subsystem. The MSC provides the connection to the
fixed networks (such as the PSTN or ISDN). Signaling between functional entities in the
Network Subsystem uses Signaling System Number 7 (SS7), used for trunk signaling in
ISDN and widely used in current public networks.
The Home Location Register (HLR) and Visitor Location Register (VLR), together with
the MSC, provide the call-routing and roaming capabilities of GSM. The HLR contains
all the administrative information of each subscriber registered in the corresponding
GSM network, along with the current location of the mobile. The location of the mobile
is typically in the form of the signaling address of the VLR associated with the mobile as
a distributed database. Station. The actual routing procedure will be described later.
There is logically one HLR per GSM network, although it may be implemented
The Visitor Location Register (VLR) contains selected administrative information from
the HLR, necessary for call control and provision of the subscribed services, for each
mobile currently located in the geographical area controlled by the VLR. Although each
functional entity can be implemented as an independent unit, all manufacturers of
switching equipment to date implement the VLR together with the MSC, so that the
geographical area controlled by the MSC corresponds to that controlled by the VLR, thus
simplifying the signaling required. Note that the MSC contains no information about
particular mobile stations --- this information is stored in the location registers.
CO SENSOR
26S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
FEATURES:
* High sensitivity to carbon monoxide
* Stable and long life
APPLICATION:
They are used in gas detecting equipment for carbon monoxide (CO) in family and
Industry or car.
SPECIFICATIONS:
A. Standard work condition
27S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
OPERATION PRINCIPLE:
The surface resistance of the sensor Rs is obtained through effected voltage signal output
of the load resistance RL which series-wound. The relationship between them is
described:
Rs\RL = (Vc-VRL) / VRL
28S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
shows alterable situation of RL signal output measured by using Fig. 2 circuit
output signal when the sensor is shifted from clean air to carbon monoxide (CO) , output
signal measurement is made within one or two complete heating period (2.5 minute from
high voltage to low voltage). Sensitive layer of MQ-7 gas sensitive components is made
of SnO2 with stability, So it has excellent long term stability. Its service life can reach 5
years under using condition.
SENSITVITY ADJUSTMENT
Resistance value of MQ-7 is difference to various kinds and various concentration
gases. So, When using this components, sensitivity adjustment is very necessary. we
recommend that you calibrate the detector for 200ppm CO in air and use value of Load
resistance that( RL) about 10 KΩ(5KΩ to 47 KΩ). When accurately measuring, the
proper alarm point for the gas detector should be determined after considering the
temperature and humidity influence. The sensitivity adjusting program:
a. Connect the sensor to the application circuit.
b. Turn on the power, keep preheating through electricity over 48 hours.
c. Adjust the load resistance RL until you get a signal value which is respond to a certain
Carbon monoxide concentration at the end point of 90 seconds.
d. Adjust the another load resistance RL until you get a signal value which is respond to a
CO concentration at the end point of 60 seconds .
29S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
MAX-232:
Meet or Exceed TIA/EIA-232-F and ITU
Recommendation V.28
Operate With Single 5-V Power Supply
Operate Up to 120 kbit/s
Two Drivers and Two Receivers
30-V Input Levels
Low Supply Current . . . 8 mA Typical
Designed to be Interchangeable With Maxim MAX232
ESD Protection Exceeds JESD 22
2000-V Human-Body Model (A114-A)
Applications:
TIA/EIA-232-F
Battery-Powered Systems
Terminals
Modems
Computers
Description/ordering information:
The MAX232 is a dual driver/receiver that includes a capacitive voltage generator
to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-
232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V
and a typical hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts
TTL/CMOS input levels into EIA-232 levels. The driver, receiver, and voltage-generator
functions are available as cells in the Texas Instruments Lin ASIClibrary.
30S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
Fig.12:Pin diagram of Max-232
Power supply:
The power supplies are designed to convert high voltage AC mains electricity to a
suitable low voltage supply for electronics circuits and other devices. A power supply can
31S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
by broken down into a series of blocks, each of which performs a particular function. A
d.c power supply which maintains the output voltage constant irrespective of a.c mains
fluctuations or load variations is known as “Regulated D.C Power Supply”
For example a 5V regulated power supply system as shown below:
Fig.13: power supply
8. Circuit Description
In the above project discussed as far, we are not sure about actually the idea
regarding the project because , till now we had discussed about the different components
used in the project and their specifications, characteristics etc. but now we come across
32S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
the flow of data or the sequence of the connections regarding these components with the
microcontroller.
In this flow the place goes to the power supply circuit and which is also used any
application where ever the controller is necessary. That means power supply plays a
major role in any project. It is easy and simple either to built or learn. When the question
comes, “what are the major components used in the circuit ……?” Immediately the
answer is “It consists of four important components such as
- A transformer which is step down
- A rectifier bridge.
- A Electrolytic Capacitor and
- The voltage regulator”
The total operation and the action of the power supply circuit as already discussed
earlier.
Here in this project we are using five different sensors as inputs for the maximum
data inputs such as
- CO sensor
As these all are made with analog in the name of data and the controller accepts
only the data which is in digital form we are using another component for converting
from analog data to the digital data and called as the analog to digital converter (ADC).
So, now the output of the ADC is in digital and was made to send to the controller. The
controller analysis the data according to the program written by the designer and forward
to the GSM modem. Actually here the data in the sense the output of the sensors. The
sensor gives output when the respective physical quantity crosses the set point that
indicates the pre disaster and they are mean to display in another place
. To make a display we are using GSM communication, the data from the
controller is forwarded to the modem through MAX232. for this communication of data
we have to under go a big process called a serial communication. For the serial com to be
a successful process we need two mediators in between such as MAX232 and the RS232.
33S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
MAX is a 16 pin IC which is also called as a level converter, which means the voltage
levels of the controller are converted to the PC voltage levels and vise versa. RS232 is a
recommended standard cable used for the wire connection between the max and the GSM
modem. After all process the data is sent to our registered mobile number in the form of
SMS by the modem.
9.source code
#include <REGX51.H> sbit rs=P3^7; //P3^7; 4th pin of LCD RSsbit rw=P3^6; // P3^6; 5th pin of LCD R/Wsbit en=P3^5; // P3^5; 6th pin of LCD E
Void lcd_cmd(unsigned char);Void lcd_data(unsigned char);void lcd_string(char *s);void Delay_ms(unsigned int x);void lcd_init();
void init_serial_port (); void str_tx(unsigned char *p); void tx(unsigned char val); void SEND_GSM(unsigned char *msg,unsigned char *mno); sbit smoke=P1^0; sbit dc=P1^1; void main(){ lcd_init(); init_serial_port(); lcd_cmd(0x80); //first line first pos Delay_ms(5); lcd_string(" WELCOME "); Delay_ms(5); while(1){ if(smoke==0){ lcd_cmd(0x80);
lcd_string(" Sending SMS.... "); Delay_ms(30); SEND_GSM("SMOKE DETECTED","9550140850");
lcd_cmd(0x80);
34S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
lcd_string(" Message Sent ");Delay_ms(50);
dc=1; } else if(smoke==1){ lcd_cmd(0x80);
lcd_string("NO SMOKE DETECTED "); Delay_ms(5);
dc=0; } }}void SEND_GSM(unsigned char *msg,unsigned char *mno){ str_tx("AT+CMGS=\""); // ( AT+CMGS=" ) will be sendstr_tx(mno); //
// " Delay_ms(10); str_tx(msg); // message tx(0x1a); // Ascii Code of the CTRL+Z tx(0x0d); // Ascii Code of the Enter Key Delay_ms(10); }void lcd_init(){ lcd_cmd(0x38);
Delay_ms(5);lcd_cmd(0x0C);Delay_ms(5);lcd_cmd(0x01);Delay_ms(5);lcd_cmd(0x06);Delay_ms(5);lcd_cmd(0x80);Delay_ms(5);
}void lcd_cmd(unsigned char value){
P2=value;rs = 0;rw = 0;en = 1;Delay_ms(20);en = 0;return;
}void lcd_data(unsigned char value){
P2=value;rs = 1;
35S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
rw = 0;en = 1;Delay_ms(20);en = 0;return;
}void lcd_string(char *s){ while(*s)
lcd_data(*s++);Delay_ms(10);
} void Delay_ms(unsigned int x) { unsigned int i,j;
for(i=0;i<x;i++)for(j=0;j<1275;j++); /// unsigned int y;
/// for(y=0;y<=x;y++); }
10. Software Components
a. About Keil:
36S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
1. Click on the Keil u Vision Icon on Desktop
2. The following fig will appear
3. Click on the Project menu from the title bar
4. Then Click on New Project
37S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
5. Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\
6. Then Click on Save button above.
7. Select the component for u r project. i.e. Atmel……
38S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
8. Click on the + Symbol beside of Atmel
9. Select AT89C51 as shown below
10. Then Click on “OK”
39S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
11. The Following fig will appear
12. Then Click either YES or NO………mostly “NO”
13. Now your project is ready to USE
14. Now double click on the Target1, you would get another option “Source
group 1” as shown in next page.
40S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
15. Click on the file option from menu bar and select “new”
16. The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.
41S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
17. Now start writing program in either in “C” or “ASM”
18. For a program written in Assembly, then save it with extension “. asm” and
for “C” based program save it with extension “ .C”
42S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
19. Now right click on Source group 1 and click on “Add files to Group Source”
20. Now you will get another window, on which by default “C” files will appear.
43S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
21. Now select as per your file extension given while saving the file
22. Click only one time on option “ADD”
23. Now Press function key F7 to compile. Any error will appear if so happen.
24. If the file contains no error, then press Control+F5 simultaneously.
25. The new window is as follows
44S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
25.Then Click “OK”
26. Now Click on the Peripherals from menu bar, and check your required port as
shown in fig below
27. Drag the port a side and click in the program file.
45S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
28. Now keep Pressing function key “F11” slowly and observe.
29. You are running your program successfully
b. Embedded C:
Data Types:
U people have already come across the word “Data types” in C- Language. Here
also the functionality and the meaning of the word is same except a small change in the
prefix of their labels. Now we will discuss some of the widely used data types for
embedded C- programming.
Data Types Size in Bits Data Range/Usage
unsigned char 8-bit 0-255
signed char 8-bit -128 to +127
unsigned int 16-bit 0 to 65535
signed int 16-bit -32,768 to +32,767
sbit 1-bit SFR bit addressable only
Bit 1-bit RAM bit addressable only
Sfr 8-bit RAM addresses 80-FFH
only
46S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
Unsigned char:
The unsigned char is an 8-bit data type that takes a value in the range of 0-255(00-
FFH). It is used in many situations, such as setting a counter value, where there is no
need for signed data we should use the unsigned char instead of the signed char.
Remember that C compilers use the signed char as the default if we do not put the key
word
Signed char:
The signed char is an 8-bit data type that uses the most significant bit (D7 of D7-
D0) to represent the – or + values. As a result, we have only 7 bits for the magnitude of
the signed number, giving us values from -128 to +127. In situations where + and – are
needed to represent a given quantity such as temperature, the use of the signed char data
type is a must.
Unsigned int:
The unsigned int is a 16-bit data type that takes a value in the range of 0 to 65535
(0000-FFFFH). It is also used to set counter values of more than 256. We must use the int
data type unless we have to. Since registers and memory are in 8-bit chunks, the misuse
of int variables will result in a larger hex file. To overcome this we can use the unsigned
char in place of unsigned.
47S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
10. Conclusion
The project “A VEHICULAR WIRELESS SENSOR NETWORK FOR
VEHICLE EMISSIONS MONITORING” has been successfully designed and tested.
It has been developed by integrating features of all the hardware
components used. Presence of every module has been reasoned out and placed carefully
thus contributing to the best working of the unit.
Secondly, using highly advanced IC’s and with the help of growing technology the
project has been successfully implemented.
Finally we conclude that “ A VEHICULAR WIRELESS
SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING” is an emerging
field and there is a huge scope for research and development.
48S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
11. FUTURE ENHANCEMENT
In this project “A VEHICULAR WIRELESS SENSOR NETWORK FOR
VEHICLE EMISSIONS MONITORING can be further modified by controlling the
equipments which we are monitoring regarding the disaster of that equipment by proper
measurements.
The controlling part can also be done by the same mobile keypad. When we dial a
number from that mobile the particular signal is passed to the dialed mobile and we can
control this system. So, here we can do the monitoring part and also the controlling part
by a little modification.
49S.R.T.I.S.T-ECE
A VEHICULAR WIRELESS SENSOR NETWORK FOR VEHICLE EMISSIONS MONITORING
12. Bibliography
The 8051 Micro controller and Embedded Systems -Muhammad Ali Mazidi Janice Gillispie Mazidi
The 8051 Micro controller Architecture, Programming & Applications
-Kenneth J.Ayala
Fundamentals of Micro processors and Micro computers
-B.Ram
Micro processor Architecture, Programming & Applications
-Ramesh S. Gaonkar
Electronic Components
-D.V. Prasad
Wireless Communications - Theodore S. Rappaport
Mobile Tele Communications - William C.Y. Lee
References on the Web:
www.national.comwww.atmel.comwww.microsoftsearch.comwww.geocities.com
50S.R.T.I.S.T-ECE