0% found this document useful (0 votes)
126 views43 pages

Chapter 1: Introduction: 1.1 Preamble of The Project

This document discusses the design of an automatic vehicle ventilation system controlled by a microcontroller. The system uses sensors like temperature, precipitation and motion sensors to monitor the vehicle's surroundings and autonomously open the windows to ventilate the vehicle when it is parked in the sun. It aims to prevent overheating and facilitate comfortable entry into the vehicle. The document describes the components, algorithms, advantages and disadvantages of the system, and test results that provide insights into its utilization options and usefulness.

Uploaded by

Yogi Vanam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views43 pages

Chapter 1: Introduction: 1.1 Preamble of The Project

This document discusses the design of an automatic vehicle ventilation system controlled by a microcontroller. The system uses sensors like temperature, precipitation and motion sensors to monitor the vehicle's surroundings and autonomously open the windows to ventilate the vehicle when it is parked in the sun. It aims to prevent overheating and facilitate comfortable entry into the vehicle. The document describes the components, algorithms, advantages and disadvantages of the system, and test results that provide insights into its utilization options and usefulness.

Uploaded by

Yogi Vanam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 43

CHAPTER 1: INTRODUCTION

The ventilation process is performed by opening vehicle windows slightly, which


enables air to circulate. Microcontroller controls the position of the windows autonomously
and independently of the drivers presence, following predefined algorithm that uses sensors
data obtained from the vehicles surroundings. Besides temperature, the most important
factors to ensure quality implementation of ventilation are detected movements around the
vehicle, the presence of precipitation and other. This paper shows the components, their
purpose and capabilities, advantages and disadvantages, as well as potential implementations
and upgrades. The test results give insight into utilization options of this module and its
usefulness.
1.1 PREAMBLE OF THE PROJECT:
The module's task is to control the ventilation process autonomously in order to
facilitate vehicle utilization, i.e. providing conditions to make the entering into the vehicle
parked in the sun more comfortable. In order to meet all the criteria of quality ventilation, the
module has to collect enough data from the vehicle's immediate environment and, based on
that data, it has to decide whether it is necessary to lower the windows and thus start the
ventilation process.This project uses regulated 5V, 750mA power supply. 7805 three
terminals voltage regulator is used for voltage regulation. Bridge type full wave rectifier is
used to rectify the ac output of secondary of 230/18V step down transformer. Closed area
without air circulation and directly exposed to sunlight heats up much faster and reaches
significantly higher temperatures than the open space where air circulates freely so-called
"greenhouse effect". That is exactly what happens in a vehicle parked in the hot summer sun,
which later represents a problem when entering such overheated vehicle.
The basic idea of this project is to prevent or at least mitigate overheating of the vehicle
interior in order tofacilitate entering into the vehicle. The problem can be solved by leaving
the vehicle windows partially opened so air can circulate, which reduces the heating of the
vehicle interior. However, as the ventilation process takes place in a parked vehicle, without
human presence, and the vehicle is exposed to external influence potential burglary, it is
unreliable and unsafe. Consequently, it is necessary to automate the ventilation process.

1.2 OBJECTIVE OF THE PROJECT:


The complete automatic ventilation process is managed by microcontroller default
algorithm, considering input signals read using various sensors. The temperature sensor
measures the temperature inside the vehicle. If it exceeds predefined level of "comfortable
temperature", microcontroller automatically lowers the power windows to enable air
circulation which alleviates aforementioned "greenhouse effect".
The automatic ventilation process must be reliable and not affect the safety of the
vehicle. For this reason, additional sensors are used, whose task is to annul dangers appeared
with this ventilation method. Before all, these are precipitation sensor that makes the
ventilation process reliable, and motion sensors that make it safe. There are also other sensors
whose implementation gives additional quality, but these are the most important of them.
Together with temperature sensor, they meet the minimum requirements to perform automatic
function of ventilation, without endangering the vehicle.
Following chapters show components and technologies used, operation modes,
advantages and disadvantages, capabilities and potential upgrades of the module, as well as
ability of integration with existing automatic systems within the vehicle. Results of testing the
module in real conditions are presented and analyzed.

CHAPTER 2. LITERATURE SURVEY


