You are on page 1of 109

GSM Based BTS Security System

Objective:
Security is a prime concern in our day-today life. Every country as well as
individual wants to be as much secure as possible. In Modern era, the people use
different types of security products in their shops, office and homes. The
governments of many countries are using big security systems to makes their
offices, colleges and residences more secure. In modern technology, there are
various types of security systems. For example, video recording, cameras, sensors,
GSM, and siren based security systems are used. The shopkeepers are using video
recording and camera based projects. For home, people uses the sensors, camera
and siren based security systems.
In BTS also there are alarm monitoring system till now. In this case a particular
person always monitors alarms generated from the site. We have purposed a
system which will gives a SMS alert at any alarm failure. The Project will sense
the input from three sensors (Fire, IR reflector, Touch Sensor). The failure alarm
will be displayed on the LCD screen, as well as a buzzer will beep to give an
audible alarm. The message corresponding to the failure will be sent to the pre-
stored numbers
Project Description
This project GSM based BTS Security system includes a Fire Sensor, Touch
Sensor, IR Reflector Sensor, GSM Voice & Data Transceiver (GSM
MODEM), Buzzer for Beep Source, Display Unit (Liquid Crystal
Display), Microcontroller 8051 Family, Regulated Power Supply. When any
failure will be sensed by the MCU it will give command to the Buzzer as well as
GSM Modem to send the SMS on the pre stored number. A visual alarm will also
be displayed on LCD.
Block Diagram of Project

LCD
Fire Sensor
MCU Power
Supply
MAX232
IR Reflector
Touch Sensor
GSM Modem

Regulated Power Supply:
Power supplies are designed to convert high voltage AC mains to a suitable low
voltage supply for electronic circuits and other devices. In our project the various
electronic modules are being used for which power supply requirement is +5V DC.
The Microcontroller unit needs a pure regulated +5V DC.
A power supply can be broken down into a series of blocks, each of which
performs a particular function.
For example a 5V regulated supply:

