mobile controlled home appliances

Upload: adityanarayansourav

Post on 15-Oct-2015

49 views

Category:

Documents


2 download

DESCRIPTION

Mobile Controlled Home Appliances

TRANSCRIPT

MOBILE CONTROLLED HOME APPLIANCES

A PROJECT REPORT

Submitted to

MAHARSHI DAYANAND UNIVERSITY, ROHTAK

In partial fulfillment for the award of the degree

of

BACHELOR OF TECHNOLOGY

in

ELECTRONICS AND COMMUNICATION ENGINEERING

Submitted by

RAVINDER FEJB10EC12Under the supervision of

MR. MANOJ KUMARLECTURERDEPARTMENT OF ECE

FACULTY OF ENGINEERING, J B KNOWLEDGE PARK, VILLAGE-MANJHAWALI, FARIDABAD

JUNE 2014i

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGG.DEPARMENT OF ELECTRONICS AND COMM ENGGFACULTY OF ENGINEERING, J B KNOWLEDGE PARK, VILLAGE-MANJHAWALI, FARIDABAD

BONAFIDE CERTIFICATE

Certified that this project report MOBILE CONTROLLED HOME APPLIANCE is the bonafide work of RAVINDER FEJB10EC12 who carried out the project work under my supervision.

Signature:Name of Supervisor:Designation:Department:

Signature:Name of Project Coordinator : Mr. Manoj kumar

Head of Department

ACKNOWLADGEMENTI would like to take this opportunity to express my deepest sense of gratitude and respect to my honorable teacher & project supervisor Mr.Manoj kumar , Lecturer , Department of Electronics & communication Engineering, J B Knowledge park, who guided me in this project and help me in every stage where any difficulty comes. And he has given me valuable suggestions on the development of my project and suggested me to prepare this project paper.I am also thankful to Professor A K Dubay, HOD, Department of Electronic&Communication Engineering, MDU, for his kindness in providing me access to the seminar library, internet connections and lab facilities. My heartiest thank to all my respectable teachers, and my classmates for providing moral support and encouragement to enhance my knowledge on Microcontroller.Foremost and finally, it is generosity and guidance of Almighty God to honor me with power and persistence to get this work done.

Date: 21/05/2014 The Author

ABSTRACTThe project demonstrates a novel method which enables users to control their home appliances and systems for remotely using a cell phone-based interface. To access the control unit, the user should send an authentication code Dual Tone Multi Frequency along with the required function to his/her home control system via Global System for Mobile communication (GSM). Upon being properly authenticated, the cell phone-based interface at home (control unit) would relay the commands to a microcontroller that would perform the required function.Four mobile keypad buttons generate four different DTMF signals at input which is sent to the mobile at output section via GSM. Then the signal is transferred to a Microcontroller. Microcontroller output is used to make active or inactive two magnetic relays for four different state (i.e. keypad button 2 is used make two relays idle. Keypad button 4 is used to make one relay one and so on.)

Table of ContentsACKNOWLADGEMENTiiABSTRACTiiiTable of ContentsivLIST OF FIGUREviList of tablesviiChapter 1 INTRODUCTION1Chapter 2 DTMF BASICS2Chapter 3 DECODER M-887053.1 DECODER DESCRIPTION53.2 PIN DIAGRAM OF M- 887063.3 Pin discription63.4 FEATURES8Chapter 4 MICROCONTROLLER104.1 INTRODUCTION104.2 PIN DIAGRAM114.3 RC Oscillator114.4 Internal Oscillator Block124.5 Special Features124.6 HEXADECIMAL CODE OF PIC MICROCONTROLLER14Chapter 5 ULN 2003 IC165.1 INTRODUCTION165.2 PIN DIAGRAM175.3 Pin Description:185.4 CIRCUIT DIAGRAM OF ULN200319Chapter 6 IN4007 DIODE206.1 INTRODUCTION206.2 FEATURES216.3 USED OF IN4007 DIODE21Chapter 7 AUTOMATIVE RELAY IC 12VOLT237.1 INTRODUCTION237.2 Relay Design247.3 Relay Construction257.4 WORKING OF RELAY267.5 Relay Basics277.6 relay operation28Chapter 8 POWER SUPPLY318.1 BLOCK DIAGRAM318.2 TRANSFORMER318.3 Bridge rectifier318.4 780531

