Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 71

GSM BASED HOME AUTOMATION

SYSTEM
A Project Report submitted by

T.J.SHIVA RAM(111716041)

AT

ECIL-ECIT

(ELECTRONICS CORPORATION OF INDIA LIMITED)

Under the esteemed guidance of

Mr. T.THIRUMALAI (HEAD CED)

Computer Education Division,

ECIL
INDIAN INSTITUTE OF INFORMATION TECHNOLOGY PUNE
(An Autonomous Institute of National Importance under act of Parliament)

BTP Report (2019-20)


ACKNOWLEDGEMENT

I wish to thank those who were involved in the successful completion of my in-plant
training at ECIL (Electronics corporation of India Limited), starting from Mr.T.Thirumalai(Head
,CED). Secunderabad, for giving me the opportunity and freedom to learn as per my interests;
the head of the team at ECIL, for being a constant support and guidance; the project lead for my
in-plant training Mr. Vijaya Chandra , for providing me with the necessary resources; and the
entire staff of the company for their support and positivity which made my internship a
worthwhile experience.

I would also like to thank my parents, for being my motivation to take up this internship;
and last, but not the least, the faculty and management at ECIL, Secunderabad for providing me
with such an avenue to help realize how interesting it is to work in today's industry.

By

T.J.SHIVA RAM
BTP Report (2019-20)
ACKNOWLEDGEMENT

I wish to thank those who were involved in the successful completion of my in-plant
training at ECIL (Electronics corporation of India Limited), starting from Mr.T.Thirumalai(Head
,CED). Secunderabad, for giving me the opportunity and freedom to learn as per my interests;
the head of the team at ECIL, for being a constant support and guidance; the project lead for my
in-plant training Mr. Vijaya Chandra , for providing me with the necessary resources; and the
entire staff of the company for their support and positivity which made my internship a
worthwhile experience.
I would also like to thank my parents, for being my motivation to take up this internship;
and last, but not the least, the faculty and management at ECIL, Secunderabad for providing me
with such an avenue to help realize how interesting it is to work in today's industry.

By

T.J.SHIVA RAM
ACKNOWLEDGEMENT

I wish to thank those who were involved in the successful completion of my in-plant training at
ECIL (Electronics corporation of India Limited), starting from Mr.T.Thirumalai(Head ,CED). Secunderabad,
for giving me the opportunity and freedom to learn as per my interests; the head of the team at ECIL, for
being a constant support and guidance; the project lead for my in-plant training Mr. Vijaya Chandra , for
providing me with the necessary resources; and the entire staff of the company for their support and
positivity which made my internship a worthwhile experience.

I would also like to thank my parents, for being my motivation to take up this internship; and last,
but not the least, the faculty and management at ECIL, Secunderabad for providing me with such an
avenue to help realize how interesting it is to work in today's industry.

By

T.J.SHIVA RAM
COMPANY PROFILE

ECIL was setup under the Department of Atomic Energy on 11th April, 1967 with a view to
generate a strong indigenous capability in the field of professional grade electronics. The initial
accent was on total self-reliance and ECIL was engaged in the design development, Manufacture
and Marketing of several products with emphasis on three technology lines viz. Computers,
Control Systems and Communications. Over the years, ECIL pioneered the development of
various complex electronics products without any external technology help and scored several
‘firsts’ in this fields prominent among them being country’s

First Digital Computer

First Solid State TV

First Control & Instrumentation of Nuclear Power Plants

First Earth Station Antenna

First Computerized Operator Information System

First radiation Monitoring & Detection System

First Automatic Message Switching System

First Operation & Maintenance Center for E-108 Exchange

First Programmable Logic Controller

First Solid state Cockpit Voice Recorder

First Electronics Voting Machines

The company played a very significant role in the training and growth of high caliber technical
and managerial man power especially in the fields of Computer and Information Technology.
Though the initial thrust was on meeting the Control & Instrumentation requirements of the
Nuclear Power Program, the expand scope of self-reliance pursued by ECIL enabled the
company to develop various products to cater to the needs of Defense, Civil Aviation,
Information & Broadcasting, Telecommunications, Insurance, banking, Police and Para-Military
Forces, Oil & Gas, Power, Space Education, Health, Agriculture Steel and Coal Sectors and
various user departments in the Government domain. ECIL thus evolved as multi-product
company serving multiple sectors of Indian economy with emphasis on import of country
substitution and development of products & services that are of economic and strategic
significance to the country.
ABSTRACT

In today’s fast changing world, everything is becoming compact, portable and mobile. The
mobile handsets for communication are the biggest advancement in the area. These have made
our lives much simpler and connected. Today almost everyone is familiar with its usage, and is
able to draw advantage from it. The technologies for mobile communication have been ever
evolving. Each had there share of pro’s and con’s. The Global System for Mobile
communication represents the second generation of mobile communications.

The idea behind the project is to utilize the mobile nature of communication and application
provided by the GSM technology, namely SMS. Mobile phone is a revolutionary invention of the
century. It was primarily designed for making and receiving calls & text messages, but it has
become the whole world after the Smart phone comes into the picture. In this project, no Smart
phone is needed; just the old GSM phone will work to switch ON and OFF any home electronic
appliances, from anywhere. This easy to use control of appliances will not only make our daily
life easy but it will also reduce the unnecessary consumption of electricity.
INDEX

1. INTRODUCTION

1.1 PROJECT OBJECTIVE

2. INTRODUCTION TO EMBEDDED SYSTEMS

2.1NTRODUCTION

2.2 DEFINITION OF AN EMBEDDED SYSTEM:

2.3 FEATURES OF AN EMBEDDED SYSTEM:

2.4 CHARACTERISTICS OF AN EMBEDDED SYSTEM:


3. DESIGN ELEMENTS

3.1 MICROCONTROLLER

3.1.1 INTRODUCTION

3.1.2 FEATURES
3.1.3 DESCRIPTION
3.1.4 PIN CONFIGURATION
3.1.5 PIN DESCRIPTION
3.2 POWER SUPPLY
DESCRIPTION
3.2.1TRANSFORMER

3.2.2 BRIDGE RECTIFIER

3.2.3 FILTERS

3.2.4 REGULATOR

3.3 LIGHT EMITTING DIODE

3.4 PUSH BUTTON

3.5 RESET BUTTON


3.6 LIQUID CRYSTAL DISPLAY
3.6.1 PIN DESCRIPTION of LCD
3.7 MAX 232
FEATURES, PIN DIAGRAM AND CIRCUIT CONNECTIONS
3.8 RELAYS
3.9 GSM (Global System for Mobile communications)

3.10 DC MOTOR

4. CIRCUIT EXPLANATION
4.1 DESCRIPTION
4.2 CODE
4.3 INTERFACING LCD WITH CONTROLLER
5. ADVANTAGES
6. DISADVANTAGES

7. FUTURE SCOPE
8. CONCLUSION
9. BIBLIOGRAPHY
ABBREVIATIONS

 PSW: Program status word


 IP: Interrupt Priority
 SFR: Special Function Register
 ALE: Address Latch Enable
 SP: Stack Pointer
 DPL/DPH: Data Pointer Low/Data Pointer High
 PSEN: Program Store Enable
 PCON: Power Control
 TCON: Timer Control
 TMOD: Timer Mode
 ACC: Accumulator
 CAN: Control Area Network
 LED: Light Emitting Diode
 LCD: Liquid Crystal Display
 IR: Infrared
 EA: External Access Enable
 RTS: Request to send
 CTS: Clear to send
 ISP : In system Programmable
 DTR: Data terminal ready
 DSR: Data set ready
 DB: Define byte
 SCON:Selection control
 SBUF: Selection buffer
 RS: Selection register
 RW: Read write
 EN: Enable
INTERNSHIP SUMMARY

As a part of our curriculum, we have been instructed to do in-plant training for a span of 45 days.
The intention of introducing in-plant training as a part of our curriculum is to gain practical
knowledge of the subjects learnt in our classroom and to gain industrial exposure. The in-plant
training’s duration is from 3 June 2018 to 3 July 2018. We were divided into batches at ECIL
and were asked to select projects in the stream of embedded systems for which problem
statements were given and out of our interest and curiosity we have selected the project GSM
Based Home Automation System.

