Vous êtes sur la page 1sur 48

1

REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

1. ABSTRACT
The main function of the system is to control any electrical devices through mobile phone. In this concept two mobile phones with different service numbers are used, the control phone at receiving end, where the appliances are controlled is interfaced with microcontroller unit which controls the devices through relays. To achieve this, the output of the mobile is amplified and fed to DTMF (Duel Tone Multi Frequency) decoder chip, which generates binary code according to the received information from the other mobile phone. After establishing a communication link between the two mobiles by dialing the home mobile number, the corresponding keys of calling phone must be activated to generate different DTMF signals. Based on this signals, the DTMF decoder generates different binary codes through four outputs, and this data is Fed to the microcontroller. Now the program is prepared for the microcontroller to energize or de-energize the corresponding relay based on the code produced by the DTMF decoder chip.

The prototype module is constructed with three relays and three different lamp loads are used to simulate the electrical appliances. These relay contacts are used to make or break the supply to the lamps. The DTMF signals are the only control signals utilized and no special technology or special facilities are required to operate this device. This system permits the user to control a variety of devices through appliance device codes and problems such as leaved home with forget turn off electrical appliance are easily solved. The extremely low-cost of this system makes it viable for ready real time application as against the high priced solutions available today.

NMREC

ECE

2
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

2. INTRODUCTION
When you are on the way to your home in hot summer, imagine within 30 minutes you will reach to your home, and you wish by the time you reach to your house it should be cool. Then call your house through your mobile and pass commands to the control system that is interfaced with other mobile phone to switch on the air conditioner, so that when you return your house will be a comfortable. Likewise any home or Industrial electrical appliances can be controlled anywhere from the world through telecommunications network. The project work described here can be called as Home appliance control system, which can be controlled either by a cell phone or landline telephone. It controls various appliances such as outdoor lights, fridge, Geiger, air conditioner etc. The Home Appliance Control System receives signals from the user either through Cell phone or Landline telephone. The system in turn gives commands to respective appliances. Telephone line can be used for remote controlling applications, besides normal telephone call. It is possible to use DTMF signals for remote control functions in additions to normal dialing. DTMF tones are often used for controlling telephone remote systems. Now a days most of the systems are automated in order to face new challenges and present day requirements to achieve good results. Automated systems have less manual operations, so that the flexibility, reliabilities are high and accurate. Hence every field prefers automated control systems, especially in the field of electronics.

In modern days, we must use various high-tech machineries and equipments to get our jobs done and make the life easier. The homeowner from any location should control these machineries as the homeowner might be away from home at workplace or traveling in a different place in the weekend. Thus a system of remote monitoring and controlling are very much necessary. Smart home is one of these types of system equipped with home appliances, which we wish to control smartly from anywhere. Some products are commercially available which allow remote home appliance controlling through Internet, which is undoubtedly emerging. But it lacks the true sense of real mobility and security, making the remote home appliance controlling a limited term than it is supposed to be. In search of a true remote and adequately secure solution to be really effective and practicable, mobile telephony is better than any other solutions. Mobile phones have become almost
NMREC ECE

3
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

an inseparable part of civil lives today. In this paper we introduce a new mechanism so that the ordinary services of the mobile phones can be leveraged to communicate with and control the home appliances and make our homes a really smart one.

The goal of the project is to develop a unique system through mobile technology, which can control various units of the houses, industries, and also if required with some changes in hardware and software, the same system can provide security to the locked house. The various appliances can be utilized by managing them remotely by using Mobile technology, which enables the user to remotely control the operations of the appliances. Just by pressing keypad of remote telephone the user can perform ON/OFF operations on the appliances.

A modern home contains a large number of sophisticated devices and technologies. Current and near future technologies and respective devices can be roughly categorized into the categories of home control, infotainment, security, communication, and special-purpose devices. These devices can be energized or de-energized automatically through the telephone, for this purpose the electronic hardware including microcontroller is connected through mobile phone, which controls the electrical home appliances. The present project work focuses about the mobile technology and the role of microcontroller.

Smart home is a home equipped with special facilities to enable occupants to control or program an array of automated home electronic devices. For example, a homeowner on vacation can arm a home security system, control temperature gauges, switch appliances on or off, control lighting, program a home theater or entertainment system, and perform many other tasks. Smart home became smarter if the controlling can be done from any remote place. Our main focus is to control the home appliances from remote place. The motivations behind the goal to remote control of home appliances are simple. Its not always feasible to be physically near to the home still sometimes its very important to control the appliances for many purposes. So the remote controlling takes the control of the home beyond the home and to the hands of the people. If a simple mobile phone takes the added responsibility to control the smart home then the control is reachable from almost everywhere people travels and lives
NMREC ECE

4
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

on earth. This sort of high-end technology is supposed to facilitate the different life easing utilities to a new age. Mobile telephony offers a wide range of communication services like voice and data transfer through SMS and other enhanced data transfer protocols like GPRS, EDGE at a relatively low price and at a wide variety of places on the earth. On the other hand, the security is better achieved by the use of strict traffic control. We adhered to this method of remote controlling of home appliances because of its unparallel availability and modest security at the affordable price.

The main components used in the project work are DTMF signal decoder chip and Microcontroller unit. The DTMF decoder circuit is designed with 8870 chip, this is a complete DTMF receiver integrating both the band split filter and digital decoder functions. The filter section uses switched capacitor techniques for high and low group filters; the 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 on chip provision of a differential input amplifier, clock oscillator and latched threestate bus interface. The main controlling technique using this integrated DTMF IC is that it is having all DTMF Receiver Features like it has low power consumption, adjustable guard time, inhibit mode. It is widely used in Telephone answering machine, the MT8870D is a complete DTMF receiver integrating both the band split filter and digital decoder functions. The filter section uses switched capacitor techniques for high and low group filters; the 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 on chip provision of a differential input amplifier, clock oscillator and latched three-state bus interface. The detailed description of this DTMF decoder is provided in chapter 7. The heart of the project work is microcontroller unit; it is designed with 89C51 ATMEL chip. These days there is no such electronic or electrical device that functions without microcontroller; we are living in the Embedded World surrounded with many embedded products designed with much variety of microcontroller chips produced by different companies. Our daily life largely depends on the proper functioning of these gadgets. Television, Radio, CD player, Washing Machine, Microwave Oven and many more house hold gadgets, and Card readers, Access Controllers, Palm devices of our work space enable us to do many of our tasks very effectively. Apart from all these, many controllers embedded in our car, which take care of many car operations

NMREC

ECE

5
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

to make it as fully automated. The detailed description of the controller used in this project work is provided in chapter 5.

The ATMEL 89C51 is an 8-bit controller; the internal Architecture is similar to the 8031 core. The most popular and used architecture is Intels 8031. Market acceptance of this particular family has driven many semiconductor manufacturers to develop something new based on this particular architecture. The 8031 contain variety of configurations; even after 25 years of existence, semiconductor manufacturers still come out with some kind of device using this 8031 core.

NMREC

ECE

6
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

3. BLOCKDIAGRAM AND BRIEF DESCRIPTION

The block diagram of the project work Remote Control of Home Appliances through Mobile is explained in detailed. The main purpose of the project work is to control the electrical household gadgets through the mobile phone. The Home appliances control system that is interfaced with another mobile phone is designed with microcontroller unit and DTMF signal decoder blocks. Any home appliance, that is to be controlled by the mobile phone, which makes a call to the other mobile phone attached to the Home appliance control system, in the course of a call, if any button of calling mobile keypad is pressed, a tone corresponding to the button pressed is heard at the other end of the call (through the called mobile), where the receiving mobile is controlling the home appliances. This tone is called duel tone multiple frequency (DTMF), the decoder circuit recognizes this signal after converting it in to suitable digital signal through 8870 chip.

NMREC

ECE

7
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

The received tone signal is converted in to its equivalent binary digit and this binary number through four outputs of DTMF decoder is fed to microcontroller. The microcontroller is preprogrammed, which takes suitable decisions according to the binary code accepted as an input signal. Depending up on this code, the controller energizes or de-energizes the relays. These relay contacts are used to make or break the supply to the appliances. Since it is a prototype module, only three relays are connected at the output of microcontroller, and these relay contacts are used to provide supply to the three different lamp loads, which are simulated as home appliances. The controller is programmed to control the relays according to the binary code produced by the DTMF decoder chip. For example; if we want to energize the first relay, specific code has to be generated. This code will be differed from one key to the other of calling phone keypad. The mobile that makes a call to the other mobile phone attached with Home appliances acts as a remote. So this simple control system does not require the construction of receiver and transmitter units.