LIST OF FIGURE

Fig. 21 Row and Column Frequency Correspondence3Fig. 31pin digram of m-88706Fig. 41 Pin digram of pic 18f452011Fig. 42 HEXADECIMAL CODE OF PIC MICROCONTROLLER14Fig. 51 pin digram of ULN200317Fig. 52 CIRCUIT DIAGRAM OF ULN200319Fig. 61 diode symbol and figure20Fig. 62 use of IN400722Fig. 71 relays23Fig. 72 relay internal structure25Fig. 73 Relay26Fig. 74 Energized Relay (ON)29Fig. 75 De Energized Relay30Fig. 8-1 circuit digram of power supply31

List of tables

Table 21 Frequencies generated on Key presses2Table 22 Row and Column Frequency Correspondence3Table 31 Values of Decoder output for various frequencies5Table 51 pin description of ULN200318

Chapter 1 INTRODUCTIONThe remote control technologies have been used in the fields like factory automation, space exploration, in places where human access is difficult. As this has been achieved in the domestic systems partially, many corporations and laboratories are researching the methods which enable human to control and monitor efficiently and easily in the house or outdoor. Controlling the domestic system regardless of time and space is an important challenge. As the mobile phone enables us to connect with the outside devices via mobile communication network regardless of time and space, the mobile phone is a suitable device to control domestic systems. This project proposes a method to control a domestic system using a mobile phone, irrespective of the phone model and mobile phone carrier. The system suggested consists of the mobile phone normally registered in communication service and a mobile phone that can receive a call from another phone. Existing methods for control and monitoring, using mobile phones have usage problems because the cost and need for continuous control. One of the disadvantage, being the lack of feedback during the process. This paper proposes to solve the problems of existing methods of control that use simple voice call. Method proposed uses the DTMF (Dual Tone Multi Frequency) generated when a keypad button of the mobile phone is pressed by the user. The mobile phone user controls the system by sending the DTMF tone to the access point. Mobile communication network coverage is larger than that of LANs, thus user can take advantage of mobile phones to control the system

Chapter 2 DTMF BASICSDTMF is a generic communication term for touch tone . The tones produced when dialing on the keypad on the phone could be used to represent the digits, and a separate tone is used for each digit. However, there is always a chance that a random sound will be on the same frequency which will trip up the system. It was suggested that if two tones were used to represent a digit, the likelihood of a false signal occurring is ruled out. This is the basis of using dual tone in DTMF communication.DTMF dialing uses a keypad with 12/16 buttons. Each key pressed on the phone generates two tones with specific frequencies, so a voice or a random signal cannot imitate the tones. One tone is generated from a high frequency group of tones and the other from low frequency group.The frequencies generated on pressing different phone keys are shown in the Table 1.Table 21 Frequencies generated on Key pressesButton

Low Frequency(Hz)HighFrequency(Hz)

16971209

26971336

36971477

47701209

57701336

67701477

78521209

88521336

98521477

09411209

*9411336

#9411477

Each row and column of the keypad corresponds to a certain tone and creates a specific frequency. Each button lies at the intersection of the two tones as shown in Table 2.

Fig. 21 Row and Column Frequency Correspondence

Table 22 Row and Column Frequency Correspondence123697

456770

789852

*0#941

120913361477Frequency(Hz)

When a button is pressed, both the row and column tones are generated by the telephone instrument. These two tones will be unique and different from tones of other keys. So, whenever we say that there is a low and high frequency associated with a button, it is actually the sumof two waves is transmitted. This fundamental principle can be extended to various applications. DTMF signals can be transmitted over a radio to switch on or switch off home appliances, flash lights, motors, cameras, warning systems, irrigation systems and so on. These encoded data can be stored in a microcontroller and can be transmitted serially to another system for processing. Block diagram for the proposed method is shown in Figure