Being a student, it is a wonderful experience to get a chance to work in an esteemed


Organization. We have learnt Organizational etiquette and attained industrial work experience
while maintaining the bi-lateral relations of the University and the Organization and thereby
fulfilling the intention of the University in introducing in-plant training as a part of our
curriculum.

MOTIVATION

The project chosen is Home Automation using GSM module. This was selected because of
incorporating mobile technology with controlling of appliances which we believe is the next
important step to realize the Home Automation. The comfort of being able to take control of
devices from one particular location has become imperative as it saves a lot of time and effort.
PROBLEM STATEMENT

Technology has advanced so much in the last decade or two that it has made life more efficient
and comfortable. The comfort of being able to take control of devices from one particular
location has become imperative as it saves a lot of time and effort. Therefore there arises a need
to do so in a systematic manner which we have tried to implement with our system. The system
we have proposed is an extended approach to automating a control system. The application of
our system comes in handy when people who forget to do simple things such as turn ON or OFF
devices at their home or in their office, they can now do so without their presence by the
transmission of a simple text message from their mobile phone. For the device to be controlled as
per desire, a particular “line” or “path” of communication need not be taken care of. For example
TV cannot be controlled unless a clear path is maintained for the infrared rays to reach the TV.
Our project outreaches such problems and makes it comfortable for the user to operate devices.
1. INTRODUCTION

1.1. PROJECT OBJECTIVE

 The goal of the project is to develop a system, which uses Mobile technology that keeps
control of the various units of the automobiles, which executes with respect to the signal sent by
the mobile.

 For utilization of appliances the new concept has been thought to manage them remotely
by using GSM, which enables the user to remotely control switching of domestic appliances. Just
by dialing keypad of remote telephone, from where you are calling you can perform ON / OFF
operation of the appliances.
 The ranges of appliances that can be controlled through tele remote systems are many in
numbers. Some of them are as follows and this depends upon the usage priority of the
appliances i.e. parking Lights, Music System,TV or other electrical / electronic appliances.

BLOCK DIAGRAM
2. INTRODUCTION TO EMBEDDED SYSTEMS

2.1 INTRODUCTION

Each day, our lives become more dependent on 'embedded systems', digital information
technology that is embedded in our environment. More than 98% of processors applied today are
in embedded systems, and are no longer visible to the customer as 'computers' in the ordinary
sense. An Embedded System is a special-purpose system in which the computer is completely
encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose
computer, such as a personal computer, an embedded system performs one or a few pre-defined
tasks, usually with very specific requirements. Since the system is dedicated to specific tasks,
design engineers can optimize it, reducing the size and cost of the product. Embedded systems
are often mass-produced, benefiting from economies of scale. The increasing use of PC hardware
is one of the most important developments in high-end embedded systems in recent years.
Hardware costs of high-end systems have dropped dramatically as a result of this trend, making
feasible some projects which previously would not have been done because of the high cost of
non-PC-based embedded hardware. But software choices for the embedded PC platform are not
nearly as attractive as the hardware.

Typically, an embedded system is housed on a single microprocessor board with the programs
stored in ROM. Virtually all appliances that have a digital interface -- watches, microwaves,
VCRs, cars -- utilize embedded systems. Some embedded systems include an operating system,
but many are so specialized that the entire logic can be implemented as a single program.

Physically, Embedded Systems range from portable devices such as digital watches and MP3
players, to large stationary installations like traffic lights, factory controllers, or the systems
controlling nuclear power plants.

In terms of complexity embedded systems can range from very simple with a single
microcontroller chip, to very complex with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.
2.2 DEFINITION OF AN EMBEDDED SYSTEM

An Embedded system is defined as, for a particular/specific application implementing the


software code to interact directly with that particular hardware what we built. Software is used
for providing features and flexibility, Hardware = {Processors, ASICs, Memory...} is used for
Performance (& sometimes security).

(Or)

An embedded system is a special-purpose computer system designed to perform one or a few


dedicated functions, often with real-time computing constraints. It is usually embedded as part of
a complete device including hardware and mechanical parts. In contrast, a general-purpose
computer, such as a personal computer, can do many different tasks depending on programming.

(Or)

An embedded system is a single-purpose computer built into a larger system for the purposes of
controlling and monitoring the system. A computer system that is part of a larger system or
machine.

There are many definitions of embedded system but all of these can be combined into a single
concept. An embedded system is a special purpose computer system that is used for particular
task.

2.3 FEATURES OF AN EMBEDDED SYSTEM

The versatility of the embedded computer system lends itself to utility in all kinds of enterprises,
from the simplification of deliverable products to a reduction in costs in their development and
manufacture. Complex systems with rich functionality employ special operating systems that
take into account major characteristics of embedded systems. Embedded operating systems have
minimized footprint and may follow real-time operating system specifics.
The special computers system is usually less powerful than general-purpose systems, although
some expectations do exist where embedded systems are very powerful and complicated.
Usually a low power consumption CPU with a limited amount of memory is used in embedded
systems. Many embedded systems use very small operating systems; most of these provide very
limited operating system capabilities.

Since the embedded system is dedicated to specific tasks, design engineers can optimize it,
reducing the size and cost of the product, or increasing the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.

Some embedded systems have to operate in extreme environment conditions such as very high
temperature & humidity.

For high volume systems such as portable music players or mobile phones, minimizing cost is
usually the primary design consideration. Engineers typically select hardware that is just “good
enough” to implement the necessary functions.

For low volume or prototype embedded systems, general purpose computers may be adapted by
limiting the programs or by replacing the operating system with a real-time operating system.

2.4 CHARACTERISTICS OF AN EMBEDDED SYSTEM

An Embedded computing systems generally exhibit rich functionality complex functionality is


usually the reason for introducing CPUs into the design. However, they also exhibit many non-
functional requirements that make the task especially challenging:

• Real-time deadlines that will cause system failure if not met;

• Multi-rate operation;

• In many cases, low power consumption;

• Low manufacturing cost, which often means limited code size.


Workstation programmers often concentrate on functionality. They may consider the
performance characteristics of a few computational kernels of their software, but rarely analyze
the total application. They almost never consider power consumption and manufacturing cost.
The need to juggle all these requirements makes embedded system programming very
challenging and is the reason why embedded system designers need to understand computer
architecture.
3. DESIGN ELEMENTS

3.1 MICROCONTROLLER

3.1.1 INTRODUCTION:

Microcontrollers as the name suggests are small controllers. They are like single chip
computers that are often embedded into other systems to function as processing/controlling unit.
For example the remote control you are using probably has microcontrollers inside that do
decoding and other controlling functions. They are also used in automobiles, washing machines,
microwave ovens, toys ... etc, where automation is needed.

Micro-controllers are useful to the extent that they communicate with other devices, such as
sensors, motors, switches, keypads, displays, memory and even other micro-controllers. Many
interface methods have been developed over the years to solve the complex problem of balancing
circuit design criteria such as features, cost, size, weight, power consumption, reliability,
availability, manufacturability.

Basically, a microcontroller is a device which integrates a number of the components of a


microprocessor system onto a single microchip. So a microcontroller combines onto the same
microchip. The following components:
1. CPU
2. Core Memory (Both RAM and ROM)
3. Some Parallel Digital I/Os
Essentially, a microcontroller is obtained by integrating the key components of microprocessor,
RAM, ROM, and Digital I/O onto the same chip die. Modern microcontrollers also contain a
wealth of other modules such as Serial I/O, Timers, and Analogue to Digital Converters. There
are a large number of specialized devices with additional modules for specific needs. E.g. CAN
controllers.

3.1.2 FEATURES:

 8K Bytes of In-System Reprogrammable Flash Memory


 Endurance: 1,000 Write/Erase Cycles
 Fully Static Operation: 0 Hz to 24 MHz
 256 x 8-bit Internal RAM
 32 Programmable I/O Lines
 Three 16-bit Timer/Counters
 Eight Interrupt Sources
 Programmable Serial Channel
 Low-power Idle and Power-down Modes

3.1.3 DESCRIPTION:

The AT89S52 is a low-power, high-performance CMOS 8-bit micro controller with 8Kbytes of
in-system programmable Flash memory.