Each of the blocks has its own function as described below:
1. Transformer steps down high voltage AC mains to low voltage AC. The
step down transformer of 12-0-12, 750mA will be used in our project.
2. Rectifier converts AC to DC, but the DC output is varying. The ripple
factor of Bridge rectifier is than the other rectifier circuits. So here in our
project we will use bridge rectifier to convert the AC into DC.
3. Smoothing smoothes the DC from varying greatly to a small ripple. A
electrolytic capacitor of 1000uF/50V will be used as a filter/smoothing
circuit to get pure DC.
4. Regulator eliminates ripple by setting DC output to a fixed voltage. There
are two types of regulator series. First is positive voltage regulator series
(78XX) and second is negative voltage regulator series (79XX). In our
project we need positive voltage (+5V) so we will use 7805 to regulate the
voltage.
Microcontroller 8051 Family
A microcontroller has a CPU (a microprocessor) in addition to the fixed amount of
RAM, ROM, I/O ports, and timers are all embedded together on the chip:
therefore, the designer cannot add any external memory, I/O, or timer to it.
Microcontroller Unit is the heart of our project. It controls all the major activities
of our project. The Microcontroller unit used in our project is based on MCS-51.
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 four ports (8-bit) all on a single chip. The other two
members of MCS-51 series were 8052 and 8031 with different features. The 8051
became widely popular after Intel allowed other manufacturers to make any flavor
of the 8051 they please with the condition that they remain code compatible with
the 8051. This has led to many versions of the 8051 with different speeds and
amount of on-chip ROM marketed by more than half a dozen manufacturers. It is
important to know that although there are different flavors of the 8051, they are all
compatible with the original 8051 as far as the instructions are concerned. This
means that if you write your program for one, it will run on any one of them
regardless of the manufacturer. The major 8051 manufacturers are Intel, Atmel,
Dallas Semiconductors, Philips Corporation, Infineon. The Microcontrollers
manufactured by these companies which were based on 8051 architecture are the
MCS-51 based microcontrollers.
In our projects we will use from Atmel corporation AT89C52/AT89S52 having
similar features of 8052. The benefit of using AT89S52 is that it is In-circuit
system programmable (ISP) i.e. it can be reprogrammed without removing it from
the application using ISP Programmer. But if we are using AT89C52 then if we
have to reprogram it then first of all we have to remove it from our application then
program it using its programmer and then install it again in the application to use.
Display Unit (Liquid Crystal Display):
Display unit used in our project will be Liquid crystal display (LCD) which
makes our project user friendly by displaying everything on the display.
Liquid crystal displays (LCD) are widely used in recent years as compared to
LEDs or seven segment displays. Because LCD can be used to display
alphanumeric as well as special characters (like * @ ! # % & etc.). Also due to
the declining prices of LCD, the ability to display numbers, characters and
graphics, incorporation of a refreshing controller into the LCD, their by
relieving the CPU of the task of refreshing the LCD and also the ease of
programming for characters and graphics. HD 44780 based LCDs are most
commonly used.
The LCD, which is used as a display in our project, is LMB162A. The main
features of this LCD are: 16 X 2 display, intelligent LCD, used for
alphanumeric characters & based on ASCII codes. This LCD contains 16 pins,
in which 8 pins are used as 8-bit data I/O, which are extended ASCII. Three
pins are used as control lines these are Read/Write pin, Enable pin and Register
select pin. Two pins are used for Backlight and LCD voltage, another two pins
are for Backlight & LCD ground and one pin is used for contrast change.
It can display 32 characters at a time on the display. There are two rows (lines)
and 16 characters can be displayed in each line. And it will be used in 8 bit
mode i.e. its 8-bit data bus will be used to transfer the data codes from MCU to
LCD. Below is the picture of our LCD:


Buzzer for Beep Source
A Buzzer will be used as an audio alarm in our project.
A buzzer or beeper is an audio signaling device, which may
be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers
and beepers include alarm devices, timers and confirmation of user input
such as a mouse click or keystroke.


Buzzer

There are many types of Buzzers like:
Mechanical Buzzer
Electromechanical Buzzer
Piezoelectric buzzer

The buzzer used in our project will be piezoelectric buzzer. Instead of this
buzzer we can also use a musical IC with combination of speaker as an
audio alarm in our project. The various musical ICs (like UM66) with
different musical sounds are available.
TTL to RS232 Line-Driver Module (MAX232)
Some devices like PC, GSM Modem, and GPS Modem works on RS232
voltage standards which are not compatible with MCUs TTL voltage
standards. So MAX232 has to be used to make their communication
compatible to each other.
RS232 Voltage Standards:
The RS-232 standard defines the voltage levels that correspond to logical
one and logical zero levels for the data transmission and the control signal
lines. Valid signals are plus or minus 3 to 15 volts; the 3 V range near zero
volts is not a valid RS-232 level. The standard specifies a maximum open-
circuit voltage of 25 volts: signal levels of 5 V, 10 V, 12 V, and 15 V
are all commonly seen depending on the power supplies available within a
device. RS-232 drivers and receivers must be able to withstand indefinite
short circuit to ground or to any voltage level up to 25 volts.
For data transmission lines (TxD, RxD and their secondary channel
equivalents) logic one is defined as a negative voltage, the signal condition
is called marking, and has the functional significance. Logic zero is positive
and the signal condition is termed spacing. Control signals are logically
inverted with respect to what one sees on the data transmission lines. When
one of these signals is active, the voltage on the line will be between +3 to
+15 volts. The inactive state for these signals is the opposite voltage
condition, between 3 and 15 volts. Examples of control lines include
request to send (RTS), clear to send (CTS), data terminal ready (DTR), and
data set ready (DSR).
Because the voltage levels are higher than logic levels typically used by
integrated circuits, special intervening driver circuits are required to translate
logic levels. These also protect the device's internal circuitry from short
circuits or transients that may appear on the RS-232 interface, and provide
sufficient current to comply with the slew rate requirements for data
transmission.
MAX232:
This chip is used when interfacing micro controller with PC to check the
Baud rate and changes the voltage level because micro controller is TTL
compatible whereas PC is CMOS compatible. The MAX 232 IC contains the
necessary drivers{two} and receivers {two}, to adapt the RS- 232 signal
voltage levels to TTL logic.It became popular,because it just needs one
voltage{+5V} and generates the necessary RS-232 voltage levels{approx -
10V AND +10V} internally.This greatly simplified the design of
circuitry.And this made the IC so popular.MAX232 is just a
driver/receiver.It does not generate the necessary RS-232 sequence of marks
and spaces with the right timing,it does not decode RS-232 signal, it does
not provide a serial /parallel conversion.All it does is to convert signal
voltage levels.

GSM Voice & Data Transceiver (GSM MODEM)
What is a GSM Modem?
A GSM modem is a wireless modem that works with a GSM wireless
network. A wireless modem behaves like a dial-up modem. The main
difference between them is that a dial-up modem sends and receives data
through a fixed telephone line while a wireless modem sends and receives
data through radio waves.
A GSM modem can be an external device or a PC Card / PCMCIA Card.
Typically, an external GSM modem is connected to a computer through a
serial cable or a USB cable. A GSM modem in the form of a PC Card /
PCMCIA Card is designed for use with a laptop computer. It should be
inserted into one of the PC Card / PCMCIA Card slots of a laptop computer.
Like a GSM mobile phone, a GSM modem requires a SIM card from a
wireless carrier in order to operate.
Computers/MCUs use AT commands to control modems. Both GSM
modems and dial-up modems support a common set of standard AT
commands. You can use a GSM modem just like a dial-up modem.
In addition to the standard AT commands, GSM modems support an
extended set of AT commands. These extended AT commands are defined
in the GSM standards. With the extended AT commands, you can do things
like:
Reading, writing and deleting SMS messages.
Sending SMS messages.
Monitoring the signal strength.
Monitoring the charging status and charge level of the battery.
Reading, writing and searching phone book entries.
IR Reflector Sensor
An IR transmitter or source converts an electrical signal to an optical
signal. A receiver or detector converts optical power into electrical current
by detecting the photon flux incident on the detector surface.

IR Reflector Circuit
This Circuit works on reflection of white surface. There are two cases, In
First case when IR LED emits IR rays and reflects from white surface then it
is received by photodiode. When IR rays fall on photodiode then it passes
5V to base of transistor (BC 547).Transistor gets turn on and passes 5V from
collector to emitter. The output of reflector circuit is 0. This zero send to
MCU then MCU take action according to condition which is written in
program.
In second case when IR LED emits IR rays and absorb by black surface then
it is not received by photodiode. Photodiode remains OFF and it is not pass
5V to base of transistor (BC 547).Transistor remains OFF. The output of
reflector circuit is 1.This one send to MCU then MCU take action according
to condition which is written in program.

Touch Sensor
Touch sensor are devices which are used to detect a contact between the sensor and
an object.
Touch and tactile sensor are devices which measures the parameters of a contact
between the sensor and an object. This interaction obtained is confined to a small
defined region. This contrasts with a force and torque sensor that measures the
total forces being applied to an object. In the consideration of tactile and touch
sensing, the following definitions are commonly used:
Touch Sensing
This is the detection and measurement of a contact force at a defined point. A
touch sensor can also be restricted to binary information, namely touch, and no
touch.
Tactile Sensing
This is the detection and measurement of the spatial distribution of forces
perpendicular to a predetermined sensory area, and the subsequent interpretation of
the spatial information. A tactile-sensing array can be considered to be a
coordinated group of touch sensors.
Touch Sensor Circuit Used in our Project
This circuit is combination of transistor and resistors. It used to make a touch
sensor for security of home, gadgets and vehicles. In this circuit, when we touch
the strip then first transistor Q1 gets turn ON.Q1 Passes the VCC to the base of
second transistor Q2 then it turns ON the Q2. It gives the low output at the
collector of second transistor. This output will be sent to MCU unit. After getting
low output from circuit, MCU gives command to the alarm for its activation.
Fire Sensor
There are so many methods of fire detection technology. In the 1960s smoke
detectors began to increase in popularity in commercial systems. And there was a
problem of false alarm. Other researches were made to the fire detection
technology. Some of which were based on heat sensing, temperature sensing. One
scheme was multi-mode detection which provides a single bit of information. Has
the concentration of particles exceeded the threshold level? If yes, there is a fire
and if no, there is not. To make better decision for non-(unwanted) fire sources we
need to collect more bits of information. This can be rate of change of signal or
combination of signals from different sensors particle concentration and
temperature and CO level. All current fire sensors are intended to be general
purpose; that is, to detect any fire within the protected space. In some cases, it is
possible to tailor the sensor to a specific characteristic of the principle fuel. An
example is the use of hydrogen chloride sensors in telephone exchanges. They will
quickly detect cable fires, but will ignore a burning printed circuit board (unless it
contains chlorine in a coating). It also is possible to look for a compound that is
intentionally added to items so that it is released when they burn or simply
overheat. NASA is currently exploring this technology for the space station
project.
Here in our project a heat sensor is used as fire sensor. A thermistor is used as heat
sensor.
A thermistor is a type of resistor whose resistance varies significantly with
temperature, more so than in standard resistors.













Regulated Power Supply














Power supplies are designed to convert high voltage AC mains to a suitable low
voltage supply for electronic circuits and other devices. A power supply can be
broken down into a series of blocks, each of which performs a particular function.
For example a 5V regulated supply:

Each of the blocks has its own function as described below
1. Transformer steps down high voltage AC mains to low voltage AC.
2. Rectifier converts AC to DC, but the DC output is varying.
3. Smoothing smoothes the DC from varying greatly to a small ripple.
4. Regulator eliminates ripple by setting DC output to a fixed voltage.
Transformer
Transformers convert AC electricity from one voltage to another with little loss of
power. Transformers work only with AC and this is one of the reasons why mains
electricity is AC. The two types of transformers
Step-up transformers increase voltage,
Step-down transformers reduce voltage.

Most power supplies use a step-down transformer to reduce the
dangerously high mains voltage (230V in UK) to a safer low voltage. The
input coil is called the primary and the output coil is called the secondary.
There is no electrical connection between the two coils, instead they are
linked by an alternating magnetic field created in the soft-iron core of the
transformer. The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the
power in. Note that as voltage is stepped down current is stepped up. The ratio of
the number of turns on each coil, called the turn ratio, determines the ratio of the
voltages. A step-down transformer has a large number of turns on its primary
(input) coil which is connected to the high voltage mains supply, and a small
number of turns on its secondary (output) coil to give a low output voltage.
Turns Ratio =



And Power Out = Power In
Vs Is = Vp Ip
Where
Vp = primary (input) voltage
Np = number of turns on primary coil
Ip = primary (input) current
Ns = number of turns on secondary coil
Is = secondary (output) current
Vs = secondary (output) voltage


Bridge Rectifier
A bridge rectifier can be made using four individual diodes, but it is also available
in special packages containing the four diodes required. It is called a full-wave
rectifier because it uses all AC wave (both positive and negative sections). 1.4V is
used up in the bridge rectifier because each diode uses 0.7V when conducting and
there are always two diodes conducting, as shown in the diagram below. Bridge
rectifiers are rated by the maximum current they can pass and the maximum
reverse voltage they can withstand (this must be at least three times the supply
RMS voltage so the rectifier can withstand the peak voltages). In this alternate
pairs of diodes conduct, changing over the connections so the alternating directions
of AC are converted to the one direction of DC.


OUTPUT Full-wave Varying DC
SMOOTHING
Smoothing is performed by a large value electrolytic capacitor connected across
the DC supply to act as a reservoir, supplying current to the output when the
varying DC voltage from the rectifier is falling. The diagram shows the
unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The
capacitor charges quickly near the peak of the varying DC, and then discharges as
it supplies current to the output.


Note that smoothing significantly increases the average DC voltage to almost the
peak value (1.4 RMS value). For example 6V RMS AC is rectified to full wave
DC of about 4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing
this increases to almost the peak value giving 1.4 4.6 = 6.4V smooth DC.
Smoothing is not perfect due to the capacitor voltage falling a little as it discharges,
giving a small ripple voltage. For many circuits a ripple which is 10% of the
supply voltage is satisfactory and the equation below gives the required value for
the smoothing capacitor. A larger capacitor will give fewer ripples. The capacitor
value must be doubled when smoothing half-wave DC.
Smoothing capacitor for 10% ripple, C = 5 Io
Vs f
Where
C = smoothing capacitance in farads (F)
Io = output current from the supply in amps (A)
Vs = supply voltage in volts (V), this is the peak value of the unsmoothed DC
f = frequency of the AC supply in hertz (Hz), 50Hz in the UK

REGULATOR


Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable
output voltages. They are also rated by the maximum current they can pass.
Negative voltage regulators are available, mainly for use in dual supplies. Most
regulators include some automatic protection from excessive current (overload
protection') and overheating (thermal protection'). Many of the fixed voltage
regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V 1A
regulator shown on the right. They include a hole for attaching a heat sink if
necessary.
Working of Power Supply
Transformer



The low voltage AC output is suitable for lamps, heaters and special AC motors. It
is not suitable for electronic circuits unless they include a rectifier and a smoothing
capacitor.
Transformer + Rectifier


The varying DC output is suitable for lamps, heaters and standard motors. It is not
suitable for electronic circuits unless they include a smoothing capacitor.
Transformer + Rectifier + Smoothing


The smooth DC output has a small ripple. It is suitable for most electronic circuits.
Transformer + Rectifier + Smoothing + Regulator

The regulated DC output is very smooth with no ripple. It is suitable for all
electronic circuits.
D2
C1
1000uf
1N4007
+5V
V
LM7805
1 2
3
VIN VOUT
G
N
D
J1
1
2
3
D3
gnd
D4
D1



Microcontroller 8051 Family







In our day to day life the role of micro-controllers has been immense. They are
used in a variety of applications ranging from home appliances, FAX machines,
Video games, Camera, Exercise equipment, Cellular phones musical Instruments
to Computers, engine control, aeronautics, security systems and the list goes on.
Microcontroller versus Microprocessors
What is the difference between a microprocessor and microcontroller? The
microprocessors (such as 8086, 80286, 68000 etc.) contain no RAM, no ROM and
no I/O ports on the chip itself. For this reason they are referred as general- purpose
microprocessors. A system designer using general- purpose microprocessor must
add external RAM, ROM, I/O ports and timers to make them functional. Although
the addition of external RAM, ROM, and I/O ports make the system bulkier and
much more expensive, they have the advantage of versatility such that the designer
can decide on the amount of RAM, ROM and I/o ports needed to fit the task at
hand. This is the not the case with microcontrollers. A microcontroller has a CPU
(a microprocessor) in addition to the fixed amount of RAM, ROM, I/O ports, and
timers are all embedded together on the chip: therefore, the designer cannot add
any external memory, I/O, or timer to it. The fixed amount of on chip RAM, ROM,
and number of I/O ports in microcontrollers make them ideal for many applications
in which cost and space are critical. In many applications, for example a TV
remote control, there is no need for the computing power of a 486 or even a 8086
microprocessor. In many applications, the space it takes, the power it consumes,
and the price per unit are much more critical considerations than the computing
power. These applications most often require some I/O operations to read signals
and turn on and off certain bits. It is interesting to know that some
microcontrollers manufactures have gone as far as integrating an ADC and other
peripherals into the microcontrollers.
Microcontrollers for Embedded Systems
In the literature discussing microprocessors, we often see a term embedded system.
Microprocessors and microcontrollers are widely used in embedded system
products. An embedded product uses a microprocessor (or microcontroller) to do
one task and one task only. A printer is an example of embedded system since the
processor inside it performs one task only: namely, get data and print it.
Contrasting this with a IBM PC which can be used for a number of applications
such as word processor, print server, network server, video game player, or internet
terminal. Software for a variety of applications can be loaded and run. Of course
the reason a PC can perform myriad tasks is that it has RAM memory and an
operating system that loads the application software into RAM and lets the CPU
run it. In an embedded system, there is only one application software that is burned
into ROM. A PC contains or is connected to various embedded products such as
the keyboard, printer, modem, disk controller, sound card, CD-ROM drive, mouse
and so on. Each one of these peripherals has a microcontroller inside it that
performs only one task. For example, inside every mouse there is a microcontroller
to perform the task of finding the mouse position and sending it to the PC.
Although microcontrollers are the preferred choice for many embedded systems,
there are times that a microcontroller is inadequate for the task. For this reason, in
many years the manufacturers for general-purpose microprocessors have targeted
their microprocessor for the high end of the embedded market.
A brief history of 8051 Family
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 four ports (8-bit) all on a single chip. The 8051 is an 8-
bit processor, meaning the CPU can work on only 8- bit pieces to be processed by
the CPU. The 8051 has a total of four I/O ports, each 8- bit wide. Although 8051
can have a maximum of 64K bytes of on-chip ROM, many manufacturers put only
4K bytes on the chip.
The 8051 became widely popular after Intel allowed other manufacturers to make
any flavor of the 8051 they please with the condition that they remain code
compatible with the 8051. This has led to many versions of the 8051 with different
speeds and amount of on-chip ROM marketed by more than half a dozen
manufacturers. It is important to know that although there are different flavors of
the 8051, they are all compatible with the original 8051 as far as the instructions
are concerned. This means that if you write your program for one, it will run on
any one of them regardless of the manufacturer. The major 8051 manufacturers are
Intel, Atmel, Dallas Semiconductors, Philips Corporation, Infineon.
8051 microcontroller
The 8051 is the original member of the 8051 family. Intel refers to it as MCS-51.
Other members of the 8051 family
There are two other members in the 8051 family of microcontrollers. They are the
8052 and the 8031.
Comparison of 8051 Family Members
Feature 8051 8052 8031
ROM (On Chip) 4K 8K 0K
RAM (Bytes) 128 256 128
Timers 2 3 2
I/O Pins 32 32 32
Serial Port 1 1 1
Interrupt Sources 6 8 6

Versions of 8051 from Atmel
Part Number ROM RAM I/O Pins Timers Interrupts V
cc

AT89C51 4K 128 32 2 6 5V
AT89LV51 4K 128 32 2 6 3V
AT89C1051 1K 64 15 1 3 3V
AT89C2051 2K 128 15 2 6 3V
AT89C52 8K 128 32 3 8 5V
AT89LV52 8K 128 32 3 8 3V

AT89C51 from ATMEL Corporation:
This popular 8051 chip has on-chip ROM in the form of flash memory. This is
ideal for fast development since flash memory can be erased in seconds compared
to twenty minutes or more needed for the earlier versions of the 8051. To use the
AT89C51 to develop a microcontroller-based system requires a ROM burner that
supports flash memory: However, a ROM eraser is not needed. Notice that in flash
memory you must erase the entire contents of ROM in order to program it again.
The PROM burner does this erasing of flash itself and this is why a separate burner
is not needed. To eliminate the need for a PROM burner Atmel is working on a
version of the AT89C51 that can be programmed by the serial COM port of the
PC.

Atmel Microcontroller AT89C51
Hardware features
40 pin IC
4 Kbytes of Flash
128 Bytes of RAM
32 I/O lines
Two16-Bit Timer/Counters
Two-Level Interrupt Architecture
Full Duplex Serial Port
On Chip Oscillator and Clock Circuitry
Software features
Bit Manipulations
Single Instruction Manipulation
Separate Program And Data Memory
4 Bank Of Temporary Registers
Direct, Indirect, Register and Relative Addressing.
In addition, the AT89C51 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.
The Atmel Flash devices are ideal for developing, since they can be reprogrammed
easy and fast. If we need more code space for our application, particularly for
developing 89Cxx projects with C language. Atmel offers a broad range of
microcontrollers based on the 8051 architecture, with on-chip Flash program
memory.

Internal Architecture of AT89C51
Pin description
The 89C51 have a total of 40 pins that are dedicated for various functions such as
I/O, RD, WR, address and interrupts. Out of 40 pins, a total of 32 pins are set aside
for the four ports P0, P1, P2, and P3, where each port takes 8 pins. The rest of the
pins are designated as V
cc
, GND, XTAL1, XTAL, RST, EA, and PSEN. All these
pins except PSEN and ALE are used by all members of the 8051 and 8031
families. In other words, they must be connected in order for the system to work,
regardless of whether the microcontroller is of the 8051 or the 8031 family. The
other two pins, PSEN and ALE are used mainly in 8031 based systems.

V
cc

Pin 40 provides supply voltage to the chip. The voltage source is +5V.
GND
Pin 20 is the ground.
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier which can be configured for use as an on-chip oscillator, as shown in
Figure. Either a quartz crystal or ceramic resonator may be used. To drive the
device from an external clock source, XTAL2 should be left unconnected while
XTAL1 is driven as shown in Figure.

Oscillator Connections
It must be noted that there are various speeds of the 8051 family. Speed refers to
the maximum oscillator frequency connected to the XTAL. For example, a 12
MHz chip must be connected to a crystal with 12 MHz frequency or less.
Likewise, a 20 MHz microcontroller requires a crystal frequency of no more than
20 MHZ. When the 8051 is connected to a crystal oscillator and is powered up, we
can observe the frequency on the XTAL2 pin using oscilloscope.
RST
Pin 9 is the reset pin. It is an input and is active high (normally low). Upon
applying a high pulse to this pin, the microcontroller will reset and terminate all
activities. This is often referred to as a power on reset. Activating a power-on
reset will cause all values in the registers to be lost. Notice that the value of
Program Counter is 0000 upon reset, forcing the CPU to fetch the first code from
ROM memory location 0000. This means that we must place the first line of source
code in ROM location 0000 that is where the CPU wakes up and expects to find
the first instruction. In order to RESET input to be effective, it must have a
minimum duration of 2 machine cycles. In other words, the high pulse must be
high for a minimum of 2 machine cycles before it is allowed to go low.
EA
All the 8051 family members come with on-chip ROM to store programs. In such
cases, the EA pin is connected to the V
cc
. For family members such as 8031 and
8032 in which there is no on-chip ROM, code is stored on an external ROM and is
fetched by the 8031/32. Therefore for the 8031 the EA pin must be connected to
ground to indicate that the code is stored externally. EA, which stands for external
access, is pin number 31 in the DIP packages. It is input pin and must be
connected to either V
cc
or GND. In other words, it cannot be left unconnected.
PSEN
This is an output pin. PSEN stands for program store enable. It is the read strobe
to external program memory. When the microcontroller is executing from external
memory, PSEN is activated twice each machine cycle.
ALE
ALE (Address latch enable) is an output pin and is active high. When connecting a
microcontroller to external memory, port 0 provides both address and data. In other
words the microcontroller multiplexes address and data through port 0 to save pins.
The ALE pin is used for de-multiplexing the address and data by connecting to the
G pin of the 74LS373 chip.
I/O port pins and their functions
The four ports P0, P1, P2, and P3 each use 8 pins, making them 8-bit ports. All the
ports upon RESET are configured as output, ready to be used as output ports. To
use any of these as input port, it must be programmed.
Port 0
Port 0 occupies a total of 8 pins (pins 32 to 39). It can be used for input or output.
To use the pins of port 0 as both input and output ports, each pin must be
connected externally to a 10K-ohm pull-up resistor. This is due to fact that port 0 is
an open drain, unlike P1, P2 and P3. With external pull-up resistors connected
upon reset, port 0 is configured as output port. In order to make port 0 an input
port, the port must be programmed by writing 1 to all the bits of it. Port 0 is also
designated as AD0-AD7, allowing it to be used for both data and address. When
connecting a microcontroller to an external memory, port 0 provides both address
and data. The microcontroller multiplexes address and data through port 0 to save
pins. ALE indicates if P0 has address or data. When ALE=0, it provides data D0-
D7, but when ALE=1 it has address A0-A7. Therefore, ALE is used for de-
multiplexing address and data with the help of latch 74LS373.
Port 1
Port 1 occupies a total of 8 pins (pins 1 to 8). It can be used as input or output. In
contrast to port 0, this port does not require pull-up resistors since it has already
pull-up resistors internally. Upon reset, port 1 is configures as an output port.
Similar to port 0, port 1 can be used as an input port by writing 1 to all its bits.
Port 2
Port 2 occupies a total of 8 pins (pins 21 to 28). It can be used as input or output.
Just like P1, port 2 does not need any pull-up resistors since it has pull-up resistors
internally. Upon reset port 2 is configured as output port. To make port 2 as input
port, it must be programmed as such by writing 1s to it.
Port 3
Port 3 occupies a total of 8 pins (pins 10 to 17). It can be used as input or output.
P3 does not need any pull-up resistors, the same as P1 and P2 did not. Although
port 3 is configured as output port upon reset, this is not the way it is most
commonly used. Port 3 has an additional function of providing some extremely
important signals such as interrupts. Some of the alternate functions of P3 are
listed below:
P3.0 RXD (Serial input)
P3.1 TXD (Serial output)
P3.2 INT0 (External interrupt 0)
P3.3 INT1 (External interrupt 1)
P3.4 T0 (Timer 0 external input)
P3.5 T1 (Timer 1 external input)
P3.6 WR (External memory write strobe)
P3.7 RD (External memory read strobe)
Memory Space Allocation
Internal ROM
The 89C51 has 4K bytes of on-chip ROM. This 4K bytes ROM memory has
memory addresses of 0000 to 0FFFh. Program addresses higher than 0FFFh, which
exceed the internal ROM capacity, will cause the microcontroller to automatically
fetch code bytes from external memory. Code bytes can also be fetched exclusively
from an external memory, addresses 0000h to FFFFh, by connecting the external
access pin to ground. The program counter doesnt care where the code is: the
circuit designer decides whether the code is found totally in internal ROM, totally
in external ROM or in a combination of internal and external ROM.
Internal RAM
The 128 bytes of RAM inside the 8051 are assigned addresses 00 to 7Fh. These
128 bytes can be divided into three different groups as follows:
1. A total of 32 bytes from locations 00 to 1Fh are set aside for register
banks and the stack.
2. A total of 16 bytes from locations 20h to 2Fh are set aside for bit
addressable read/write memory and instructions.
A total of 80 bytes from locations 30h to 7Fh are used for read and write storage,
or what is normally called a scratch pad. These 80 locations of RAM are widely
used for the purpose of storing data and parameters by 8051 programmers.
Serial Communication
Data Communication Concepts
Within a microcomputer data is transferred in parallel, because that is the fastest
way to do it. For transferring data over long distances, however, parallel data
transmission requires too many wires. Therefore, data to be sent long distances is
usually converted from parallel form to serial form so that it can be sent on a single
wire or pair of wires. Serial data received from a distant source is converted to
parallel form so that it can be easily transferred on the microcomputer buses.
Serial Interface
Basic concepts concerning the serial communication can be classified into
categories below:
Interfacing requirements
Transmission format
Error check in data communication
Standards in serial I/O
Interfacing Requirements:
The serial interface requirement is very much similar to parallel interface
requirement. Computer identifies the peripheral through port address and enable if
using the read and write signals. The primary difference between the parallel I/O
and serial I/O is the number of lines used for data transfer. Parallel I/O requires the
entire bus while the serial I/O requires only one or pair of data lines for
communication.
Transmission Format:
Transmission format for communication is concerned with the issues such as
synchronization, direction of data flow, speed, errors and medium of transmission.
Serial data can be sent synchronously or asynchronously.
Serial Transmission Methods
Serial Communication, like any data transfer, requires coordination between the
sender and receiver. For example, when to start the transmission and when to end
it, when one particular bit or byte ends and another begins, when the receiver's
capacity has been exceeded, and so on. A protocol defines the specific methods of
coordinating transmission between a sender and receiver.
Two serial transmission methods are used that correct serial bit errors. The first
one is synchronous communication, the sending and receiving ends of the
communication are synchronized using a clock that precisely times the period
separating each bit. By checking the clock the receiving end can determine if a bit
is missing or if an extra bit (usually electrically induced) has been introduced in the
stream. Here is an example of this method of communication, lets say that on a
conveyor belt a product is passing through a sensing device every 5 seconds, if the
sensing device senses something in between the 5 second lap it assumes that
whatever is passing is a foreign object of some sorts and sounds an alarm, if on the
5 second lap nothing goes by it assumes that the product is missing and sounds an
alarm. One important aspect of this method is that if either end of the
communication loses its clock signal, the communication is terminated.
The alternative method (used in PCs) is to add markers within the bit stream to
help track each data bit. By introducing a start bit which indicates the start of a
short data stream, the position of each bit can be determined by timing the bits at
regular intervals, by sending start bits in front of each 8 bit streams, the two
systems don't have to be synchronized by a clock signal, the only important issue is
that both systems must be set at the same port speed. When the receiving end of the
communication receives the start bit it starts a short term timer. By keeping
streams short, there's not enough time for the timer to get out of sync. This method
is known as asynchronous communication because the sending and receiving end
of the communication are not precisely synchronized by the means of a signal line.
Each stream of bits are broke up in 5 to 8 bits called words. Usually in the PC
environment you will find 7 or 8 bit words, the first is to accommodate all upper
and lower case text characters in ASCII codes (the 127characters) the latter one is
used to exactly correspond to one byte. By convention, the least significant bit of
the word is sent first and the most significant bit is sent last. When communicating
the sender encodes the each word by adding a start bit in front and 1 or 2 stop bits
at the end. Sometimes it will add a parity bit between the last bit of the word and
the first stop bit, this used as a data integrity check.
This is often referred to as a data frame. Five different parity bits can be used, the
mark parity bit is always set at a logical 1, the space parity bit is always set at a
logical 0, the even parity bit is set to logical 1 by counting the number of bits in the
word and determining if the result is even, in the odd parity bit, the parity bit is set
to logical 1 if the result is odd. The later two methods offer a means of detecting
bit level transmission errors. Note that you don't have to use parity bits, thus
eliminating 1 bit in each frame, this is often referred to as non parity bit frame.

Asynchronous Serial Data Frame (8E1)
In the example above you can see how the data frame is composed of and
synchronized with the clock signal. This example uses an 8 bit word with even
parity and 1 stop bit also referred to as an 8E1 setting.
Bit Rates
Another important part of every asynchronous serial signal is the bit rate at which
the data is transmitted. The rates at which the data is sent is based on the minimum
speed of 300 bps (bits per second), you may find some slower speeds of 50, 100
and 150 bps, but these are not used in todays technologies. Faster speeds are all
based on the 300 bps rate, you merely double the preceding rate, so the rates are as
follows, 600, 1200, 2400, 4800, 9600, 19200 and 38400 which is the fastest speed
supported by todays BIOSs.
Asynchronous Serial Communication:
This section provides an overview of the protocol that governs the lowest level of
data transmission--how serialized bits are sent over a single electrical line. This
standard rests on more than a century of evolution in teleprinter technology.
When a sender is connected to a receiver over an electrical connecting line, there is
an initial state in which communication has not yet begun, called the idle or mark
state. Because older electromechanical devices operate more reliably with current
continually passing through them, the mark state employs a positive voltage level.
Changing the state of the line by shifting the voltage to a negative value is called a
space. Once this change has occurred, the receiver interprets a negative voltage
level as a 0 bit, and a positive voltage level as a 1 bit. These transitions are shown
in figure. The change from mark to space is known as the start bit, and this triggers
the synchronization necessary for asynchronous serial transmission. The start bit
delineates the beginning of the transmission unit defined as a character frame. The
receiver then samples the voltage level at periodic intervals known as the bit time,
to determine whether a 0-bit or a 1-bit is present on the line.


The Format of Serialized Bits [Missing Image]
The bit time is expressed in samples per second, known as baud (in honor of
telecommunication pioneer Emile Baudot). This sampling rate must be agreed
upon by sender and receiver prior to start of transmission in order for a successful
transfer to occur. Common values for the sampling rate are 1200 baud and 2400
baud. In the case where one sampling interval can signal a single bit, a baud rate of
1200 results in a transfer rate of 1200 bits per second (bps). Note that because
modern protocols can express more than one bit value within the sampling interval,
the baud rate and the data rate (bps) are not always identical.
Prior to transmission, the sender and receiver agree on a serial data format; that is,
how many bits of data constitute a character frame, and what happens after those
bits are sent. The Serial Driver supports frames of 5, 6, 7, or 8 bits in length.
Character frames of 7 or 8 data bits are commonly used for transmitting ASCII
characters.
After the data bits in the frame are sent, the sender can optionally transmit a parity
bit for error-checking. There are various parity schemes, which the sender and
receiver must agree upon prior to transmission. In odd parity, a bit is sent so that
the entire frame always contains an odd number of 1 bit. Conversely, in even
parity, the parity bit results in an even number of 1 bit. No parity means that no
additional bit is sent. Other less-used parity schemes include mark parity, in which
the extra bit is always 1, and space parity, in which its value is always 0. Using
parity bits for error checking, regardless of the scheme, is now considered a
rudimentary approach to error detection. Most communication systems employ
more reliable techniques for error detection and correction.
To signify the end of the character frame, the sender places the line back to the
mark state (positive voltage) for a minimum specified time interval. This interval
has one of several possible values: 1 bit time, 2 bit times, or 1-1/2 bit times. This
signal is known as the stop bit, and returns the transmission line back to idle status.
Electrical lines are always subject to environmental perturbations known as noise.
This noise can cause errors in transmission, by altering voltage levels so that a bit
is reversed (flipped), shortened (dropped), or lengthened (added). When this
occurs, the ability of the receiver to distinguish a character frame may be affected,
resulting in a framing error.
The break signal is a special signal that falls outside the character frame. The
break signal occurs when the line is switched from mark (positive voltage) to space
(negative voltage) and held there for longer than a character frame. The break
signal resembles an ASCII NUL character (a string of 0-bits), but exists at a lower
level than the ASCII encoding scheme (which governs the encoding of information
within the character frame
Error Check In Data Communication
During transmission, various types of errors can occur. These errors need to be
checked, therefore, additional information for error checking is sent during
transmission the receiver can check the received data against the error check
information, and if the error is detected, the receiver can request there
retransmission of that data segment. Three methods generally used for this purpose
are parity check, checksum and redundancy check
Standard in Serial I/O
The serial I/O technique is commonly used to interface terminals, printers etc. a
standard is normally defined by a professional organization (such as IEEE). A
standard may include such items as assignment of pin positions for signals, voltage
levels, speed of data transfer, length of cable and mechanical specifications. When
data are transmitted as voltage, the commonly used standard is known as RS232C.
It is defined as reference to data terminal equipment (DTE) and data
communication equipment (DCE). The rate of transmission is RS232C is restricted
to a maximum of 20k baud and a distance of 50 feet.
8051 Serial Communication Programming
Baud Rate in The 8051
The 8051 transfers and receives data serially at many different baud rates. The
baud rate in the 8051 is programmable. This is done with the help of timer 1
Frequency of XTAL = 11.0592 MHZ
Machine cycle frequency = 11.0592/12= 921.6 KHZ.
The 8051s serial communication UART circuitry divides the machine cycle
frequency of 921.6 kHz by 32 once more before it is used by timer1 to set the baud
rate .result is 28,800 HZ. This value is used to find the timer 1 value to set the bad
rate. When timer 1 is used to set the baud rate it must be programmed in mode 2,
that is 8 bit, auto-reload.
Counter/Timer Programming
The 8051 has two timers/counters. They can be used either as timers to generate a
time delay or as counters to count events happening outside the microcontroller.
These timers are, timer 0 and timer 1.both are 16 bits wide, and each 16 bit timer is
accessed as two separate registers of low byte and high byte.
Timer 0 Register
The low byte register is called TL0 and the high byte register is referred to as TH0.
For e.g.: the instruction MOV TL0, # 4FHmoves the value 4FH in to TL0, the
low byte of timer 0.

D1
5
D1
4
D1
3
D1
2
D1
1
D1
0
D
9
D
8
D
7
D
6
D
5
D
4
D
3
D
2
D
1
D
0
Timer 1 Register
Timer 1 is also 16 bits, and it is split in to TL1 & TH1.

D1
5
D1
4
D1
3
D1
2
D1
1
D1
0
D
9
D
8
D
7
D
6
D
5
D
4
D
3
D
2
D
1
D
0

TH1 TL1
TMOD (Timer Mode) Register (20h)
Both timers 0 & 1 use the same register, called TMOD,to set the various timer
operation modes.TMOD is an 8-bit register in which the lower 4 bits are set aside
for timer 0 and the upper 4 bits are set aside for timer 1. In each case, the lower 2
bits are used to set the timer mode and upper 2 bits to specify the operation.
(MSB) (LSB)
GATE C/T M1 M0 GATE C/T M1 M0
.Timer 1 Timer 0
M1 M0 Mode Operating Mode
0 0 M0 13-Bit Timer Mode
0 1 M1 16-Bit Timer Mode
1 0 M2 8-Bit auto reload
1 1 M3 Split timer mode

C/T = 0 for Timer
= 1 for Counter
GATE = 0 When on/off is done by software
= 1 when additional hardware is needed for on/off.
SBUF Register
SBUF is an 8 bit register used solely for special communication in the 8051.for a
byte of data to be transferred via the TxD line; it must be placed in the SBUF
register. Similarly, SBUF holds the byte of data when it is received by the 8051s
RxD line.SBUF can be accessed like any other register in the 8051.
SCON (Serial Control) Register (50 H)
The SCON register is an 8 bit register used to program the start bit, stop bit, and
data bits of data framing, among other things. The following describes various bits
of the SCON register.
SM0 SM1 SM2 REN TB8 RB8 T1 R1

SM0 Serial port mode spcifier
SM1 Serial port mode spcifier
SM2 Used for multiprocessor communication
REN Set/cleared by software to enable/disable reception
TB8 Not widely used
RB8 Not widely used
T1 Transmit interrupt flag
R1 Receive interrupt flag
SM1 SM0 Mode Operating Mode
0 0 Serial Mode 0 8-bit fixed Baud rate mode
0 1 Serial Mode 1, 8 bit data, 1 stop bit, 1
start bit
8-bit variable Baud rate
mode
1 0 Serial Mode 2 9-bit fixed Baud rate mode
1 1 Serial Mode 3 9-bit variable Baud rate
mode




Display Unit
(Liquid Crystal Display)





Liquid crystal displays (LCD) are widely used in recent years as compares to
LEDs. This is due to the declining prices of LCD, the ability to display numbers,
characters and graphics, incorporation of a refreshing controller into the LCD, their
by relieving the CPU of the task of refreshing the LCD and also the ease of
programming for characters and graphics. HD 44780 based LCDs are most
commonly used.
The LCD, which is used as a display in the system, is LMB162A. The main
features of this LCD are: 16 X 2 display, intelligent LCD, used for alphanumeric
characters & based on ASCII codes. This LCD contains 16 pins, in which 8 pins
are used as 8-bit data I/O, which are extended ASCII. Three pins are used as
control lines these are Read/Write pin, Enable pin and Register select pin. Two
pins are used for Backlight and LCD voltage, another two pins are for Backlight &
LCD ground and one pin is used for contrast change.
LCD pin description
Pin Symbol I/O Description
1 VSS - Ground
2 VCC - +5V power supply
3 VEE - Power supply to control contrast
4 RS I RS=0 to select command register, RS=1 to select data
register.
5 R/W I R/W=0 for write, R/W=1 for read
6 E I/O Enable
7 DB0 I/O The 8 bit data bus







LCD pin description
The LCD discuss in this section has the most common connector used for the
Hitachi 44780 based LCD is 14 pins in a row and modes of operation and how to
program and interface with microcontroller is describes in this section.


LCD Pin Description Diagram
V
CC
, V
SS
, V
EE

Vcc
16
15
14
13
12
11
10
9
8
6
5
4
3
2
1
7
16
15
14
13
12
11
10
9
8
6
5
4
3
2
1
7
D7
E
Vcc
D4
Contrast
RS
Gnd
R/W
Gnd
D0
D3
D6
D5
1
3
2
D2
D1
8 DB1 I/O The 8 bit data bus
9 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
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
The voltage V
CC
and V
SS
provided by +5V and ground respectively while V
EE
is
used for controlling LCD contrast. Variable voltage between Ground and V
cc
is
used to specify the contrast (or "darkness") of the characters on the LCD screen.
RS (register select)
There are two important registers inside the LCD. The RS pin is used for their
selection as follows. If RS=0, the instruction command code register is selected,
then allowing to user to send a command such as clear display, cursor at home etc..
If RS=1, the data register is selected, allowing the user to send data to be displayed
on the LCD.
R/W (read/write)
The R/W (read/write) input allowing the user to write information from it. R/W=1,
when it read and R/W=0, when it writing.
EN (enable)
The enable pin is used by the LCD to latch information presented to its data pins.
When data is supplied to data pins, a high power, a high-to-low pulse must be
applied to this pin in order to for the LCD to latch in the data presented at the data
pins.
D0-D7 (data lines)
The 8-bit data pins, D0-D7, are used to send information to the LCD or read the
contents of the LCDs internal registers. To displays the letters and numbers, we
send ASCII codes for the letters A-Z, a-z, and numbers 0-9 to these pins while
making RS =1. There are also command codes that can be sent to clear the display
or force the cursor to the home position or blink the cursor.
We also use RS =0 to check the busy flag bit to see if the LCD is ready to receive
the information. The busy flag is D7 and can be read when R/W =1 and RS =0, as
follows: if R/W =1 and RS =0, when D7 =1(busy flag =1), the LCD is busy taking
care of internal operations and will not accept any information. When D7 =0, the
LCD is ready to receive new information.
Interfacing of micro controller with LCD display
In most applications, the "R/W" line is grounded. This simplifies the application
because when data is read back, the microcontroller I/O pins have to be alternated
between input and output modes.
In this case, "R/W" to ground and just wait the maximum amount of time for each
instruction (4.1ms for clearing the display or moving the cursor/display to the
"home position", 160s for all other commands) and also the application software
is simpler, it also frees up a microcontroller pin for other uses. Different LCD
execute instructions at different rates and to avoid problems later on (such as if the
LCD is changed to a slower unit). Before sending commands or data to the LCD
module, the Module must be initialized. Once the initialization is complete, the
LCD can be written to with data or instructions as required. Each character to
display is written like the control bytes, except that the "RS" line is set. During
initialization, by setting the "S/C" bit during the "Move Cursor/Shift Display"
command, after each character is sent to the LCD, the cursor built into the LCD
will increment to the next position (either right or left). Normally, the "S/C" bit is
set (equal to "1")

Interfacing of Microcontroller with LCD
LCD Command Code
LCD
1234567891
0
1
1
1
2
1
3
1
4
1
5
1
6
8 Bit Data Bus
of LCD To MCU
Port
Control Pins of
LCD To MCU Port
Pins
VCC
Code
(HEX)
Command to LCD Instruction
Register
1 Clear the display screen
2 Return home
4 Decrement cursor(shift cursor to left)
6 Increment cursor(shift cursor to right)
7 Shift display right
8 Shift display left
9 Display off, cursor off
A Display off, cursor on
C Display on, cursor off
E Display on, cursor blinking
F Display on, cursor blinking
10 Shift cursor position to left
14 Shift cursor position to right


18 Shift the entire display to left
1C Shift the entire display to right
80 Force cursor to the beginning of 1
st
line
C0 Force cursor to the beginning of 2nd line
38 2 line and 57 matrix




Buzzer for Beep Source








A buzzer or beeper is an audio signaling device, which may
be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers
and beepers include alarm devices, timers and confirmation of user input
such as a mouse click or keystroke.

Buzzer
Mechanical Buzzer
A joy buzzer is an example of a purely mechanical buzzer.
A joy buzzer (also called a hand buzzer) is a practical joke device that
consists of a coiled spring inside a disc worn in the palm of the hand. When
the wearer shakes hands with another person, a button on the disc releases
the spring, which rapidly unwinds creating a vibration that feels somewhat
like an electric shock to someone not expecting it.
Electromechanical Buzzer
Early devices were based on an electromechanical system identical to
an electric bell without the metal gong. Similarly, a relay may be connected
to interrupt its own actuating current, causing the contacts to buzz. Often
these units were anchored to a wall or ceiling to use it as a sounding board.
The word "buzzer" comes from the rasping noise that electromechanical
buzzers made.
An electric bell is a mechanical bell that functions by means of
an electromagnet. When an electric current is applied, it produces a
repetitive buzzing or clanging sound. Electric bells have been widely used
at railroad crossings, in telephones, fire and burglar alarms, as school
bells, doorbells, and alarms in industrial plants, but they are now being
widely replaced with electronic sounders.

An electric buzzer uses a similar mechanism to an interrupter bell, but
without the resonant bell. They are quieter than bells, but adequate for a
warning tone over a small distance, such as across a desktop.
With the development of low cost electronics from the 1970s onwards, most
buzzers have now been replaced by electronic 'sounders'. These replace the
electromechanical striker of a bell with an electronic oscillator and a
loudspeaker, often a piezo transducer.
Piezoelectric buzzer

A piezoelectric element may be driven by an oscillating electronic circuit or
other audio signal source, driven with a piezoelectric audio amplifier.
Sounds commonly used to indicate that a button has been pressed are a click,
a ring or a beep.
Oscillation is the repetitive variation, typically in time, of some measure
about a central value (often a point of equilibrium) or between two or more
different states. Familiar examples include a
swinging pendulum and AC power. The term vibration is sometimes used
more narrowly to mean a mechanical oscillation but sometimes is used to be
synonymous with "oscillation". Oscillations occur not only in physical
systems but also in biological systems and in human society.
A piezoelectric audio amplifier (PAA) is a single integrated circuit or a PCB
developed to amplify small audio signals to
drive piezoelectric audio loudspeaker elements. A piezo audio amplifier can
amplify a small signal sine wave of 1 volt peak-to-peak to a signal of about
30 or 60 Volts.

Uses
Annunciate panels
Electronic metronomes
Game shows
Microwave ovens and other household appliances
Sporting events such as basketball games
Electrical alarms
Buzzers

Interfacing Circuit to MCU
VCC
To MCU
Input/Output Pin
LS1
BUZZER
1
2






TTL to RS232 Line-Driver
Module










Data Communication Concepts
Within a microcomputer data is transferred in parallel, because that is the
fastest way to do it. For transferring data over long distances, however,
parallel data transmission requires too many wires. Therefore, data to be sent
long distances is usually converted from parallel form to serial form so that
it can be sent on a single wire or pair of wires. Serial data received from a
distant source is converted to parallel form so that it can be easily transferred
on the microcomputer buses.
Serial Interface
Basic concepts concerning the serial communication can be classified into
categories below:
Interfacing requirements
Transmission format
Error check in data communication
Standards in serial I/O
Interfacing Requirements
The serial interface requirement is very much similar to parallel interface
requirement. Computer identifies the peripheral through port address and
enable if using the read and write signals. The primary difference between
the parallel I/O and serial I/O is the number of lines used for data transfer.
Parallel I/O requires the entire bus while the serial I/O requires only one or
pair of data lines for communication.
Transmission Format
Transmission format for communication is concerned with the issues such as
synchronization, direction of data flow, speed, errors and medium of
transmission. Serial data can be sent synchronously or asynchronously.
Synchronous Data Transmission
For synchronous data transmission data is sent in blocks at a constant rate.
The start and end of the block are identified with specific bytes or bit
patterns.
Asynchronous Data Transmission
For asynchronous transmission each data character has a bit which identifies
its start and 1 or 2 bits, which identifies its end. Since each character is
individually identified, characters can be sent at any time (asynchronously),
in the same way that a person types on a keyboard.
The asynchronous format is character oriented. Each character carries the
information of the start and stop bits. When no data is being transferred, a
receiver stage high at the logic 1 called mark; logic 0 is called space. The
transmission of data begins with one start bit (low) followed by a character
and one or two stop bits (high). This is known as framing. The asynchronous
format is generally used in low speed transmission (less than 20k bits/sec) in
serial I/O one bit is sent out at a time. Therefore how long the bit stays on or
off is determined by the speed at which bits are transmitted. The receiver
should be set up to receive the bits at the same rate of transmission;
otherwise the receiver may not be able to differentiate between the two
consecutive 0s and 1s.
The rate at which the bits are transmitted (bits/sec) is called baud. Each
equipment has its own baud requirements. The figure shown below shows
how the ASCII character A (41) will be transmitted with the 1200 baud
with the framing information of one start and one stop bit. The bit time
(delay between any two successive bits) is 0.83ms; this is determined by the
baud as follows.




Mark
Start Bit
Transmission Data Stop Bit

Asynchronous Data Format
Error Check In Data Communication
During transmission, various types of errors can occur. These errors need to
be checked, therefore, additional information for error checking is sent
during transmission the receiver can check the received data against the error
check information, and if the error is detected, the receiver can request there
retransmission of that data segment. Three methods generally used for this
purpose are parity check, checksum and redundancy check.
Standard in Serial I/O
The serial I/O technique is commonly used to interface terminals, printers
etc. a standard is normally defined by a professional organization (such as
IEEE). A standard may include such items as assignment of pin positions for
signals, voltage levels, speed of data transfer, length of cable and mechanical
specifications. When data are transmitted as voltage, the commonly used
standard is known as RS232C. it is defined as reference to data terminal
equipment (DTE) and data communication equipment (DCE). The rate of
transmission is RS232C is restricted to a maximum of 20k baud and a
distance of 50 feet.
Serial Port Description
The electrical speifications of the serial port are contained in the EIA
(Electronics industry Association) RS232 standard
It states many parameters such as
1. A Space {logic 0} will between +3 and +25 Volts.
2. A Mark {logic 1} will between -3 and -25 Volts.
3. The region between +3 and -3 volts is undefined.
4. An open circuit voltage should never exceed 25 volts.{In Reference to
GND}
5. A short circuit current should not exceed 500 ma.The driver should be
able to handle this without damage.
These connectors come in two forms: A male and a female connector.
There are the D-Type 9 pin connector and D-Type pin connector both of
which are male on the back of the PC.The female connector has holes
that allow the pins on the male end to be inserted into the connector.
DB-9
This is a female DB-9 connector:

The female DB-9 connector is typically used as the "plug" that goes into a
typical PC. If you see one of these on the back of your computer, it is likely
not to be used for serial communication, but rather for things like early VGA
or CGA monitors (not SVGA) or for some special control/joystick
equipment.
And this is a male DB-9 connector:

This is the connector that you are more likely to see for serial
communications on a "generic" PC. Often you will see two of them side by
side (for COM1 and COM2). Special equipment that you might
communicate with would have either connector, or even one of the DB-25
connectors listed below.
TTL to RS232 Line-Driver (MAX 232) (communication interface)
This chip is used when interfacing micro controller with PC to check the
Baud rate and changes the voltage level because micro controller is TTL
compatible whereas PC is CMOS compatible. The MAX 232 IC contains the
necessary drivers{two} and receivers {two}, to adapt the RS- 232 signal
voltage levels to TTL logic.It became popular,because it just needs one
voltage{+5V} and generates the necessary RS-232 voltage levels{approx -
10V AND +10V} internally.This greatly simplified the design of
circuitry.And this made the IC so popular.MAX232 is just a
driver/receiver.It does not generate the necessary RS-232 sequence of marks
and spaces with the right timing,it does not decode RS-232 signal, it does
not provide a serial /parallel conversion.All it does is to convert signal
voltage levels.

General Description
The MAX220MAX249 family of line drivers/receivers is intended for all
EIA/TIA-232E and V.28/V.24 communications interfaces, particularly
applications where 12V is not available. These parts are especially useful
in battery-powered systems, since their low-power shutdown mode reduces
power dissipation to less than 5W.
Applications
Portable Computers
Low-Power Modems
Interface Translation
Battery-Powered RS-232 Systems
Multi-drop RS-232 Networks
Features
1. Superior to bipolar
2. Low-power receive mode in shutdown
3. Meet all EIA/TIA-232E and v.28 specifications.
4. 3-state driver and receiver output.
The MAX220MAX249 contain four sections: dual charge-pump DC-DC
voltage converters, RS-232 drivers, RS-232 receivers, and receiver and
transmitter enable control inputs.


Dual Charge-Pump Voltage Converter
The MAX220MAX249 has two internal charge-pumps that convert +5V to
10V (unloaded) for RS-232 driver operation. The first converter uses
capacitor C1 to double the +5V input to +10V on C3 at the V+ output. The
second converter uses capacitor C2 to invert +10V to -10V on C4 at the V-
output. A small amount of power may be drawn from the +10V (V+) and -
10V (V-) outputs to power external circuitry except on the MAX225 and
MAX245MAX247, where these pins are not available. V+ and V- are not
regulated, so the output voltage drops with increasing load current. Do not
load V+ and V- to a point that violates the minimum 5V EIA/TIA-232E
driver output voltage when sourcing current from V+ and V- to external
circuitry. When using the shutdown feature in the MAX222, MAX225,
MAX230, MAX235, MAX236, MAX240, MAX241, and MAX245
MAX249, avoid using V+ and V to power external circuitry. When these
parts are shut down, V- falls to 0V, and V+ falls to +5V. For applications
where a +10V external supply is applied to the V+ pin (instead of using the
internal charge pump to generate +10V), the C1 capacitor must not be
installed and the SHDN pin must be tied to VCC. This is because V+ is
internally connected to VCC in shutdown mode.
RS-232 Drivers
The typical driver output voltage swing is 8V when loaded with a nominal
5k RS-232 receiver and VCC = +5V. Output swing is guaranteed to meet
the EIA/TIA- 232E and V.28 specification, which calls for 5V minimum
driver output levels under worst-case conditions. These include a minimum
3k load, VCC = +4.5V, and maximum operating temperature. Unloaded
driver output voltage ranges from (V+ -1.3V) to (V- +0.5V). Input
thresholds are both TTL and CMOS compatible. The inputs of unused
drivers can be left unconnected since 400k input pull-up resistors to VCC
are built in (except for the MAX220). The pull-up resistors force the outputs
of unused drivers low because all drivers invert. The internal input pull-up
resistors typically source 12A, except in shutdown mode where the pull-
ups are disabled. Driver outputs turn off and enter a high-impedance state
where leakage current is typically microamperes (maximum 25A)when
in shutdown mode, or when in three-state mode, device power is removed.
Outputs can be driven to 15V. The power supply current typically drops to
8A in shutdown mode.
The MAX220 does not have pull-up resistors to force the outputs of the
unused drivers low. Connect unused inputs to GND or VCC. The MAX239
has a receiver three-state control line, and the MAX223, MAX225,
MAX235, MAX236, MAX240, and MAX241 have both a receiver three-
state control line and a low-power shutdown control. The receiver
TTL/CMOS outputs are in a high-impedance, three-state mode whenever the
three-state enable line is high (for the
MAX225/MAX235/MAX236/MAX239 MAX241), and are also high-
impedance whenever the shutdown control line is high. When in low-power
shutdown mode, the driver outputs are turned off and their leakage current is
less than 1A with the driver output pulled to ground. The driver output
leakage remains less than 1A, even if the transmitter output is back driven
between 0V and (VCC + 6V). Below -0.5V, the transmitter is diode clamped
to ground with 1k series impedance. The transmitter is also zener clamped
to approximately VCC + 6V, with a series impedance of 1k. The driver
output slew rate is limited to less than 30V/s as required by the EIA/TIA-
232E and V.28 specifications. Typical slew rates are 24V/s unloaded and
10V/s loaded with 3 and 2500pF.
RS-232 Receivers
EIA/TIA-232E and V.28 specifications define a voltage level greater than
3V as logic 0, so all receivers invert. Input thresholds are set at 0.8V and
2.4V, so receivers respond to TTL level inputs as well as EIA/TIA-232E and
V.28 levels. The receiver inputs withstand an input over voltage up to 25V
and provide input terminating resistors with nominal 5k values. The
receivers implement Type 1 interpretation of the fault conditions of V.28
and EIA/TIA-232E. The receiver input hysteresis is typically 0.5V with a
guaranteed minimum of 0.2V. This produces clear output transitions with
slow-moving input signals, even with moderate amounts of noise and
ringing. The receiver propagation delay is typically 600ns and is
independent of input swing direction.





Passive Infra Red Sensor












A passive Infrared sensor (PIR sensor) is an electronic sensor that measures
infrared (IR) light radiating from objects in its field of view. They are most often
used in PIR-based motion detectors.
Operating Principle
All objects above absolute zero emit heat energy in the form of infrared radiation
(infrared light). Usually infrared light is invisible to the human eye, but it can be
detected by electronic devices designed for such a purpose.
The term passive in this instance refers to the fact that PIR devices do not generate
or radiate any energy for detection purposes. They work entirely by detecting the
energy given off by other objects.
Construction
Infrared radiation enters through the front of the sensor, known as the sensor face.
At the core of a PIR sensor is a solid state sensor or set of sensors, made from
pyroelectric materials -- materials which generate energy when exposed to heat.
Typically, the sensors are approximately 1/4 inch square, and take the form of a
thin film. Materials commonly used in PIR sensors include gallium nitride (GaN),
caesium nitrate (CsNO
3
), polyvinyl fluorides, derivatives of phenylpyrazine, and
cobalt phthalocyanine. The sensor is often manufactured as part of an integrated
circuit.
PIR based motion detector
A PIR-based motion detector is used to sense movement of people, animals, or
other objects. They are commonly used in burglar alarms and automatically-
activated lighting systems. They are commonly called simply "PIR", or sometimes
"PID", for passive infrared detector.
Operation
Strictly speaking, individual PIR sensors do not detect motion; rather, they detect
abrupt changes in temperature at a given point. As an object, such as a human,
passes in front of the background, such as a wall, the temperature at that point will
rise from room temperature to body temperature, and then back again. This quick
change triggers the detection. Moving objects of identical temperature will not
trigger detection.
PIDs can be equipped with more than one internal sensing element so that, with the
appropriate electronics, it can detect the apparent direction of movement. As an
object passes in front of adjacent sensors in turn, this implies the direction of
movement. This may be used by on-board electronics to reduce false alarms, i.e.,
by requiring adjacent sensors to trip in succession. It may also be used to signal the
direction of movement to a monitoring apparatus.
PIDs come in many configurations for a wide variety of applications. The most
common models have numerous Fresnel lenses or mirror segments, an effective
range of about thirty feet, and a field of view less than 180 degrees. Models with
wider fields of view, including 360 degrees, are available -- typically designed to
mount on a ceiling. Some larger PIDs are made with single segment mirrors and
can sense changes in infrared energy over one hundred feet away from the PID.
There are also PIDs designed with reversible orientation mirrors which allow either
broad coverage (110 wide) or very narrow "curtain" coverage, or with
individually selectable segments to "shape" the coverage.
Differential detection
Pairs of sensor elements may be wired as opposite inputs to a differential amplifier.
In such a configuration, the PIR measurements cancel each other so that the
average temperature of the field of view is removed from the electrical signal; an
increase of IR energy across the entire sensor is self-cancelling and will not trigger
the device. This allows the device to resist false indications of change in the event
of being exposed to brief flashes of light or field-wide illumination. (Continuous
high energy exposure may still be able to saturate the sensor materials and render
the sensor unable to register further information.) At the same time, this
differential arrangement minimizes common-mode interference, allowing the
device to resist triggering due to nearby electric fields. However, a differential pair
of sensors cannot measure temperature in this configuration, and therefore is only
useful for motion detection.
Product design
The PIR sensor is typically mounted on a printed circuit board containing the
necessary electronics required to interpret the signals from the sensor itself. The
complete assembly is usually contained within a housing, mounted in a location
where the sensor can cover area to be monitored.
The housing will usually have a plastic "window" through which the infrared
energy can enter. Despite often being only translucent to visible light, infrared
energy is able to reach the sensor through the window because the plastic used is
transparent to infrared radiation. The plastic window reduces the chance of foreign
objects (dust, insects, etc.) from obscuring the sensor's field of view, damaging the
mechanism, and/or causing false alarms. The window may be used as a filter, to
limit the wavelengths to 8-14 micrometres, which is closest to the infrared
radiation emitted by humans. It may also serve as a focusing mechanism; see
below.
Focusing
Different mechanisms can be used to focus the distant infrared energy onto the
sensor surface.
Lenses
The plastic window covering may have multiple facets molded into it, to focus the
infrared energy onto the sensor. Each individual facet is a Fresnel lens.
Mirrors
Some PIDs are manufactured with internal, segmented parabolic mirrors to focus
the infrared energy. Where mirrors are used, the plastic window cover generally
has no Fresnel lenses molded into it.
Motion detector module uses a motion detector IC and PCB mounted Fresnel
lens (Item: SB0061)


General
SB0061 is a pyroelectric sensor module which developed for human body
detection. A PIR detector combined with a fresnel lens are mounted on a compact
size PCB together with an analog IC, SB0061, and limited components to form the
module. High level output of variable width is provided.
Features and Electrical Specification
Compact size (28 x 38 mm)
Supply current: DC5V-20V(can design DC3V-24V)
Current drain :< 50uA (Other choice: DC0.8V-4.5V; Current drain: 1.5mA-
0.1mA)
Voltage Output: High/Low level signal 3.3V (Other choice: Open-
Collector Output)
TTL output
High sensitivity
Delay time5s-18 minute
Blockade time0.5s-50s (acquiescently 0 seconds)
Operation Temperature: -15oC -70Oc
Infrared sensor: dual element, low noise, high sensitivity
Light sensor: CdS photocell (can be add as customer requirement)
Lens information



Application Note
1. Power anode
2. Output: High level signal
3. Power cathode
H: Can be spring repeatedly
L: Can not be spring repeatedly
CDS: Photocell




Note
Due to the high sensitivity of PIR sensor device, it is not recommended to use the
module in the following or similar condition.
A) in rapid environmental changes
B) in strong shock or vibration
C) in a place where there are obstructing material (eg. glass) through which IR
cannot pass within detection area.
D) exposed to direct sun light
E) exposed to direct wind from a heater or air condition





