cell phone based home automation

45
CHAPTER-1 INTRODUCTION 1.1 PROJECT TYPE:- Microcontroller(AT89c51)hardware design with software development (Device Driver). 1.2 PROJECT DESCRIPTION:- This Project “CELL PHONE BASED HOME AUTOMATION” is used to control the devices in home as well as in industries, Banks, and also in Remote areas. Conventionally, wireless-controlled appliances use RF circuits, which have the drawbacks of limited working range, limited frequency range and limited control. Use of a mobile phone for device control can overcome these limitations. It provides the advantages of robust control, working range as large as the coverage area of the service provider, no interference with other controllers and up to twelve controls. In this project, we control home appliances either AC Device or DC Device controlled by a mobile phone that makes a call to the mobile phone attached to the control board. In the course of a call, if any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. This tone is called ‘dual-tone multiple-frequency’ (DTMF) tone. The controller perceives this DTMF tone with the 1

Upload: adigopi

Post on 25-Oct-2014

150 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Cell Phone Based Home Automation

CHAPTER-1INTRODUCTION

1.1 PROJECT TYPE:-

Microcontroller(AT89c51)hardware design with software development (Device Driver) .

1.2 PROJECT DESCRIPTION:-

This Project “CELL PHONE BASED HOME AUTOMATION” is used to control the devices in home as well as in industries, Banks, and also in Remote areas. Conventionally, wireless-controlled appliances use RF circuits, which have the drawbacks of limited working range, limited frequency range and limited control. Use of a mobile phone for device control can overcome these limitations. It provides the advantages of robust control, working range as large as the coverage area of the service provider, no interference with other controllers and up to twelve controls.

In this project, we control home appliances either AC Device or DC Device controlled by a mobile phone that makes a call to the mobile phone attached to the control board. In the course of a call, if any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. This tone is called ‘dual-tone multiple-frequency’ (DTMF) tone. The controller perceives this DTMF tone with the help of the phone stacked in the control board and operate.

1.3. BLOCK DIAGRAM:-

1

Page 2: Cell Phone Based Home Automation

8051

Relay 2

Relay 1

Relay 3

Relay 4

ULN

2003Dtmf

decoder

Phone call

1.4 INTERFACES USED:- Serial communication used for downloading the hex code.

o DTMF circuit interface.o ULN2003 interfacingo RELAY interfacing.

2

Page 3: Cell Phone Based Home Automation

CHAPTER-2HARDWARE DESCRIPTION

The different hardware components used in our project are:-

1. Power supply

2. Dtmf decoder

3. Micro controller-8051

4. ULN2003

5. Relays

2.1 POWER SUPPLY:-

Introduction:

Any invention of latest technology cannot be activated without the source of

power. So in this fast moving world we deliberately need a proper power source

which will be apt for a particular requirement. All the electronic components

starting from diode to IC’s only work with a DC supply ranging from 5V to

12V.We are utilizing for the same, the cheapest and commonly available energy

source of 230V-50Hz and stepping down, rectifying, filtering and regulating the

voltage. . Microcontroller operates at +5v DC and also for other ICs and displays.

A 220v ac to 12-0-12v transformer is used and for rectification, four diodes

IN4007 are connected for rectification of the step down ac supply. Filter capacitor

of 1000Uf is used. It is regulated to +5v using a regulator 7805. 0.1 UF capacitor is

used for filtration of high frequency noise. .The power supply circuit is shown

below.

3

Page 4: Cell Phone Based Home Automation

DESCRIPTION:

Transformer

A bridge rectifier coupled with a step down transformer is used for our

design. The voltage rating of transformer used is 0-12V and the current rating is

500mA. When AC voltage of 230V is applied across the primary winding an

output AC voltage of 12V is obtained. One alteration of input causes the top of

transformer to be positive and the bottom negative. The next alteration will

temporarily cause the reverse.

Rectifier

In the power supply unit, rectification is normally achieved using a solid

state diode. Diode has the property that will let the electron flow easily at one

direction at proper

4

Page 5: Cell Phone Based Home Automation

Fig POWER SUPPLY CIRCIUT Fig POWER SUPPLY CIRCIUT

biasing condition. Bridge rectifiers of 4 diodes are used to achieve full wave

rectification. Two diodes will conduct during the negative cycle and the other two

will conduct during the positive half cycle.

Filtering unit

Filter circuit which is usually a capacitor acts as a surge arrester always

follows the rectifier unit. This capacitor is also called as a decoupling capacitor or