2.1 SUPPORT PAPERS:
To save costs, embedded systems frequently have the cheapest processors that can do
the job. This means your programs need to be written as efficiently as possible. When dealing
with large data sets, issues like memory cache misses that never matter in PC programming
can hurt you. Luckily, this won't happen too often- use reasonably efficient algorithms to
start, and optimize only when necessary. Of course, normal profilers won't work well, due to
the same reason debuggers don't work well.
Memory is also an issue. For the same cost savings reasons, embedded systems usually
have the least memory they can get away with. That means their algorithms must be memory
efficient (unlike in PC programs, you will frequently sacrifice processor time for memory,
rather than the reverse). It also means you can't afford to leak memory. Embedded
applications generally use deterministic memory techniques and avoid the default "new" and
"malloc" functions, so that leaks can be found and eliminated more easily. Other resources
programmers expect may not even exist. For example, most embedded processors do not
have hardware FPUs (Floating-Point Processing Unit). These resources either need to be
emulated in software, or avoided altogether.
An embedded system is a computer system designed to perform one or a few dedicated
functions often with real-time computing constraints. It is embedded as part of a complete
device often including hardware and mechanical parts. By contrast, a general-purpose
computer, such as a personal computer (PC), is designed to be flexible and to meet a wide
range of end-user needs. Embedded systems control many devices in common use today.
Embedded systems are controlled by one or more main processing cores that are
typically either microcontrollers or digital signal processors (DSP). The key characteristic,
however, is being dedicated to handle a particular task, which may require very powerful
processors. For example, air traffic control systems may usefully be viewed as embedded,
even though they involve mainframe computers and dedicated regional and national networks
between airports and radar sites. (Each radar probably includes one or more embedded
systems of its own.

Since the embedded system is dedicated to specific tasks, design engineers can
optimize it to reduce the size and cost of the product and increase the reliability and perfor
mance. Some embedded systems are mass-produced, benefiting from economies of scale.
Physically embedded systems range from portable devices such as digital watches and
MP3 players, to large stationary installations like traffic lights, factory controllers, or the
systems controlling nuclear power plants. Complexity varies from low, with a single
microcontroller chip, to very high with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.
In general, "embedded system" is not a strictly definable term, as most systems have
some element of extensibility or programmability. For example, handheld computers share
some elements with embedded systems such as the operating systems and microprocessors
which power them, but they allow different applications to be loaded and peripherals to be
connected. Moreover, even systems which don't expose programmability as a primary feature
generally need to support software updates. On a continuum from "general purpose" to
"embedded", large application systems will have subcomponents at most points even if the
system as a whole is "designed to perform one or a few dedicated functions", and is thus
appropriate to call "embedded".
In many ways, programming for an embedded system is like programming PC 15 years
ago. The hardware for the system is usually chosen to make the device as cheap as possible.
Spending an extra dollar a unit in order to make things easier to program can cost millions.
Hiring a programmer for an extra month is cheap in comparison.This means the programmer
must make do with slow processors and low memory, while at the same time battling a need
for efficiency not seen in most PC applications. Below is a list of issues specific to the
embedded field.

CHAPTER 3.PROBLEM DEFINITION


3.1 PREVIOUS METHODS:
One-way vehicle sharing system is an urban mobility on demand (MOD)
platform which effectively utilizes usages of idle vehicles, reduces demands to parking
spaces, alleviates traffic congestion during rush hours, and cuts down excessive carbon
footprints due to personal transportation. The MOD vehicle sharing system consists of a
network of parking stations and a fleet of vehicles. Customers arrive at particular stations can
pick up a vehicle and drop it off at any other destination station. Existing vehicle sharing
examples include Zipcar , Car2Go and Auto share for one-way car sharing, and Velib and
City-bike for one-way bike sharing. Traditional vehicle sharing system requires users to have
the same drop-off and pick-up locations. This is known as the two-way vehicle sharing
system. The challenges of operating two-way vehicle sharing systems are relatively small
because by apriori vehicle scheduling, customers demands can be easily fulfilled at each
station. However, this service is less convenient for the users comparing to a one-way vehicle
sharing system. Intuitively one-way vehicle sharing systems have a huge business potential as
they allow more flexible trips than the the two-way vehicle sharing system,but it can not
guarantee us about the security of the vehicle.so we are going for the intelligent vehicle
sharing systems.
3.2 PROPOSED METHOD:
Today a lot of industries are using embedded systems for process control. In
industries we design the embedded systems to perform a specific operation like monitoring
temperature, pressure, humidity ,voltage, current etc, and basing on these monitored levels
we do control other devices, we can send information to a centralized monitoring station. In
critical industries where human presence is avoided there we can use robots which are
programmed to do a specific operation.
Module has been tested under real operating conditions in few vehicles on outside
temperatures in range of 21C to 27C. Mid position sensors were set on few different levels.
Also, temperatures inside vehicles while fully opened/closed windows were measured for
better comparison. The samples were collected during longer period of time. Comparing
measured inside temperatures it is concluded that slightly opened windows (up to 5 cm) do
not get satisfying results. To achieve quality ventilation it was necessary to lower windows at

least 10 to 15 centimeters. Of course, more opened windows, and finally completely opened
windows gives the best results, but 15 to 25 centimeters is optimal regarding inside
temperature drop, energy consummation and safety concerns.
It can be summarized that this project, although only a prototype, is completely functional
device that performs its function safely, reliably and efficiently. Possibility of application is
not limited only to the vehicle ventilation. The module is extremely expandable in both ways:
it is upgradeable for new tasks as well as compatible for integration into some existing
systems. Nearly every component can be used for several other functions, which can be
achieved only by software upgrade. Upgrading hardware opens even greater possibility to
upgrade the software and there are countless capabilities

Real Time Issues


Embedded systems frequently control hardware, and must be able to respond to them
in real time. Failure to do so could cause inaccuracy in measurements, or even damage
hardware such as motors. This is made even more difficult by the lack of resources available.
Almost all embedded systems need to be able to prioritize some tasks over others, and to be
able to put off/skip low priority tasks such as UI in favor of high priority tasks like hardware
control.
2.3.1Real-Time Embedded Systems
Embedded systems which are used to perform a specific task or operation in a specific
time period those systems are called as real-time embedded systems. There are two types of
real-time embedded systems.

Hard Real-time embedded systems:


These embedded systems follow an absolute dead line time period i.e.., if the tasking

is not done in a particular time period then there is a cause of damage to the entire equipment.
Eg: consider a system in which we have to open a valve within 30 milliseconds. If this
valve is not opened in 30 ms this may cause damage to the entire equipment. So in such cases
we use embedded systems for doing automatic operations.

Soft Real Time embedded systems:

These embedded systems follow a relative dead line time period i.e.., if the task is not
done in a particular time that will not cause damage to the equipment.
Eg: Consider a TV remote control system,if the remote control takes a few milliseconds
delay it will not cause damage either to the TV or to the remote control. These systems which
will not cause damage when they are not operated at considerable time period those systems
comes under soft real-time embedded systems.
Different Types of Processing Units
The central processing unit (C.P.U) can be any one of the following microprocessor,
micro controller, digital signal processing.

Among these Microcontroller is of low cost processor and one of the main
advantage of microcontrollers is, the components such as memory, serial
communication interfaces, analog to digital converters etc., all these are built on a
single chip. The numbers of external components that are connected to it are very
less according to the application.

Microprocessors are more powerful than microcontrollers. They are used in major
applications with a number of tasking requirements. But the microprocessor
requires many external components like memory, serial communication, hard
disk, input output ports etc.., so the power consumption is also very high when
compared to microcontrollers.

Digital signal processing is used mainly for the applications that particularly
involved with processing of signals.

CHAPTER 4: HARDWARE DESCRIPTION


4.1 Block Diagram Description:
In this chapter the block diagram of the project and design aspect of independent
modules are considered. Block diagram of module isshown in figure 3.1

Figure3.1Block diagram of module

It consists of ARM 7 micro controller, Humidity sensor, Temperature sensor, PIR


sensor, MAX 232, Power supply, Motor Driver, LCD Display, and the whole system is
attached to the vehicle. At the other end (main vehicle station) where the monitoring or
tracking of the vehicle is done should be equipped with a computer in which Google maps
must be present which is a free web mapping service application. Microcontroller used is
ARM7. The code is written in the internal memory of Microcontroller i.e., in the ROM
.
8

4.1.1 The main blocks of this project are:

ARM7

Temperature Sensor

Humidity sensor

LCD

LED

PIR Sensor

Motor driver Circuit

MAX 232
4.2 Hardware Module Description:
4.2.1 Arm 7 Based Lpc 2148
The LPC2148 microcontrollers are designed based on a 32/16 bit ARM7TDMI-S CPU
with real-time emulation and embedded trace support, which combines the microcontroller
with an embedded systems memory ranging from 32 KB to 512 KB. An interface of 128-bit
wide memory and an accelerator of unique architecture will enable the 32-bit code execution
with a maximum clock rate. For complex code size applications, the 16-bitalternative Thumb
mode will reduces code by more than 30 % with having minimum performance penalty.
Because of their small size and less power consumption properties, LPC2141/2/4/6/8 is ideal
for applications. A number of serial communications interfaces having different ranges and
SSP SPI I2Cs and static RAM all these devices made this controller suitable for different
communications.
4.2.2 Features of Arm

16/32-bit ARM7TDMI-S microcontrollers with a small LQFP64 package.


On-chip static RAM is 8 to 40 KB andon-chip flash program memory is 32 to 512 KB.

128 bit wide interface/accelerator enables high speed of 60 MHz operation.


ARM7 is having an In-System/In-Application Programming (ISP/IAP) via on-chip
boot-loader software. Single flash sector or full chip erase in 400 ms and programming

of 256 bytes in 1 MS.


Real-time debugging with the on-chip Real Monitor software is offered by Embedded
ICE RT and high speed tracing of instruction execution is offered by Embedded Trace

interfaces.
The LPC2146/8 provides 8 KB of on-chip RAM accessible to USB by DMA.In
addition USB 2.0 Full Speed compliant Device Controller with 2 KB of endpoint
RAMS.

One or two (LPC2141/2 vs. LPC2144/6/8) 10-bit A/D converters provide a total of 6/14

analog inputs, with conversion times as low as 2.44 s per channel.


Variable analog output is providedby single 10-bit D/A converter.
ARM 7 has two 32-bit timers/external event counters (with four capture and four

compare channels each), PWM unit (six outputs) and watchdog.


Low power real-time clock with independent power and dedicated 32 kHz clock input.
ARM7 have multiple serial interfaces including two UARTs (16C550), two Fast I2Cbus (400 Kbit/s), SPI and SSP with buffering and variable data length capabilities.

4.2.2.1 Architectural Overview of Arm Processor


The LPC2148 consists of an ARM7TDMI-S CPU with emulation support, in the ARM7
for interface to on-chip memory controllers, Local Bus is used, and for interface to the
interrupt controller, Advanced High-performance Bus (AHB) is used, and for connection to
on-chip peripheral functions the VLSI Peripheral Bus (VPB, a compatible superset of ARMs
AMBA Advanced Peripheral Bus)is used.
The LPC2148 configures the ARM7TDMI-S processor in little-endian byte order. AHB
peripherals are allocated a 2 megabyte range of addresses at the very top of the 4 gigabyte
ARM memory space. Each AHB peripheral is allocated a 16 KB address space within the
AHB address space. Pin diagram of LPC 2148 is shown in figure 3.2
LPC2148 peripheral functions (other than the interrupt controller) are connected to the
VPB bus. The AHB to VPB Bridge interfaces the VPB bus to the AHB bus. VPB peripherals
are also allocated a 2 megabyte range of addresses, beginning at the 3.5 gigabyte address
point.
Each VPB peripheral is allocated a 16 KB address space within the VPB address space.
The connection of on-chip peripherals to device pins is controlled by a Pin Connect Block
This must be configured by software to fit specific application requirements for the use of
perip heral functions and pins.

10

Figure Pin diagram of LPC2148


4.2.2.2 Features of GPIO
1.

GPIO will give the direction control (whether the selected pin is used as input pin or
output pin) of individual bits. It can be achieved by IODIR.

2.

We can set the values of register by writing one, produces high at the corresponding
port pins, whereas writing zero will have no effect. It can be done by using IOSET.
Whenever we use i.e. when we set any value we have to clear those bit using IOCLR.
IOCLR will clear the particular bits we have selected.

3.

After reset, by default all the I/O will act as input pins.

4.2.2.3 Pin Description of GPIO


TheLPC2148 processor has the following ports

Port0 has 32 pins and all can be used as input/output. All pins of this port can be used
as general purpose input/output. The number of pins available for input/output
operation will depends on the use of alternate functions i.e. if we use less alternate
functions more are the available input/outputs. Port Pins P0.24,P0.26,P0.27 are not
available.
11

Port1 has16 pins and all can be used as input/output. All pins of this port can be used
as general purpose input/output. This is same as port0, only difference is this port has
only 16pins where as port0 has 32 pins.

4.2.2.4 Universal Asynchronous Receiver Transmitter (UART)


Features of UART0

It has 16 byte Transmit and Receive FIFOs.


It has built-in baud rate generator.
UART0 Register locations are confirmed to 550 industry standards.

3.3.6 Pin Description of UART0


In LPC2148 we are having only one UART which is UART0. Generally RS-232 is used
as the UART0. In Every UART input is to receive the data and output is to transmit the data
i.e. Receiver we will receive the input data and transmitter will output the data. TXD pin of
UART0 is connected to 8th pin of port0 which is TDX1 of the processor and RXD pin of
UART0 is connected to 9th pin of port0 of the processor.

4.2.2.6 Switch
A switch is a mechanical device used to connect and disconnect an electric circuit at
will. Switches cover a wide range of types, from subminiature up to industrial plant switching
megawatts of power on high voltage distribution lines.
In applications where multiple switching options are required (e.g., a telephone
service), mechanical switches have long been replaced by electronic switching devices which
can be automated and intelligently controlled. Different types of switches are shown in figure
The switch is referred to as a "gate" when abstracted to mathematical form. In the
philosophy of logic, operational arguments are represented as logic gates. The use of
electronic gates to function as a system of logical gates is the fundamental basis for the
computer i.e. a computer is a system of electronic switches which function as logical gates. A
railroad switch is not electrical, but a mechanical device to divert a train from one track to
another.

12

Figure 3.3 Three tactile switches. Major scale is inches.


4.2.3 Types of Switches
A pair of contacts is said to be 'closed' when there is no space between them, allowing
electricity to flow from one to the other. When the contacts are separated by an insulating air
gap, an air space, they are said to be 'open', and no electricity can flow at typical voltages.
Switches can be and are classified according to the arrangement of their contacts in
electronics field, but electricians in the electrical wiring service business and their electrical
supplier industries use different nomenclature, such as "one-way", "two-way", "three-way"
and "four-way" switches.
We have types of switches also
SPST (single pole single through),
SPDT(single pole double through),
DPST(double pole single through),

13

DPDT(double pole double through).

4.2.3.1. MAX 232


A standard serial interface for PC, RS232C, requires negative logic, i.e., logic 1 is -3V
to -12V and logic 0 is +3V to +12V. To convert TTL logic, say, TXD and RXD pins of the
microcontroller thus need a converter chip. A MAX232 chip has long been using in many
microcontrollers boards. It is a dual RS232 receiver / transmitter that meets all RS232
specifications while using only +5V power supply. It has two onboard charge pump voltage
converters which generate +10V to -10V power supplies from a single 5V supply. It has four
level translators, two of which are RS232 transmitters that convert TTL/CMOS input levels
into +9V RS232 outputs. The other two level translators are RS232 receivers that convert
RS232 input to 5V. Typical MAX232 circuit is shown in figure 3.4.

Figure3.4 Max 232 IC


4.2.3.2 Features

Operates With Single 5-V Power Supply


LinBi-CMOSEProcess Technology
Two Drivers and Two Receivers
30-V Input Levels
Low Supply Current. 8 MA Typical
Meets or Exceeds TIA/EIA-232-F and IT Recommendation V.28
Designed to be Interchangeable with Maxim MAX232

4.2.3.3 Temperature Sensor (Lm35)


14

The LM35 series are precision integrated-circuit temperature sensors, whose


output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35
thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not
required to subtract a large constant voltage from its output to obtain convenient centigrade
scaling. The LM35 does not require any external calibration or trimming to provide typical
accuracies of 1/4C at room temperature and 3/4C over a full -55 to +150C temperature
range. Low cost is assured by trimming and calibration at the wafer level. The LM35s low
output impedance, linear output, and precise inherent calibration make interfacing to readout
or control circuitry especially easy. It can be used with single power supplies, or with plus
and minus supplies. As it draws only 60 A from its supply, it has very low self-heating, less
than 0.1C in still air. The LM35 is rated to operate over a -55 to +150C temperature range,
while the LM35C is rated for a -40 to +110C range (-10 with improved accuracy). The
LM35 series is available packaged plastic TO-92 transistor package. The LM35D is also
available in an 8-lead surface mount small outline package and a plastic TO-220 package.
4.2.3.4 Features

Calibrated directly in Celsius (Centigrade)

Linear + 10.0 mV/C scale factor

0.5C accuracy guarantee able (at +25C)

Rated for full -55 to +150C range

Suitable for remote applications

Low cost due to wafer-level trimming

Operates from 4 to 30 volts

Less than 60 A current drain

Low self-heating, 0.08C in still air

Nonlinearity only 1/4C typical

Low impedance output, 0.1 for 1 mA load

15

4.2.3.5 Applications

. Common toilets, for lights & exhaust fans


Common staircases
For parking lights
For garden lights
For changing rooms in shops
For corridors & many more

42.3.6 Passive Infrared Sensor ( PIR Sensor )


This PIR Sensor Switch Can Detect the Infrared Rays released by Human Body
Motion within the Detection Area (14 Meters), and Start the Load - Light Automatically. This
Unit is Suitable for Outdoor Use (Corridor, Staircase, Courtyard etc.) Different PIR sensors
are shown in figure 3.5

A PIR Sensor is a Passive Infrared Sensor which controls the switching on/off of the

lighting load when it detects a moving target.


The built in sensor turns on/off the connected lighting load when it detects motion in
the coverage area. It has different working principle during the day time and the night

time.
During the day, the built in photocell sensor saves electricity by deactivating the

lighting load connected to the sensor.


During the night the connected lighting load is turned on by adjusting the luminosity

knob (LUX).
An adjustable time knob lets you select how long the light stays on after activation.

4.2.3.7 Working Principle

The PIR Sensor senses the motion of a human body by the change in surrounding

ambient temperature when a human body passes across.


Then it turns on the lighting load to which it is connected.
The lighting load remains on until it senses motion.
Once the motion is seized it switches off the lighting load.
During the night, the LUX adjustment knob allows you to adjust the luminosity based
on which the lighting load will either switch on/off automatically.

16

Figure PIR sensors


4.2.3. 8 Liquid Crystal Display ( LCD )
A liquid crystal display (LCD) is a thin, flat display device made up of any number of
color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists
of a column of liquid crystal molecules suspended between two transparent electrodes, and
two polarizing filters, the axes of polarity of which are perpendicular to each other. Without
the liquid crystals between them, light passing through one would be blocked by the other.
The liquid crystal twists the polarization of light entering one filter to allow it to pass through
the other.
A program must interact with the outside world using input and output devices that
communicate directly with a human being. One of the most common devices attached to an
controller is an LCD display. Some of the most common LCDs connected to the controllers
are 16X1, 16x2 and 20x2 displays. This means 16 characters per line by 1 line 16 characters
per line by 2 lines and 20 characters per line by 2 lines, respectively.

17

Many microcontroller devices use 'smart LCD' displays to output visual information.
LCD displays designed around LCD NT-C1611 module, are inexpensive, easy to use, and it
is even possible to produce a readout using the 5X7 dots plus cursor of the display. They
have a standard ASCII set of characters and mathematical symbols. For an 8-bit data bus, the
display requires a +5V supply plus 10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For
a 4-bit data bus it only requires the supply lines plus 6 extra lines(RS RW D7 D6 D5 D4).
When the LCD display is not enabled, data lines are tri-state and they do not interfere with
the operation of the microcontroller.

available. Line lengths of

8, 16,

20, 24,

32 and
40
charact

ers are
all
standar
d,
18

one,
two

in

An LCD consists of two glass panels, with the liquid crystal material sand witched in
between them. The inner surface of the glass plates are coated with transparent
electrodes which define the character, symbols or patterns to be displayed polymeric
layers are present in between the electrodes and the liquid crystal, which makes the
liquid crystal molecules to maintain a defined orientation angle.

One each polarizers are pasted outside the two glass panels. This polarizers would
rotate the light rays passing through them to a definite angle, in a particular direction.

When the LCD is in the off state, light rays are rotated by the two polarizers and the
liquid crystal, such that the light rays come out of the LCD without any orientation, and
hence the LCD appears transparent.

When sufficient voltage is applied to the electrodes, the liquid crystal molecules would
be aligned in a specific direction. The light rays passing through the LCD would be
rotated by the polarizers, which would result in activating/ highlighting the desired
characters.

The LCDs are lightweight with only a few millimeters thickness. Since the LCDs
consume less power, they are compatible with low power electronic circuits, and can be
powered for long durations.

The LCD does dont generate light and so light is needed to read the display. By using
backlighting, reading is possible in the dark. The LCDs have long life and a wide
operating temperature range.

Changing the display size or the layout size is relatively simple which makes the LCDs
more customers friendly.

The LCDs used exclusively in watches, calculators and measuring instruments are the
simple seven-segment displays, having a limited amount of numeric data. The recent
advances in technology have resulted in better legibility, more information displaying
capability and a wider temperature range. These have resulted in the LCDs being
extensively used in telecommunications and entertainment electronics. The LCDs have
even started replacing the cathode ray tubes (CRTs) used for the display of text and
graphics, and also in small TV applications.

19

This section describes the operation modes of LCDs then describe how to program and
interface an LCD to 8051 using Assembly and C.

4.2.3.9 LCD Operation

In recent years the LCD is finding widespread use replacing LEDs(seven-segment


LEDs or other multisegment LEDs).This is due to the following reasons:

The declining prices of LCDs.

The ability to display numbers, characters and graphics. This is in

Contract to LEDs, which are limited to numbers and a few characters.

Incorporation of a refreshing controller into the LCD, there by

Relieving the CPU of the task of refreshing the LCD. In the contrast,

The LED must be refreshed by the CPU to keep displaying the data.

Ease of programming for characters and graphics.

LCD Pin Description

The LCD discussed in this section has 14 pins. The function of each pins is given in
table 3.1

4.2.3.9 Uses
The LCDs used exclusively in watches, calculators and measuring instruments are the
simple seven-segment displays, having a limited amount of numeric data. The recent
advances in technology have resulted in better legibility, more information displaying
capability and a wider temperature range. These have resulted in the LCDs being extensively
used in telecommunications and entertainment electronics. For 161 LCD, the address
locations are shown in figure 3.6.The LCDs have even started replacing the cathode ray tubes
(CRTs) used for the display of text and graphics, and also in small TV applications.

20

Figure Address locations for a 1x16 line LCD


Even limited to character based modules, there is still a wide variety of shapes and sizes
available. Line lengths of 8, 16,20,24,32 and 40 characters are all standard, in one, two and
four line versions. Different sizes and shapes are shown in figure 3.7
Table 3.1 Pin description for LCD
Pin

Symbol

I/O

Description

Vss

--

Ground

Vcc

--

+5V power supply

VEE

--

Power supply to control contrast

RS

RS=0 to select command register


RS=1 to selectdata register

R/W

R/W=0 for write, R/W=1 for read

I/O

Enable

DB0

I/O

The 8-bit data bus

DB1

I/O

The 8-bit data bus

DB2

I/O

The 8-bit data bus

10

DB3

I/O

The 8-bit data bus

11

DB4

I/O

The 8-bit data bus


21

12

DB5

I/O

The 8-bit data bus

13

DB6

I/O

The 8-bit data bus

14

DB7

I/O

The 8-bit data bus

4.2.3.10 Features
Interface with either 4-bit or 8-bit microprocessor.
Display data RAM
80X8 bits (80 characters).
Character generator ROM
160 different 5 X7 dot-matrix character patterns.
Character generator RAM
8 different users programmed 5 X7 dot-matrix patterns.
Display data RAM and character generator RAM may be accessed by the

microprocessor.
Numerous instructions
Clear Display, Cursor Home, Display ON/OFF, Cursor ON/OFF,Blink Character,
Cursor Shift, Display Shift.

Built-in reset circuit is triggered at power ON.


Built-in oscillator Data can be placed at any location on the LCD.
Several different LC technologies exist. Supertwist types, for example, offer

improved contrast and viewing angle over the older twisted pneumatic types. Some
modules are available with back lighting, so that they can be viewed in dimly-lit conditions.
The back lighting may be either electro-luminescent, requiring a high voltage inverter
circuit, or simple LED illumination.

22

Figure Shapes and sizes of LEDS


4.2.4 Pin Description
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two
pins are extra in both for back-light LED connections). Pin diagram of 1X16 lines LCD is
shown in figure 3.8.