GSM Voice & Data
Transceiver (GSM MODEM)














What is a GSM Modem?
A GSM modem is a wireless modem that works with a GSM wireless
network. A wireless modem behaves like a dial-up modem. The main
difference between them is that a dial-up modem sends and receives data
through a fixed telephone line while a wireless modem sends and receives
data through radio waves.
A GSM modem can be an external device or a PC Card / PCMCIA Card.
Typically, an external GSM modem is connected to a computer through a
serial cable or a USB cable. A GSM modem in the form of a PC Card /
PCMCIA Card is designed for use with a laptop computer. It should be
inserted into one of the PC Card / PCMCIA Card slots of a laptop computer.
Like a GSM mobile phone, a GSM modem requires a SIM card from a
wireless carrier in order to operate.
As mentioned in earlier sections of this SMS tutorial, computers use AT
commands to control modems. Both GSM modems and dial-up modems
support a common set of standard AT commands. You can use a GSM
modem just like a dial-up modem.
In addition to the standard AT commands, GSM modems support an
extended set of AT commands. These extended AT commands are defined
in the GSM standards. With the extended AT commands, you can do things
like:
Reading, writing and deleting SMS messages.
Sending SMS messages.
Monitoring the signal strength.
Monitoring the charging status and charge level of the battery.
Reading, writing and searching phone book entries.
The number of SMS messages that can be processed by a GSM modem per
minute is very low -- only about six to ten SMS messages per minute.
What is a GPRS Modem?
A GPRS modem is a GSM modem that additionally supports the GPRS
technology for data transmission. GPRS stands for General Packet Radio
Service. It is a packet-switched technology that is an extension of GSM.
(GSM is a circuit-switched technology.) A key advantage of GPRS over
GSM is that GPRS has a higher data transmission speed.
GPRS can be used as the bearer of SMS. If SMS over GPRS is used, an
SMS transmission speed of about 30 SMS messages per minute may be
achieved. This is much faster than using the ordinary SMS over GSM,
whose SMS transmission speed is about 6 to 10 SMS messages per minute.
A GPRS modem is needed to send and receive SMS over GPRS. Note that
some wireless carriers do not support the sending and receiving of SMS over
GPRS.
If you need to send or receive MMS messages, a GPRS modem is typically
needed.
Which is better? Mobile Phone or GSM / GPRS Modem?
In general, a GSM/GPRS modem is recommended for use with a computer
to send and receive messages. This is because some mobile phones have
certain limitations comparing to GSM/GPRS modems. Some of the
limitations are described below:
Some mobile phone models (example: Ericsson R380) cannot be used
with a computer to receive concatenated SMS messages.
What is a concatenated SMS message?
A concatenated SMS message is a message that contains more than 140
bytes. (A normal SMS message can only contain at most 140 bytes.)
Concatenated SMS works like this: the sender's mobile device breaks a
message longer than 140 bytes into smaller parts. Each of these parts are
then fitted in a single SMS message and sent to the recipient. When these
SMS messages reach the destination, the recipient's mobile device will
combine them back to one message.
What is the cause of the problem?
When the mobile phone receives the SMS messages that are parts of a
concatenated SMS message, it combines them to one message automatically.
The correct behavior should be: when the mobile phone receives the SMS
messages that are parts of a concatenated SMS message, it forwards them to
the computer without combining them.
Many mobile phone models cannot be used with a computer to
receive MMS messages. Because when they receive a MMS
notification, they handle it automatically instead of forwarding it to
the computer.
A mobile phone may not support some AT commands, command
parameters and parameter values. For example, some mobile phones
do not support the sending and receiving of SMS messages in text
mode. So, the AT command "AT+CMGF=1" (it instructs the mobile
phone to use text mode) will cause an error message to be returned.
Usually GSM/GPRS modems support a more complete set of AT
commands than mobile phones.
Most SMS messaging applications have to be available 24 hours a
day. (For example, an SMS messaging application that provides
ringtone downloading service should be running all the time so that a
user can download ringtones any time he/she wants.) If such SMS
messaging applications use mobile phones to send and receive SMS
messages, the mobile phones have to be switched on all the time.
However, some mobile phone models cannot operate with the battery
removed even when an AC adaptor is connected, which means the
battery will be charged 24 hours a day.
Besides the above issues, mobile phones and GSM/GPRS modems are more
or less the same for sending and receiving SMS messages from a computer.
Actually, you can consider an AT-command-enabled mobile phone as
"GSM/GPRS modem + keypad + display + ..."
There is not much difference between mobile phones and GSM/GPRS
modems in terms of SMS transmission rate, since the determining factor for
the SMS transmission rate is the wireless network.
SMS Introduction
The Short Message Service (SMS) allows text messages to be sent and
received to and from mobile telephones. The text can comprise words or
numbers or an alphanumeric combination. SMS was created as part of the
GSM Phase 1 standard. The first short message is believed to have been sent
in December 1992 from a PC to a mobile phone on the Vodafone GSM
network in the UK. Each short message is up to 160 characters in length
when Latin alphabets are used and 70 characters in length when non-Latin
alphabets such as Arabic and Chinese are used.
There is no doubting the success of SMS. The market in Europe alone had
reached over three billion short messages per month as of December 1999,
despite little in proactive marketing by network operators and phone
manufacturers.
SMS Technology
SMS is essentially similar to paging, but SMS messages do not require the
mobile phone to be active and within range, as they will be held for a
number of days until the phone is active and within range. SMS messages
are transmitted within the same cell or to anyone with roaming capability.
They can also be sent to digital phones from a web site equipped with a PC
Link or from one digital phone to another.
The SMS is a store and forward service. In other words, short messages are
not sent directly from sender to recipient, but via an SMS Center. Each
mobile telephone network that supports SMS has one or more messaging
centers to handle and manage the short messages.
SMS Text Mode
The Short Message Service SMS, as defined within the GSM 900 / 1800 /
1900 digital mobile phone standard has several unique features. A single
short message can be up to 160 characters (7bit coded) or 140 characters (8
bit coded) of text in length. Those 140 / 160 characters can comprise of
words or numbers or an alphanumeric combination. Non-text based short
messages (for example, in binary format) are also supported.
About SMS PDU Mode
The PDU mode offers to send binary information in 7 bit or 8 bit format.
That is helpful if you have to send compressed data, binary data or like to
build your own encoding of the characters in the binary bit stream. If you go
back on the old encoding of a Fern Schreiber, then there is only 5 bit needed
to send an alphanumeric text. By 5 bit coding you can contain 224 characters
instant of 160 characters in 7 bit Text mode. An others reason could be the
sending of integer data.
The PDU format
There are two ways of sending and receiving SMS messages: by text mode
and by PDU (protocol description unit) mode. The text mode (unavailable
on some phones) is just an encoding of the bit stream represented by the
PDU mode. Alphabets may differ and there are several encoding alternatives
when displaying an SMS message. The most common options are
"PCCP437", "PCDN", "8859-1", "IRA" and "GSM". These are all set by the
AT-command AT+CSCS, when read the message in a computer application.
An application capable of reading incoming SMS messages can thus use text
mode or PDU mode. If text mode is used, the application is bound to (or
limited by) the set of preset encoding options. If PDU mode is used,
any encoding can be implemented. The PDU string contains not only the
message, but also a lot of meta-information about the sender, his SMS
service center, the time stamp etc. It is all in the form of hexa-decimal octets
or decimal semi-octets.
07 917238010010F5 040BC87238880900F100009930925161958003C16010
This octet sequence consists of three parts: An initial octet indicating the
length of the SMSC information ("07"), the SMSC information itself
("917238010010F5"), and the SMS_DELIVER part. All the octets above are
hexa-decimal 8-bit octets, except the Service center number, the sender
number and the timestamp; they are decimal semi-octets. The message part
in the end of the PDU string consists of hexa-decimal 8-bit octets, but these
octets represent 7-bit data .The semi-octets are decimal, and e.g. the sender
number is obtained by performing internal swapping within the semi-octets
from "72 38 88 09 00 F1" to "27 83 88 90 00 1F".
The length of the phone number is odd, so a proper octet sequence cannot be
formed by this number. This is the reason why the trailing F has been added.
The time stamp, when parsed, equals "99 03 29 15 16 59 08", where the 6
first characters represent date, the following 6 represents time, and the last
two represents time-zone related to GMT.
SMSC: Short Message Service Centre
MMI: Man Machine Interface
PDUS: Protocol Data Units
SM-AL: Short Message Aplication Layer
SM-TL: Short Message Transport Layer
SM-RL: Short Message Relay Layer
SM-LL: Short Message Link Layer
The MMI is based on the command set of AT+Cellular, and could be
realized by means of a terminal (for example Win-Terminal, HyperTerminal,
etc) or the display of a handy.
The SM-TL provides a service to the Short Message Application Layer. This
service enables the SM-AL to transfer short messages to its peer entity,
receive short messages from its peer entity and receive reports about earlier
requests for short messages to be transferred.
The SM-TL communicates with its peer entity with six several PDUs
(Protocol Data Units):
SMS-DELIVER - conveying a short message from the SMSC to the MS
SMS-DELIVER-REPOR- conveying a failure cause (if necessary)
SMS-SUBMIT - conveying a short message from the MS to the SMSC
SMS-SUBMIT-REPORT- conveying a failure cause (if necessary)
SMS-STATUS-REPORT- conveying a status report from the SMSC to the
MS
SMS-COMMAN- conveying a command from the MS to the SMSC.
SMS-Deliver (Mobile Terminated)

