Professional Documents
Culture Documents
Sr. No.
CONTENT
PAGE NO.
1)
CERTIFICATE ...
2)
ACKNOWLEDGEMENT ...
ii
3)
IMAGE OF PROJECT
iii
4)
TABLE OF CONTENTS .
5)
6)
7)
8)
GSM . 7-9
9)
10)
iv
13)
14)
15)
BIBLOGRAPHY.. ...42-56
ABSTRACT
This project demonstrates a novel method which enables users to control industrial appliances
and systems from remote using a cell phone-based interface. In its most simple form Home
Automation is the ability to control lighting & household appliances remotely. Almost
everyone already has a limited amount of Home Automation. Home Automation is analogous
to earlier developments in factory and office automation. It includes the remote control and
monitoring of domestic appliances, home security and energy management. To access the
control unit, the user should send an authentication code (DTMF) along with the
required/desired function/action to his/her home control system via Global System for Mobile
communication (GSM). Upon being properly authenticated, the cell phone-based interface at
home (control unit) would relay the commands to a microcontroller that would perform the
required function/action, and return a function completion code that would be sent to the
source of the original command (users cell phone).
INTRODUCTION
Imagine being able to control all the electrical appliances of your home from virtually any
place you are in the world! For example, say one cold winter day, you are stuck in traffic on
the motorway after a long day at work. By pressing a few keystrokes on your mobile phone,
you activate a macro which turns on the heating, prepares your Jacuzzi, and switches on your
electrical fireplace and lava-lamps at your premises.
In today's times the GSM mobile terminal has become one of the items that are constantly
with us. Just like our wallet/purse, keys or watch, the GSM mobile terminal provides us with
a communication channel that enables us to communicate with the world. The want for a
person to be reachable or to call anyone at any time is very appealing.
Using the cybernetic concept of action space, we in fact extend the action space of the human
with the mobile terminal, enabling the subscriber to talk to another subscriber and thus
exchange information, issue or receive commands.
This Project is used to control our household electrical devices from anywhere through the
cell phone. The circuit consists of a DTMF tone detector and a powerful 8 bit Microcontroller
AT89C51. The microcontroller controls all the system. In this project we control total four
devices.
The Microcontroller senses the DTMF signal through the DTMF decoder IC MT8870 and it
switch on/off the corresponding devices according to the user need. The circuit has an inbuilt
phone ring sensor circuit and the system will take over the phone control if it was not taken
manually. Press the corresponding numbers to turn on/off the devices.
The aim of the project is to investigate a cost effective solution that will provide controlling
of home appliances remotely and will also enable home security against intrusion in the
absence of home owner.
The motivation is to facilitate the users to automate their homes having ubiquitous access.
The system provides availability due to development of a low cost system. The home
appliances control system with an affordable cost was thought to be built that should be
mobile providing remote access to the appliances and allowing home security.
Home security has been a major issue where crime is increasing and everybody wants to take
proper measures to prevent intrusion. In addition there was a need to automate home so that
user can take advantage of the technological advancement in such a way that a person getting
off the office does not get melted with the hot climate. Therefore this paper proposes a system
that allows user to be control home appliances ubiquitously and also provide security on
detection of intrusion via SMS using GSM technology.
The home automation today needs to make use of the latest technological components
available. In this project, we present the design and implementation of a home automation
system
where
communication
technologies
GSM
(Global
System
for
Mobile
INDUSTRIAL AUTOMATION
Home automation security system is a specialized field dealing with specified requirements
of homes in the usage of easy-to-use technologies for security and comforts of the residents.
Home automation includes all that a building automation provides like the climate controls,
door and window controls and security etc plus additionally controlling multimedia home
theatres, pet feeding, plant watering, blinds and so on. But there exists a difference in that
home automation emphasizes more on comforts through ergonomics and ease of operation.
With the fast development in the field, doorways for wireless home automation system are
being opened in a big way.
Automation is the process of automatically performing everyday functions around the home
to save you time, energy, money and at the same time offering improved security
Home automation saves your time and effort by controlling you home automatically for
performing routine functions such as watering your grass, or turning off all lights, setting the
thermostat to economy mode, control scheduled appliances operation and arming the security
system when you retire for the night.
The concept of home automation is to connect all of these systems and devices to a
central controller so that they can be controlled from anywhere and react to one another.
GSM
OVERVIEW
A cellular communication links mobile system subscribers into the public system or to
another cellular systems MS subscriber.
Information sent between the MS subscriber and the cellular network uses radio
communication .This removes the necessity for the fixed wiring in a traditional telephone
installation.
Due to this, the MS subscriber is able to move around and become fully mobile, perhaps
travelling in a vehicle or on foot.
Flexibility
Mobility
Convenience
Network expansion flexibility
Revenue or profit margins
Efficiency
Easier re-configuration
GSM (Global System for Mobile Communications, originally Groupe Spcial Mobile), is a
standard set developed by the European Telecommunications Standards Institute (ETSI) to
describe technologies for second generation (or "2G") digital cellular networks. Developed as
a replacement for first generation analog cellular networks, the GSM standard originally
described a digital, circuit switched network optimized for full duplex voice telephony. The
standard was expanded over time to include first circuit switched data transport, then packet
data transport via GPRS. Packet data transmission speeds were later increased via EDGE.
The GSM standard is succeeded by the third generation (or "3G") UMTS standard developed
by the 3GPP. GSM networks will evolve further as they begin to incorporate fourth
generation (or "4G") LTE Advanced standards. "GSM" is a trademark owned by the GSM
Association.
GSM is the legacy network of the evolution to the third generation (3G) technologies
Universal Mobile Telecommunication System (UMTS), also known as WCDMA, and High
Speed Packet Access (HSPA). Commonly referred to as the GSM family of technologies, the
following diagram represents the evolution from second generation (2G) GSM and General
Packet Radio System (GPRS) to 3G Enhanced Data for GSM Evolution (EDGE), UMTS and
HSPA.
GSM has a straightforward, cost-effective migration path to 3G through GPRS, EDGE and
UMTS-HSPA, as well as beyond 3G via the HSPA Evolution (HSPA+), LTE and System
Architecture Evolution (SAE) initiatives. Each step in the GSM-based migration path
leverages the network infrastructure deployed for the previous steps and is backwards
compatible. For example, a UMTS phone can provide voice and data service when connected
to a GSM network. This family of technologies also provides a viable, flexible 3G migration
path for Code Division Multiple Access (CDMA) and Time Division Multiple Access
(TDMA) operators. In fact, the majority of TDMA operators have already migrated to GSM
and many CDMA operators have likewise migrated.
BLOCK DIAGRAM
Mobile
Phone
ULN2803
89c51
DTMF DECODER
Incoming Call
Drivers
RELAY
Air Conditioner
RELAY
Refrigerator
RELAY
Jacuzzi
RELAY
Computer
Home
Appliances
COMPONENTS USED
1. IC 89c51
2. DTMF IC 8870
3. RELAY
4. OSCILLATOR
5. ULN 2803 IC
1. MICROCONTROLLER 89C51
AT89C51 a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of insystem programmable Flash memory. The device is manufactured using Atmels
high-density non-volatile memory technology and is compatible with the industry standard
80C51 instruction set and pin out. 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 on a monolithic chip,
the Atmel AT89C51 is a powerful microcontroller which provides a highly-flexible and costeffective solution to many embedded control applications. The AT89C51 provides the
following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog
timer, two data pointers, two 16-bit timer/counters, a five-vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In
addition, the AT89S51 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 con-tents but freezes the oscillator,
disabling all other chip functions until the next interrupter hardware reset.
FEATURES
Compatible with MCS-51 Products
interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be
just nanowatts, making many of them well suited for long lasting battery applications. Other
microcontrollers may serve performance-critical roles, where they may need to act more like
a digital signal processor(DSP), with higher clock speeds and power consumption.
History
The first single-chip microprocessor was the 4-bit Intel 4004 released in 1971, with the Intel
8008 and other more capable microprocessors becoming available over the next several
years. However, both processors required external chips to implement a working system,
raising total system cost, and making it impossible to economically computerize appliances.
The Smithsonian Institution says TI engineers Gary Boone and Michael Cochran succeeded
in creating the first microcontroller in 1971. The result of their work was the TMS 1000,
which went commercial in 1974. It combined read-only memory, read/write memory,
processor and clock on one chip and was targeted at embedded systems.
Partly in response to the existence of the single-chip TMS 1000, Intel developed a computer
system on a chip optimized for control applications, the Intel 8048, with commercial parts
first shipping in 1977. It combined RAM and ROM on the same chip. This chip would find
its way into over one billion PC keyboards, and other numerous applications. At that time
Intel's President, Luke J. Valenter, stated that the microcontroller was one of the most
successful in the company's history, and expanded the division's budget over 25%.
Most microcontrollers at this time had two variants. One had an erasable EPROM program
memory, which was significantly more expensive than the PROM variant which was only
programmable once. Erasing the EPROM required exposure to ultraviolet light through a
transparent quartz lid. One-time parts could be made in lower-cost opaque plastic packages.
In 1993, the introduction of EEPROM memory allowed microcontrollers (beginning with the
Microchip PIC 16x84 to be electrically erased quickly without an expensive package as
required for EPROM, allowing both rapid prototyping, and In system programming. The
same year, Atmel introduced the first microcontroller using Flash memory. Other companies
rapidly followed suit, with both memory types.
Cost has plummeted over time, with the cheapest 8-bit microcontrollers being available for
under $0.25 in quantity (thousands) in 2009, and some 32-bit microcontrollers around $1 for
similar quantities.
Nowadays microcontrollers are cheap and readily available for hobbyists, with large online
communities around certain processors.
In the future, MRAM could potentially be used in microcontrollers as it has infinite
endurance and its incremental semiconductor wafer process cost is relatively low.
Volumes
About 55% of all CPUs sold in the world are 8-bit microcontrollers and microprocessors.
According to Semico, over four billion 8-bit microcontrollers were sold in 2006.
A typical home in a developed country is likely to have only four general-purpose
microprocessors but around three dozen microcontrollers. A typical mid-range automobile
has as many as 30 or more microcontrollers. They can also be found in many electrical
devices such as washing machines, microwave ovens, and telephones.
EMBEDDED DESIGN
A microcontroller can be considered a self-contained system with a processor, memory and
peripherals and can be used as an embedded system. The majority of microcontrollers in use
today are embedded in other machinery, such as automobiles, telephones, appliances, and
peripherals for computer systems. While some embedded systems are very sophisticated,
many have minimal requirements for memory and program length, with no operating system,
and low software complexity. Typical input and output devices include switches, relays,
solenoids, LEDs, small or custom LCD displays, radio frequency devices, and sensors for
data such as temperature, humidity, light level etc. Embedded systems usually have no
keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer,
and may lack human interaction devices of any kind.
Interrupts
Microcontrollers must provide real time (predictable, though not necessarily fast) response to
events in the embedded system they are controlling. When certain events occur, an interrupt
system can signal the processor to suspend processing the current instruction sequence and to
begin an interrupt service routine (ISR, or "interrupt handler"). The ISR will perform any
processing required based on the source of the interrupt before returning to the original
instruction sequence. Possible interrupt sources are device dependent, and often include
events such as an internal timer overflow, completing an analog to digital conversion, a logic
level change on an input such as from a button being pressed, and data received on a
communication link. Where power consumption is important as in battery operated devices,
interrupts may also wake a microcontroller from a low power sleep state where the processor
is halted until required to do something by a peripheral event.
Programs
Typically microcontroller programs must fit in the available on-chip program memory, since
it would be costly to provide a system with external, expandable, memory. Compilers and
assemblers are used to convert high-level language and assembler language codes into a
compact machine code for storage in the microcontroller's memory. Depending on the device,
the program memory may be permanent, read-only memory that can only be programmed at
the factory, or program memory may be field-alterable flash or erasable read-only memory.
Manufacturers have often produced special versions of their microcontrollers in order to help
the hardware and software developments of the target system. Originally these included
EPROM versions that have a "window" on the top of the device through which program
memory can be erased by ultraviolet light, ready for reprogramming after a programming
("burn") and test cycle. Since 1998, EPROM versions are rare and have been replaced by
EEPROM and flash, which are easier to use (can be erased electronically) and cheaper to
manufacture.
Other versions may be available where the ROM is accessed as an external device rather
than as internal memory, however these are becoming increasingly rare due to the widespread
availability of cheap microcontroller programmers.
The use of field-programmable devices on a microcontroller may allow field update of the
firmware or permit late factory revisions to products that have been assembled but not yet
shipped. Programmable memory also reduces the lead time required for deployment of a new
product.
Where hundreds of thousands of identical devices are required, using parts programmed at
the time of manufacture can be an economical option. These mask programmed parts have
the program laid down in the same way as the logic of the chip, at the same time.
A customizable microcontroller incorporates a block of digital logic that can be personalized
in order to provide additional processing capability, peripherals and interfaces that are
adapted to the requirements of the application. For example, the AT91CAP from Atmel has a
block of logic that can be customized during manufacturer according to user requirements.
A dedicated Pulse Width Modulation(PWM) block makes it possible for the CPU to control
power convertors, resistive loads, motors, etc., without using lots of CPU resources in tight
timer loops. Universal Asynchronous Receiver/Transmitter (UART) block makes it possible
to receive and transmit data over a serial line with very little load on the CPU. Dedicated onchip hardware also often includes capabilities to communicate with other devices (chips) in
digital formats such as IC and Serial Peripheral Interfaces(SPI).
Higher Integration
Micro-controllers may not implement an external address or data bus as they integrate RAM
and non-volatile memory on the same chip as the CPU. Using fewer pins, the chip can be
placed in a much smaller, cheaper package.
Integrating the memory and other peripherals on a single chip and testing them as a unit
increases the cost of that chip, but often results in decreased net cost of the embedded system
as a whole. Even if the cost of a CPU that has integrated peripherals is slightly more than the
cost of a CPU and external peripherals, having fewer chips typically allows a smaller and
cheaper circuit board, and reduces the labor required to assemble and test the circuit board.
A micro-controller is a single integrated system, commonly with the following features:
Central processing unit- ranging from small and simple 4-bit processors to complex
32- or 64-bit processors
ROM, EPROM, EEPROM or Flash memory for program and operating parameter
storage
discrete input and output bits, allowing control or detection of the logic state of an
individual package pin
other serial
IC, Serial
Peripheral
clock generator - often an oscillator for a quartz timing crystal, resonator or RC circuit
This integration drastically reduces the number of chips and the amount of wiring and circuit
board space that would be needed to produce equivalent systems using separate chips.
Furthermore, on low pin count devices in particular, each pin may interface to several internal
peripherals, with the pin function selected by software. This allows a part to be used in a
wider variety of applications than if pins had dedicated functions. Micro-controllers have
proved to be highly popular in embedded systems since their introduction in the 1970s.
Some microcontrollers use a Harvard architecture: separate memory buses for instructions
and data, allowing accesses to take place concurrently. Where a Harvard architecture is used,
instruction words for the processor may be a different bit size than the length of internal
memory and registers; for example: 12-bit instructions used with 8-bit data registers.
The decision of which peripheral to integrate is often difficult. The microcontroller vendors
often trade operating frequencies and system design flexibility against time-to-market
requirements from their customers and overall lower system cost. Manufacturers have to
balance the need to minimize the chip size against additional functionality.
Microcontroller architectures vary widely. Some designs include general-purpose
microprocessor cores, with one or more ROM, RAM, or I/O functions integrated onto the
package. Other designs are purpose built for control applications. A micro-controller
instruction set usually has many instructions intended for bit-wise operations to make control
programs more compact. For example, a general purpose processor might require several
instructions to test a bit in a register and branch if the bit is set, where a micro-controller
could have a single instruction to provide that commonly-required function.
Microcontrollers typically do not have a math coprocessor, so floating point arithmetic is
performed by software.
PROGRAMMING ENVIRONMENTS
Microcontrollers were originally programmed only in assembly language, but various highlevel programming languages are now also in common use to target microcontrollers. These
languages are either designed especially for the purpose, or versions of general purpose
languages such as the language. Compilers for general purpose languages will typically have
some restrictions as well as enhancements to better support the unique characteristics of
microcontrollers. Some microcontrollers have environments to aid developing certain types
of applications. Microcontroller vendors often make tools freely available to make it easier to
adopt their hardware.
Many microcontrollers are so quirky that they effectively require their own non-standard
dialects of C, such as SDCC for the 8051, which prevent using standard tools (such as code
libraries or static analysis tools) even for code unrelated to hardware features. Interpreters are
often used to hide such low level quirks.
Interpreter firmware is also available for some microcontrollers. For example, BASIC on the
early microcontrollers Intel 8052; BASIC and FORTH on the Zilog Z8 as well as some
modern devices. Typically these interpreters support interactive programming.
Simulators are available for some microcontrollers. These allow a developer to analyze what
the behavior of the microcontroller and their program should be if they were using the actual
part. A simulator will show the internal processor state and also that of the outputs, as well as
allowing input signals to be generated. While on the one hand most simulators will be limited
from being unable to simulate much other hardware in a system, they can exercise conditions
that may otherwise be hard to reproduce at will in the physical implementation, and can be
the quickest way to debug and analyze problems.
Recent microcontrollers are often integrated with on-chip debug circuitry that when accessed
by an in-circuit emulator via JTAG, allow debugging of the firmware with a debugger.
TYPES OF MICROCONTROLLER
As of 2008 there are several dozen microcontroller architectures and vendors including:
Intel 8051
Many others exist, some of which are used in very narrow range of applications or are more
like applications processors than microcontrollers. The microcontroller market is extremely
fragmented, with numerous vendors, technologies, and markets. Note that many vendors sell
or have sold multiple architectures.
PIN DIAGRAM
Pin Description
VCC
Supply voltage.
GND
Ground.
Port 0
Port 0 is an 8-bit open drain bidirectional 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 may 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 bidirectional 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. As inputs, Port 1 pins that are externally being
pulled low will source
Current (IIL) because of the internal pull ups. Port 1 also receives the low-order address bytes
during Flash programming and program verification.
Port 2
Port 2 is an 8-bit bidirectional 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 pullups and can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current (IIL) because of the internal pullups. 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 it uses
strong internal pull-ups when emitting 1s. During accesses to external data memory that uses
8-bit addresses (MOVX @ RI), Port 2 emits 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 bidirectional I/O port with internal pullups. 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 pullups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of
various special features of the AT89C51 as listed below:
Port 3 also receives some control signals for Flash programming and Programming
verification.
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 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 of 1/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 microcontroller is
in external execution mode.
PSEN
Program Store Enable is the read strobe to external program memory. When the AT89C51 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. EA should
be strapped to VCC for internal program executions. This pin also receive the 12-volt
programming enable voltage (VPP) during flash programming, for parts that require 12-volt
VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
2. DTMF ( IC 8870)
Most telephone equipment use a DTMF receiver IC. One common DTMF receiver IC is the
Motorola MT8870 that is widely used in electronic communications circuits. The MT8870 is
an 18-pin IC. It is used in telephones and a variety of other applications. When a proper
output is not obtained in projects using this IC, engineers or technicians need to test this IC
separately. A quick testing of this IC could save a lot of time in research labs and
manufacturing industries of communication instruments. Heres a small and handy tester
circuit for the DTMF IC. It can be assembled on a multipurpose PCB with an 18-pin IC base.
One can also test the IC on a simple breadboard. For optimum working of telephone
equipment, the DTMF receiver must be designed to recognise a valid tone pair greater than
40 ms in duration and to accept successive digit tone-pairs that are greater than 40 ms apart.
However, for other applications like remote controls and radio communications, the tone
duration may differ due to noise considerations. Therefore, by adding an extra resistor and
steering diode the tone duration can be set to different values. The circuit is configured in
balanced line mode. To reject common-mode noise signals, a balanced differential amplifier
input is used. The circuit also provides an excellent bridging interface across a properly
terminated telephone line. Transient protection may be achieved by splitting the input
resistors and inserting zener diodes (ZD1 and ZD2) to achieve voltage clamping. This allows
the transient energy to be dissipated in the resistors and diodes, and limits the maximum
voltage that may appear at the inputs. Whenever you press any key on your local telephone
keypad, the delayed steering output of the IC goes high on receiving the tone-pair, causing
LED to glow. It will be high for duration depending on the values of capacitor and resistors
Dual-tone multi-frequency (DTMF) signalling is used for telecommunication signalling
over analog telephone lines in the voice-frequency band between telephone handsets
and other communications devices and the switching centre. The version of DTMF used
for telephone tone dialling is known by the trademarked term Touch-Tone (cancelled
March 13, 1984), and is standardized by ITU-T Recommendation. It is also known in
the UK as MF4. Other multi-frequency systems are used for signalling internal to the
telephone network. As a method of in-band signalling, DTMF tones were also used by
cable television broadcasters to indicate the start and stop times
of
local
commercial insertion points during station breaks for the benefit of cable companies. Until
better
out-of-band signalling
equipment was
during the
PIN DIAGRAM
3. RELAY
A relay is an electrically operated switch. Current flowing through the coil of the relay creates
a magnetic field which attracts a lever and changes the switch contacts. The coil current can
be on or off so relays have two switch positions and most have double throw (changeover)
switch contacts as shown in the diagram.
Relays allow one circuit to switch a second circuit which can be completely separate from the
first. For example a low voltage battery circuit can use a relay to switch a 230v ac mains
circuit. There is no electrical connection inside the relay between the two circuits, the link is
magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 30ma for a 12v relay, but it can
be as much as 100ma for relays designed to operate from lower voltages. Most ics (chips)
cannot provide this current and a transistor is usually used to amplify the small ic current to
the larger value required for the relay coil. The maximum output current for the popular 555
timer ic is 200ma so these devices can supply relay coils directly without amplification.
Relays are usually spdt or dpdt but they can have many more sets of switch contacts, for
example relays with 4 sets of changeover contacts are readily available. For further
information about switch contacts and the terms used to describe them please see the page on
switches.
Most relays are designed for pcb mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay.
The supplier's catalogue should show you the relay's connections. The coil will be obvious
and it may be connected either way round. Relay coils produce brief high voltage 'spikes'
when they are switched off and this can destroy transistors and ics in the circuit. To prevent
damage you must connect a protection diode across the relay coil.
The animated picture shows a working relay with its coil and switch contacts. You can see a
lever on the left being attracted by magnetism when the coil is switched on. This lever moves
the switch contacts. There is one set of contacts (spdt) in the foreground and another behind
them, making the relay dpdt.
The relay's switch connections are usually labelled COM, NC and NO:
COM = Common, always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
used where it is necessary to control a circuit by a low-power signal (with complete electrical
isolation between control and controlled circuits), or where several circuits must be
controlled by one signal. The first relays were used in long distance telegraph circuits,
repeating the signal coming in from one circuit and re-transmitting it to another. Relays were
used extensively in telephone exchanges and early computers to perform logical operations.
A type of relay that can handle the high power required to directly control an electric motor
or other loads is called a contactor. Solid-state relays control power circuits with no moving
parts, instead using a semiconductor device to perform switching. Relays with calibrated
operating characteristics and sometimes multiple operating coils are used to protect electrical
circuits from overload or faults; in modern electric power systems these functions are
performed by digital instruments still called "protective relays".
Small "cradle" relay often used in electronics. The "cradle" term refers to the shape of the
relay's armature.
A simple electromagnetic relay consists of a coil of wire wrapped around a soft iron core, an
iron yoke which provides a low reluctance path for magnetic flux, a movable iron armature,
and one or more sets of contacts (there are two in the relay pictured). The armature is hinged
to the yoke and mechanically linked to one or more sets of moving contacts. It is held in
place by a spring so that when the relay is de-energized there is an air gap in the magnetic
circuit. In this condition, one of the two sets of contacts in the relay pictured is closed, and
the other set is open. Other relays may have more or fewer sets of contacts depending on their
function. The relay in the picture also has a wire connecting the armature to the yoke. This
ensures continuity of the circuit between the moving contacts on the armature, and the circuit
track on the printed circuit board (PCB) via the yoke, which is soldered to the PCB.
When an electric current is passed through the coil it generates a magnetic field that activates
the armature, and the consequent movement of the movable contact(s) either makes or breaks
(depending upon construction) a connection with a fixed contact. If the set of contacts was
closed when the relay was de-energized, then the movement opens the contacts and breaks
the connection, and vice versa if the contacts were open. When the current to the coil is
switched off, the armature is returned by a force, approximately half as strong as the magnetic
force, to its relaxed position. Usually this force is provided by a spring, but gravity is also
used commonly in industrial motor starters. Most relays are manufactured to operate quickly.
In a low-voltage application this reduces noise; in a high voltage or current application it
reduces arcing.
When the coil is energized with direct current, a diode is often placed across the coil to
dissipate the energy from the collapsing magnetic field at deactivation, which would
Since relays are switches, the terminology applied to switches is also applied to relays. A
relay will switch one or morepoles, each of whose contacts can be thrown by energizing the
coil in one of three ways:
Normally-open (NO) contacts connect the circuit when the relay is activated; the
circuit is disconnected when the relay is inactive. It is also called a Form A contact or
"make" contact. NO contacts can also be distinguished as "early-make" or NOEM, which
means that the contacts will close before the button or switch is fully engaged.
Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the
circuit is connected when the relay is inactive. It is also called a Form B contact or
"break" contact. NC contacts can also be distinguished as "late-break" or NCLB, which
means that the contacts will stay closed until the button or switch is fully disengaged.
SPST Single Pole Single Throw. These have two terminals which can be connected
or disconnected. Including two for the coil, such a relay has four terminals in total. It is
ambiguous whether the pole is normally open or normally closed. The terminology
"SPNO" and "SPNC" is sometimes used to resolve the ambiguity.
SPDT Single Pole Double Throw. A common terminal connects to either of two
others. Including two for the coil, such a relay has five terminals in total.
DPST Double Pole Single Throw. These have two pairs of terminals. Equivalent to
two SPST switches or relays actuated by a single coil. Including two for the coil, such a
relay has six terminals in total. The poles may be Form A or Form B (or one of each).
DPDT Double Pole Double Throw. These have two rows of change-over terminals.
Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has
eight terminals, including the coil.
The "S" or "D" may be replaced with a number, indicating multiple switches connected to a
single actuator. For example 4PDT indicates a four pole double throw relay (with 14
terminals).
EN 50005 are among applicable standards for relay terminal numbering; a typical EN 50005compliant SPDT relay's terminals would be numbered 11, 12, 14, A1 and A2 for the C, NC,
NO, and coil connections, respectively.
4. OSCILLATOR
A crystal oscillator is an electronic oscillator circuit that uses the mechanical
resonance of a vibrating crystal of piezoelectric material to create an electrical signal
with a very precise frequency. This frequency is commonly used to keep track of time
(as in quartz wristwatches), to provide a stable clock signal for digital integrated
circuits, and to stabilize frequencies for radio transmitters and receivers. The most
common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits
designed around them became known as "crystal oscillators."
In an LC oscillator circuit, the filter is a tuned circuit (often called a tank circuit)
consisting of an inductor (L) and capacitor (C) connected together. Charge flows back
and forth between the capacitor's plates through the inductor, so the tuned circuit can
store electrical energy oscillating at its resonant frequency. There are small losses in the
tank circuit, but the amplifier compensates for those losses and supplies the power for the
output signal. LC oscillators are often used at radio frequencies, when a tunable
frequency source is necessary, such as in signal generators, tunable radio transmitters and
the local oscillators in radio receivers. Typical LC oscillator circuits are
the Hartley, Colpitts and Clapp circuits.
In addition to the feedback oscillators described above, which use two-port amplifying active
elements such as transistors and op amps, linear oscillators can also be built using one-port
devices with negative resistance, such as magnetron tubes, tunnel diodes and Gunn diodes. In
these oscillators, a resonator, such as an LC circuit, crystal, or cavity resonator, is connected
across the negative resistance device, and a DC bias voltage is applied to supply energy. The
negative resistance of the active device can be thought of as cancelling the (positive) effective
loss resistance of the resonator and permitting a sustained oscillation. These circuits are
frequently used for oscillators at microwave frequencies.
RELAXATION OSCILLATOR
ULN 2803 IC
The eight NPN Darlington connected transistors in this family of arrays are ideally suited for
interfacing between low logic level digital circuit (such as TTL, CMOS or PMOS/NMOS)
and the higher current/voltage requirements of lamps, relays, printer hammers or other similar
loads for a broad range of computer, industrial, and consumer applications. All devices
feature open-collector outputs and freewheeling clamp diodes for transient suppression.
The ULN2803 is designed to be compatible with standard TTL families while the ULN2804
is optimized for 6 to 15 volt high level CMOS or PMOS.
CIRCUIT DIAGRAM
GSM CIRCUIT
Relay Circuit
Relay Circuit
PROGRAM USED
#include<reg51.h>
#include<string.h>
sbit relay1=P2^0;
sbit relay2=P2^1;
sbit relay3=P2^3;
void main()
{
int i=0;
char arr[16];
relay1=relay2=relay3=0;
P3=0xff;
while(1)
{
while(P3!=0xfc)
{
if(P3==0xf1)
{
arr[i++]='1';
while(P3==0xf1);
}
else if(P3==0xf2)
{
arr[i++]='2';
while(P3==0xf2);
}
else if(P3==0xf3)
{
arr[i++]='3';
while(P3==0xf3);
}
else if(P3==0xf4)
{
arr[i++]='4';
while(P3==0xf4);
}
else if(P3==0xf5)
{
arr[i++]='5';
while(P3==0xf5);
}
else if(P3==0xf6)
{
arr[i++]='6';
while(P3==0xf6);
}
else if(P3==0xf7)
{
arr[i++]='7';
while(P3==0xf7);
}
else if(P3==0xf8)
{
arr[i++]='8';
while(P3==0xf8);
}
else if(P3==0xf9)
{
arr[i++]='9';
while(P3==0xf9);
}
else if(P3==0xfa)
{
arr[i++]='0';
while(P3==0xfa);
}
arr[i]='\0';
}
i=0;
if(strcmp(arr,"123")==0)
relay1=1;
else if(strcmp(arr,"321")==0)
relay1=0;
else if(strcmp(arr,"456")==0)
relay2=1;
else if(strcmp(arr,"654")==0)
relay2=0;
else if(strcmp(arr,"789")==0)
relay3=1;
else if(strcmp(arr,"987")==0)
relay3=0;
else if(strcmp(arr,"0")==0)
P2=0x00;
while(P3==0xfc);
}
}
ADVANTAGES
1.
2.
3.
4.
5.
6.
GLOBAL RANGE
LOW COST
LOW POWER REQUIREMENT
WIRELESS CONTROL
NO BOUNDATION OF RANGE
USE OF MOBILE TECHNOLOGY WHICH IS PRESENT EVERYWHERE
DISADVANTAGES
1. DELAYS IN MOBILE NETWORKS
2. NEED OF A MOBILE PHONE DEDICATED FOR THIS SYSTEM
3. COST OF THE MOBILE IF INCLUDED
POSSIBLE IMPROVEMENTS
1. CONTROL OF MORE DEVICES:
We can use of more and more devices of our home peripherals through the home
automation system. Here we have shown only four bulbs as home devices but we can use
any type of home appliances to the circuit to avail the facility.
CONCLUSIONS
Home Automation has been taken into a new dimension. We have clearly demonstrated that
Mobile Home Automation is the birth of a brand new era open to endless possibilities.
Mobile Home Automation can be applied for your convenience. For example, living in a city
such as Delhi where the temperature can greatly vary between the morning and the evening,
Mobile Home Automation can be very beneficial. Say you leave to work in the morning on a
hot summery day and during the day you start to realize that the temperature aiming to go
below freezing, you can then remotely turn on the heating at your home.
We have shown how Mobile Home Automation can be performed using a main medium of
communication in this information age, the mobile phone. The basic level of home appliance
control and remote monitoring has been implemented. our project allows for greater
development of products. The code is open source and we are providing for development by
others for application in several ways. With our software, we could develop it for more
complicated applications.
BIBLIOGRAPHY
http://www.8051projects.info
http://www.datasheet4u.com
http://www.seminarprojects.com
http:// www.ieeexplore.ieee.org
http://en.wikipedia.org/wiki/Electronic_oscillator
http://en.wikipedia.org/wiki/Relay
http://en.wikipedia.org/wiki/Microcontroller
HILL
The 8051 Microcontroller and Embedded Systems by Muhammad Ali Mazidi,
Janice Gillispie Mazidi.