Chapter 3 DECODER M-88703.1 DECODER DESCRIPTION

The decoder used is M-8870. For operating functions. M-8870 includes 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 parsing the resulting 4-bitcode to the output bus. The M-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. Table 3 shows values of Decoder output for various frequencies.

Table 31 Values of Decoder output for various frequenciesButtonLow Frequency(Hz)High Frequency(Hz)Q1Q2Q3Q4

169712090001

269713360010

369714770011

477012090100

577013360101

677014770110

785212090111

885213360000

985214771001

094112091010

*94113361011

#94114771100

3.2 PIN DIAGRAM OF M- 8870

Fig. 31pin digram of m-88703.3 Pin discription

1. IN+Non-Inverting Op-Amp (Input).2. IN-Inverting Op-Amp (Input).3. GSGain Select.Gives access to output of front end differential amplifier for connection of feedback resistor.4. V-RefReference Voltage (Output).Nominally VDD/2 is used to bias inputs at mid-rail .5. INHInhibit (Input).Logic high inhibits the detection of tones representing characters A, B, C and D. This pin input is internally pulled down.6. PWDNPower Down (Input).Active high. Powers down the device and inhibits the oscillator. This pin input is internally pulled down.7. OSC1Clock (Input).8. OSC2Clock (Output). A 3.579545 MHz crystal connected between pins OSC1 and OSC2 completes the internal oscillator circuit.9. VSSGround (Input). 0 V typical.10. TOEThree State Output Enable (Input).Logic high enables the outputs Q1-Q4. This pin is pulled up internally.11-14. Q1-Q4Three State Data (Output).When enabled by TOE, provide the code corresponding to the last valid tone-pair received (see Table 1). When TOE is logic low, the data outputs are high impedance.15. StDDelayed Steering (Output).Presents a logic high when a received tone-pair has been registered and the output latch updated; returns to logic low when the voltage on St/GT falls below VTSt.16. EStEarly Steering (Output).Presents a logic high once the digital algorithm has detected a valid tone pair (signal condition). Any momentary loss of signal condition will cause ESt to return to a logic low.17. St/GTSteering Input/Guard time (Output) Bidirectional.A voltage greater than VTSt detected at St causes the device to register the detected tone pair and update the output latch. A voltage less than VTSt frees the device to accept a new tone pair. The GT output acts to reset the external steering time-constant; its state is a function of ESt and the voltage on St.18. VDDPositive power supply (Input). +5 V typical.3.4 FEATURES Complete DTMF Receiver Low power consumption Internal gain setting amplifier Adjustable guard time Central office quality Power-down mode Inhibit mode Backward compatible with MT8870C/MT8870C-13.4 APPLICATION Paging systems Repeater systems/mobile radio Credit card systems Remote control Personal computers Telephone answering machine

Chapter 4 MICROCONTROLLER4.1 INTRODUCTIONMicroconroller pic18f4520 is used for this purpose. It is a 40 pin miro controller.10bit A/D converter is used. Here 16pin is used for i/o purpose. Microcontroller pic18f4520 is divided into 5port.PortA -8pinPortB -8pinPortC -8pinPortD -8pinPortE -4pinIn microcontroller pic18f4520 PortC and PortD is used for i/o purpose.The o/p of decoder is apply to the i/p of pic micro controller.4.2 PIN DIAGRAM