PDU-
type
bits:
MTI
0 1 2 3 4 5 6 7
MMS SRI RP
OA
2-12 octets
PID DCS SCTS UDL UD
1 octet 1 octet 7 octets 1 octet 0-140 octets
UDHI
SCA
1-10 octets

MTI bit 1 = 0
bit 0 = 0
SMS-Deliver (Mobile Terminated)
SMS-Submit (Mobile Originated)
PDU-
type
bits:
MTI
0 1 2 3 4 5 6 7
RP
MR DA PID DCS UDL UD
2-12 octets 1 octet 1 octet 0-140 octets
VPF
1 octet
0,1 or 7
octets
VP
1 octet
UDHI SRR RD
SCA
1-10 octets

MTI bit 1 = 0
bit 0 = 1

SMS-Submit (Mobile Originated)

Service Centre Address Specifications
SCA Service Centre Address
information element
Telephone number of the Service
Centre
PDU Protocol Data Unit Type
Type
MR Message Reference Sucessive number (0..255) of all
SMS-SUBMIT Frames set by the
M20
OA Originator Address Address of the originating SME
DA Destination Address Address of the destination SME
PID Protocol Identifier Parameter showing the SMSC how
to process the SM (as FAX, Voice
etc)
DCS Data Coding Scheme Parameter identifying the coding
scheme within the User Data (UD)
SCTS Service Centre Time Stamp Parameter identifying time when the
SMSC received the message
VP Validity Period Parameter identifying the time from
where the message is no longer valid
in the SMSC
UDL User Data Length Parameter indicating the length of
the UD-field
UD User Data Data of the SM
RP Reply Path Parameter indicating that Reply Path
exists
UDHI User Data Header Indicator Parameter indicating that the UD
field contains a header
SRI Status Report Indication Parameter indicating if the SME has
requested a status report
SRR Status Report Request Parameter indicating if the MS has
requested a status report
VPF Validity Period Format Parameter indicating whether or not
the VP field is present
MMS More Messages to Send Parameter indicating whether or not
there are more messages to send
RD Reject Duplicate
MTI Message Type Indicator Parameter describing the message
type
00 means SMS-DELIVER
01 means SMS-SUBMIT