The calling mobile that makes a call to the data receiving mobile by dialing the service number makes a communication link between these two mobiles. After establishing a call and by activating the calling mobile keypad DTMF signals are produced and transmitted to the called mobile through call switching centre. The version of DTMF used for telephone tone dialing is known as touch-tone. DTMF assigns a specific frequency to each key, so that it can easily be identified by the microcontroller unit. Each key generates two separate tone frequencies, for example when number one key is pressed two different low frequencies of 697 Hz and 1209 Hz are generated.

In general a mobile communication device receives an incoming call signal, and activates a call alert function to alert a user of the mobile communication device of the incoming call. The mobile communication device also presents the user with the alternative options of auto-answering the incoming call, or answering the call normally. If the auto-answer option is chosen, the mobile communication device answers the call and transmits a pre-recorded greeting message to the calling party, then puts the call on hold until the user is ready to speak with the calling party. This avoids the disruption of having to answer the call immediately. But here the application is quite different; the called mobile need not reply, the aim is putting the receiving mobile in to auto answering mode

NMREC

ECE

8
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

is to establish a communication link between the two mobiles automatically. Typically, whenever any mobile receives any call from any phone, answering key has to be activated manually, here human involvement is avoided, there by the receiving mobile is always put in to auto answering mode to accept the command signals from caller phone.

Now the output of the mobile phone is fed to an audio amplifier circuit to amplify the signal strength of audio signals. Initially after establishing a communication link between two mobiles, different command signals in the form of DTMF (duel tone multi frequency) codes are supposed to be generated to control the three different relays individually. There by the DTMF signals in the form of low frequencies produced by the mobile phone, as it is we cannot use to drive the DTMF decoder chip, because the signal strength is very low, hence an audio amplifier is essential to increase the signal strength.

The control circuit is designed with DTMF signal Decoder and Micro controller chip, these two devices are playing major roll in this project work. The first step starts from mobile phone at receiving end, whenever it receives any call from any phone, generally somebody has to activate the answer key to establish a link between two phones, and then the conversation starts between two persons. This is general phenomenon, here the application is quite different, it is the function of mobile phone to control the relays according to the command signals received from another phone, and therefore a call is to be established automatically. To achieve this, the receiving side mobile is supposed to be put in auto answering mode.

After establishing link between the two phones, the DTMF decoder will come into the picture for decoding the DTMF signal, generated by activating the keypad of data transmitting telephone. Here the DTMF signal differs from one numerical key to the other numerical key, whenever any key is depressed; two different low frequencies are generated by the exchange and transmitted through telecommunications network. The output of this DTMF decoder is fed to micro controller and based on this signal, the 8870 chip used as DTMF signal decoder generates four bit data through four outputs. This data is fed to microcontroller and depending up on this data; the microcontroller controls all the three relays independently. For example: to give a command, initially a call has to be established, after that if we want to energize first relay, number one of data
NMREC ECE

9
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

transmitting telephone key pad must be activated, by which two different frequencies of 697Hz and 1207 Hz will be generated, on receipt of this signal in data receiving module, the DTMF decoder chip generates a binary code of 0001, based on this data the microcontroller energizes the relay. If we want to de-energize the same relay, another key must be activated to produce different code.

The DTMF signal decoding circuit is designed using 8870 IC. The purpose of this unit is to decode the DTMF signals that are available at the input stage of the receiver side circuit. The output of the data receiving mobile phone is amplified and fed to pin number 2 of this decoder chip, this chip is designed to generate binary code through its four out puts. With the help of some passive elements, 8870 IC produces BCD codes for the corresponding DTMF signals. The output BCD code from this circuit is fed to microcontroller.

As described in previous chapters, after establishing communication link between two mobiles, and by activating different keys of caller mobile keypad, different low frequencies are produced and transmitted. For example; if number one key is activated, two different low frequencies of 697 Hz and 1209 Hz are produced, similarly when number two key is depressed, 697 Hz and 1336 Hz are produced, when 8870 IC receives this code, it generates 0010 code at its out puts. Likewise depending up on the different frequencies produced by activating the mobile keypad, different binary codes are produced.

The prime use of microcontroller is to acquire data from DTMF decoder, and according to that it is the main function of the controller to control Home appliances. Initially the process begins from mobile phone, depending up on the control signals in the form of DTMF code transmitted by the mobile or land line, the receiving mobile produces corresponding DTMF code. The output of the mobile is amplified to increase the signal strength and it is fed to DTMF signal decoder chip, which generates corresponding binary code at four outputs. This binary code differs depending up on the low frequencies produced by the exchange, whenever any key of calling mobile is operated, two low frequencies are produced and the DTMF chip produces corresponding to this a particular binary code. The output of the DTMF chip is fed to microcontroller.

NMREC

ECE

10
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

The next important device used in this project work is microcontroller, it is playing major roll, there by the following description mainly focuses about Micro controller and its architecture, because it is treated as heart of the project work. Today, there is no such instrument that can function without Micro controller. Micro controllers have become an integral part of all instruments. Many tedious from simple to dedicated tasks are left over to the controller for solutions.

The Micro controller used in this project work is ATMEL 89C51, basically this IC belongs to 8051 family. In1981, Intel Corporation introduced an 8- bit Micro controller, which is named as 8051. This controller is having 128 bytes of RAM, 4K bytes of ROM, two timers, one serial port, and four ports. This IC is called as 8- bit Processor, means that the CPU can work on only 8-bits of data at a time. The 8051 is having four ports and each port contain 8 input / output lines. This IC became very popular after Intel allowed other manufacturers to make and market any flavors of the 8051 they please with the condition that they remain code compatible with the 8051. This has led to many versions of the 8051 with different speeds and amounts of on-chip ROM marketed by many manufacturers. ATMEL is one of the major manufacturers of these devices and are compatible with the original 8051 as far as the instructions are concerned. The original 8051 of Intel are having a maximum of 64K bytes of on-chip ROM, where as the ATMEL 89C51 is having only 4K bytes on the chip. ATMEL 89C52 is designed with 8K memory, like wise up to 20K bites on the chips are available from ATMEL Company. The Atmel Corporation has a wide selection of 8051 chips and out of, the AT 89C51 is a popular and inexpensive chip used for many applications. It has 4K bytes of flash ROM; C stands for CMOS, which has low power consumption.

The ATMEL AT89C51 is a low power, higher performance CMOS 8-bit microcomputer with 4K bytes of flash programmable and erasable read only memory (PEROM). Its high-density non-volatile memory compatible with standard MCS-51 instruction set makes it a powerful controller that provides highly flexible and cost effective solution to control applications.

Micro-controller works according to the program written in it. Most microcontrollers today are based on the Harvard architecture, which clearly defined the four basic components required for an embedded system. These include a CPU core, memory for the program (ROM or Flash memory),

NMREC

ECE

11
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

memory for data (RAM), one or more timers (customizable ones and watchdog timers), as well as I/O lines to communicate with external peripherals and complementary resources all this in a single integrated circuit. A microcontroller differs from a general-purpose CPU chip in that the former generally is quite easy to make into a working computer, with a minimum of external support chips. The idea is that the microcontroller will be placed in the device to control, hooked up to power and any information it needs, and that's that.

A traditional microprocessor won't allow you to do this. It requires all of these tasks to be handled by other chips. For example, some number of RAM memory chips must be added. The amount of memory provided is more flexible in the traditional approach, but at least a few external memory chips must be provided, and additionally requires that many connections must be made to pass the data back and forth to them.

For instance, a typical microcontroller will have a built in clock generator and a small amount of RAM and ROM (or EPROM or EEPROM), meaning that to make it work, all that is needed is some control software and a timing crystal (though some even have internal RC clocks). Microcontrollers will also usually have a variety of input/output devices, such as analog-to-digital converters, timers, UARTs or specialized serial communications interfaces like IC, Serial Peripheral Interface and Controller Area Network. Often these integrated devices can be controlled by specialized processor instructions.