The device is manufactured using Atmel’s high-density non-volatile memory technology and is
compatible with the industry-standard 80C51 micro controller. The on-chip Flash allows the
program memory to be reprogrammed in-system or by a conventional non-volatile memory
programmer. By combining a versatile 8-bit CPU with in-system programmable flash one
monolithic chip; the Atmel AT89S52 is a powerful micro controller, which provides a highly
flexible and cost- effective solution to many embedded control applications.
FIG: BLOCK DIAGRAM OF AT89S52
3.1.4 PIN CONFIGURATION:

FIG: PIN DIAGRAM OF 8051 MICROCONTROLLER

The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM,
32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, full duplex serial
port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static
logic for perationdown 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 interrupt or hardware reset.

3.1.5 PIN DESCRIPTION:

Vcc: Supply voltage.


GND: Ground.
PORT 0:

Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs.
Port 0 can also be configured to be the multiplexed low order address/data bus during accesses to
external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives
the code bytes during Flash programming and outputs the code bytes during program
verification. External pull-ups are required during program verification.

PORT 1:

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 Output buffers
can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the
internal pull-ups and can be used as inputs. In addition, P1.0 and P1.1 can be configured to be the
timer/counter 2 external count input

(P1.0/T2) and the timer/counter 2 trigger input P1.1/T2EX), respectively, as shown in the
following table. Port 1 also receives the low-order address bytes during Flash programming .

TABLE: PORT 1 FUNCTIONS.

PORT 2:

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the
internal pull-ups and can be used as inputs. Port 2 emits the high-order address byte during
fetches from external program memory and during accesses to external data memory that uses
16-bit addresses (MOVX @DPTR). In this application, Port 2 uses strong internal pull-ups when
emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI),
Port 2emits the contents of the P2 Special Function Register. Port 2 also receives the high-order
address bits and some control signals during Flash programming and verification.

PORT 3:

Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled
low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various
special features of the AT89S52, as shown in the following table.

Port 3 also receives some control signals for Flash programming and verification.

TABLE: PORT 3 FUNCTIONS.

RST:

Reset input. A high on this pin for two machine cycles while the oscillator is running resets the
device.
ALE/PROG:

Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG) during Flash
programming.

In normal operation, ALE is emitted at a constant rate of1/6 the oscillator frequency and may be
used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped
during each access to external data Memory. If desired, ALE operation can be disabled by setting
bit 0 of SFR location 8EH. with the bit set, ALE is active only during a MOVX or MOVC
instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if
the micro controller is in external execution mode.

PSEN:

Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external data
memory.

EA/VPP:

External Access Enable. EA must be strapped to GND in order to enable the device to fetch code
from external program memory locations starting at 0000H up to FFFFH. Note, however, that if
lock bit 1 is programmed, EA will be internally latched on reset. A should be strapped to VCC
for internal program executions. This pin also receives the 12-voltProgramming enables voltage
(VPP) during Flash programming.

XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
XTAL2: Output from the inverting oscillator amplifier.

OSCILLATOR CHARACTERISTICS:

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be
configured for use as an on-chip oscillator, as shown in Figure 1. 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 .

FIG: CRYSTAL CIRCUIT

3.2 POWER SUPPLY

DESCRIPTION:

As the microcontroller operating voltage is +5V DC. Through this power supply circuit we have
to create a +5V DC which is given to the micro controller. The below components are used to
create the power supply

230V AC Step down Bridge Filter Regulator


supply transformer rectifier
FIG: BLOCK DIAGRAM OF POWER SUPPLY

230V AC supply is given to the step down transformer of 12A type. It may be a 230V to
9V or 12V step down transformer. The output of the step down transformer is given to bridge
rectifier. The bridge rectifier is formed with 1N4007 diodes. The bridge rectifier converts the AC
Voltage into DC Voltage. But the output DC Voltage contains some AC component (ripples). So
we use a capacitors-2200uF/25V, 0.1uF/D and resistor of 10K as a filter for removing ripples.
That output DC Voltage is given to the positive voltage regulator LM7805 (i.e., 78 represents the
positive series and 5 represent the output voltage it can provide). So the output of the regulator
will be the regulated +5V DC. To indicate the condition of the circuit we place a LED at the end
of the circuit.

FIG: SCHEMATIC OF POWER SUPPLY

3.2.1 TRANSFORMER:

A transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled electrical conductors. A changing current in the first circuit (the primary)
creates a changing magnetic field; in turn, this magnetic field induces a changing voltage in the
second circuit (the secondary). By adding a load to the secondary circuit, one can make current
flow in the transformer, thus transferring energy from one circuit to the other.
The secondary induced voltage VS, of an ideal transformer, is scaled from the primary VP by a
factor equal to the ratio of the number of turns of wire in their respective windings:

Basic principle

The transformer is based on two principles: firstly, that an electric current can produce a
magnetic field (electromagnetism) and secondly that a changing magnetic field within a coil of
wire induces a voltage across the ends of the coil (electromagnetic induction). By changing the
current in the primary coil, it changes the strength of its magnetic field; since the changing
magnetic field extends into the secondary coil, a voltage is induced across the secondary.

A simplified transformer design is shown below. A current passing through the primary
coil creates a magnetic field. The primary and secondary coils are wrapped around a core of very
high magnetic permeability, such as iron; this ensures that most of the magnetic field lines
produced by the primary current are within the iron and pass through the secondary coil as well
as the primary coil.
FIG: AN IDEAL STEP DOWN TRANFORMER SHOWING FLUX IN THE CORE

Induction law

The voltage induced across the secondary coil may be calculated from Faraday's law of
induction, which states that:

Where VS is the instantaneous voltage, NS is the number of turns in the secondary coil and Φ
equals the magnetic flux through one turn of the coil. If the turns of the coil are oriented
perpendicular to the magnetic field lines, the flux is the product of the magnetic field strength B
and the area A through which it cuts. The area is constant, being equal to the cross-sectional area
of the transformer core, whereas the magnetic field varies with time according to the excitation
of the primary. Since the same magnetic flux passes through both the primary and secondary
coils in an ideal transformer, the instantaneous voltage across the primary winding equals
Taking the ratio of the two equations for VS and VP gives the basic equation for stepping up or
stepping down the voltage

Ideal power equation

If the secondary coil is attached to a load that allows current to flow, electrical power is
transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly
efficient; all the incoming energy is transformed from the primary circuit to the magnetic field
and into the secondary circuit. If this condition is met, the incoming electric power must equal
the outgoing power.

Pincoming = IPVP = Poutgoing = ISVS

giving the ideal transformer equation


Pin-coming = IPVP = Pout-going = ISVS

giving the ideal transformer equation

If the voltage is increased (stepped up) (VS > VP), then the current is decreased (stepped down) (IS
< IP) by the same factor. Transformers are efficient so this formula is a reasonable
approximation.

If the voltage is increased (stepped up) (VS > VP), then the current is decreased (stepped down) (IS
< IP) by the same factor. Transformers are efficient so this formula is a reasonable
approximation.

The impedance in one circuit is transformed by the square of the turns ratio. For example, if an
impedance ZS is attached across the terminals of the secondary coil, it appears to the primary
circuit to have an impedance of

This relationship is reciprocal, so that the impedance ZP of the primary circuit appears to the
secondary to be

Detailed operation

The simplified description above neglects several practical factors, in particular the primary
current required to establish a magnetic field in the core, and the contribution to the field due to
current in the secondary circuit.
Models of an ideal transformer typically assume a core of negligible reluctance with two
windings of zero resistance. When a voltage is applied to the primary winding, a small current
flows, driving flux around the magnetic circuit of the core. The current required to create the flux
is termed the magnetizing current; since the ideal core has been assumed to have near-zero
reluctance, the magnetizing current is negligible, although still required to create the magnetic
field.

The changing magnetic field induces an electromotive force (EMF) across each winding. Since
the ideal windings have no impedance, they have no associated voltage drop, and so the voltages
VP and VS measured at the terminals of the transformer, are equal to the corresponding EMFs.
The primary EMF, acting as it does in opposition to the primary voltage, is sometimes termed the
"back EMF". This is due to Lenz's law which states that the induction of EMF would always be
such that it will oppose development of any such change in magnetic field.

3.2.2 BRIDGE RECTIFIER