23

Figure Pin diagrams of 1x16 lines LCD


Control lines
EN: Line is called "Enable." This control line is used to tell the LCD that you are sending it
data. To send data to the LCD, your program should make sure this line is low (0) and
then set the other two control lines and/or put data on the data bus. When the other lines
are completely ready, bring EN high (1) and wait for the minimum amount of time
required by the LCD datasheet (this varies from LCD to LCD), and end by bringing it
low (0) again.
RS: Line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS is
high (1), the data being sent is text data which should be displayed on the screen. For
example, to display the letter "T" on the screen you would set RS high.
RW: Line is the "Read/Write" control line. When RW is low (0), the information on the data
bus is being written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read
command. All others are write commands, so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation
selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1,
DB2, DB3, DB4, DB5, DB6, and DB7

24

.
4.2.5

Light Emitting Diode (LED)

A light-emitting diode(LED) is a semiconductor diode that emits light when an


electrical current is applied in the forward direction of the device, as in the simple LED
circuit. The effect is a form of electroluminescence. Where incoherent and narrow-spectrum
light is emitted from the p-n junction.
LEDs are widely used as indicator lights on electronic devices and increasingly in
higher power applications such as flashlights and area lighting. An LED is usually a small
area (less than 1 mm2) light source, often with optics added to the chip to shape its radiation
pattern and assist in reflection. The color of the emitted light depends on the composition and
condition of the semi conducting material used, and can be infrared, visible, or ultraviolet.
Besides lighting, interesting applications include using UV-LEDs for sterilization of water
and disinfection of devices, and as a grow light to enhance photosynthesis in plants.
42.5.1 Basic Principle
Like a normal diode, the LED consists of a chip of semi conducting material
impregnated, or doped, with impurities to create a p-n junction. As in other diodes, current
flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse
direction. Charge-carriers electrons and holes flow into the junction from electrodes with
different voltages. When an electron meets a hole, it falls into a lower energy level, and
releases energy in the form of a photon. Figure 3.9 shows basic principle of LED
The wavelength of the light emitted, and therefore its color, depends on the band gap
energy of the materials forming the p-n junction. In silicon or germanium diodes, the
electrons and holes recombine by a non-irradiative transition which produces no optical
emission, because these are indirect band gap materials. The materials used for the LED have
a direct band gap with energies corresponding to near-infrared, visible or near-ultraviolet
light. LED development began with infrared and red devices made with gallium arsenide.
Advances in materials science have made possible the production of devices with
ever-shorter wavelengths, producing light in a variety of colors. LEDs are usually built on an
n-type substrate, with an electrode attached to the p-type layer deposited on its surface. P25