a bypass capacitor, is used not only to short the ripple with frequency to ground but

also leave the frequency of the DC to appear at the output.

5

Page 6: Cell Phone Based Home Automation

Regulators

The voltage regulators play an important role in any power supply unit. The

primary purpose of a regulator is to aid the rectifier and filter circuit in providing a

constant DC voltage to the device. Power supplies without regulators have an

inherent problem of changing DC voltage values due to variations in the load or

due to fluctuations in the AC line voltage. With a regulator connected to DC

output, the voltage can be maintained within a close tolerant region of the desired

output. IC 7805 and 7812 regulators are used in this project for providing a DC

voltage of +5V and +12V respectively.

Technical Details:

Transformer: 230/12 volts step down transformer, 1 ampere

Diodes: IN 4007

Voltage regulators: 78L Series

7812: The 7812 supplies 12 volts at 2 amp maximum with an input of 13-25 volts

7805: The 7805 supplies 5 volts at 1 amp maximum with an input of 7-25 volts

Electrolytic Capacitors: 100pF, 330pF and 100µF, power rating of 25V.

Features:

Gives a well regulated +12V and +5V output voltages

Built in overheating protection shuts down output when regulator IC gets too

hot.

Very stable output voltages, reliable operation

The circuit has overload and thermal protection.

6

Page 7: Cell Phone Based Home Automation

2.2 DTMF DECODER

Dual-tone multi-frequency (DTMF) signaling is used for telephone signaling

over the line in the voice-frequency band to the call switching center. The version

of DTMF used for telephone tone dialing is known by the trademarked term

Touch-Tone, and is standardised by ITU-T Recommendation Q.23. Other multi-

frequency systems are used for signaling internal to the telephone network

HISTORY:-

In the time preceding the development of DTMF, telephone systems

employed a system commonly referred to as pulse (Dial Pulse or DP in the USA)

or loop disconnect (LD) signalling to dial numbers, which functions by rapidly

disconnecting and connecting the calling party's telephone line, similar to flicking

a light switch on and off. The repeated connection and disconnection, as the dial

spins, sounds like a series of clicks. The exchange equipment counts those clicks or

dial pulses to determine the called number. Loop disconnect range was restricted

by telegraphic distortion and other technical problems, and placing calls over

longer distances required either operator assistance (operators used an earlier kind

of multi-frequency dial) or the provision of subscriber trunk dialling equipment.

DTMF was developed at Bell Labs in order to allow dialing signals to dial

long-distance numbers, potentially over nonwire links such as microwave radio

relay links or satellites. For a few non crossbar offices, encoder/decoders were

added that would convert the older pulse signals into DTMF tones and play them

down the line to the remote end office. At the remote site another encoder/decoder

could decode the tones and perform pulse dialing, for example for Strowger

switches. It was as if you were connected directly to that end office, yet the

7

Page 8: Cell Phone Based Home Automation

signaling would work over any sort of link. This idea of using the existing network

for signaling as well as the message is known as in-band signaling.

It was clear even in the late 1950s when DTMF was being developed that

the future of switching lay in electronic switches, as opposed to the

electromechanical crossbar systems then in use. Either switching system could use

either dial system, but DTMF promised shorter holding times, which was more

important in the larger and more complex registers used in crossbar systems. In

this case pulse dialing made no sense at any point in the circuit, and plans were

made to roll DTMF out to end users as soon as possible. Tests of the system

occurred in the early 1960s, where DTMF became known as Touch Tone. Though

Touch Tone phones were already in use in a few places, they were vigorously

promoted at the 1964 New York World's Fair.

The Touch Tone system also introduced a standardized keypad layout. After

testing 18 different layouts, they eventually chose the one familiar to us today, with

1 in the upper-left and 0 at the bottom. The adding-machine layout, with 1 in the

lower-left was also tried, but at that time few people used adding machines, and

having the 1 at the "start" (in European language reading order) led to fewer typing

errors. In retrospect, many people consider that this was a mistake. With the

widespread introduction of computers and bank machines, the phone keyboard has

become "oddball", causing mistakes.

In another sense, DTMF was obsolete a decade after it was instituted, as

FSK methods with fewer frequencies became cheaper, faster and more reliable.

However, the technical complexities of digital filtering were more expensive to

deal with than junking an adequate system.

8

Page 9: Cell Phone Based Home Automation

Public payphones that accept credit cards use these additional codes to send

the information from the magnetic strip.

The U.S. military also used the letters, relabeled, in their now defunct