A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge configuration that
provides the same polarity of output voltage for any polarity of input voltage. When used in its
most common application, for conversion of alternating current (AC) input into direct current
(DC) output, it is known as a bridge rectifier. A bridge rectifier provides full-wave rectification
from a two-wire AC input, resulting in lower cost and weight as compared to a center-tapped
transformer design, but has two diode drops rather than one, thus exhibiting reduced efficiency
over a center-tapped design for the same output voltage.

Basic Operation

When the input connected at the left corner of the diamond is positive with respect to the one
connected at the right hand corner, current flows to the right along the upper colored path to the
output, and returns to the input supply via the lower one.
When the right hand corner is positive relative to the left hand corner, current flows along the
upper colored path and returns to the supply via the lower colored path.

In each case, the upper right output remains positive with respect to the lower right one. Since
this is true whether the input is AC or DC, this circuit not only produces DC power when
supplied with AC power: it also can provide what is sometimes called "reverse polarity
protection". That is, it permits normal functioning when batteries are installed backwards or DC
input-power supply wiring "has its wires crossed" (and protects the circuitry it powers against
damage that might occur without this circuit in place).

Prior to availability of integrated electronics, such a bridge rectifier was always constructed from
discrete components. Since about 1950, a single four-terminal component containing the four
diodes connected in the bridge configuration became a standard commercial component and is
now available with various voltage and current ratings.

Output smoothing (Using Capacitor)

For many applications, especially with single phase AC where the full-wave bridge serves to
convert an AC input into a DC output, the addition of a capacitor may be important because the
bridge alone supplies an output voltage of fixed polarity but pulsating magnitude (see diagram
above).

The function of this capacitor, known as a reservoir capacitor (aka smoothing capacitor) is to
lessen the variation in (or 'smooth') the rectified AC output voltage waveform from the bridge.
One explanation of 'smoothing' is that the capacitor provides a low impedance path to the AC
component of the output, reducing the AC voltage across, and AC current through, the resistive
load. In less technical terms, any drop in the output voltage and current of the bridge tends to be
cancelled by loss of charge in the capacitor.

This charge flows out as additional current through the load. Thus the change of load current and
voltage is reduced relative to what would occur without the capacitor. Increases of voltage
correspondingly store excess charge in the capacitor, thus moderating the change in output
voltage / current. Also see rectifier output smoothing.

3.2.3 FILTERS:

Filters are electronic circuits which perform signal processing functions, specifically to
remove unwanted frequency components from the signal, to enhance wanted ones, or both.
Electronic filters can be:

 passive or active
 analog or digital
 High-pass, low-pass, band pass, band-reject (band reject; notch), or all-pass.
 discrete-time (sampled) or continuous-time
 linear or non-linear
 infinite impulse response (IIR type) or finite impulse response (FIR type)

The most common types of electronic filters are linear filters, regardless of other aspects of their
design. See the article on linear filters for details on their design and analysis.

Passive implementations of linear filters are based on combinations of resistors (R), inductors (L)
and capacitors (C). These types are collectively known as passive filters, because they do not
depend upon an external power supply and/or they do not contain active components such as
transistors.

Inductors block high-frequency signals and conduct low-frequency signals, while capacitors do
the reverse. A filter in which the signal passes through an inductor, or in which a capacitor
provides a path to ground, presents less attenuation to low-frequency signals than high-frequency
signals and is a low-pass filter. If the signal passes through a capacitor, or has a path to ground
through an inductor, then the filter presents less attenuation to high-frequency signals than low-
frequency signals and is a high-pass filter. Resistors on their own have no frequency-selective
properties, but are added to inductors and capacitors to determine the time-constants of the
circuit, and therefore the frequencies to which it responds.

The inductors and capacitors are the reactive elements of the filter. The number
of elements determines the order of the filter. In this context, an LC tuned circuit being used in a
band-pass or band-stop filter is considered a single element even though it consists of two
components.

At high frequencies (above about 100 megahertz), sometimes the inductors consist of single
loops or strips of sheet metal, and the capacitors consist of adjacent strips of metal. These
inductive or capacitive pieces of metal are called stubs.

3.2.4 REGULATOR:

7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage
regulator ICs. The voltage source in a circuit may have fluctuations and would not give the fixed
voltage output. The voltage regulator IC maintains the output voltage at a constant value. The xx
in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated
power supply. Capacitors of suitable values can be connected at input and output pins depending
upon the respective voltage levels.

 PIN DIAGRAM: 
PIN DESCRIPTION: 
Pin No Function Name
1 Input voltage (5V-18V) Input
2 Ground (0V) Ground
3 Regulated output; 5V (4.8V-5.2V) Output

3.3 LIGHT EMITTING DIODE

Light-emitting diodes are used in applications as diverse as aviation lighting, automotive


lighting, advertising, general lighting, and traffic signals. LEDs have allowed new text, video
displays, and sensors to be developed, while their high switching rates are also useful in
advanced communications technology. Infrared LEDs are also used in the remote control units of
many commercial products including televisions, DVD players, and other domestic appliances.

When a light-emitting diode is forward-biased (switched on), electrons are able to


recombine with electron holes within the device, releasing energy in the form of photons. This
effect is called electroluminescence and the color of the light (corresponding to the energy of the
photon) is determined by the energy gap of the semiconductor. LEDs are often small in area (less
than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs
present many advantages over incandescent light sources including lower energy consumption,
longer lifetime, improved robustness, smaller size, and faster switching. LEDs powerful enough
for room lighting are relatively expensive and require more precise current and heat management
than compact fluorescent lamp sources of comparable output.
Like a normal diode, the LED consists of a chip of semi conducting material impregnated, or
doped, with impurities to create a p-n junction. As in other diodes, current flows easily from the
p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-carriers
electrons and holes flow into the junction from electrodes with different voltages. When an
electron meets a hole, it falls into a lower energy level, and releases energy in the form of a
photon.

The wavelength of the light emitted, and therefore its color, depends on the band gap energy of
the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes
recombine by a non-radiative transition which produces no optical emission, because these are
indirect band gap materials. The materials used for the LED have a direct band gap with energies
corresponding to near-infrared, visible or near-ultraviolet light. LED development began with
infrared and red devices made with gallium arsenide. Advances in materials science have made
possible the production of devices with ever-shorter wavelengths, producing light in a variety of
colors. LEDs are usually built on an n-type substrate, with an electrode attached to the p-type
layer deposited on its surface. P-type substrates, while less common, occur as well. Many
commercial LEDs, especially GaN/InGaN, also use sapphire substrate.

3.4 PUSH BUTTON

A push-button (also spelled pushbutton) (press-button in the UK) or simply button is a


simple switch mechanism for controlling some aspect of a machine or a process. Buttons are
typically made out of hard material, usually plastic or metal. The surface is usually flat or shaped
to accommodate the human finger or hand, so as to be easily depressed or pushed. Buttons are
most often biased switches, though even many un-biased buttons (due to their physical nature)
require a spring to return to their un-pushed state. Different people use different terms for the
"pushing" of the button, such as press, depress, mash, and punch.

3.5 RESET BUTTON

In electronics and technology, a reset button is a button that can reset a device. On video game
consoles, the reset button restarts the game, losing the player's unsaved progress. On personal
computers, the reset button clears the memory and reboots the machine forcibly. Reset buttons
are found on circuit breakers to reset the circuit. This button can cause data corruption so this
button often doesn't exist on many machines. Usually, in computers, it is present as a small
button, possibly recessed into the case, to prevent accidentally pressing it.

3.6 LIQUID CRYSTAL DISPLAY

Liquid crystal display is a type of display used in digital watches and many portable computers.

FIG: PIN DIAGRAM OF LCD

LCD displays utilize two sheets of polarizing material with a liquid crystal solution between
them. An electric current passed through the liquid causes the crystals to align so that light
cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to pass
through or blocking the light.
The input which we give to the microcontroller is displayed on the LCD of the transmitter side
and the message sent is received at the receiver side which displays at the receiver end of the
LCD and the corresponding operation is performed .They make complicated equipment easier to
operate.

3.6.1 PIN DESCRIPTION of LCD:

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 EN I/O Enable

7 DB0 I/O The 8-bit data bus

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

15 Backlight - Display purpose


Anode(+ve) using backlight

16 Backlight - Display purpose


Cathode(Ground) using backlight

The ASCII code to be displayed is eight bits long and is sent to the LCD either four or
eight bits at a time.

 If four bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits
with an "E" Clock pulse with each nibble) are sent to make up a full eight bit transfer.
 The "E" Clock is used to initiate the data transfer within the LCD.
 Deciding how to send the data to the LCD is most critical decision to be made for an