Originally, microcontrollers were only programmed in assembly language, or later in C code. Recent microcontrollers integrated with on-chip debug circuit accessed by In-circuit emulator via JTAG (Joint Text Action Group) enables a programmer to debug the software of an embedded system with a debugger.

More recently, however, some microcontrollers have begun to include a built-in high-level programming language interpreter for greater ease of use. BASIC is a common choice, and is used in the popular BASIC Stamp MCUs (Master Control Unit). Microcontrollers trade away speed and flexibility to gain ease of equipment design and low cost. There's only so much room on the chip to include functionality, so for every I/O device or memory increase the microcontroller includes, some
NMREC ECE

12
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

other circuitry has to be removed. Finally, it must be mentioned that some microcontroller architectures are available from many different vendors in so many varieties that they could rightly belong to a category of their own. Chief among these are the 8051 family.

RELAY SECTION
A relay is an electromagnetic switch, which can be used to make or break the circuit. Here three relays are connected at the output of the microcontroller for energizing or de-energizing the appliances independently. These appliances also can be controlled manually, for this purpose individual push to ON type micro-switches are used and they are connected at the input side of the controller. The relay used here is having only one set of changing over contact, when this relay is energized normally open contact gets closed and supply is provided to the electrical device. When the same relay is de-energized, normally open contact remains in open condition and supply is disconnected to the device. The contact rating of the relay is 1.5 amps; so current flowing through the contact is restricted by less than 1.5 amps. If any heavy load device is used, higher rating relay must be selected accordingly.

NMREC

ECE

13
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

4. CIRCUIT ANALYSIS
The detailed circuit description of the project work Tele Remote switches Using Microcontroller is explained in this chapter. For better understanding the total circuit diagram is divided into various parts and each part explanation along with circuit diagram is as follows.

NMREC

ECE

14
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

DTMF Signal Decoder Circuit


The DTMF signal received from the Cell phone is decoded in this section. The CM 8870 IC configured as DTMF signal receiver cum decoder generates binary code proportionate to the inputted DTMF signal. This IC is used for Digital counting technique for the detection and decoding of all 16 DTMF tone pairs into a 4-bit code. This 4-bit code is nothing but a binary code treated as final decoded output for the proceeding circuit.

For example whenever it receives key1 information it generates 0001 as binary code at its outputs from Q1 to Q4. When no. 1 key is pressed 697Hz is produced as low frequency and 1209Hz is produced as high frequency, this dual tone frequency is fed to pin No.2 of DTMF IC. On receipt of this signal, the IC generates 0001 code. Similarly whenever it receives 697Hz and 1336Hz as dual tone frequency than this IC generates 0010 code. Likewise as the frequency differs at input side the code changes automatically at output side. The functional table of this IC is provided in chapter - 7. This IC is having Band-split filter Section internally, therefore it can separate the high and low tone frequencies automatically. Functional description of this device is provided in Hardware description chapter.

NMREC

ECE

15
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

MICRO-CONTROLLER
The output of the DTMF decoder IC is fed to microcontroller, since it is a four bit Code bus and depending up on the resultant 4-bit code; the controller energizes / de-energize, the Relay 1, 2 and 3 according to the received binary code information from the DTMF IC. In this concept, the program is prepared such that whenever it receives 1001 code from DTMF IC, it energizes Relay 1. This code will be generated by pressing number 1 key of mobile phone, when this key is depressed; the DTMF IC receives 852 Hz as low tone frequency and 1477 Hz as high tone frequency. Similarly whenever 0 key is depressed 941 Hz and 1336 Hz signal is received from the exchange, based on this signal the DTMF IC produces 1010 code and according to this code the microcontroller activates the corresponding relay, these relay contacts are used to energize or de-energizes the home appliances, this is done through mobile phon. In the same fashion, utilizing other keys electrical appliances can be switched on or switched off at remote end where the motor and other electrical gadgets is interfaced to the other landline telephone instrument or mobile phone.

Pin No.15 of DTMF IC is fed to microcontroller for clearing the previous data, whenever a new data is received; initially the output of this pin goes low to high and remains in high state until the DTMF IC receives another dual tone signal from the mobile phone. In this process, the previous data fed to controller will be erased and new data is sent to the controller automatically.

After completion of the task, # key has to be depressed to disconnect the line. By operating this key 1100 code is produced by the DTMF IC, and on receipt of this code, the controller IC deenergizes Relay-4, there by the line is disconnected automatically.

The field of microcontrollers had their beginnings in the development of technology of integrated circuits. This development has made it possible to store hundreds of thousands of transistors into one chip. That was a prerequisite for production of microprocessors, and the first computers were made by adding external peripherals such as memory, input-output lines, timers and other. Further increasing of the volume of the package resulted in creation of integrated

NMREC

ECE

16
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

circuits. These integrated circuits contained both processor and peripherals. That is how the first chip containing a microcomputer, or what would later be known as a microcontroller came about.

Memory unit
Memory is part of the microcontroller whose function is to store data. The easiest way to explain it is to describe it as one big closet with lots of drawers. If we suppose that we marked the drawers in such a way that they cannot be confused, any of their contents will then be easily accessible. It is enough to know the designation of the drawer and so its contents will be known to us for sure.

Memory components are exactly like that. For a certain input we get the contents of a certain addressed memory location and thats all. Two new concepts are brought to us: addressing and memory location. Memory consists of all memory locations, and addressing is nothing but selecting one of them. This means that we need to select the desired memory location on one hand, and on the other hand we need to wait for the contents of that location. Besides reading from a memory location, memory must also provide for writing onto it. This is done by supplying an additional line called control line.

We will designate this line as R/W (read/write). Control line is used in the following way: if r/w=1, reading is done, and if opposite is true then writing is done on the memory location. Memory is the first element, and we need a few operation of our microcontroller.
.

Central Processing Unit


Let add 3 more memory locations to a specific block that will have a built in Capabilities to multiply, divide, subtract, and move its contents from one memory location onto another. The part we just added in is called central processing unit (CPU). Its memory locations are called registers. Registers are therefore memory locations whose role is to help with performing various mathematical operations or any other operations with data wherever data can be found. Look at the
NMREC ECE

17
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

current situation. We have two independent entities (memory and CPU) which are interconnected, and thus any exchange of data is hindered, as well as its functionality. If, for example, we wish to add the contents of two memory locations and return the result again back to memory, we would need a connection between memory and CPU. Simply stated, we must have some way through data goes from one block to another.

Bus
That way is called bus. Physically, it represents a group of 8, 16, or more wires. There are two types of buses: address and data bus. The first one consists of as many lines as the amount of memory we wish to address and the other one is as wide as data, in our case 8 bits or the connection line. First one serves to transmit address from CPU memory, and the second to connect all blocks inside the microcontroller.

INPUT - OUTPUT UNIT


Those locations weve just added are called ports. There are several types of ports: input, output or bi-directional ports. When working with ports, first of all it is necessary to choose which port we need to work with, and then to send data to, or take it from the port. When working with it the port acts like a memory location. Something is simply being written into or read from it, and it could be noticed on the pins of the microcontroller.

POWER SUPPLY UNIT

The required DC levels are derived from the mains supply for this purpose a Step-down transformer of 12V-0-12V center tapped secondary transformer is used. The current rating of the
NMREC ECE

18
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

transformer is 2000 ma at secondary. The secondary is rectified and filtered to generate 12V smooth DC which is un-regulated voltage and which is required to drive the relays. With the help of positive voltage regulator, a constant voltage source of +5V is derived, for this purpose 7805 3Pin Voltage regulator is used so that, though the mains supply varies from 170V to 250V, the output DC level remains constant.

Rectification is a process of rendering an alternating current or voltage into a unidirectional one. The component used for rectification is called Rectifier. A rectifier Permits current to flow only during the positive half cycles of the applied AC voltage by eliminating the negative half cycles or alternations of the applied AC voltage. Thus pulsating DC is obtained. to obtain smooth DC power, additional filter circuits are required.