Autovon phone system. Here they were used before dialing the phone in order to

give some calls priority, cutting in over existing calls if need be. The idea was to

allow important traffic to get through every time. The levels of priority available

were Flash Override (A), Flash (B), Immediate (C), and Priority (D), with Flash

Override being the highest priority. Pressing one of these keys gave your call

priority, overriding other conversations on the network. Pressing C, Immediate,

before dialing would make the switch first look for any free lines, and if all lines

were in use, it would disconnect any non-priority calls, and then any priority calls.

Flash Override will kick every other call off the trunks between the origin and

destination. Consequently, it is limited to the White House Communications

Agency. Precedence dialing is still done on the military phone networks, but using

number combinations (Example:Entering 93 before a number is a priority call)

rather than the separate tones.

Present-day uses of the A, B, C and D keys on telephone networks are few,

and exclusive to network control. For example, the A key is used on some

networks to cycle through different carriers at will (thereby listening in on calls).

Their use is probably prohibited by most carriers. The A, B, C and D tones are

used in amateur radio phone patch and repeater operations to allow, among other

uses, control of the repeater while connected to an active phone line.

DTMF tones are also used by some cable television networks and radio

networks to signal the local cable company/network station to insert a local

advertisement or station identification. These tones were often heard during a

9

Page 10: Cell Phone Based Home Automation

station ID preceding a local ad insert. Previously, terrestrial television stations also

used DTMF tones to shut off and turn on remote transmitters.

DTMF tones are also sometimes used in caller ID systems to transfer the

caller ID information, however in the USA only Bell 202 modulated FSK

signalling is used to transfer the data.

MT 8870 DTMF decoder: -

IC MT8870/KT3170 serves as DTMF decoder. This IC takes DTMF signal

coming via telephone line and converts that signal into respective BCD number. It

uses same oscillator frequency used in the remote section so same crystal oscillator

with frequency of 3.85M Hz is used in this IC.

Working of IC MT8870:-

The MT-8870 is a full DTMF Receiver that integrates both band split filter

and decoder functions into a single 18-pin DIP. Its filter section uses switched

capacitor technology for both the high and low group filters and for dial tone

rejection. Its decoder uses digital counting techniques to detect and decode all 16

DTMF tone pairs into a 4-bit code. External component count is minimized by

provision of an on-chip differential input amplifier, clock generator, and latched

tri-state interface bus. Minimal external components required include a low-cost

3.579545 MHz crystal, a timing resistor, and a timing capacitor. The MT-8870-02

can also inhibit the decoding of fourth column digits.

MT-8870 operating functions include a band split filter that separates the

high and low tones of the received pair, and a digital decoder that verifies both the

frequency and duration of the received tones before passing the resulting 4-bit code

to the output bus.

10

Page 11: Cell Phone Based Home Automation

The low and high group tones are separated by applying the dual-tone signal

to the inputs of two 6th order switched capacitor band pass filters with bandwidths

that correspond to the bands enclosing the low and high group tones.

Block diagram of IC MT8870:-

The filter also incorporates notches at 350 and 440 Hz, providing excellent

dial tone rejection. Each filter output is followed by a single-order switched

capacitor section that smoothes the signals prior to limiting. Signal limiting is

performed by high gain comparators provided with hysteresis to prevent detection

of unwanted low-level signals and noise. The MT-8870 decoder uses a digital

counting technique to determine the frequencies of the limited tones and to verify

that they correspond to standard DTMF frequencies. When the detector recognizes

the simultaneous presence of two valid tones (known as signal condition), it raises

the Early Steering flag (ESt). Any subsequent loss of signal condition will cause

ESt to fall. Before a decoded tone pair is registered, the receiver checks for valid

signal duration (referred to as character- recognition-condition). This check is

performed by an external RC time constant driven by ESt. A short delay to allow

the output latch to settle, the delayed steering output flag (StD) goes high,

signaling that a received tone pair has been registered.

11

Page 12: Cell Phone Based Home Automation

Figure (F) Block diagram of IC MT8870

The contents of the output latch are made available on the 4-bit output bus

by raising the three state control input (OE) to logic high. Inhibit mode is enabled

by a logic high input to pin 5 (INH). It inhibits the detection of 1633 Hz.

The output code will remain the same as the previous detected code. On the

M- 8870 models, this pin is tied to ground (logic low).

The input arrangement of the MT-8870 provides a differential input

operational amplifier as well as a bias source (VREF) to bias the inputs at mid-rail.