LCD interface application.
 Eight-bit mode is best used when speed is required in an application and at least ten I/O
pins are available.
 The "R/S" bit is used to select whether data or an instruction is being transferred between
the microcontroller and the LCD.
 If the Bit is set, then the byte at the current LCD "Cursor" Position can be reader written.
 When the Bit is reset, either an instruction is being sent to the LCD or the execution
status of the last instruction is read back.

3.7 MAX 232


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

Features:

1. Operates With Single 5-V Power Supply

2.LinBiCMOSE Process Technology

3.Two Drivers and Two Receivers

4.±30-V Input Levels

5.Low Supply Current . 8 mA Typical


6.Designed to be Interchangeable With Maxim MAX232

7.Applications

 TIA/EIA-232-F
 Battery-Powered Systems
 Terminals
 Modems
 Computers

Circuit connections:

A standard serial interfacing for PC, RS232C, requires negative logic, i.e., logic '1' is -3V to
-12V and logic '0' is +3V to +12V. To convert a TTL logic, say, TxD and RxD pins of the uC
chips, thus need a converter chip. A MAX232 chip has long been using in many uC boards. It
provides 2-channel RS232C port and requires external 10uF capacitors. A DS275 however, no
need external capacitor and smaller.
3.8 RELAYS

A relay is an electrical switch that opens and closes under the control of another electrical
circuit. In the original form, the switch is operated by an electromagnet to open or close one or
many sets of contacts. A relay is able to control an output circuit of higher power than the input
circuit, it can be considered to be, in a broad sense, a form of an electrical amplifier.

Relays are usuallly SPDT (single pole double through switch)or DPDT (double pole double
through switch) but they can have many more sets of switch contacts, for example relays with 4
sets of changeover contacts are readily available.

Basic operation of a relay:


An electric current through a conductor will produce a magnetic field at right angles to the
direction of electron flow. If that conductor is wrapped into a coil shape, the magnetic field
produced will be oriented along the length of the coil. The greater the current, the greater the
strength of the magnetic field, all other factors being equal.

Inductors react against changes in current because of the energy stored in this magnetic field.
When we construct a transformer from two inductor coils around a common iron core, we use
this field to transfer energy from one coil to the other. However, there are simpler and more
direct uses for electromagnetic fields than the applications we've seen with inductors and
transformers. The magnetic field produced by a coil of current-carrying wire can be used to exert
a mechanical force on any magnetic object, just as we can use a permanent magnet to attract
magnetic objects, except that this magnet (formed by the coil) can be turned on or off by
switching the current on or off through the coil.

If we place a magnetic object near such a coil for the purpose of making that object move when
we energize the coil with electric current, we have what is called a solenoid. The movable
magnetic object is called an armature, and most armatures can be moved with either direct
current (DC) or alternating current (AC) energizing the coil. The polarity of the magnetic field is
irrelevant for the purpose of attracting an iron armature. Solenoids can be used to electrically
open door latches, open or shut valves, move robotic limbs, and even actuate electric switch
mechanisms and is used to actuate a set of switch contacts.

Applications:

 To control a high-voltage circuit with a low-voltage signal, as in some types of modems


or audio amplifiers,
 To control a high-current circuit with a low-current signal, as in the starter solenoid of an
automobile,
 To detect and isolate faults on transmission and distribution lines by opening and closing
circuit breakers (protection relays),
 To isolate the controlling circuit from the controlled circuit when the two are at different
potentials, for example when controlling a mains-powered device from a low-voltage switch.
The latter is often applied to control office lighting as the low voltage wires are easily installed in
partitions, which may be often moved as needs change. They may also be controlled by room
occupancy detectors in an effort to conserve energy,

 To perform logic functions. For example, the boolean AND function is realised by
connecting NO relay contacts in series, the OR function by connecting NO contacts in parallel.
The change-over or Form C contacts perform the XOR (exclusive or) function. Similar functions
for NAND and NOR are accomplished using NC contacts. The Ladder programming language is
often used for designing relay logic networks.
o Early computing. Before vacuum tubes and transistors, relays were used as logical
elements in digital computers. See ARRA (computer), Harvard Mark II, Zuse Z2, and Zuse Z3.
o Safety-critical logic. Because relays are much more resistant than semiconductors
to nuclear radiation, they are widely used in safety-critical logic, such as the control panels of
radioactive waste-handling machinery.
 To perform time delay functions. Relays can be modified to delay opening or delay
closing a set of contacts. A very short (a fraction of a second) delay would use a copper disk
between the armature and moving blade assembly. Current flowing in the disk maintains
magnetic field for a short time, lengthening release time. For a slightly longer (up to a minute)
delay, a dashpot is used. A dashpot is a piston filled with fluid that is allowed to escape slowly.
The time period can be varied by increasing or decreasing the flow rate. For longer time periods,
a mechanical clockwork timer is installed

3.9 GSM (Global System for Mobile communications)

GSM (Global System for Mobile communications) is a cellular network, which means that
mobile phones connect to it by searching for cells in the immediate vicinity. GSM networks
operate in four different frequency ranges. Most GSM networks operate in the 900 MHz or 1800
MHz bands. Some countries in the Americas use the 850 MHz and 1900 MHz bands because the
900 and 1800 MHz frequency bands were already allocated.

The rarer 400 and 450 MHz frequency bands are assigned in some countries, where these
frequencies were previously used for first-generation systems.