How To Use AT commands
Here are two examples of how to send a short message with AT+Cellular
First enter PIN-number and the Service Centre Address:
at+cpin="XXXX" enter the PIN-
number
OK
at+csca="+61418706700" enter the Service-
Centre-
OK address
1st example:

at+cmgs=18 enter send message,
18 is the actual length of the PDU
message in octet
> 0011000A81409079344400000105E8329BFD06 ( type the PDU
(SMS-SUBMIT) and finish with
ctrl Z the thin-typed
characters are the Destination
Address e.g. the own tel.-
number(0409974344) the
Service Centre address is the
same as set via at+csca
command )
+CMGS: 0
OK
at+cpms? are messages stored on the
SIM-Card?
+CPMS: "SM" , 1 , 7 , "SM" , 1 , 7 on this SIM-Card is 1
message stored
OK you can store at most 7
messages
at+cmgr=1 read stored message in
location 1
+CMGR: 0,,24
07911614786007F0040B911604994743F400009930139100406B05E8329BF
D06 This is a PDU (SMS-DELIVER) sent by the
Service Centre
OK


2nd example:

at+cmgw=18 write message in the memory of the SIM-
card

>07911614786007F011000781409079344400F6AA0568656C6C6F( type the
PDU (SMS-SUBMIT) and finish with
ctrl Z the thin-typed characters are the
Destination Address e.g. the own tel.-
number (0409974344). The service
Centre Address is +61418706700)
+CMGW: 2
OK
at+cmgr=2 read stored message in
location 2
+CMGR: 2,,18
07911614786007F011000A81407008090500F6010568656C6C6F
this is the PDU stored in location 2