Fig. 41 Pin digram of pic 18f45204.3 RC OscillatorFor timing insensitive applications, the RC and RCIO device options offer additional cost savings. The actual oscillator frequency is a function of several factors: supply voltage values of the external resistor (REXT) and capacitor (CEXT) operating temperatureGiven the same device, operating voltage and temperature and component values, there will also be unit-to-unit frequency variations. These are due to factors such as: normal manufacturing variation difference in lead frame capacitance between package types (especially for low CEXT values) variations within the tolerance of limits of REXT and CEXTIn the RC Oscillator mode, the oscillator frequency divided by 4 is available on the OSC2 pin. This signal may be used for test purposes or to synchronize other logic.4.4 Internal Oscillator BlockThe PIC18F4520 devices include an internal oscillator block which generates two different clock signals; either can be used as the microcontrollers clock source. This may eliminate the need for external oscillator circuits on the OSC1 and/or OSC2 pins. The main output (INTOSC) is an 8 MHz clock source, which can be used to directly drive the device clock. It also drives a post scaler, which can provide a range of clock frequencies from 31 kHz to 4 MHz. The INTOSC Output is enabled when a clock frequency from 125 kHz to 8 MHz is selected.The other clock source is the internal RC oscillator (INTRC), which provides a nominal 31 kHz output. INTRC is enabled if it is selected as the device clocksource; it is also enabled automatically when any of the following are enabled: direct or INTOSC postscaler) is selected by configuring the IRCF bits of the OSCCON register Power-up Timer Fail-Safe Clock Monitor Watchdog Timer Two-Speed Start-up4.5 Special Features Memory Endurance: The Enhanced Flash cells for both program memory and data EEPROM are rated to last for many thousands of erase/writecycles up to 100,000 for program memory and 1,000,000 for EEPROM. Data retention without refresh is conservatively estimated to be greaterthan 40 years.

Self-programmability: These devices can write to their own program memory spaces under internal software control. By using a bootloader routine located in the protected Boot Block at the top ofprogram memory, it becomes possible to create an application that can update itself in the field.

Extended Instruction Set: The PIC18F2420/2520/4420/4520 family introduces an optional extension to the PIC18 instruction set, which adds8 new instructions and an Indexed Addressing mode. This extension, enabled as a device configuration option, has been specifically designedto optimize re-entrant application code originally developed in high-level languages, such as C.

Enhanced CCP module: In PWM mode, this module provides 1, 2 or 4 modulated outputs for controlling half-bridge and full-bridge drivers. Other features include Auto-Shutdown, for disabling PWM outputs on interrupt or other select conditions and Auto-Restart, to reactivate outputs once the condition has cleared.

Enhanced Addressable USART: This serial communication module is capable of standard RS-232 operation and provides support for the LINbus protocol. Other enhancements include automatic baud rate detection and a 16-bit Baud Rate Generator for improved resolution. When the microcontroller is using the internal oscillator block, the USART provides stable operation for applications that talk to the outside world without using an external crystal (or its accompanying power requirement).

10-bit A/D Converter: This module incorporates programmable acquisition time, allowing for a channel to be selected and a conversion to beinitiated without waiting for a sampling period and thus, reduce code overhead.

Extended Watchdog Timer (WDT): This enhanced version incorporates a 16-bit prescaler allowing an extended time-out range that is stable across operating voltage and temperature.4.6 HEXADECIMAL CODE OF PIC MICROCONTROLLER

Fig. 42 HEXADECIMAL CODE OF PIC MICROCONTROLLER

Chapter 5ULN 2003 IC5.1 INTRODUCTIONIdeally suited for interfacing between low-level logic circuitry and multiple peripheral power loads, the Series ULN2003IC high-voltage, high-current Darlington arrays feature continuous load current ratings to 500 mA for each of the seven drivers. At an appropriate duty cycle depending on ambient temperature and number of drivers turned ON simultaneously, typical power loads totaling over 230 W (350 mA x 7, 95 V) can be controlled. Typical loads include relays, solenoids,stepping motors, magnetic print hammers, multiplexed LED and incandescent displays, and heaters. All devices feature open-collector outputs with integral clamp diodes 600mA peak) Output voltage 50V. Integrated suppression Seven Darlingtons per package output current 500mA. Diodes for inductive loads outputs can be paralleled for high current. TTL/CMOS/PMOS/DTL compatible input pinned opposite outputs to simplify layout. The ULN2003 is a high voltage, high current Darlington array containing seven open collector Darlington pairs with common emitters. Each channel rated at 500mA and can withstand peak currents of 600mA. Suppression diodes are included for inductive load driving and the inputs are pinned opposite the outputs to simplify board layout. This versatile device is useful for driving a wide range of loads including solenoids, relays DC motors, LED displays filament lamps, thermal print heads and high power buffers. The ULN2003A is supplied in 16 pin plastic DIP packages with a copper lead frame to reduce thermal resistance. 5.2 PIN DIAGRAM