type substrates, while less common, occur as well. Many commercial LEDs, especially
GaN/InGaN, also use sapphire substrate.
4.2.5.2 Common Package Shapes

Round, dome top

Round, flat top

Rectangular, flat top (often seen in LED bar-graph displays)

Triangular or square, flat top

The encapsulation may also be clear or semi opaque to improve contrast and viewing angle.
Different sizes LEDs are shown in figure 3.10

Figure Basic principle of LED


There are three main categories of miniature single die LEDs

Low current typically rated for 2 mA at around 2 V (approximately 4 mW


consumption).

26

Standard 20 mA LEDs at around 2 V (approximately 40 mW) for red, orange,


yellow & green, and 20 mA at 45 V (approximately 100 mW) for blue, violet and
white.

Ultra-high output 20 mA at approximately 2 V or 45 V, designed for viewing in


direct sunlight.

4.2.5.3 LED Types


a)

Flashing LEDs
Flashing LEDs are used as attention seeking indicators where it is desired to
avoid the complexity of external electronics. Flashing LEDs resemble standard LEDs
but they contain an integrated multivibrator circuit inside which causes the LED to
flash with a typical period of one second. In diffused lens LEDs this is visible as a
small black dot. Most flashing LEDs emit light of a single color, but more sophisticated
devices can flash between multiple colors and even fade through a color sequence using
RGB color mixing.