OK
at+cmss=2 send the message stored in
location 2
+CMSS: 3
OK
at+cmss=2,0407485455,129 send the message stored in
location
2 to the national (129 = 81H)
destination address 0407485455

at+cmss=2,+61419877302,145 send the message stored in
location 2 to the international (145
= 91H) destination address
+61419877302

at+cpms? are messages stored on the SIM-
Card?
+CPMS: "SM", 3 , 7 , "SM" , 3 , 7 on this SIM-Card are 3 message
stored
OK you can store at most 7 messages
at+cmgr=3 read stored message in location 3
+CMGR: 0,,24
07911614786007F0040B911604994743F400009930139100406B05E8329BF
D06 this is a PDU (SMS-DELIVER) sent by the Service Centre.

OK

BCD digits len
type of
number
2. octet 0-8 octets 1. octet
3. octet 4. octet
...
last octet
digit1 digit2 digit3 digit4
last digit
or FH
07 91 94
71 01 00
e.g. 67 00

Send SMS message Format

GSM Modem for Voice calls
GSM modem supports the AT commands for requesting to initiate both
mobile-originated (MO) and mobile-terminated (MT) voice calls.
The following example provides the AT command for requesting the GSM
modem to initiate a mobile-originated (MO) voice call. This command
assumes that GSM modem is configured for the Data Call mode (default).
ATD1234567890; AT command to dial the telephone number. The ";" after
the number indicates that this is a voice call.
OK Modem Response.
ATH Terminates the call.
OK Modem Response.
The following example provides the AT command for requesting GSM
modem to initiate a mobile-terminated (MT) voice call. This command
assumes that GSM modem is configured for the Data Call mode (default).
OK
RING Displayed for incoming call notification
ATA Command to manually answer the MT call. If "Auto Answer" is
enabled (the ATS0=x command, where x = "the number of rings") the call
will be automatically answered.
OK Modem Response.
ATH Terminates the call.
OK Modem Response.