A diode can be used as rectifier. There are various types of diodes. But, semiconductor diodes are very popularly used as rectifiers. A semiconductor diode is a solid state device consisting of two elements is being an electron emitter or cathode, the other an electron collector or anode. Since electrons in a semiconductor diode can flow in one direction only-form emitter to collector- the diode provides the unilateral conduction necessary for rectification.

The rectified Output is filtered for smoothening the DC, for this purpose 1000 Microfaraday capacitor is used in the filter circuit. The filter capacitors are usually connected in parallel with the rectifier output and the load. The AC can pass through a capacitor but DC cannot, the ripples are thus limited and the output becomes smoothed. When the voltage across the capacitor plates tends to rise, it stores up energy back into voltage and current. Thus the fluctuation in the output voltage is reduced considerable.

NMREC

ECE

19
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

5. DETAILED DESCRIPTION OF 89C51 MICROCONTROLLER


The microcontroller 89C51 from ATMEL group is treated as a digital minicomputer; a digital computer typically consists of three major components: the Central Processing Unit (CPU), program and data memory, and an Input/output (I/O) system. The CPU controls the flow of information among the components of the computer. It also processes the data by performing digital operations. Most of the processing is done in the Arithmetic-Logic Unit (ALU) within the CPU. When the CPU of a computer is built on a single printed circuit board, the computer is called a minicomputer. A microprocessor is a CPU that is compacted into a single-chip semiconductor device. Microprocessors are general-purpose devices, suitable for many applications. A computer built around a microprocessor is called a microcomputer. The choice of I/O and memory devices of a microcomputer depends on the specific application. For example, most personal computers contain a keyboard and monitor as standard input and output devices.

A microcontroller is an entire computer manufactured on a single chip. Microcontrollers are usually dedicated devices embedded within an application. For example, microcontrollers are used as engine controllers in automobiles and as exposure and focus controllers in cameras. In order to serve these applications, they have a high concentration of on-chip facilities such as serial ports, parallel input output ports, timers, counters; interrupt control, analog-to-digital converters, random access memory, read only memory, etc. The I/O, memory, and on-chip peripherals of a microcontroller are selected depending on the specifics of the target application. Since microcontrollers are powerful digital processors, the degree of control and programmability they provide significantly enhances the effectiveness of the application.

Embedded control applications also distinguish the microcontroller from its relative, the general-purpose microprocessor. Embedded systems often require real-time operation and multitasking capabilities. Real-time operation refers to the fact that the embedded controller must be able to receive and process the signals from its environment as they are received. That is, the environment must not wait for the controller to become available. Similarly, the controller must perform fast enough to output control signals to its environment when they are needed. Again, the
NMREC ECE

20
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

environment must not wait for the controller. In other words, the embedded controller should not be a bottleneck in the operation of the system. Multitasking is the capability to perform many functions in a simultaneous or quasi-simultaneous manner.

The embedded controller is often responsible of monitoring several aspects of a system and responding accordingly when the need arises. The 8051 is the first microcontroller of the MCS-51 family introduced by Intel Corporation at the end of the 1970s. The 8051 family with its many enhanced members enjoys the largest market share, estimated to be about 40%, among the various microcontroller architectures. The architecture of the 8051 family of the microcontrollers is presented in this chapter. First, the original 8051 microcontroller is discussed, followed by the enhanced features of the 8032, and the 80C515.

The 8051 Microcontroller Family Architecture


The architecture of the 8051 family of microcontrollers is referred to as the MCS-51 architecture, or sometimes simply as MCS-51. The microcontrollers have an 8-bit data bus. They are capable of addressing 64K of program memory and a separate 64K of data memory. The 8051 has 4K of code memory implemented as on-chip Read Only Memory (ROM). The 8051 has 128 bytes of internal Random Access Memory (RAM). The 8051 has two timer/counters, a serial port, 4 general purpose parallel input/output ports, and interrupt control logic with five sources of interrupts. Besides internal RAM, the 8051 has various Special Function Registers (SFR), which are the control and data registers for on-chip facilities. The SFRs also include the accumulator, the B register, and the Program Status Word (PSW), which contains the CPU flags. Programming the various internal hardware facilities of the 8051 is achieved by placing the appropriate control words into the corresponding SFRs. The 8031 is similar to the 8051, except it lacks the on-chip ROM.

As stated, the 8051 can address 64K of external data memory and 64K of external program memory. These may be separate blocks of memory, so that up to 128K of memory can be attached to the microcontroller. Separate blocks of code and data memory are referred to as the Harvard architecture. The 8051 has two separate read signals, RD# and PSEN#. The first is activated when a
NMREC ECE

21
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

byte is to be read from external data memory, the other, from external program memory. Both of these signals are so-called active low signals. That is, they are cleared to logic level 0 when activated. All external code is fetched from external program memory. In addition, bytes from external program memory may be read by special read instructions such as the MOVC instruction. There are separate instructions to read from external data memory, such as the MOVX instruction. That is, the instructions determine which block of memory is addressed, and the corresponding control signal, either RD# or PSEN# is activated during the memory read cycle. A single block of memory may be mapped to act as both data and program memory. This is referred to as the Von Neumann1 architecture. In order to read from the same block using either the RD# signal or the PSEN# signal, the two signals are combined with a logic AND operation. This way, the output of the AND gate is low when either input is low. The advantage of the Harvard architecture is not simply doubling the memory capacity of the microcontroller. Separating program and data increases the reliability of the microcontroller, since there are no instructions to write to the program memory. A ROM device is ideally suited to serve as program memory. The Harvard architecture is somewhat awkward in evaluation systems, where code needs to be loaded into program memory. By adopting the Von Neumann architecture, code may be written to memory as data bytes, and then executed as program instructions.

The 8052 has 256 bytes of internal RAM and 8K of internal code ROM. The 8051 and 8052 internal ROM cannot be programmed by the user. The user must supply the program to the manufacturer, and the manufacturer programs the microcontrollers during production. Due to the setup costs, the factory masked ROM option is not economical for small quantity productions. The 8751 and 8752 are the Erasable Programmable Read Only Memory (EPROM) versions of the 8051 and 8052. Many manufacturers offer the EPROM versions in windowed ceramic and nonwindowed plastic packages. These are user programmable. However, the non-windowed versions cannot be erased. These are usually referred to as One-Time- Programmable (OTP) microcontrollers, which are more suitable for experimental work or for small production runs. The 8951 and 8952 contain FLASH EEPROMs (Electrically Erasable Programmable Read Only Memory). These chips can be programmed as the EPROM versions, using a chip programmer. Moreover, the memory may be erased. Similar to EPROMs, Erasing FLASH memory sets all data bits (data bytes become FFh). A bit may be cleared (made 0) by programming. However, a zero bit may not be programmed to a
NMREC ECE

22
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

one. This requires erasing the chip. Some larger FLASH memories are organized in banks or sectors. Rather than erasing the entire chip, you may erase a given sector and keep the remaining sectors unchanged.

During the past decade, many manufacturers introduced enhanced members of the 8051 microcontroller. The enhancements include more memory, more ports, analog to - digital converters, more timers with compare, reload and capture facilities, more interrupt sources, higher precision multiply and divide units, idle and power down mode support, watchdog timers, and network communication subsystems. All microcontroller of the family use the same set of machine instructions, the MCS-51. The enhanced features are programmed and controlled by additional SFRs. In the remainder of this chapter, the hardware architecture of the 8051 is presented. The enhancements brought by the 8052 and 80C515 follow. Some of the more popular enhanced members of the family are reviewed at the end of Chapter 2. The reader is referred to the manufacturers' data books for the specifics of other enhanced members.

Intel Corporation introduces 89c51; it is an 8-bit microcontroller. This microcontroller has 128 bytes of RAM, 4K of on-chip ROM, two timers, one serial port, and four ports of 8-bits each all on a single chip. 89c51 is basically Flash ROM version of 8051 families. 89c51 is basically a 40 pin Dual-in-package. Block diagram of 89c51 is as shown in chapter-10, i.e., hardware details. The main features of 89c51 Hardware can be labeled as below:

1. It has 8-bit CPU with registers A (the accumulator) and B. 2. Sixteen-bit program counter (PC) and data pointer (DPTR). 3. Eight-bit program status word (PSW). 4. Eight-bit stack pointer (SP). 5. Internal ROM of 0 to 4K. 6. Internal RAM of 128 bytes. 7. 32 I/0 pins arranged as four 8-bit ports: P0-P3 8. Two 16-bit Timer/Counters: T0 and T1 9. Full duplex serial data receiver/transmitter: SBUF 10. Control registers: TCON, TMOD, SCON, PCON, IP, and IE.
NMREC ECE

23
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

11. Two external and three internal interrupt sources. 12. Oscillator and Clock circuits.

PIN DESCRIPTION:

1. VSS (pin-20) Ground= 0 V reference

2. VCC (pin-40)This is the power supply voltage for normal, idle and power-down modes.

3. P.0-P0.7 (pin-39 to pin 32 i.e., port 0) Port 0 is an open-drain, bi-directional I/O port. Pins of Port 0 on which there is a high logic will float and can be used as a high impedance inputs. Port 0 is also the multiplexed low-order address and data bus during accesses to external program and data memory; in this application it uses strong internal pull-ups for emitting 1s. 4. P1.0 P1.7 (Pin-1 to Pin 8 i.e., Port 1) Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. Port 1 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 1 pins that are externally pulled low will source current because of the internal pull-ups. 5. P2.0 P2.7 (Pin-21 to Pin 28 i.e., Port 2) Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. Port 2 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 2 pins that are externally being pulled low will source current because of the internal pull-ups. 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 use 8 bit addresses (MOV @Ri), port 2 emits the contents of the P2 special function register.

NMREC

ECE

24
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

6. P3.0 P3.7 (Pin-10 to Pin 17 i.e., Port ) Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. Port 3 pins that have 1s written to them 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 because of the pull-ups. Port 3 also serves the special features of the 89C51, as listed below:

RxD (P3.0): Serial input port. TxD (P3.1): Serial output port. INT0 (P3.2): External interrupt. INT1 (P3.3): External interrupt. T0 (P3.4): Timer 0 external input. T1 (P3.5): Timer 1 external input. WR (P3.6): External data memory write strobe. RD (P3.7): External data memory read strobe.

7. RESET (Pin-9) A high on this pin for two machine cycles while the oscillator is running, resets the device. An internal diffused resistor to VSS permits a power-on reset using only an external capacitor to VCC.

8. ALE (Pin-30) Output pulse for latching the low byte of the address during an Access to external memory. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency, and can be used for external timing or clocking. Note that one ALE pulse is skipped during each access to external data memory. Setting SFR auxiliary,0 can disable ALE. With this bit set, ALE will be active only during a MOVX instruction.

9. PSEN (Pin-29) The read strobe to external program memory. When executing code from the external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped

NMREC

ECE

25
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

during each access to external data memory. PSEN is not activated during fetches from internal program Memory.

10. EA/VPP (Pin-31) EA must be externally held low to enable the device to fetch code from external program memory locations 0000H to the maximum internal memory boundary. If EA is held high, the device executes from internal program memory unless the program counter contains an address greater than 0FFFH for 4 k devices, 1FFFH for 8 k devices, 3FFFH for 16 k devices, and 7FFFH for 32 k devices. The value on the EA pin is latched when RST is released and any subsequent changes have no effect. This pin also receives the 5V/12V programming supply voltage (VPP) during FLASH programming.

11. XTAL1 and XTAL2 (Pin-18 and Pin-19) Crystal1: Input to the inverting oscillator amplifier and input to the internal clock generator circuits. Chapter2: Output from the inverting oscillator amplifier

OSCILLATOR CHARACTERISTICS
XTAL1 and XTAL2 are the input and output, respectively, of an Inverting amplifier. The pins can be configured for use an On-chip oscillator. To drive the device from an external clock source, XTAL1 should be driven while XTAL2 is left unconnected. There are no requirements on the duty cycle of the external clock signal, because the input to the internal clock circuitry is through a divideby-two flip-flop. However, minimum and maximum high and low times specified in the data sheet must be observed.

RESET:

A reset is accomplished by holding the RST pin high for at least two machine cycles (24 oscillator periods), while the oscillator is running. To insure a good power-on reset, the RST pin must be high long enough to allow the oscillator time to start up (normally a few milliseconds) plus two
NMREC ECE

26
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

machine cycles. At power-on, the voltage on VCC and RST must come up at the same time for a proper start-up. Ports 1, 2, and 3 will asynchronously be driven to their reset condition when a voltage above VIH1 (min.) is applied to RST. The value on the EA pin is latched when RST is disserted and has no further effect.

ACCUMULATOR: The A (Accumulator) is the versatile of the two CPU registers and is used for many operations, including addition, subtraction, division, integer multiplication and Boolean bit manipulations. The A register is also used for data transfers between the 8091 and any external memory.

B REGISTER: The B register is used during multiply and divide operations. For other instructions it can be treated as another scratch pad register.

PROGRAM STATUS WORD The PSW register contains program status information as detailed in Table below: The PSW consists of math flags, user program flag F0, and the register bank select bits that identify which of the four general register banks is currently in use by the program.

STACK POINTER
The Stack Pointer register is 8 bits wide. It is incremented before data is stored during PUSH and CALL executions. While the stack may reside anywhere in on-chip RAM, the Stack Pointer is initialized to 07H after a reset. This causes the stack to begin at locations 08H.

DATA POINTER The Data Pointer (DPTR) consists of a high byte (DPH) and a low byte (DPL). Its intended function is to hold a 16-bit address. It may be manipulated as a 16-bit register or as two independent 8bit registers.

NMREC

ECE

27
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

SERIAL DATA BUFFER The Serial Buffer is actually two separate registers, a transmit buffer and a receive buffer. When data is moved to SBUF, it goes to the transmit buffer and is held for serial transmission. (Moving a byte to SBUF is what initiates the transmission.) When data is moved from SBUF, it comes from the receive buffer.

TIMER REGISTERS Register pairs (TH0, TL0), and (TH1, TL1) are the 16-bit Counting registers for Timer/Counters 0 and 1, respectively.

CONTROL REGISTER Special Function Registers IP, IE, TMOD, TCON, SCON, and PCON contain control and status bits for the interrupt system, the Timer/Counters, and the serial port. They are described in later sections. Timers and Counters Timer 0 and Timer 1 The Timer or Counter function is selected by control bits C/T in the Special Function Register TMOD. These two Timer/Counters have four operating modes, which are selected by bit-pairs (M1, M0). In TMOD. Modes 0, 1, and 2 are the same for both Timers/Counters. Mode 3 is different. The four operating modes are described in the following text:

Mode 0: Timer, which is an 8-bit Counter with a divide-by-32 pre scalar. The Mode 0 operation as it applies to Timer 1. In this mode, the Timer register is configured as a 13-bit register. As the count rolls over from all 1s to all 0s, it sets the Timer interrupt flag TF1. The counted input is enabled to the Timer when TR1 = 1 and either GATE = 0 or INT1 = 1. (Setting GATE = 1 allows the Timer to be controlled by Putting either Timer into Mode 0 makes it look like an 8048 external input INT1, to facilitate pulse width measurements). TR1 is a control bit in the Special Function Register TCON (Figure 3).
NMREC ECE

28
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

GATE is in TMOD: The 13-bit register consists of all 8 bits of TH1 and the lower 5 bits of TL1. The upper 3 bits of TL1 are indeterminate and should be ignored. Setting the run flag (TR1) does not clear the registers. Mode 0 operation is the same for the Timer 0 as for Timer 1. Substitute TR0, TF0, and INT0 for the corresponding Timer 1 signals in Figure 2. There are two different GATE bits, one for Timer 1 (TMOD.7) and one for Timer 0 (TMOD.3).

Mode 1: Mode 1 is the same as Mode 0, except that the Timer register is being run with all 16 bits.

Mode 2: Mode 2 configures the Timer register as an 8-bit Counter (TL1) with automatic reload, as shown in Figure 4. Overflow from TL1 not only sets TF1, but also reloads TL1 with the contents of TH1, which is preset by software. The reload leaves TH1 unchanged. Mode 2 operations are the same for Timer/Counter 0.