Figure Different sized LEDs. 8 mm, 5mm and 3 mm


b)

High power LEDs


High power LEDs from limitless mounted on a star shaped heat sink High power LEDs

(HPLED) can be driven at more than one ampere of current and give out large amounts of
light. Since overheating destroys any LED the HPLEDs must be highly efficient to minimize
excess heat, furthermore they are often mounted on a heat sink to allow for heat dissipation.
If the heat from a HPLED is not removed the device will burn out in seconds.
27

A single HPLED can often replace an incandescent bulb in a flashlight or be set in an


array to form a powerful LED lamp. LEDs have been developed that can run directly from
mains power without the need for a DC converter. For each half cycle part of the LED diode
emits light and part is dark, and this is reversed during the next half cycle. Current efficiency
is 80 lm/W.
c)

Multi-color LEDs
A bi-color LED is actually two different LEDs in one case. It consists of two dies

connected to the same two leads but in opposite directions. Current flow in one direction
produces one color, and current in the opposite direction produces the other color.
Alternating the two colors with sufficient frequency causes the appearance of a third
color. A tri-color LED is also two LEDs in one case, but the two LEDs are connected to
separate leads so that the two LEDs can be controlled independently and lit simultaneously.
RGB LEDs contain red, green and blue emitters, generally using a four-wire connection
with one common (anode or cathode). The Taiwanese LED manufacturer ever light has
introduced a 3 watt RGB package capable of driving each die at 1 watt
d)