Fig. 501 pin digram of ULN20035.3 Pin Description:Table 01 pin description of ULN2003Pin NoFunctionName

1Input for 1stchannelInput 1

2Input for 2ndchannelInput 2

3Input for 3rdchannelInput 3

4Input for 4thchannelInput 4

5Input for 5thchannelInput 5

6Input for 6thchannelInput 6

7Input for 7thchannelInput 7

8Ground (0V)Ground

9Common free wheeling diodesCommon

10Output for 7thchannelOutput 7

11Output for 6thchannelOutput 6

12Output for 5thchannelOutput 5

13Output for 4thchannelOutput 4

14Output for 3rdchannelOutput 3

15Output for 2ndchannelOutput 2

16Output for 1stchannelOutput 1

5.4 CIRCUIT DIAGRAM OF ULN2003

Fig. 502 CIRCUIT DIAGRAM OF ULN2003ULN2003is a high voltage and high current Darlington array IC. It contains seven open collector darlington pairs with common emitters. A darlington pair is an arrangement of two bipolar transistors.ULN2003belongs to the family of ULN200X series of ICs. Different versions of this family interface to different logic families. ULN2003 is for 5V TTL, CMOS logic devices. These ICs are used when driving a wide range of loads and are used as relay drivers, display drivers, line drivers etc. ULN2003 is also commonly used while drivingStepper Motors. ReferStepper Motor interfacing using ULN2003.Each channel or darlington pair inULN2003is rated at 500mA and can withstand peak current of 600mA. The inputs and outputs are provided opposite to each other in the pin layout. Each driver also containsa suppression diodeto dissipate voltage spikes while driving inductive loads. The schematic for each driver is given above.Chapter 6IN4007 DIODE6.1 INTRODUCTIONIn normal biasing state of diode anode terminal is connected to positive of the power source and cathode is connected to ground. When anode voltage crosses inner barrier potential of diode the device goes into conduction state where there is increase in output current with constant Vak (voltage across anode and cathode) voltage. But in this paper we have observed the behavior of diode at different biasing conditions.

Fig. 601 diode symbol and figure

In the case of semiconductor diodes, the temperature range over which the temperature dependence of the forward voltage is linear, can be increased by lowering the operating current along with the increase of the sensitivity(dVf/dT)which is found to vary logarithmically withI.The temperature and current dependence of forward voltageVfcan be explained by using the theory of thep-njunction. The capacitance-voltage(C-V)measurements ofp-njunctions are carried out at different temperatures and are discussed in light of the theory of thep-njunction. The band gapEg,estimated fromVf-Tmeasurement, is found to be1.17eV,whereas it is found to be 1.189 eV fromC-Vmeasurement.on the basis of above observations we can say that on practical analysis diode is much more than a switch or for the matter rectyifier . we have seen the sinusoid variations of current and resistances, which is independent of each other. We have seen diode behaving as amplifier with albiet low gain.we are carrying out further studies to put the above behaviour interms of mathmetical/solid state devices equation. This may leads to complete new out look toward a conventional diode and new applicaions will come in picture

6.2 FEATURES

Diffused Junction High Current Capability and Low Forward Voltage Drop Surge Overload Rating to 30A Peak Low Reverse Leakage Current Lead Free Finish, RoHS Compliant

6.3 USED OF IN4007 DIODEIt is used for reverse Voltage protection.The IN4007 is staple for many powers, DC to DC setup and broadband projects.This is a simple, common rectified Diode.IN4007 rated for upto 1A/1000V

Fig. 602 use of IN4007