Provision is made for connection of a feedback resistor to the op-amp output (GS)

for gain adjustment.

The internal clock circuit is completed with the addition of a standard

3.579545 MHz crystal.

12

Page 13: Cell Phone Based Home Automation

The input arrangement of the MT-8870 provides a differential input

operational amplifier as well as a bias source (VREF) to bias the inputs at mid-rail.

Provision is made for connection of a feedback resistor to the op-amp output (GS)

for gain adjustment.

The internal clock circuit is completed with the addition of a standard

3.579545 MHz crystal.

2.3 MICRO CONTROLLER(8051):-

MICROCONTROLLER: A microcontroller is an integrated chip with minimum required

devices. The microcontroller includes a CPU: ALU, PC,SP and registers, RAM,

ROM, I/O ports, and timers like a standard computer, but because they are

designed to execute only a single specific task to control a single system, they are

much smaller and simplified so that they can include all the functions required on a

single chip.

The following are some of the capabilities of 8051 microcontroller.

Internal ROM and RAM I/O ports with programmable pins Timers and counters Serial data communication

13

Page 14: Cell Phone Based Home Automation

.

FEATURES

Compatible with MCS-51™ Products

4K Bytes of In-System Reprogrammable Flash Memory

Endurance: 1,000 Write/Erase Cycles

Fully Static Operation: 0 Hz to 24 MHz

Three-level Program Memory Lock

128 x 8-bit Internal RAM

32 Programmable I/O Lines

Two 16-bit Timer/Counters

14

Page 15: Cell Phone Based Home Automation

Six Interrupt Sources

Programmable Serial Channel

Low-power Idle and Power-down

Mode

Pin diagram of 8051

2.4 ULN2003:

FEATURES:

15

Page 16: Cell Phone Based Home Automation

ULN2003 is a 16 bit IC

It is of Darlington pair amplifier (1 to 1000)

1.2 Amps current is supported.

It gives inverted output.

REASON FOR USING ULN2003 DRIVER:

This driver is used to avoid back EMF and protect circuit from back EMF.It

also provides current amplification.General microcontroller supports current up to

500mA but some motors require 600mA. In order to achieve this we need current

amplification.

ULN2003 circuit diagram:

A-Darlington pair of amplifier I-Inverter

16

Page 17: Cell Phone Based Home Automation

2.5 Relays:-

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

they are double throw (changeover) switches.

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.

17

Page 18: Cell Phone Based Home Automation

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.

Connect to COM and NO if you want the switched circuit to be on when the

relay coil is on.

Connect to COM and NC if you want the switched circuit to be on when the

relay coil is off.

Choosing a relay:

You need to consider several features when choosing a relay:

Physical size and pin arrangement

18

Page 19: Cell Phone Based Home Automation

If you are choosing a relay for an existing PCB you will need to ensure that

its dimensions and pin arrangement are suitable. You should find this information

in the supplier's catalogue.

Coil voltage:

The relay's coil voltage rating and resistance must suit the circuit powering

the relay coil. Many relays have a coil rated for a 12V supply but 5V and 24V

relays are also readily available. Some relays operate perfectly well with a supply

voltage which is a little lower than their rated value.

Coil resistance :

The circuit must be able to supply the current required by the relay coil. You

can use Ohm's law to calculate the current:

Relay coil current = supply voltage/ coil resistance

For example:

A 12V supply relay with a coil resistance of 400 passes a current of 30mA.

This is OK for a 555 timer IC (maximum output current 200mA), but it is too

much for most ICs and they will require a transistor to amplify the current.

Switch ratings (voltage and current)

The relay's switch contacts must be suitable for the circuit they are to

control. You will need to check the voltage and current ratings. Note that the

voltage rating is usually higher for AC, for example: "5A at 24V DC or 125V AC".

Switch contact arrangement (SPDT, DPDT etc)

19

Page 20: Cell Phone Based Home Automation

Most relays are SPDT or DPDT which are often described as "single pole

changeover" (SPCO) or "double pole changeover" (DPCO). For further

information please see the page on switches.

Protection diodes for relays:-

Transistors and ICs (chips) must be protected from the brief high voltage

'spike' produced when the relay coil is switched off. The diagram shows how a

signal diode (eg 1N4148) is connected across the relay coil to provide this

protection. Note that the diode is connected 'backwards' so that it will normally not

conduct. Conduction only occurs when the relay coil is switched off, at this

moment current tries to continue flowing through the coil and it is harmlessly