Mode 3: Timer 1 in Mode 3 simply holds its count. The effect is the same as setting TR1 = 0. Timer 0 in Mode 3 establishes TL0 and TH0 as two separate counters. The logic for Mode 3 on Timer 0 is shown in Figure 5. TL0 uses the Timer 0 control bits: C/T, GATE, TR0, and TF0, as well as the INT0 pin. TH0 is locked into a timer function (counting machine cycles) and takes over the use of TR1 and TF1 from Timer 1. Thus, TH0 now controls the Timer 1 interrupt. Mode 3 is provided for applications requiring an extra 8-bit timer on the counter. With Timer 0 in Mode 3, an 80C51 can look like it has three Timer/Counters. When Timer 0 is in Mode 3, Timer 1 can be turned on and off by switching it out of and into its own Mode 3, or can still be used by the serial port as a baud rate generator, or in fact, in any application not requiring an interrupt.

TCON and TMOD are the two registers used for setting the above modes. The format of these registers is as shown in figure TMOD is dedicated solely to the timers and can be considered to be two duplicate 4-bit registers, each of which controls the action of one of the timers.
NMREC ECE

29
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

2.4 CRITERIA FOR CHOOSING 89C51MICROCONTROLLER


1. The first and foremost criterion in choosing a microcontroller is that it must meet the task at hand efficiently and cost effectively. In our project we have chosen an 8-bit microcontroller, which can handle the computing needs of the task most effectively. 2. The highest speed this microcontroller can support is 12MHZ 3. To fulfill our requirements in terms of space, assembling, we have chosen the 40-pin DIP. 4. To support the memory requirement we have chosen it as it includes 4K ROM and 128byte RAM. 5. As there are 32 I/O pins and 2 timers, it supports our input-output requirement greatly. 6. We have used the battery power product like an RTC the power consumption is critical for it. 7. In choosing this controller we have considered the availability of an assembler, debugger, simulator etc. 8. The ready availability in needed quantities both now and in the future. Currently, of the leading 8-bit microcontrollers, the 8051 family has the largest number of diversified suppliers.

NMREC

ECE

30
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

6. DETAILED DESCRIPTION OF CELLULAR PHONES


The mobile phone (also called a wireless phone or cellular phone) is a short-range, portable electronic device used for mobile voice or data communication over a network of specialized base stations known as cell sites. In addition to the standard voice function of a telephone, current mobile phones may support many additional services, and accessories, such as SMS for text messaging, email, packet switching for access to the Internet, gaming, Bluetooth, infrared, camera with video recorder and MMS for sending and receiving photos and video. Most current mobile phones connect to a cellular network of base stations (cell sites), which is in turn interconnected to the public switched telephone network (PSTN) (the exception is satellite phones). The first commercial mobile phone service was launched in Japan in 1978. By November 2007, the total number of mobile phone subscriptions in the world had reached 3.3 billion or half of the human population (although some users have multiple subscriptions or inactive subscriptions), which also makes the mobile phone the most widely spread technology and the most common electronic device in the world. The first mobile phone to enable internet connectivity and wireless email, the Nokia Communicator, was released in 1996, creating a new category of expensive phones called smart phones. In 1999 the first mobile internet service was launched in Japan under the I-Mode service. By 2007 over 798 million people around the world accessed the internet or equivalent mobile internet services such as WAP and I-Mode at least occasionally using a mobile phone rather than a personal computer. CELLULAR SYSTEMS Mobile phones send and receive radio signals with any number of cell site base stations fitted with microwave antennas. These sites are usually mounted on a tower, pole or building, located throughout populated areas, then connected to a cabled communication network and switching system. The phones have a low-power transceiver that transmits voice and data to the nearest cell sites, normally not more than 8 to 13 km away.

NMREC

ECE

31
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

When the mobile phone or data device is turned on, it registers with the mobile telephone exchange, or switch, with its unique identifiers, and can then be alerted by the mobile switch when there is an incoming telephone call. The handset constantly listens for the strongest signal being received from the surrounding base stations, and is able to switch seamlessly between sites. As the user moves around the network, the "handoffs" are performed to allow the device to switch sites without interrupting the call. Cell sites have relatively low-power (often only one or two watts) radio transmitters which broadcast their presence and relay communications between the mobile handsets and the switch. The switch in turn connects the call to another subscriber of the same wireless service provider or to the public telephone network, which includes the networks of other wireless carriers. Many of these sites are camouflaged to blend with existing environments, particularly in scenic areas. The dialogue between the handset and the cell site is a stream of digital data that includes digitized audio (except for the first generation analog networks). The technology that achieves this depends on the system which the mobile phone operator has adopted. The technologies are grouped by generation. The first-generation systems started in 1979 with Japan, are all analog and include AMPS and NMT. Second-generation systems, started in 1991 in Finland, are all digital and include GSM, CDMA and TDMA. The nature of cellular technology renders many phones vulnerable to 'cloning': anytime a cell phone moves out of coverage (for example, in a road tunnel), when the signal is re-established, the phone sends out a 're-connect' signal to the nearest cell-tower, identifying itself and signaling that it is again ready to transmit. With the proper equipment, it's possible to intercept the re-connect signal and encode the data it contains into a 'blank' phone -- in all respects, the 'blank' is then an exact duplicate of the real phone and any calls made on the 'clone' will be charged to the original account. Third-generation (3G) networks, which are still being deployed, began in Japan in 2001. They are all digital, and offer high-speed data access in addition to voice services and include WCDMA (known also as UMTS), and CDMA2000 EV-DO. China will launch a third generation technology on the TD-SCDMA standard. Operators use a mix of pre designated frequency bands determined by the network requirements and local regulations.

NMREC

ECE

32
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

In an effort to limit the potential harm from having a transmitter close to the user's body, the first fixed/mobile cellular phones that had a separate transmitter, vehicle-mounted antenna, and handset (known as car phones and bag phones) were limited to a maximum 3 watts Effective Radiated Power. Modern handheld cell phones which must have the transmission antenna held inches from the user's skull are limited to a maximum transmission power of 0.6 watts ERP. Regardless of the potential biological effects, the reduced transmission range of modern handheld phones limits their usefulness in rural locations as compared to car/bag phones, and handhelds require that cell towers be spaced much closer together to compensate for their lack of transmission power. Some handhelds include an optional auxiliary antenna port on the back of the phone, which allows it to be connected to a large external antenna and a 3 watt cellular booster. Alternately in fringe-reception areas, a cellular repeater may be used, which uses a long distance high-gain dish antenna or yogi antenna to communicate with a cell tower far outside of normal range, and a repeater to rebroadcast on a small short-range local antenna that allows any cell phone within a few meters to function properly. HANDSETS Nokia is currently the world's largest manufacturer of mobile phones, with a global device market share of approximately 40% in 2008. Other major mobile phone manufacturers (in order of market share) include Samsung (14%), Motorola (14%), Sony Ericsson (9%) and LG (7%). These manufacturers account for over 80% of all mobile phones sold and produce phones for sale in most countries. There are several categories of mobile phones, from basic phones to feature phones such as music phones and camera phones, to smart phones. The first smart phone was the Nokia 9000 Communicator in 1996 which incorporated PDA functionality to the basic mobile phone at the time. As miniaturization and increased processing power of microchips has enabled ever more features to be added to phones, the concept of the smart phone has evolved, and what was a high-end smart phone five years ago, is a standard phone today. Several phone series have been introduced to address a given market segment, such as the RIM Blackberry focusing on enterprise/corporate customer email needs; the Sony Ericsson Walkman series of music phones and Cyber shot series of
NMREC ECE

33
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

camera phones; the Nokia N-Series of multimedia phones; and the Apple I Phone which provides full-featured web access and multimedia capabilities.

MOBILE PHONE FEATURES


Mobile phones often have features beyond sending text messages and making voice calls, including Internet browsing, music (MP3) playback, memo recording, personal organizer functions, e-mail, instant messaging, built-in cameras and camcorders, ring tones, games, radio, Push-to-Talk (PTT), infrared and Bluetooth connectivity, call registers, ability to watch streaming video or download video for later viewing, video calling and serve as a wireless modem for a PC, and soon will also serve as a console of sorts to online games and other high quality games. The total value of mobile data services exceeds the value of paid services on the Internet. The largest categories of mobile services are music, picture downloads, video gaming, adult entertainment, gambling, video/TV. APPLICATIONS The most commonly used data application on mobile phones is SMS text messaging, with 74% of all mobile phone users as active users (over 2.4 billion out of 3.3 billion total subscribers at the end of 2007). SMS text messaging was worth over 100 billion dollars in annual revenues in 2007 and the worldwide average of messaging use is 2.6 SMS sent per day per person across the whole mobile phone subscriber base. (Source Informa 2007). The first SMS text message was sent from a computer to a mobile phone in 1992 in the UK, while the first person-to-person SMS from phone to phone was sent in Finland in 1993.