GSM-900 uses 890–915 MHz to send information from the mobile station to the base station
(uplink) and 935–960 MHz for the other direction (downlink), providing 124 RF channels
(channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. In some
countries the GSM-900 band has been extended to cover a larger frequency range. This 'extended
GSM', E-GSM, uses 880–915 MHz (uplink) and 925–960 MHz (downlink), adding 50 channels
(channel numbers 975 to 1023 and 0) to the original GSM-900 band. Time division multiplexing
is used to allow eight full-rate or sixteen half-rate speech channels per radio frequency channel.
There are eight radio timeslots (giving eight burst periods) grouped into what is called a TDMA
frame. Half rate channels use alternate frames in the same timeslot. The channel data rate is
270.833 kbit/s, and the frame duration is 4.615 ms.

GSM Advantages:

GSM also pioneered a low-cost, to the network carrier, alternative to voice calls, the Short t
message service (SMS, also called "text messaging"), which is now supported on other mobile
standards as well. Another advantage is that the standard includes one worldwide Emergency
telephone number, 112. This makes it easier for international travelers to connect to emergency
services without knowing the local emergency number.

The GSM Network:

GSM provides recommendations, not requirements. The GSM specifications define the functions
and interface requirements in detail but do not address the hardware. The GSM network is
divided into three major systems: the switching system (SS), the base station system (BSS), and
the operation and support system (OSS).
The Switching System:

The switching system (SS) is responsible for performing call processing and subscriber-related
functions. The switching system includes the following functional units.

 Home location register (HLR): The HLR is a database used for storage and management
of subscriptions. The HLR is considered the most important database, as it stores permanent data
about subscribers, including a subscriber's service profile, location information, and activity
status. When an individual buys a subscription from one of the PCS operators, he or she is
registered in the HLR of that operator.

 Mobile services switching center (MSC): The MSC performs the telephony switching
functions of the system. It controls calls to and from other telephone and data systems. It also
performs such functions as toll ticketing, network interfacing, common channel signaling, and
others.

 Visitor location register (VLR): The VLR is a database that contains temporary
information about subscribers that is needed by the MSC in order to service visiting subscribers.
The VLR is always integrated with the MSC. When a mobile station roams into a new MSC
area, the VLR connected to that MSC will request data about the mobile station from the HLR.
Later, if the mobile station makes a call, the VLR will have the information needed for call setup
without having to interrogate the HLR each time.

 Authentication center (AUC): A unit called the AUC provides authentication and
encryption parameters that verify the user's identity and ensure the confidentiality of each call.
The AUC protects network operators from different types of fraud found in today's cellular
world.

 Equipment identity register (EIR): The EIR is a database that contains information about
the identity of mobile equipment that prevents calls from stolen, unauthorized, or defective
mobile stations. The AUC and EIR are implemented as stand-alone nodes or as a combined
AUC/EIR node.
The Base Station System (BSS):

All radio-related functions are performed in the BSS, which consists of base station controllers
(BSCs) and the base transceiver stations (BTSs).

 BSC: The BSC provides all the control functions and physical links between the MSC
and BTS. It is a high-capacity switch that provides functions such as handover, cell configuration
data, and control of radio frequency (RF) power levels in base transceiver stations. A number of
BSCs are served by an MSC.

 BTS: The BTS handles the radio interface to the mobile station. The BTS is the radio
equipment (transceivers and antennas) needed to service each cell in the network. A group of
BTSs are controlled by a BSC.

The Operation and Support System

The operations and maintenance center (OMC) is connected to all equipment in the switching
system and to the BSC. The implementation of OMC is called the operation and support system
(OSS). The OSS is the functional entity from which the network operator monitors and controls
the system. The purpose of OSS is to offer the customer cost-effective support for centralized,
regional and local operational and maintenance activities that are required for a GSM network.
An important function of OSS is to provide a network overview and support the maintenance
activities of different operation and maintenance organizations.

Additional Functional Elements

 Message center (MXE): The MXE is a node that provides integrated voice, fax, and data
messaging. Specifically, the MXE handles short message service, cell broadcast, voice mail, fax
mail, e-mail, and notification.

 Mobile service node (MSN): The MSN is the node that handles the mobile intelligent
network (IN) services.
 Gateway mobile services switching center (GMSC): A gateway is a node used to
interconnect two networks. The gateway is often implemented in an MSC. The MSC is then
referred to as the GMSC.

 GSM inter-working unit (GIWU): The GIWU consists of both hardware and software
that provides an interface to various networks for data communications. Through the GIWU,
users can alternate between speech and data during the same call. The GIWU hardware
equipment is physically located at the MSC/VLR.

GSM Network Areas:

The GSM network is made up of geographic areas. As shown in bellow figure, these areas
include cells, location areas (LAs), MSC/VLR service areas, and public land mobile network
(PLMN) areas.

Location Areas:

The cell is the area given radio coverage by one base transceiver station. The GSM network
identifies each cell via the cell global identity (CGI) number assigned to each cell. The location
area is a group of cells. It is the area in which the subscriber is paged. Each LA is served by one
or more base station controllers, yet only by a single MSC Each LA is assigned a location area
identity (LAI) number.

MSC/VLR service areas:

An MSC/VLR service area represents the part of the GSM network that is covered by one MSC
and which is reachable, as it is registered in the VLR of the MSC.

PLMN service areas:

The PLMN service area is an area served by one network operator.

GSM Specifications:

Specifications for different personal communication services (PCS) systems vary among the
different PCS networks. Listed below is a description of the specifications and characteristics for
GSM.

 Frequency band: The frequency range specified for GSM is 1,850 to 1,990 MHz (mobile
station to base station).

 Duplex distance: The duplex distance is 80 MHz. Duplex distance is the distance
between the uplink and downlink frequencies. A channel has two frequencies, 80 MHz apart.

 Channel separation: The separation between adjacent carrier frequencies. In GSM, this is
200 kHz.

 Modulation: Modulation is the process of sending a signal by changing the


characteristics of a carrier frequency. This is done in GSM via Gaussian minimum shift keying
(GMSK).

 Transmission rate: GSM is a digital system with an over-the-air bit rate of 270 kbps.
 Access method: GSM utilizes the time division multiple access (TDMA) concept. TDMA
is a technique in which several different calls may share the same carrier. Each call is assigned a
particular time slot.

 Speech coder: GSM uses linear predictive coding (LPC). The purpose of LPC is to
reduce the bit rate. The LPC provides parameters for a filter that mimics the vocal tract. The
signal passes through this filter, leaving behind a residual signal. Speech is encoded at 13 kbps.

GSM Subscriber Services:

Dual-tone multifrequency (DTMF): DTMF is a tone signaling scheme often used for various
control purposes via the telephone network, such as remote control of an answering machine.
GSM supports full-originating DTMF.

Facsimile group III—GSM supports CCITT Group 3 facsimile. As standard fax machines are
designed to be connected to a telephone using analog signals, a special fax converter connected
to the exchange is used in the GSM system. This enables a GSM–connected fax to communicate
with any analog fax in the network.

Short message services: A convenient facility of the GSM network is the short message service.
A message consisting of a maximum of 160 alphanumeric characters can be sent to or from a
mobile station. This service can be viewed as an advanced form of alphanumeric paging with a
number of advantages. If the subscriber's mobile unit is powered off or has left the coverage area,
the message is stored and offered back to the subscriber when the mobile is powered on or has
reentered the coverage area of the network. This function ensures that the message will be
received.

Cell broadcast: A variation of the short message service is the cell broadcast facility. A message
of a maximum of 93 characters can be broadcast to all mobile subscribers in a certain geographic
area. Typical applications include traffic congestion warnings and reports on accidents.
Voice mail: This service is actually an answering machine within the network, which is
controlled by the subscriber. Calls can be forwarded to the subscriber's voice-mail box and the
subscriber checks for messages via a personal security code.

Fax mail: With this service, the subscriber can receive fax messages at any fax machine. The
messages are stored in a service center from which they can be retrieved by the subscriber via a
personal security code to the desired fax number

Supplementary Services:

GSM supports a comprehensive set of supplementary services that can complement and support
both telephony and data services.

Call forwarding: This service gives the subscriber the ability to forward incoming calls to
another number if the called mobile unit is not reachable, if it is busy, if there is no reply, or if
call forwarding is allowed unconditionally.

Barring of outgoing calls: This service makes it possible for a mobile subscriber to prevent all
outgoing calls.

Barring of incoming calls: This function allows the subscriber to prevent incoming calls. The
following two conditions for incoming call barring exist: baring of all incoming calls and barring
of incoming calls when roaming outside the home PLMN.

Advice of charge (AoC): The AoC service provides the mobile subscriber with an estimate of the
call charges. There are two types of AoC information: one that provides the subscriber with an
estimate of the bill and one that can be used for immediate charging purposes. AoC for data calls
is provided on the basis of time measurements.

Call hold: This service enables the subscriber to interrupt an ongoing call and then subsequently
reestablish the call. The call hold service is only applicable to normal telephony.
Call waiting: This service enables the mobile subscriber to be notified of an incoming call
during a conversation. The subscriber can answer, reject, or ignore the incoming call. Call
waiting is applicable to all GSM telecommunications services using a circuit-switched
connection.

Multiparty service: The multiparty service enables a mobile subscriber to establish a multiparty
conversation—that is, a simultaneous conversation between three and six subscribers. This
service is only applicable to normal telephony.

Calling line identification presentation/restriction: These services supply the called party with
the integrated services digital network (ISDN) number of the calling party. The restriction
service enables the calling party to restrict the presentation. The restriction overrides the
presentation.

Closed user groups (CUGs): CUGs are generally comparable to a PBX. They are a group of
subscribers who are capable of only calling themselves and certain numbers

Main AT commands:

"AT command set for GSM Mobile Equipment” describes the Main AT commands to
communicate via a serial interface with the GSM subsystem of the phone.

AT commands are instructions used to control a modem. AT is the abbreviation of Attention.


Every command line starts with "AT" or "at". That's why modem commands are called AT
commands. Many of the commands that are used to control wired dial-up modems, such as ATD
(Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also
supported by GSM/GPRS modems and mobile phones. Besides this common AT command set,
GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM
technology, which includes SMS-related commands like AT+CMGS (Send SMS message),
AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and
AT+CMGR (Read SMS messages).
Note that the starting "AT" is the prefix that informs the modem about the start of a command
line. It is not part of the AT command name. For example, D is the actual AT command name in
ATD and +CMGS is the actual AT command name in AT+CMGS. However, some books and
web sites use them interchangeably as the name of an AT command.

Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or
mobile phone:

 Get basic information about the mobile phone or GSM/GPRS modem. For example,
name of manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International
Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).

 Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and
IMSI number (International Mobile Subscriber Identity) (AT+CIMI).

 Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile
phone activity status (AT+CPAS), mobile network registration status (AT+CREG), radio signal
strength (AT+CSQ), battery charge level and battery charging status (AT+CBC).

 Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).

 Send and receive fax (ATD, ATA, AT+F*).

 Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW) or


delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS messages
(AT+CNMI).

 Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.

 Perform security-related tasks, such as opening or closing facility locks (AT+CLCK),


checking whether a facility is locked (AT+CLCK) and changing passwords (AT+CPWD).
(Facility lock examples: SIM lock [a password must be given to the SIM card every time the
mobile phone is switched on] and PH-SIM lock [a certain SIM card is associated with the mobile
phone. To use other SIM cards with the mobile phone, a password must be entered.])

 Control the presentation of result codes / error messages of AT commands. For example,
you can control whether to enable certain error messages (AT+CMEE) and whether error
messages should be displayed in numeric format or verbose format (AT+CMEE=1 or
AT+CMEE=2).

 Get or change the configurations of the mobile phone or GSM/GPRS modem. For
example, change the GSM network (AT+COPS), bearer service type (AT+CBST), radio link
protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and storage of SMS
messages (AT+CPMS).

 Save and restore configurations of the mobile phone or GSM/GPRS modem. For
example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging such as
the SMS center address.

3.10 DC MOTOR

A DC motor is designed to run on DC electric power. Two examples of pure DC designs are
Michael Faraday's homopolar motor (which is uncommon), and the ball bearin motor, which is
(so far) a novelty. By far the most common DC motor types are the brushed and brushless types,
which use internal and external commutation respectively to create an oscillating AC current
from the DC source -- so they are not purely DC machines in a strict sense.
Types of dcmotors:

1. Brushed DC Motors

2. Brushless DC motors

3. Coreless DC motors

Brushed DC motors:

The classic DC motor design generates an oscillating current in a wound rotor with a split
ring commutator, and either a wound or permanent magnet stator. A rotor consists of a coil
wound around a rotor which is then powered by any type of battery.

Many of the limitations of the classic commutator DC motor are due to the need for brushes to
press against the commutator. This creates friction. At higher speeds, brushes have increasing
difficulty in maintaining contact. Brushes may bounce off the irregularities in the commutator
surface, creating sparks. This limits the maximum speed of the machine. The current density per
unit area of the brushes limits the output of the motor. The imperfect electric contact also causes
electrical noise. Brushes eventually wear out and require replacement, and the commutator itself
is subject to wear and maintenance. The commutator assembly on a large machine is a costly
element, requiring precision assembly of many parts. there are three types of dc motor 1. dc
series motor 2. dc shunt motor 3. dc compound motor - these are also two type a. cummulative
compound b. deffercial compounnd
Brushless DC motors:

Some of the problems of the brushed DC motor are eliminated in the brushless design. In this
motor, the mechanical "rotating switch" or commutator/brushgear assembly is replaced by an
external electronic switch synchronised to the rotor's position. Brushless motors are typically 85-
90% efficient, whereas DC motors with brushgear are typically 75-80% efficient.

Midway between ordinary DC motors and stepper motors lies the realm of the brushless DC
motor. Built in a fashion very similar to stepper motors, these often use a permanent magnet
external rotor, three phases of driving coils, one or more Hall effect sensors to sense the position
of the rotor, and the associated drive electronics. The coils are activated, one phase after the
other, by the drive electronics as cued by the signals from the Hall effect sensors. In effect, they
act as three-phase synchronous motors containing their own variable-frequency drive electronics.
A specialized class of brushless DC motor controllers utilize EMF feedback through the main
phase connections instead of Hall effect sensors to determine position and velocity. These motors
are used extensively in electric radio-controlled vehicles. When configured with the magnets on
the outside, these are referred to by modelists as outrunner motors.

Brushless DC motors are commonly used where precise speed control is necessary, as in
computer disk drives or in video cassette recorders, the spindles within CD, CD-ROM (etc.)
drives, and mechanisms within office products such as fans, laser printers and photocopiers.
They have several advantages over conventional motors:

 Compared to AC fans using shaded-pole motors, they are very efficient, running much
cooler than the equivalent AC motors. This cool operation leads to much-improved life of the
fan's bearings.
 Without a commutator to wear out, the life of a DC brushless motor can be significantly
longer compared to a DC motor using brushes and a commutator. Commutation also tends to
cause a great deal of electrical and RF noise; without a commutator or brushes, a brushless motor
may be used in electrically sensitive devices like audio equipment or computers.
 The same Hall effect sensors that provide the commutation can also provide a convenient
tachometer signal for closed-loop control (servo-controlled) applications. In fans, the tachometer
signal can be used to derive a "fan OK" signal.
 The motor can be easily synchronized to an internal or external clock, leading to precise
speed control.
 Brushless motors have no chance of sparking, unlike brushed motors, making them better
suited to environments with volatile chemicals and fuels. Also, sparking generates ozone which
can accumulate in poorly ventilated buildings risking harm to occupants' health.
 Brushless motors are usually used in small equipment such as computers and are
generally used to get rid of unwanted heat.
 They are also very quiet motors which is an advantage if being used in equipment that is
affected by vibrations.

Modern DC brushless motors range in power from a fraction of a watt to many kilowatts. Larger
brushless motors up to about 100 kW rating are used in electric vehicles. They also find
significant use in high-performance electric model aircraft.

Coreless DC motors:

Nothing in the design of any of the motors described above requires that the iron (steel) portions
of the rotor actually rotate; torque is exerted only on the windings of the electromagnets. Taking
advantage of this fact is the coreless DC motor, a specialized form of a brush or brushless DC
motor. Optimized for rapid acceleration, these motors have a rotor that is constructed without
any iron core. The rotor can take the form of a winding-filled cylinder inside the stator magnets,
a basket surrounding the stator magnets, or a flat pancake (possibly formed on a printed wiring
board) running between upper and lower stator magnets. The windings are typically stabilized by
being impregnated with Electrical epoxy potting systems. Filled epoxies that have moderate
mixed viscosity and a long gel time. These systems are highlighted by low shrinkage and low
exotherm. Typically UL 1446 recognized as a potting compound for use up to 180C (Class H)
UL File No. E 210549.
Because the rotor is much lighter in weight (mass) than a conventional rotor formed from copper
windings on steel laminations, the rotor can accelerate much more rapidly, often achieving a
mechanical time constant under 1 ms. This is especially true if the windings use aluminum rather
than the heavier copper. But because there is no metal mass in the rotor to act as a heat sink, even
small coreless motors must often be cooled by forced air.

These motors were commonly used to drive the capstan(s) of magnetic tape drives and are still
widely used in high-performance servo-controlled systems, like radio-controlled
vehicles/aircraft, humanoid robotic systems, industrial automation, medical devices, etc.
4. CIRCUIT EXPLANATION

4.1 DESCRIPTION

The system shown below works in the following manner, the SMS sent by user is received by the
GSM receiver and then sent to an 8051 microcontroller in order to process it. The appliances
used in our project are a bulb and a fan.

FIG: CIRCUIT DIAGRAM OF THE PROJECT

The 230V AC supply is the first step down to 12V AC using transformer. This is then converted
to the DC using bridge rectifier. The AC ripples are filtered out by using a capacitor and given to
the input pin of the voltage regulator 7805.At the output pin of this regulator, we get a constant
5V DC which is used for MC and other ICs in this project. An LED is used as an indication to
know whether the power supply is provided. The MAX232 is an IC that converts signals from an
RS-232serial port to signals suitable for use in TTL compatible digital logic circuits.

When the MAX232 IC receives a TTL level to convert, it changes a TTL Logic 0 to between +3
and +15V, and changes TTL Logic 1 to between -3 to -15V, and vice versa for converting from
RS232 to TTL. However, in this project we only send commands to the microcontroller and do
not need to receive messages. Hence the main purpose of MAX232 in this project is to convert
signals from an RS-232 serial port to TTL signals suitable for use in 8051 microcontroller.