Chapter 7AUTOMATIVE RELAY IC 12VOLT7.1 INTRODUCTIONRelays are used where it is necessary to control a circuit by a low-power signal. Relay are used when you need to switch a higher current then a switch can handle. Arelayis anelectricallyoperatedswitch

Fig. 701 relaysWe know that most of the high end industrial application devices have relays for their effective working. Relays are simple switches which are operated both electrically and mechanically. Relays consist of a n electromagnet and also a set of contacts. The switching mechanism is carried out with the help of the electromagnet. There are also other operating principles for its working. But they differ according to their applications. Most of the devices have the application of relays.The main operation of a relay comes in places where only a low-power signal can be used to control a circuit. It is also used in places where only one signal can be used to control a lot of circuits. The application of relays started during the invention of telephones. They played an important role in switching calls in telephone exchanges. They were also used in long distance telegraphy. They were used to switch the signal coming from one source to another destination. After the invention of computers they were also used to perform Boolean and other logical operations. The high end applications of relays require high power to be driven by electric motors and so on. Such relays are called contactors.7.2 Relay DesignThere are only four main parts in a relay. They are Electromagnet Movable Armature Switch point contacts SpringThe figures given below show the actual design of a simple relay.

Fig. 702 relay internal structure7.3 Relay ConstructionIt is an electro-magnetic relay with a wire coil, surrounded by an iron core. A path of very low reluctance for the magnetic flux is provided for the movable armature and also the switch point contacts. The movable armature is connected to the yoke which is mechanically connected to the switch point contacts. These parts are safely held with the help of a spring. The spring is used so as to produce an air gap in the circuit when the relay becomes de-energized.

7.4 WORKING OF RELAYThe working of a relay can be better understood by explaining the following diagram given below.

Fig. 703 Relay

The diagram shows an inner section diagram of a relay. An iron core is surrounded by a control coil. As shown, the power source is given to the electromagnet through a control switch and through contacts to the load. When current starts flowing through the control coil, the electromagnet starts energizing and thus intensifies the magnetic field. Thus the upper contact arm starts to be attracted to the lower fixed arm and thus closes the contacts causing a short circuit for the power to the load. On the other hand, if the relay was already de-energized when the contacts were closed, then the contact move oppositely and make an open circuit.As soon as the coil current is off, the movable armature will be returned by a force back to its initial position. This force will be almost equal to half the strength of the magnetic force. This force is mainly provided by two factors. They are the spring and also gravity.Relays are mainly made for two basic operations. One is low voltage application and the other is high voltage. For low voltage applications, more preference will be given to reduce the noise of the whole circuit. For high voltage applications, they are mainly designed to reduce a phenomenon called arcing.7.5 Relay BasicsThe basics for all the relays are the same. Take a look at a 4 pin relay shown below. There are two colours shown. The green colour represents the control circuit and the red colour represents the load circuit. A small control coil is connected onto the control circuit. A switch is connected to the load. This switch is controlled by the coil in the control circuit. Now let us take the different steps that occour in a relay.7.6 relay operationEnergized Relay (ON)As shown in the circuit, the current flowing through the coils represented by pins 1 and 3 causes a magnetic field to be aroused. This magnetic field causes the closing of the pins 2 and 4. Thus the switch plays an important role in the relay working. As it is a part of the load circuit, it is used to control an electrical circuit that is connected to it. Thus, when the relay in energized the current flow will be through the pins 2 and 4.

Fig. 704 Energized Relay (ON) De Energized Relay (OFF)As soon as the current flow stops through pins 1 and 3, the switch opens and thus the open circuit prevents the current flow through pins 2 and 4. Thus the relay becomes de-energized and thus in off position.

Fig. 705 De Energized RelayDe-Energized Relay (OFF)

Chapter 8POWER SUPPLY8.1 BLOCK DIAGRAM vFig. 81 circuit digram of power supply8.2 TRANSFORMERAn step down transformer is used for bringing 230 v AC down to 9v AC.8.3 Bridge rectifierConvert AC to DC.8.4 7805It is a 5 volt regulator. It take 7 to 35 v as input and produce an output of 5 v.