Touch Sensor






Touch sensor are devices which are used to detect a contact between the sensor and
an object.
Touch and tactile sensor are devices which measures the parameters of a contact
between the sensor and an object. This interaction obtained is confined to a small
defined region. This contrasts with a force and torque sensor that measures the
total forces being applied to an object. In the consideration of tactile and touch
sensing, the following definitions are commonly used:
Touch Sensing
This is the detection and measurement of a contact force at a defined point. A
touch sensor can also be restricted to binary information, namely touch, and no
touch.
Tactile Sensing
This is the detection and measurement of the spatial distribution of forces
perpendicular to a predetermined sensory area, and the subsequent interpretation of
the spatial information. A tactile-sensing array can be considered to be a
coordinated group of touch sensors.
Slip
This is the measurement and detection of the movement of an object relative to the
sensor. This can be achieved either by a specially designed slip sensor or by the
interpretation of the data from a touch sensor or a tactile array.
Tactile sensors can be used to sense a diverse range of stimulus ranging from
detecting the presence or absence of a grasped object to a complete tactile image.
A tactile sensor consists of an array of touch sensitive sites; the sites may be
capable of measuring more than one property. The contact forces measured by a
sensor are able to convey a large amount of information about the state of a grip.
Texture, slip, impact and other contact conditions generate force and position
signatures that can be used to identify the state of a manipulation. This information
can be determined by examination of the frequency domain, and is fully discussed
in the literature.
As there is no comprehensive theory available that defines the sensing
requirements for a robotic system, much of the knowledge is drawn from
investigation of human sensing, and the analysis of grasping and manipulation.
Study of the human sense of touch suggests that creating a gripper incorporating
tactile sensing requires a wide range of sensors to fully determine the state of a
grip. The detailed specification of a touch sensor will be a function of the actual
task as it is required to perform. Currently no general specification of a touch or
tactile sensor exists the following can be used as an excellent basis for defining the
desirable characteristics of a touch or tactile sensor suitable for the majority of
industrial applications:
A touch sensor should ideally be a single-point contact; through the sensory
area can be any size. In practice, an area of 1-2 mm
2
is considered a
satisfactory compromise between the difficulty of fabricating a sub-
miniature sensing element and the coarseness of a large sensing element.
The sensitivity of the touch sensor is dependent on a number of variables
determined by the sensor's basic physical characteristic. In addition the
sensitivity may also be the application, in particular any physical barrier
between the sensor and the object. Sensitivity within the range 0.4 to 10N,
together with an allowance for accidental mechanical overload, is considered
satisfactory for most industrial applications.
A minimum sensor bandwidth of 100 Hz.
The sensors characteristics must be stable and repeatable with low
hysteresis. A linear response is not absolutely necessary, as information
processing techniques can be used to compensate for any moderate non-
linearity.
As the touch sensor will be used in an industrial application, it will need to
be robust and protected from environmental damage.
If a tactile array is being considered, the majority of application can be
undertaken by an array 10-20 sensor square, with a spatial resolution of 1-2
mm.
Touch sensor technology
Many physical principles have been exploited in the development of tactile
sensors. As the technologies involved are very diverse, this chapter can only
consider the generalities of the technology involved. In most cases, the
developments in tactile sensing technologies are application driven. It should be
recognized that the operation of a touch or tactile sensor is very dependent on the
material of the object being gripped.. The sensors discussed in this chapter are
capable of working with rigid objects. However if non-rigid material is being
handled problems may arise. Work has shown that conventional sensors can be
modified to operate with non-rigid materials.
Mechanically based sensors
The simplest form of touch sensor is one where the applied force is applied to a
conventional mechanical micro-switch to form a binary touch sensor. The force
required to operate the switch will be determined by its actuating characteristics
and any external constraints. Other approaches are based on a mechanical
movement activating a secondary device such as a potentiometer or displacement
transducer.
Resistive based sensors
The uses of compliant materials that have defined force-resistance characteristics
have received considerable attention in touch and tactile sensor research. The basic
principle of this type of sensor is the measurement of the resistance of a conductive
elastomer or foam between two points. The majority of the sensors use an
elastomer that consists of a carbon doped rubber.

In the above sensor the resistance of the elastomer changes with the application of
force, resulting from the deformation of the elastomer altering the particle density.

If the resistance measurement is taken between opposing surfaces of the elastomer,
the upper contacts have to be made using a flexible printed circuit to allow
movement under the applied force. Measurement from one side can easily be
achieved by using a dot-and-ring arrangement on the substrate. Resistive sensors
have also been developed using elastomer cords laid in a grid pattern, with the
resistance measurements being taken at the points of intersection. Arrays with 256-
elements have been constructed. This type of sensor easily allows the construction
of a tactile image of good resolution.
The conductive elastomer or foam based sensor, while relatively simple does suffer
from a number of significant disadvantages:
An elastomer has a long nonlinear time constant. In addition the time
constant of the elastomer, when force is applied, is different from the time
constant when the applied force is removed.
The force-resistance characteristic of elastomer based sensors is highly
nonlinear, requiring the use of signal processing algorithms.
Due to the cyclic application of forces experience by a tactile sensor, the
resistive medium within the elastomer will migrates over a period of time.
Additionally, the elastomer will become permanently deformed and fatigue
leading to permanent deformation of the sensor. This will give the sensor a
poor long-term stability and will require replacement after an extended
period of use.
Even with the electrical and mechanical disadvantages of conductive elastomers
and foams, the majority of industrial analogue touch or tactile sensors that have
been based on the principle of resistive sensing. This is due to the simplicity of
their design and interface to the robotic system.
Force sensing resistor
A force sensing resistor is a piezoresistivity conductive polymer, which changes
resistance in a predictable manner following application of force to its surface. It is
normally supplied as a polymer sheet which has had the sensing film applied by
screen printing. The sensing film consists of both electrically conducting and non-
conducting particles suspended in matrix. The particle sizes are of the order of
fraction of microns, and are formulated to reduce the temperature dependence,
improve mechanical properties and increase surface durability. Applying a force to
the surface of a the sensing film causes particles to touch the conducting
electrodes, changing the resistance of the film. As with all resistive based sensors
the force sensitive resistor requires a relatively simple interface and can operate
satisfactorily in moderately hostile environments.
Capacitive based sensors
The capacitance between two parallel plates is given by:

Where A is the plate area, d the distance between the plates, and e the permittivity
of the dielectric medium. A capacitive touch sensor relies on the applied force
either changing the distance between the plates or the effective surface area of the
capacitor. In such a sensor the two conductive plates of the sensor are separated by
a dielectric medium, which is also used as the elastomer to give the sensor its
force-to-capacitance characteristics.
To maximize the change in capacitance as force is applied, it is preferable to use a
high permittivity, dielectric in a coaxial capacitor design. . In this type of sensor, as
the size is reduced to increase the spatial resolution, the sensors absolute
capacitance will decrease. With the limitations imposed by the sensitivity of the
measurement techniques, and the increasing domination of stray capacitance, there
is an effective limit on the resolution of a capacitive array. The figure shows the
cross section of the capacitive touch transducer in which the movement of a one set
of the capacitors' plates is used to resolve the displacement and hence applied
force. The use of a highly dielectric polymer such as polyvinylidene fluoride
maximizes the change capacitance. From an application viewpoint, the coaxial
design is better as its capacitance will give a greater increase for an applied force
than the parallel plate design