NMREC

ECE

34
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

7. DETAILED DESCRIPTION OF DTMF DECODER

The MT8870D is a complete DTMF receiver consisting of digital decoder. The decoder uses digital counting techniques to detect and decode all 16 DTMF tone pairs in to four bit code. The output 4 bit code is given as input to the microcontroller. DTMF decoder is a very easy to use program to decode DTMF dial tones found on telephone lines with touch tone phones. DTMF decoder is also used for receiving data transmissions over the air in amateur radio frequency bands.

The Main Features of DTMF Mt8870d Are As Follows

Complete DTMF Receiver Low power consumption Internal gain setting amplifier Adjustable guard time Power-down mode Inhibit mode

Main Applications Are As Follows Receiver system Paging systems Repeater systems/mobile radio Credit card systems Remote control
NMREC ECE

35
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

DTMF DECODING CIRCUIT

The decoding circuit is designed using 8870 DTMF receiver IC. The purpose of this device is to decode the DTMF signals that are available at the input stage (from the telephone line) of the receiver side circuit. With the help of some passive elements, 8870 IC produces BCD codes for the corresponding DTMF signals. The output BCD code from this circuit is fed to microcontroller.

Gain Select: Gives the access to output of front-end differential amplifier for connection of feedback resistor. Power Down: A Logic High power down the device and inhibits the oscillator. Three state output Enable: A Logic High enables the outputs Q1 to Q4 Internal pull up.
NMREC ECE

36
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

The following is the functional table of the 8870 DTMF decoder IC:

F (Low) 697 697 697 770 770 770 852 852 852 941 941 941

F(high) 1209 1336 1447 1209 1336 1447 1209 1336 1447 1209 1336 1447

KEY 1 2 3 4 5 6 7 8 9 0 * #

TOE 1 1 1 1 1 1 1 1 1 1 1 1

Q4 0 0 0 0 0 0 0 1 1 1 1 1

Q3 0 0 0 1 1 1 1 0 0 0 0 1

Q2 0 1 1 0 0 1 1 0 0 1 1 0

Q1 1 0 1 0 1 0 1 0 1 0 1 0

Functional diagram of DTMF decoder

Delayed Steering output: It presents logic high when a received tone pair has been registered and the output latch is updated. It returns logic low when the voltage on St / Gt falls.

NMREC

ECE

37
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

Early Steering output: It presents logic high immediately when the digital algorithm detects a recognizable tone pair. Any momentary loss of signal condition will cause Est to return to logic low.

Steering input / Guard time output: A voltage greater than VTst detected at St causes the device to register the detected tone pair. The Gt output acts to reset the external steering time constant and its state is a function of Est and the voltage on St.

THE SAME ABOVE TABLE CAN BE SHOWN IN DIFFERENT PATTERN WITH 16 TONE COMBINATIONS SHOWN BELOW

Tone B [Hz] Symbol 1209 697 770 Tone A [Hz] 852 941 7 * 8 0 9 # C D 1 4 1336 2 5 1477 3 6 1633 A B

The signal encoded as a pair of sinusoidal tones from the table above which are mixed with each other. DTMF is used by most public switched telephone networks (PSTN) systems for number dialing, and is also used for voice-response systems such as telephone banking and sometimes over private radio networks to provide signaling and transferring of small amounts of data.

NMREC

ECE

38
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

WHAT IS DTMF?
When we press a button in the telephone set keypad, a connection is made that generates a resultant signal of two tones at the same time. These two tones are taken from a row frequency and a column frequency. The resultant frequency signal is called "Dual Tone Multiple Frequency". These tones are identical and unique. A DTMF signal is the algebraic sum of two different audio frequencies, and can be expressed as follows: f(t) = A0sin(2**fa*t) + B0sin(2**fb*t) + ........... ------->(1)

Where fa and fb are two different audio frequencies with A and B as their peak amplitudes and f as the resultant DTMF signal. fa belongs to the low frequency group and fb belongs to the high frequency group. Each of the low and high frequency groups comprise four frequencies from the various keys present on the telephone keypad; two different frequencies, one from the high frequency group and another from the low frequency group are used to produce a DTMF signal to represent the pressed key. The amplitudes of the two sine waves should be such that (0.7 < (A/B) < 0.9)V -------->(2)

The frequencies are chosen such that they are not the harmonics of each other. The frequencies associated with various keys on the keypad are shown in above table. When we send these DTMF signals to the telephone exchange through cables, the servers in the telephone exchange identifies these signals and makes the connection to the person you are calling. When we press the digit 5 in the keypad it generates a resultant tone signal which is made up of frequencies 770Hz and 1336Hz. Pressing digit 8 will produce the tone taken from tones 852Hz

NMREC

ECE

39
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

and 1336Hz. In both the cases, the column frequency 1336 Hz is the same. These signals are digital signals which are symmetrical with the sinusoidal wave. A Typical frequency is shown in the figure below:

Along with these DTMF generator in our telephone set provides a set of special purpose groups of tones, which is normally not used in our keypad. These tones are identified as 'A', 'B', 'C', 'D'. These frequencies have the same column frequency but uses row frequencies given in the table. These tones are used for communication signaling. Due to its accuracy and uniqueness, these DTMF signals are used in controlling systems using telephones. By using some DTMF generating ICs we can generate DTMF tones without depending on the telephone set.

NMREC

ECE

40
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

8. RELAYS AND THEIR APPLICATIONS


The electromagnetic relay, one of mankinds first electrical device, was used practically in telegraphy as early as 1850. The modern relay, properly applied, is one of the most simple, effective and dependable component available. In the majority of instances, it can achieve better reliability at lesser cost than an equivalent solid-state complex type of relay. The term relay was used for the first time to describe an invention made by Samuel Morse in 1836. The device invented by Morse was a Telegraph Amplifying Electromagnetic Device which enabled a small current flowing in a coil to switch on a large current in another circuit and thus helped in relay of signals.

A relay is a device that opens or closes an auxiliary circuit under some predetermined condition in the main circuit. The object of a relay is generally to act as a sort of electric magnifier, that is to say, it enables a comparatively weak current to bring into operation a much stronger current. It also provides complete electrical isolation between the controlling circuit and the controlled circuit.

Relays are widely used in industry. Railroads, pipelines and heavy-duty signaling operations have relied for many years to handle their automatic and remote control problems. Most of the traffic control signals on our streets use relays. Telephone, telegraph and telemetry systems depend on relays to provide circuit selection and switching. Complete automatic and many semi-automatic control processes in industrial plants use relays extensively. In computer circuit, relays can be arranged to provide mathematical functions and to count. In short, relays are used to perform a wide variety of tasks in electrical and electronics engineering activities.

Though relays are simple devices, they are rarely fully understood by electronic equipment designers because there are so many varieties. They have been developed to meet a wide range of requirements. A relay, when used properly under good climatic conditions, can have a very long life. Under other conditions, it can give considerable trouble.
NMREC ECE

41
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

The relays used in this project work are electromagnetic relays. The electromagnetic relay is basically a switch (or a combination of switches) operated by the magnetic force generated by a current flowing through a coil. Essentially, it consists of four parts an electromagnet comprising a coil and a magnetic circuit, a movable armature, a set of contacts, and a frame to mount all these components. However, very wide ranges of relays have been developed to meet the requirements of the industry.

This relay is nothing but a switch, which operates electromagnetically. It opens or closes a circuit when current through the coil is started or stopped. When the coil is energized armature is attracted by the electromagnet and the contacts are closed. That is how the power is applied to the signals (indicators).

The construction of the typical relay contains a code surrounded by a coil of copper wire. The core is mounted on a metal frame. The movable part of the relay is called armature. When a voltage is applied to the coil terminals, the current flowing through the coil produces a magnetic field in the core. In other words, the core acts as an electromagnet and attracts the metal armature. When the armature is attracted to the core, the magnetic path is from the core through armature, through the frame, and back to the core. On removing the voltage the spring attached to the