Alphanumeric LEDs
LED displays are available in seven-segment and starburst format. Seven-segment

displays handle all numbers and a limited set of letters. Starburst displays can display all
letters.
Seven-segment LED displays were in widespread use in the 1970s and 1980s, but
increasing use of liquid crystal displays, with their lower power consumption and greater
display flexibility, has reduced the popularity of numeric and alphanumeric LED displays.
Applications

Automotive applications with LEDS


Instrument Panels & Switches, Courtesy Lighting, CHMSL, Rear Stop/Turn/Tai,
Retrofits New Turn/Tail/Marker Lights.

Consumer electronics & general indication


Household appliances, VCR/ DVD/ Stereo/Audio/Video devices, Toys/Games
Instrumentation, Security Equipment, Switches.

Illumination with LEDs

28

Architectural Lighting, Signage (Channel Letters), Machine Vision, Retail


Displays, Emergency Lighting (Exit Signs), Neon and bulb Replacement, Flashlights,
Accent Lighting - Pathways, Marker Lights.

Sign applications with LEDs


Full Color Video, Monochrome Message Boards, Traffic/VMS, Transportation
Passenger Information.

Signal application with LEDs


Traffic, Rail, Aviation, Tower Lights, Runway Lights, Emergency/Police Vehicle
Lighting.

Mobile applications with LEDs


Mobile Phone, PDA's, Digital Cameras, Lap Tops, General Backlighting.

Photo sensor applications with LEDs


Medical Instrumentation, Bar Code Readers, Color & Money Sensors, Encoders,
Optical Switches, Fiber Optic Communication.

4.2.5.5 HUMIDITY SENSORS