To measure the change in capacitance, a number of techniques can be, the most
popular is based on the use of a precision current source. A second approach is to
use the sensor as part of a tuned or L.C. circuit, and measure the frequency
response. Significant problem with capacitive sensors can be caused if they are in
close proximity with the end effectors or robots earthed metal structures, this leads
to stray capacitance. This can be minimized by good circuit layout and mechanical
design of the touch sensor. It is possible to fabricate a parallel plate capacitor on a
single silicon slice, this can give a very compact sensing device, this approach is
discussed below.
Magnetic based sensor
There are two approaches to the design of touch or tactile sensors based on
magnetic transduction. Firstly, the movement of a small magnet by an applied
force will cause the flux density at the point of measurement to change. The flux
measurement can be made by either a Hall Effect or a magneto-resistive device.
Second, the core of the transformer or inductor can be manufactured from a
magneto-elastic material that will deform under pressure and cause the magnetic
coupling between transformer windings, or a coils inductance to change. A
magneto-resistive or magneto-elastic material is a material whose magnetic
characteristics are modified when the material is subjected to changes in externally
applied physical forces. The magneto-restrictive or magneto-elastic sensor has a
number of advantages that include high sensitivity and dynamic range, no
measurable mechanical hysteresis, a linear response, and physical robustness.
If a very small permanent magnet is held above the detection device by a
complaint medium, the change in flux caused by the magnet's movement due to an
applied force can be detected and measured. The field intensity follows an inverse
relationship, leading to a nonlinear response, which can be easily linearized by
processing. A one-dimensional sensor where a row of twenty Hall Effect devices
placed opposite a magnet has been constructed. A tactile sensor using magneto-
elastic material has been developed, where the material was bonded to a substrate,
and then used as a core for an inductor. As the core is stressed, the materials
susceptibility changed, which is measured as a change in the coils inductance.
Optical Sensors
The rapid expansion of optical technology in recent years has led to the
development of a wide range of tactile sensors. The operating principles of optical-
based sensors are well known and fall into two classes:
Intrinsic, where the optical phase, intensity, or polarization of transmitted
light are modulated without interrupting the optical path
Extrinsic, where the physical stimulus interacts with the light external to the
primary light path.
Intrinsic and extrinsic optical sensors can be used for touch, torque, and force
sensing. For industrial applications, the most suitable will be that which requires
the least optical processing. For example the detection of phase shift, using
interferometry, is not considered a practical option for robotic touch and force
sensors. For robotic touch and force-sensing applications, the extrinsic sensor
based on intensity measurement is the most widely used due to its simplicity of
construction and the subsequent information processing. The potential benefits of
using optical sensors can be summarized as follow:
Immunity to external electromagnetic interference, which is widespread in robotic
applications.
Intrinsically safe.
The use of optical fiber allows the sensor to be located some distance from
the optical source and receiver.
Low weight and volume.
Touch and tactile optical sensors have been developed using a range of optical
technologies:
(a) Modulating the intensity of light by moving an obstruction into the
light path.
The force sensitivity is determined by a spring or elastomer. To prevent cross-talk
from external sources, the sensor can construct around a deformable tube, resulting
in a highly compact sensor:

In the reflective touch sensor below, the distance between the reflector and the
plane of source and the detector is the variable. The intensity of the received light
is a function of distance, and hence the applied force. The U shaped spring was
manufactured from spring steel, leading to a compact overall design. This sensor
has been successfully used in an anthropomorphic end effecter:

Reflective sensors can be constructed with source-receiver fibre pairs embedded in
a solid elastomer structure. As shown below, above the fibre is a layer of clear
elastomer topped with a reflective silicon rubber layer. The amount of light
reflected to the receiver is determined by applied force that changes the thickness
of the clear elastomer. For satisfactory operation the clear elastomer must have a
lower compliance that the reflective layer. By the use of a number of matrixes of
transmitter-receiver pairs, the tactile image of the contact can be determined:

(b) Photoelasticity
Photoelasticity is the phenomena where stress or strain causes birefringence in
optically transparent materials. Light is passed through the photoelastic medium.
As the medium is stressed, the photoelastic medium effectively rotates the plane of
polarization and hence the intensity of the light at the detector changes as a
function of the applied force. This type of sensor is of considerable importance in
the measurement of slip.
Optical fiber based sensors
In the previous section, optical fibers where used are solely for the transmission of
light to and from the sensor; however tactile sensors can be constructed from the
fiber itself. A number of tactile sensors have been developed using this approach.
In the majority of cases either the sensor structure was too big to be attached to the
fingers of robotic hand or the operation was too complex for use in the industrial
environment. A suitable design can be based on internal-state micro-bending of
optical fiber. Micro-bending is the process of light attenuation in the core of fiber
when a mechanical bend or perturbation (of the order of few microns) is applied to
the outer surface of the fiber. The degree of attenuation depends on the fiber
parameters as well as radius of curvature and spatial wavelength of the bend.
Research has demonstrated the feasibility of effecting micro-bending on an optical
fiber by the application of a force to a second orthogonal optical fiber.
Piezoelectric sensors
Polymeric materials that exhibit piezoelectric properties are suitable for use as a
touch or tactile sensors, while quartz and some ceramics have piezoelectric
properties, polymers such as polyvinylidene fluoride (PVDF) are normally used in
sensors.
Polyvinylidene fluoride is not piezoelectric in its raw state, but can be made
piezoelectric by heating the PVDF within an electric field. Polyvinylidene fluoride
is supplied sheets between as 5 microns and 2 mm thick, and has good mechanical
properties. A thin layer of metallization is applied to both sides of the sheet to
collect the charge and permit electrical connections being made. In addition it can
be molded; hence PVDF has number of attraction when considering tactile sensor
material as an artificial skin.
Strain gauges in tactile sensors
A strain gauge when attached to a surface will detect the change in length of the
material as it is subjected to external forces. The strain gauge is manufactured from
either resistive elements (foil, wire, or resistive ink) or from semiconducting
material. A typical resistive gauge consists of the resistive grid being bonded to an
epoxy backing film. If the strain gauge is pre-stressed prior to the application of the
backing medium, it is possible to measure both tensile and compressive stresses.
The semi-conducting strain gauge is fabricated from a suitable doped piece of
silicone; in this case the mechanism used for the resistance change is the
piezoresistive effect.
When applied to robotic touch applications, the strain gauge is normally used in
two configurations: as a load cell, where the stress is measured directly at the point
of contact, or with the strain gauge positioned within the structure of the end
effecter.
Silicon based sensors
Technologies for micromachining sensors are currently being developed world-
wide. The developments can be directly linked to the advanced processing
capabilities of the integrated circuit industry, that has developed fabrication
techniques that allow the interfacing of the non-electronic environment to be
integrated through micro-electromechanical systems.. Though not as dimensionally
rigorous as the more mature silicon planer technology, micromachining is
inherently more complex as it is involves the manufacture of a three-dimensional
object. Therefore the fabrication relies on additive layer techniques to produce the
mechanical structure.
The excellent characteristics of silicon, that has made micro-machined sensors
possible, include a tensile strength comparable to steel, elastic to breaking point,
and there is very little mechanical hysteresis in devices made from as single
crystal, a low thermal coefficient of expansion.
To date it is apparent that micro engineering has been applied most successfully to
sensors. Some sensor applications take advantage of the device-to-device or batch-
to-batch repeatability of wafer-scale processing to remove expensive calibration
procedures. Current applications are restricted largely to pressure and acceleration
sensors, though these in principle can be used as force sensors. As the structure is
very delicate, there still are problems in developing a suitable tactile sensor for
industrial applications.
Smart Sensors
The most significant problem with the sensor systems discussed so far is that of
signal processing. Researchers are therefore looking to develop a complete sensing
system rather than individual sensors, together with individual interfaces and
interconnections. This allows the signal processing to be brought as close as
possible to the sensor itself or integrated with the sensor. Such sensors are
generally termed smart sensors. It is the advances in silicon fabrication techniques
which have enabled the recent developments in smart sensors. There is no single
definition of what a smart sensor should be capable of doing, mainly because
interest in smart sensors is relatively new. However, there is a strong feeling that
the minimum requirements are that the sensing system should be capable of self
diagnostics, calibration and testing. As silicon can be machined to form moving
parts such as diaphragms and beams, a tactile sensor can in principal be fabricated
on single piece of silicon. Very little commercial success has been obtained so far,
largely due to the problems encountered in transferring the technology involved
from the research laboratory to industry. In all tactile sensors their is a major
problem of information processing, and interconnection. An array has 2n
connection and individual wires, any reduction in interconnection requirements is
welcomed due to ease of construction and increased reliability. A number of
researchers have been addressing the problem of integrating a tactile sensor with
integral signal processing. In this design the sensors conductive elastomer sheet
was placed over a substrate. The significant feature of this design is that the
substrate incorporated VLSI circuitry so that each sensing element not only
measures its data but processes it as well. Each site performs the measurements
and processing operations in parallel. The main difficulty with this approach was
the poor discrimination, and susceptibility to physical damage However, the VLSI
approach was demonstrated to be viable, and alleviated the problems of wiring up
each site and processing the data serially.
Touch Sensor Circuit Used in our Project
This circuit is combination of transistor and resistors. It used to make a touch
sensor for security of home, gadgets and vehicles. In this circuit, when we touch
the strip then first transistor Q1 gets turn ON.Q1 Passes the VCC to the base of
second transistor Q2 then it turns ON the Q2. It gives the low output at the
collector of second transistor. This output will be sent to MCU unit. After getting
low output from circuit, MCU gives command to the alarm for its activation.

OUTPUT Q2
1
2
3
D1
LED
TOUCH SENSOR
R1
RESISTOR
J1
CON3
1
2
3
R2
RESISTOR
Q1
3
2
1






Fire Sensor











There are so many methods of fire detection technology. In the 1960s smoke
detectors began to increase in popularity in commercial systems. And there was a
problem of false alarm. Other researches were made to the fire detection
technology. Some of which were based on heat sensing, temperature sensing. One
scheme was multi-mode detection which provides a single bit of information. Has
the concentration of particles exceeded the threshold level? If yes, there is a fire
and if no, there is not. To make better decision for non-(unwanted) fire sources we
need to collect more bits of information. This can be rate of change of signal or
combination of signals from different sensors particle concentration and
temperature and CO level. All current fire sensors are intended to be general
purpose; that is, to detect any fire within the protected space. In some cases, it is
possible to tailor the sensor to a specific characteristic of the principle fuel. An
example is the use of hydrogen chloride sensors in telephone exchanges. They will
quickly detect cable fires, but will ignore a burning printed circuit board (unless it
contains chlorine in a coating). It also is possible to look for a compound that is
intentionally added to items so that it is released when they burn or simply
overheat. NASA is currently exploring this technology for the space station
project.
Here in our project a heat sensor is used as fire sensor. A thermistor is used as heat
sensor.
A thermistor is a type of resistor whose resistance varies significantly with
temperature, more so than in standard resistors. The word is a portmanteau of
thermal and resistor. Thermistors are widely used as inrush current limiters,
temperature sensors, self-resetting over-current protectors, and self-regulating
heating elements.
Thermistors differ from resistance temperature detectors (RTD) in that the material
used in a thermistor is generally a ceramic or polymer, while RTDs use pure
metals. The temperature response is also different; RTDs are useful over larger
temperature ranges, while thermistors typically achieve a higher precision within a
limited temperature range, typically 90 C to 130 C.

Thermistor

Fire Sensor used in our Project:
Below is the circuit used in our project for fire sensor. A NPN Transistor is used to
switch on or off according to the heat produced due to fire. When there is no fire
and the resistance of thermistor is high at this time as compared to the variable

NPN
To MCU
VCC(5V)
10K Ohm
D1
LED
470 Ohm
RESISTOR
t
THERMISTOR
1
2
resistance (10K). So the base of the transistor is grounded and the transistor is in
OFF state. When a fire is detected and heat is sensed by the thermistor then its
resistance falls as compared to the variable resistance and now at the base of the
transistor a high (V
CC
) signal is applied and at this time transistor is in ON state
and it gives a low signal output to the MCU. MCU senses for this low signal and
gives command to the alarm to operate.

You might also like