armature returns the armature to its original position. In this position, there is a small air-gap in the magnetic path. Hence, more power is needed to pull in the armature than that needed to keep it held in the attracted position.

The relay contacts and the terminals are mounted on an insulated board. When no current flows through the relay coil, the contact arm, or pole as it is called, mounted on the armature, touches the top contact. When the coil is energized by flow of current, the armature along with the contact arm assembly moves downwards so that the contact arm touches the bottom contact.

When an electric current is flowing through a relay coil, it is said to be energized, and when the current flow stops, the relay is said to be de-energized. They have a set of parallel contacts, which are all pulled in when the electromagnet pulls in the armature. On being energized, whether a

NMREC

ECE

42
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

relay makes contact(s) or breaks them depends on the design of contact arrangements. Though the contacts are open or close simultaneously, the sequence of operation cannot be guaranteed in this of construction. To have a definite switching sequence, stacked contacts are used.

RELAY CHARACTERSTICS
A relay is a device that opens or closes an auxiliary circuit under predetermined condition in the main circuit. The object of a relay is generally to act as a sort of electrical magnifier; that is to say, it enables a comparatively weak current to bring into operation a much stronger current. It also provides complete electrical isolation between the controlling circuit and the controlled circuit. Relays are extensively used in electronics, electrical engineering and many other fields. A wide variety of relays have been developed to meet the varied requirements of industry. There are relays that are sensitive to conditions of voltage, current, temperature, frequency, or some combination of these conditions. The basic working of an electromagnetic relay is easy to understand. However, in order to select a relay to perform a particular function efficiently and that too for a long time requires knowledge of relay characteristics and that of the circuits in which the relay is used.

NMREC

ECE

43
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

9. SOFTWARE DETAILS

The Keil software is used for programming the ICs. the program written is then compiled i.e., made to cross check the errors and send for the next process. The compiled file is in the form of object code. The object code is then sent to the linker where two or more object codes are linked. The resultant of the linker is sends to the simulator where the result is simulated by assuming some values. The simulated output is then sent to the debugger where the output of the program is verified.

The program or the code can be written either in Assembly Language or by

using Embedded C. But, here we used Assembly level language for programming purpose.

NMREC

ECE

44
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

10. HARDWARE DETAILS

The ICs and other important components used in this project work, procured from the Hyderabad Electronics Market. The details or data sheets of the ICs are down loaded from the Internet. The following are the web sites that can be browsed for collecting the data sheets.

1. www. Texas Instruments.com 2. www. National semiconductors.com 3. www. Fairchild semiconductors.com The following are the ICs and other important components used in this project work

1. 89C51 Micro-controller IC 2. 8870 DTMF chip 3. Voltage regulator 4. Relay 4. BC 547 Transistor The required PCBS (Printed Circuit boards) for the project work fabricated by SUN RISE CIRCUITS, Kushaiguda Industrial Estate, Hyderabad. Kushaiguda Industrial Estate is very famous for fabricating the PCBs.

NMREC

ECE

45
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

11. FABRICATION DETAILS

The fabrication of one demonstration unit is carried out in the following sequence: 1. Finalizing the total circuit diagram, listing out the components and their sources of procurement. 2. 3. Procuring the components, testing the components and screening the components. Making layout, preparing the inter connection diagram as per the circuit diagram, preparing the drilling details, cutting the laminate to the required size. 4. Drilling the holes on the board as per the component layout, painting the tracks on the board as per inter connection diagram. 5. Etching the board to remove the un-wanted copper other than track portion. Then cleaning the board with water, and solder coating the copper tracks to protect the tracks from rusting or oxidation due to moisture. 6. Assembling the components as per the component layout and circuit diagram and soldering components. 7. 8. Integrating the total unit inter wiring the unit and final testing the unit. Keeping the unit ready for demonstration.

PCB FABRICATION DETAILS:


The Basic raw material in the manufacture of PCB is copper cladded laminate. The laminate consists of two or more layers insulating reinforced materials bonded together under heat and pressure by thermo setting resins used are phenolic or epoxy. The reinforced materials used are electrical grade paper or woven glass cloth. The laminates are manufactured by impregnating thin sheets of reinforced materials (woven glass cloth or electrical grade paper) with the required resin (Phenolic or epoxy). The laminates are divided into various grades by National Electrical Manufacturers association (NEMA).
NMREC ECE

46
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

The nominal overall thickness of laminate normally used in PCB industry is 1.6mm with copper cladding on one or two sides. The copper foil thickness is 35 Microns (0.035mm) OR 70 Microns (0.070 mm).

The next stage in PCB fabrication is artwork preparation. The artwork (Mater drawing) is essentially a manufacturing tool used in the fabrication of PCBs. It defines the pattern to be generated on the board. Since the artwork is the first of many process steps in the Fabrication of PCBs. It must be very accurately drawn. The accuracy of the finished board depends on the accuracy of artwork.

Normally, in industrial applications the artwork is drawn on an enlarged scale and photographically reduced to required size. It is not only easy to draw the enlarged dimensions but also the errors in the artwork correspondingly get reduced during photo reduction. For ordinary application of simple single sided boards artwork is made on ivory art paper using drafting aids. After taping on an art paper and photography (Making the negative) the image of the photo given is transformed on silkscreen for screenprinting. After drying the paint, the etching process is carried out. This is done after drilling of the holes on the laminate as per the components layout. The etching is the process of chemically removing un-wanted copper from the board.

The next stage after PCB fabrication is solder masking the board to prevent the tracks from corrosion and rust formation. Then the components will be assembled on the board as per the component layout.

The next stage after assembling is the soldering the components. The soldering may be defined as process where in joining between metal parts is produced by heating to suitable temperatures using non-ferrous filler metals has melting temperatures below the melting temperatures of the metals to be joined. This non-ferrous intermediate metal is called solder. The solders are the alloys of lead and tin.

NMREC

ECE

47
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

CONCLUSION
The project work Remote Control of Home Appliances through Mobile is designed and developed success fully, for the demonstration purpose, a prototype module is constructed, results are found to be satisfactory. Since it is a prototype module, it is designed with only three relays, but for real applications many relays can be connected at the output of microcontroller, and these relay contacts can be used to control the variety of home appliances. The microcontroller used in the project work is having 32 I/O lines, many of them are left idle, if required all these pins can be used for many applications. In any concept of mobile controlled wireless systems, it is essential to attach one mobile phone to the controller circuit. This mobile phone cannot be used for normal functions; the main function of this phone is to control the system according to the DTMF signals received from the caller phone.

In addition the control of home appliances, the same concept with slight changes can be used for many other applications especially for security purposes. One common application is that it can be used for spy activities; in this regard the data receiving mobile can be used to control a small robot that is equipped with wireless video camera, which can be used as high level security system to guard the restricted zones. When the robot is leaved in the restricted zone, it moves freely in the zone and covers all corners; the camera arranged over the vehicle can broadcast the video signals to the centralized monitoring station, where the security personals are monitoring the zone, and from where the vehicle is controlled through cell phone. Likewise this type of robots can be used for many applications.

NMREC

ECE

48
REMOTE CONTROL OF HOME APPLIANCES THROUGH MOBILE

REFERENCES
The following are the books referred during design, development and fabrication of the project work. (1) The 8051 Micro-controller Architecture, programming & Applications

By: Kenneth J. Ayala (2) Programming and customizing the 8051 Micro-controller (3) The concepts and Features of Micro-controllers By: Myke Predko

By: Raj Kamal

(4) Mobile and Personal Communication System and Services By: RAJPANDYA In addition to the above books, most of the information collected from the Internet. The following are the references. Bair, Christian (1999) AD5 Advanced SEI Bus Commands http://www.usdigital.com/products/ad5/ad5advcom.shtml Saikkonen, Riku (2001) Linux I/O port programming mini-HOWTO http://www.linuxdoc.org/HOWTO/mini/IO-Port-Programming.html Roth Jr., Charles H. Fundamentals of Logic Design. Massachusetts, PWS Publishing Co., 1995

NMREC

ECE

Vous aimerez peut-être aussi