Humidity sensors are gaining more significance in diverse areas of measurement and
Control technology. Manufacturers are not only improving the accuracy and long-term drift
of their sensors, they are improving their durability for use in different environments, and
simultaneously reducing the component size and the price. Table 3.2 shows specifications of
Humidity sensors.
Following this trend, Swiss-based Sensation AG has introduced a new generation of
integrated, digital, and calibrated humidity and temperature sensors using CMOS "micromachined" chip technology. The new products, SYH2 and SYH-2S, are a single chip relative
humidity and temperature multi sensor module with a calibrated digital output which allows
for simple and quick system integration.
Table 3.2Specifications
1.

Items

SYH2 and SYH-2S

2.

Rated voltage

AC 1Vrms (1 kHz)

3.

Rated power

AC 0.22Mw

4.

Operating temperature

0-600C

5.

Operating humidity

20-95%RH
29

6.

Standard characteristics

33KQ (At 250C, 60%RH)

7.

Storage temperature

-30850C

8.

Storage humidity

within 95%RH

9.

Humidity accuracy

+/- 5%RH (at 250C,60%RH)

10.

Humidity response time

<60sec (40-8-%RH)

11.

Hysteresis

+/- 2%RH (40-80%RH)

Conventional sensors determine relative air humidity using capacitive measurement


technology. For this principle, the sensor element is built out of a film capacitor on different
substrates (glass, ceramic, etc.). The dielectric is a polymer which absorbs or releases water
proportional to the relative environmental humidity, and thus changes the capacitance of the
capacitor, which is measured by an onboard electronic circuit.
Humidity is a important factor in personal comfort and in quality control for materials,
machinery etc. Now we are using SYH2 and SYH-2S humidity sensors in most of the
circuits. Humidity sensors are shown in figure 3.11

30

Figure Humidity Sensors

4.2.5.6 BUZZER:
A buzzer or beeper is a signaling device, usually electronic, typically used in automobiles,
household appliances such as a microwave oven, or game shows.It most commonly consists
of a number of switches or sensors connected to a control unit that determines if and which
button was pushed or a preset time has lapsed, and usually illuminates a light on the
appropriate button or control panel, and sounds a warning in the form of a continuous or
intermittent buzzing or beeping sound. Initially this device was based on an
electromechanical system which was identical to an electric bell without the metal gong .
Often these units were anchored to a wall or ceiling and used the ceiling or wall as a sounding

31

board. Another implementation with some AC-connected devices was to implement a circuit
to make the AC current into a noise loud enough to drive a loudspeaker and hook this circuit
up to a cheap 8-ohm speaker. Nowadays, it is more popular to use a ceramic-based
piezoelectric sounder like a Son alert which makes a high-pitched tone. Usually these were
hooked up to "driver" circuits which varied the pitch of the sound or pulsed the sound on and
off.

In game shows it is also known as a "lockout system," because when one person
signals ("buzzes in"), all others are locked out from signaling. Several game shows
have large buzzer buttons which are identified as "plungers".

The word "buzzer" comes from the rasping noise that buzzers made when they were
electromechanical devices, operated from stepped-down AC line voltage at 50 or 60
cycles. Other sounds commonly used to indicate that a button has been pressed are a
ring or a beep.

CHAPTER 5 IMPLEMENTATION AND TESTING


5.1 Interfacing Of All Input Devices:
The module is designed and developed for the installation into a one older car without
automatic air conditioner and with already existing basic electric mechanism for lowering and
raising the windows. The car has two power windows which can be managed. That is why
this module prototype manages only two sets of input and output signals for connecting two
independent windows. Control unit, switching unit, other units and some of the peripheral
units (temperature and light sensors) can be perceived. Since the rest of the sensors cannot be
32

integrated into the modules main electronic circuit, connectors for their signals are located
inside the module.
However, what is not mentioned so far are a lot of buttons, switches and LEDs that can
be seen alongside input and output connectors. With buttons, switches and LEDs, this
prototype module becomes the simulator as well inside the module are simulators of all
input and output signals that make this prototype even more convenient for the further
development and testing. Although this is just a module prototype, it satisfies all requirements
for working in real conditions and can be implemented in any vehicle.
Considering different characteristics of individual microcontroller pins and the various
possible upgrades, important criterion was to place and connect components in a logical and
calculated order, with respect to all present and possible hardware or software upgrades so it
is important to be careful while designing and connecting all electronic circuits, inputs,
outputs and electronic components in general. Integration of certain electronic components
protects module against different sort of nuisances that exist or could appear in real
circumstances.
Electronic circuit was developed parallel with the program code to achieve even better
congruence between individual components and operations. Besides all the attention that was
given in the hardware development, a lot of attention was committed to the software
segments that improve quality work of module and protect system against contingent
situations. Aesthetic appearance of the assembly was also taken into consideration. Result is a
complete product that is ready for real use. Of course, the software can still significantly
improve in order to obtain a more intelligent and efficient module, but it is efficient
enough, functional, reliable and safe to use.
5.1.1 Types of Switches :
A pair of contacts is said to be 'closed' when there is no space between them, allowing
electricity to flow from one to the other. When the contacts are separated by an insulating air
gap, an air space, they are said to be 'open', and no electricity can flow at typical voltages.
Switches can be and are classified according to the arrangement of their contacts in
electronics field, but electricians in the electrical wiring service business and their electrical

33

supplier industries use different nomenclature, such as "one-way", "two-way", "three-way"


and "four-way" switches.
We have types of switches also
SPST (single pole single through),
SPDT(single pole double through),
DPST(double pole single through),
DPDT(double pole double through).
5.1.3 PIR Sensors:

The PIR Sensor senses the motion of a human body by the change in surrounding

ambient temperature when a human body passes across.


Then it turns on the lighting load to which it is connected.
The lighting load remains on until it senses motion.
Once the motion is seized it switches off the lighting load.
During the night, the LUX adjustment knob allows you to adjust the luminosity based
on which the lighting load will either switch on/off automatically.

Figure PIR sensors

34

Interface with either 4-bit or 8-bit microprocessor.


Display data RAM
80X8 bits (80 characters).
Character generator ROM
160 different 5 X7 dot-matrix character patterns.
Character generator RAM
8 different users programmed 5 X7 dot-matrix patterns.
Display data RAM and character generator RAM may be accessed by the