diverted through the diode. Without the diode no current could flow and the coil

would produce a damaging high voltage 'spike' in its attempt to keep the current

flowing.

Reed Relay:

Reed relays consist of a coil surrounding a reed switch. Reed switches are

normally operated with a magnet, but in a reed relay current flows through the coil

to create a magnetic field and close the reed switch.

Reed relays generally have higher coil resistances than standard relays (1000

for example) and a wide range of supply voltages (9-20V for example). They are

capable of switching much more rapidly than standard relays, up to several

hundred times per second; but they can only switch low currents (500mA

maximum for example).

20

Page 21: Cell Phone Based Home Automation

The reed relay shown in the photograph will plug into a standard 14-pin DIL

socket ('chip holder').

Relays and transistors compared

Like relays, transistors can be used as an electrically operated switch. For

switching small DC currents (< 1A) at low voltage they are usually a better choice

than a relay. However transistors cannot switch AC or high voltages (such as

mains electricity) and they are not usually a good choice for switching large

currents (> 5A). In these cases a relay will be needed, but note that a low power

transistor may still be needed to switch the current for the relay's coil! The main

advantages and disadvantages of relays are listed below:

Advantages of relays:

Relays can switch AC and DC, transistors can only switch DC.

Relays can switch high voltages, transistors cannot.

Relays are a better choice for switching large currents (> 5A).

Relays can switch many contacts at once.

Disadvantages of relays:

Relays are bulkier than transistors for switching small currents.

Relays cannot switch rapidly (except reed relays), transistors can switch

many times per second.

Relays use more power due to the current flowing through their coil.

21

Page 22: Cell Phone Based Home Automation

Relays require more current than many chips can provide, so a low power

transistor may be needed to switch the current for the relay's coil.

22

Page 23: Cell Phone Based Home Automation

CHAPTER-3

SOFTWARES

The different softwares used for our project development are:

1. µ Vision keil – for software testing.

2. Universal dumper – for micro controller dumping.

3.1 µ VISION KEIL:

µVision is a window-based software

development platform that combines a robust and modern editor with a

project manager and make facility tool. It integrates all the tools needed to

develop embedded applications including a C/C++ compiler, macro

assembler, linker/locator, and a HEX file generator. µVision helps expedite

the development process of embedded applications by providing the

following:

Full-featured source code editor. Device Database® for configuring the development tool. Project Manager for creating and maintaining your projects. Integrated Make Utility functionality for assembling, compiling, and linking

your embedded applications. Dialogs for all development environment settings. True integrated source-level and assembler-level Debugger with high-speed

CPU and peripheral Simulator. Advanced GDI interface for software debugging on target hardware and for

connecting to a Keil™ ULINK® Debug Adapter.

23

Page 24: Cell Phone Based Home Automation

Flash programming utility for downloading the application program into Flash ROM.

Links to manuals, on-line help, device datasheets, and user guides.

The µVision IDE and Debugger is the central part of the Keil development toolchain and has numerous features that help the programmer to develop embedded applications quickly and successfully. The Keil tools are easy to use, and are guaranteed to help you achieve your design goals in a timely manner.

µVision offers a Build Mode for creating applications and a Debug Mode for debugging applications. Applications can be debugged with the integrated µVision Simulator or directly on hardware, for example with adapters of the Keil ULINK USB-JTAG family. Developers can also use other AGDI adapters or external third-party tools for analyzing applications.

Features and AdvantagesFeatures and Advantages

Feature AdvantageProject Manager, Make Utility, Debugger, modern Editor

Have been combined into a single user interface accelerating the application development. While editing, debugger features can be configured. While debugging, changes can be made to the source code.

µVision Simulator Write, test and debug applications before any production hardware is available. Investigate different hardware configurations to optimize the hardware design. The µVision Simulator is the only debugger that simulates most on-chip peripherals.

Simulator and Target Debugger

Both debugging interfaces have been implemented to have the same look&feel, and shorten the learning curve considerably.

System Viewer Displays information about peripheral registers and allows changing property values manually at runtime.

Code Coverage Provides statistical data about the execution of the application. Safety-critical systems can be tested and

24

Page 25: Cell Phone Based Home Automation

validated thoroughly. Execution analysis reports can be viewed and printed for certification requirements.

Logic Analyzer Displays changes of values on a time graph. Study the signal and variable changes and view their dependency or correlation.

Device Database Allows configuring the development environment automatically based on the microcontroller in use. Developers are provided with default settings that reduce the time needed to configure the tool.