When a command is sent by the user, it is received by the GSM receiver and then sent to
MAX232 for conversion to TTL form. Once it is done, the signals are given to the
microcontroller 8051 for functioning as per the command.

The commands used in our project are as follows:

<111> : Fan ON

<222> : Bulb ON

<333> : Fan OFF

<444> :Bulb OFF

An SPDT relay (switching circuit) is used to ensure the current flow unidirectionally from the
8051 to the bulb. The bulb is connected to the NO(Normally open) terminal of the relay.

The appliances remain in the previous state until a command is received by it.

On reset, the appliances are turned on momentarily due to the high state present in the pins of
8051 microcontroller at that time.

4.2 CODE

#include<REG51.H>
#include"UART.c"
#include"lcd4bitP2.h"

sbit device1 = P0^0;


sbit device2 = P0^1;
main()
{
int i,j,k;
char a[68],temp;
P0=0x00;
lcd_init();
Init_Uart();
for(j=0;j<4444;j++);

lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay("HOME AUTOMATIOM");
lcdcmd(0xC0);
msgdisplay(" USING GSM ");

send_char(0x0A); // catrige return


send_char(0x0D); // catrige return
send_string("AT+CNMI=2,2,2,0,0"); // for
send_char(0x0A); // catrige return
send_char(0x0D); // catrige return
for(i=0;i<6;i++)
temp=RX_CHAR();
send_char(0x0A); // catrige return
send_char(0x0D); // catrige return
send_string("AT+CMGF=1");//for making the GSM modem to work in text
mode.
send_char(0x0A); // catrige return
send_char(0x0D); // catrige return
for(i=0;i<6;i++)
temp=RX_CHAR();
delay(100);
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay(" waiting for sms ");
for(i=0;i<6;i++)
temp=RX_CHAR(); // just for discarding ok

P0=0x00;
while(1)
{
for (i=0;i<20;i++)
{
a[i]=RX_CHAR();
if(a[i]=='>') // the SMS message from the mobile
should be ended with '>'
{
k=i;
temp=SBUF;
temp=SBUF;
break;

}
}
k=k-1;
if(a[k]=='1') //DEVICE 1 ON
WHEN MESSAGE READ
{
device1=1;
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay(" DEVICE 1 ON ");
delay(2000);
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay("HOME AUTOMATIOM");
lcdcmd(0xC0);
msgdisplay(" USING GSM ");
}
else if(a[k]=='2') // DEVICE 1 off WHEN MESSAGE
READ
{
device1=0;
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay(" DEVICE 1 OFF");
delay(2000);
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay("HOME AUTOMATIOM");
lcdcmd(0xC0);
msgdisplay(" USING GSM ");
}

else if(a[k]=='3') // DEVICE 2 ON WHEN MESSAGE


UNREAD
{
device2=1;
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay(" DEVICE 2 ON");
delay(2000);
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay("HOME AUTOMATIOM");
lcdcmd(0xC0);
msgdisplay(" USING GSM ");
}
else if(a[k]=='4') // DEVICE 2 Off WHEN MESSAGE
UNREAD..
{
device2=0;
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay(" DEVICE 2 OFF");
delay(2000);
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay("HOME AUTOMATIOM");
lcdcmd(0xC0);
msgdisplay(" USING GSM ");
}
/* else if(a[k]=='5') // DEVICE 1&2 ON WHEN MESSAGE
UNREAD..
{
device1=1;device2=1;
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay(" DEVICE 1&2 ON");
delay(2000);
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay("HOME AUTOMATIOM");
lcdcmd(0xC0);
msgdisplay(" USING GSM ");
}
else if(a[k]=='6') // DEVICE 1&2 ON WHEN MESSAGE
UNREAD..
{
device1=0;device2=0;
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay(" DEVICE 1&2 OFF");
delay(2000);
lcdcmd(0x01);
lcdcmd(0x80);
msgdisplay("HOME AUTOMATIOM");
lcdcmd(0xC0);
msgdisplay(" USING GSM ");
} */
temp=SBUF; // jus for clearing the read buffer
}
}
4.3 INTERFACING LCD WITH CONTROLLER:

CODE:

#define lcd_data P2
#include<string.h>

void lcd_init(void);
void lcdcmd(unsigned char value);
void lcddata(unsigned char value);
void msgdisplay(unsigned char b[]);
void delay(unsigned int value);
void conv(unsigned int temp1_value) ;

void lcd_init(void)
{
lcdcmd(0x28);
lcdcmd(0x28);
lcdcmd(0x28);
lcdcmd(0x0c);
lcdcmd(0x06);
lcdcmd(0x01);
lcdcmd(0x80);
delay(5);
}
//////////////////////////////////////////////////////////////////////////
void lcdcmd(unsigned char value) // LCD COMMAND
{
lcd_data = ((value & 0xF0) | 0x02);
lcd_data = 0;
lcd_data = ((value << 4) | 0x02);
lcd_data = 0;
delay(5);
}
/////////////////////////////////////////////////////////////////////////
void lcddata(unsigned char value)
{
lcd_data = ((value & 0xF0) | 0x03);
lcd_data = 0;
lcd_data = ((value << 4) | 0x03);
lcd_data = 0;
delay(5);
}
/////////////////////////////////////////////////////////////////////////
void msgdisplay(unsigned char b[])
{
unsigned char s,count=0;
for(s=0;b[s]!='\0';s++)
{
if(s==16)
lcdcmd(0xc0);
if(s==32)
lcdcmd(0x01);
lcddata(b[s]);
}
}
///////////////////////////////////////////////////////////////
void delay(unsigned int value)
{
unsigned int x,y;
for(x=0;x<100;x++)
for(y=0;y<value;y++);
}
///////////////////////////////////////////////////////////////////////
void conv(unsigned int temp1_value)
{
unsigned char value,d1,d2,d3,d4,val1;
value=temp1_value/10;
d4=temp1_value%10;
val1=value/10;
d3=value%10;
d2=val1%10;
d1=val1/10;

if(d1==0)
lcddata(d1+48);delay(10);
lcddata(d2+48);delay(10);
lcddata(d3+48);delay(10);
lcddata(d4+48);delay(10);

}
5. ADVANTAGES

 This will help to eliminate need of human personnel attending the device till it has to be
switched off/on. Based on experience of approximate time to switch on/off ,he/she can
control the device, saving time.
 It will also help to control device while attending to other work.
 User can control device in case of forgetting to do so while leaving for some other place.
 Energy conservation
 Devices can be controlled from long distances.
 Economical design
 Can be easily implemented in homes
 Can be used by everyone with just the knowledge of text SMS
 Format of the SMS is simple to understand and write

6. DISADVANTAGES
 The system is network dependent. Hence, network congestion can reduce the reliability
of the system.
 If user makes any mistakes while typing the message format, the message will not be
acknowledged by the microcontroller hence the system will not work.
7. FUTURE SCOPE

The project “GSM BASED HOME AUTOMATION” is intended to automate the certain
functions of home appliances. Smart home technologies have been around for about 30 years,
mostly relying on some proprietary technologies and applications. With the recent expansion of
communication networks, smart home applications can be further enhanced with new dimension
of capabilities that were not available before. In particular, wireless access technologies will
soon enable exotic and economically feasible applications. The device is much helpful in
controlling home. It reduces the wastage of valuable time and our daily life become easier and
flexible.

8. CONCLUSION

The main purpose of the project is to provide a smart and efficient way to control our home
appliances with the help of modern communication technology. With the combination of
GSM this project is not only a modern approach to next generation home controlled at our
fingertips but also a very friendly and easy to use system. This project will give our daily life a
new dimension at the same time it will help us to save energy.
9. BIBLIOGRAPHY

TEXT BOOKS REFERRED

 The 8051 Micro controller and Embedded Systems by Muhammad Ali Mazidi and
Janice Gillispie Mazidi
 The 8051 Micro controller Architecture, Programming & Applications by Kenneth
J.Ayala
 Electronic Components by D.V.Prasad ;Goldsmith, Wireless Communications,
Cambridge Press, 2005.
 S. Haykin, Communication Systems, Wiley, New York, 2002.

WEBSITES REFERRED
 www.allthedatasheets.com
 www.atmel.com
 www.microcontroller.com
 www.howstuffworks.com

You might also like