microprocessor.
Numerous instructions
Clear Display, Cursor Home, Display ON/OFF, Cursor ON/OFF,Blink Character,
Cursor Shift, Display Shift.

Built-in reset circuit is triggered at power ON.


Built-in oscillator Data can be placed at any location on the LCD.

5.2 Interfacing Of All Output Devices:


5.2.2 LCD
Several different LC technologies exist. Supertwist types, for example, offer
improved contrast and viewing angle over the older twisted pneumatic types. Some
modules are available with back lighting, so that they can be viewed in dimly-lit conditions.
The back lighting may be either electro-luminescent, requiring a high voltage inverter
circuit, or simple LED illumination.

35

Figure Shapes and sizes of LEDS

5.2. 2 BUZZER: This section consists of a Buzzer. The buzzer is used to alert / indicate the
completion of process. It is sometimes used to indicate the start of the embedded syste by
alerting during start-up.

BUZZER MODULE

36

Schematic diagram
Flashing LEDs are used as attention seeking indicators where it is desired to
avoid the complexity of external electronics. Flashing LEDs resemble standard LEDs
but they contain an integrated multivibrator circuit inside which causes the LED to
flash with a typical period of one second. In diffused lens LEDs this is visible as a
small black dot. Most flashing LEDs emit light of a single color, but more sophisticated
devices can flash between multiple colors and even fade through a color sequence using
RGB color mixing.

37

Software description
Keil Software:
Installing the Keil software on a Windows PC

Insert the CD-ROM in your computers CD drive

On most computers, the CD will auto run, and you will see the Keil installation
menu. If the menu does not appear, manually double click on the Setup icon, in the
root directory: you will then see the Keil menu.

On the Keil menu, please select Install Evaluation Software. (You will not require a
license number to install this software).

Follow the installation instructions as they appear.

Loading the Projects

The example projects for this book are NOT loaded automatically when you
install the Keil compiler.
These files are stored on the CD in a directory /Pont. The files are arranged by chapter: for
example, the project discussed in Chapter 3 is in the directory /Pont/Ch03_00-Hello.
Rather than using the projects on the CD (where changes cannot be saved), please copy the
files from CD onto an appropriate directory on your hard disk.

38

Note: you will need to change the file properties after copying: file transferred from the CD
will be read only.
Configuring the Simulator
Open the Keil Vision

39

CHAPTER 6: RESULTS
Module has been tested under real operating conditions in few vehicles on outside
temperatures in range of 21C to 27C. Mid position sensors were set on few different levels.
Also, temperatures inside vehicles while fully opened/closed windows were measured for
better comparison. The samples were collected during longer period of time. Comparing
measured inside temperatures it is concluded that slightly opened windows (up to 5 cm) do
not get satisfying results. To achieve quality ventilation it was necessary to lower windows at
least 10 to 15 centimeters. Of course, more opened windows, and finally completely opened
windows gives the best results, but 15 to 25 centimeters is optimal regarding inside
temperature drop, energy consummation and safety concerns.

Figure Project kit


Presented results should be taken into consideration as informative since measurements
were not taken in exactly the same weather conditions for each individual vehicle so there are
visible disrupting effects. It can be remarked that many different factors, besides obvious
40

direct sunlight, outside temperature and windows position directly affect ventilation process;
weather conditions have significant influence on the ventilation process e.g., wind
noticeably accelerates and enhances ventilation. Further, size of the vehicle, even vehicle
body color and vehicle orientation relative to the sun makes noticeable difference. Figure 7.1
shows design and implementation of module.

41

CHAPTER 7 CONCLUSION
7.1.CONCLUSION AND FUTURE SCOPE:
Despite all the positive sides of this project, the question remains whether it can find
its application in the market. Since the module is impracticable as a physical unit (because of
peripheral unit), it is necessary to adapt it to any individual vehicle. Thus its individual
installation is not cost-effective. It could find its purpose and economic efficiency if it would
be serially mounted in same type of vehicle.
It can be summarized that this project, although only a prototype, is completely functional
device that performs its function safely, reliably and efficiently. Possibility of application is
not limited only to the vehicle ventilation. The module is extremely expandable in both ways:
it is upgradeable for new tasks as well as compatible for integration into some existing
systems. Nearly every component can be used for several other functions, which can be
achieved only by software upgrade. Upgrading hardware opens even greater possibility to
upgrade the software and there are countless capabilities

42

BIBLIOGRAPHY
REFERENCES

[1]

S.P. Bhumkar, V.V. Deotare, R.V.BabarIntelligent Car System for Accident


Prevention Using ARM-7, International Journal of Emerging Technology and
Advanced Engineering, Volume 2, Issue 4, Pp: 56-78, 2012

[2]

BaburaoKodavati,

V.K.RajuARM

BASED

VEHICLE

LOCATION

AND

TRACKING SYSTEM International Journal of Engineering Research and


Applications, Vol. 1, issue no.3, Pp: 616-625, 2012
[3]

PoojaPathe,Prof. R.H.Talwekar GPRS BASED ROUTING & TRACKING OF


MOBILE VEHICLES USING ARM International Journal of Engineering Research
and Applications , Vol. 2, issue no.4, Pp: 1088-1090 ,2012

[4]

Amir Salarpour, ArezooSalarpourVehicle Tracking Using Kalman Filter and


Features Signal & Image Processing: An International JournalVol.2, Issue No.2, Pp:
1-8, June 2011

[5]

Victor Olugbemiga, EmmanuelAdetibaVehicle Accident Alert and Locator


International Journal of Electrical & Computer Sciences Vol: 11, Issue No: 02, Pp: 3855, 2011

[6]

Prof.M.KamarajuA Novel Design Of Low Cost Real Time Vehicle Navigation


System International Journal of Engineering Science and Technology Vol. 2,Issue no
3, Pp: 1-32 ,2010

[7]

Hans Burklin, The whole electronics Main catalog 92, datasheet, 1991

[8]

ARM-7, International Journal of Emerging Technology and Advanced Engineering,


Volume 2, Issue 4, Pp: 56-78, 2012

43

You might also like