Template editor Create common text sequences or header blocks. Use templates to insert standard text, header descriptions, and generic code blocks into the program structure.

Source Browser Use the browser for navigating quickly among coded procedures. Save time during development. Use this functionality in addition to the Find functions.

Configuration Wizard Provides a graphical interface for maintaining device and start-up code settings. Instead of scrolling through the start-up file, use this advanced GUI-like feature.

Third-party tools µVision integrates additional tools such as version control systems, CASE tools, or Flash/Device programming. Quickly access development tools and third-party tools. All configuration details are saved in the µVision project file.

Debugging and Flash programming

The Keil ULINK family of Debug and Trace Adapters are delivered with pre-configured Flash programming algorithms, which can be modified and adapted to particular needs. Only one adapter is used for both debugging and programming.

Multi-Project Manager Allows combining µVision projects, which logically depend on each other, into one single Multiple-Project. This increase the overview, consistency, and transparency of the embedded system application design. Contained projects can be build individually or many at a time.

25

Page 26: Cell Phone Based Home Automation

3.2 UNIVERSAL DUMPER:

UNIVERSAL AND FLEXIBLE:-• One unit supports all types of programmable devices: FLASH, EPROMs, EEPROMs, Microchip PICs, 87XX and 89XX series micros,

parallel PROMs, serial PROMs (24xx, 25xx, 93xx, 17xx, EPC1), PALs, GALs, EPLDs, CPLDs, etc.

• True low voltage support down to 1.8 volts. • Software controlled from desktops or notebook PCs. Easy new device updates via

software from web. • Pins are controlled by programmable software pin drivers. • No adapters are necessary for programming DIP packages including EPROMs,

micros, PICs, PALs, CPLDs, etc. Adapters are needed only for programming non-DIP packages.

• A wide variety of packages such as PLCC, LCC, TSOP, PSOP, SOIC, QFP, TQFP, QFN and uBGA are optionally supported by adapters available directly from Advin.

• Expandable to support high pin-count devices up to 84 pins.

26

Page 27: Cell Phone Based Home Automation

ADDITIONAL SOFTWARE FEATURES:-

• PC Software included. Easy to learn and fast to operate. • Compatible with Windows XP/NT/2000/ME/98. • FREE software updates available over the web. • Accepts various file formats including Intel HEX, Intel Extended Hex, Motorola S-records, POF, ASCII and binary. • Virtual memory feature: makes use of RAM and disk space on your PC. No RAM expansion modules needed, even for large devices. • File Load operation supports automatic splits (1 to 2, 1 to 4, 1 to 8) for both byte-wide and word-wide memories. • Functions provided include: read, program, verify, sector protect, edit, checksum, file offset, buffer offset, partial address programming, ASCII buffer edit, etc.

• Release control features: automatically generates serial numbers, checksums, and date/time stamping information for memory devices.

27

Page 28: Cell Phone Based Home Automation

CHAPTER-4

Program

#include<reg51.h>

sbit relay1=P2^0;

sbit relay2=P2^1;

sbit relay3=P2^2;

sbit relay4=P2^3;

void main(void)

{

unsigned int k, h;

while (1)

{

k =~P1;

switch (h)

{

case 0x01:

{

relay1=0;

break;

}

28

Page 29: Cell Phone Based Home Automation

case 0x02:

{

relay1=1 ;

break;

}

case 0x03:

{

relay2=0;

break;

}

case 0x04:

{

relay2=1;

break;

}

case 0x05:

{

relay3=0;

break;

}

case 0x06:

{

relay3=1;

break;

}

29

Page 30: Cell Phone Based Home Automation

case 0x07:

{

relay4=0;

break;

}

case 0x08:

{

relay4=1;

break;

}

case 0x09:

{

P2=0x00;

break;

}

case 0x0a:

{

P2=0xFF;

break;

}

}

}

}

30

Page 31: Cell Phone Based Home Automation

CHAPTER-5

RESULT & CONCLUSION

31

Page 32: Cell Phone Based Home Automation

CHAPTER-6

BIBLIOGRAPHY

REFERENCES:

BOOKS:

1. MICRO CONTROLLERS BY

RAMESH.S.GAONKR

2. DATA SHEETS OF VARIOUS IC’S

3. 8051 MANUAL

WEB SITE:

1. WWW.CHIP.COM

2. WWW.GOOGLEARCH.COM

3. WWW.EMBEDDEDSYSTEMS.COM

4. WWW.VISUALBASIC.COM

32