You are on page 1of 23

HOME AUTOMATION

G MANIHAS REDDY - 08B81A1026 G.RAKESH REDDY - 08B81A1041 M.SRIKANTH - 08B81A1052

INTERNAL GUIDE :: Mrs. S.Harivardhagini Associate Professor, Dept. Of Electronics & Instrumentation Engg. CVR College Of Engineering

CVR COLLEGE OF ENGINEERING Vastunagar, Mangalpalli (V), Ibrahimpatnam (M), Ranga Reddy Distt., Hyderabad. 501510

ACKNOWLEDGEMENTS
We would like to express our foremost sincere gratitude to the Head of the Department (Electronics and Instrumentation Engineering), Prof. S. Narayana, for encouraging us to implement our technical ideas in the form of this mini project. It was a constructive time that we got all through the execution of the project, wherein we not only enhanced our caliber but also developed aptitude towards logic development and implementation. We would also like to thank our internal guide Mrs. S.Harivardhagini, Associate Professor, CVR College of Engineering, without whose continuous guidance and support in many forms, this mini project might not have seen the daylight. Her corrections and suggestions all through the project execution were of immense help for us. Last but not the least, we would like to thank our parents who supported us in procuring our resources and encouraged us, and our friends who were of a great help at many points of time while this project was being executed.

Page 2

ABSTRACT
This project is designed to make home automation easy to control when a user is not at home. The project is designed to allow easy use of a mobile phone to control appliances in the home. This will communicate with another mobile phone, which in turn controls the devices attached to microcontroller module. The technology used is DTMF (Dual Tone Multi Frequency), used for telecommunication signaling. A DTMF decoder is interfaced with microcontroller.

Page 3

Contents
INTRODUCTION ...................................................................................................................................................... 5 DESIGN OF THE PROJECT BLOCK DIAGRAM ................................................................................................................................... 6 Components Used ................................................................................................................................. 8 DTMF Decoder: ...................................................................................................................................... 9 DTMF DECODER CIRCUIT ..................................................................................................................... 11 Microcontroller:(ATMEGA 16) ............................................................................................................. 12 CIRCUIT DESCRIPTION......................................................................................................................... 14 FLOWCHART ....................................................................................................................................... 18 SOFTWARES USED ..................................................................................................................................................... 19 SCOPE OF THE PROJECT APPLICATIONS ...................................................................................................................................................... 20 Advantages .......................................................................................................................................................... 21 Disadvantages ...................................................................................................................................................... 21 Bibiliography ........................................................................................................................................................ 22

Page 4

INTRODUCTION
The underlying principle mainly relies up on the ability of DTMF (Double Tune Multi Frequency) ICs to generate DTMF corresponding to a number or code in the number pad and to detect the same number or code from its corresponding DTMF. In detail, a DTMF generator generates two frequencies corresponding to a number or code in the number pad which will be transmitted through the communication networks, constituting the transmitter section which is simply equivalent to a mobile set. In the receiver part, the DTMF detector IC, for example IC MT 8870 detects the number or code represented by DTMF back, through the inspection of the two transmitted frequencies. The DTMF frequencies representing the number/ codes are shown below.

Page 5

BLOCK DIAGRAM

MOBILE PHONE

DTMF DECODER CM8870

MICROCONTROLLER ATMEGA16

APPLIANCES

DISPLAY

Page 6

As mentioned earlier, as the relevance of our design confines in the receiver section to drive the devices represented by the LEDs from the DTMF transmitted by the mobile phones to the land line, we are restricting our whole discussion.

As shown in the above block diagram, first block is the cell with tone it acts as a DTMF generator depending upon key pressed.DTMF decoder, i.e, IC CM8870 decodes the received tone and gives binary equivalent of it to the microcontroller.

Page 7

Components Used
1. Resistors Value 100k 10k 330k Quantity 2 5 1

2. Capacitors Value 0.1uF 22pF Quantity 2 4

3. Ics IC CM8870 ATMEGA16 Quantity 1 1

4. Oscillators Value 3.57MHZ 12MHZ Quantity 1 1

5. Miscellaneous Component 7805 LED Quantity 2 8

Page 8

DTMF Decoder:
The main system is the user interface and control system. The phone line was chosen as the method of interfacing because it has distinct advantages over other systems in communicating information from a distance. The next image serves as a block diagram for not only the remote access interface but the overall system as a whole. System flow and activation begins at the top left of the block diagram with the answering machine picking up a call from the user dialing in remotely. The answering machine controls the connection and disconnection of the phone line to the DTMF decoder automatically. The user presses the keys on their touch tone enabled telephone in a specific sequence. The DTMF decoder circuit is connected to the phone line and it interprets the DTMF signals on the line and forwards them to the main microcontroller in the form of a four bit binary number. The controller running the main firmware determines if the correct input sequence was entered by the user and interfaces directly with the individual subsystems. The subsystems also have a local activation capability such as a pushbutton switch to control its functionality. The subsystems are independent of one another and can operate in parallel if an activation signal is given from either the controller or from the local activation switches. A control line is driven high on the chip to indicate that a valid code has been decoded and is present on the four bit binary port. This decoded DTMF tone will remain present on the output port until the CM8870 receives an enable signal from the microprocessor controlling circuitry. At this point, the CM8870 will start the DTMF decoding process over. A table listing the binary output for a decoded DTMF signal is given below in the next image.

Page 9

Page 10

DTMF DECODER CIRCUIT

Page 11

Microcontroller:(ATMEGA 16)

Pin Descriptions VCC: Digital supply voltage. GND: Ground. Port A (PA7..PA0) Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running. 2466TAVR07/10

Page 12

ATmega16(L) Port B (PB7..PB0) Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port B also serves the functions of various special features of the ATmega16 Port C (PC7..PC0) Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. Port C also serves the functions of the JTAG interface and other special features of the ATmega16 Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port D also serves the functions of various special features of the ATmega16 RESET Reset Input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running. The minimum pulse length is given in Shorter pulses are not guaranteed to generate a reset. XTAL1 Input to the inverting Oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting Oscillator amplifier. AVCC A VCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. AREF A REF is the analog reference pin for the A/D Converter.

Page 13

CIRCUIT DESCRIPTION

Page 14

A CM8870 series DTMF decoder is used here. All types of the CM8870 series use digital counting techniques to detect and decode all the 16 DTMF tone pairs into a 4-bit code output. The built-in dial tone rejection circuit eliminates the need of pre-filtering. When the input signals are given at pins 1(IN+) & 2(IN-), a differential input configuration is recognized to be effective, the correct 4-bit decode signal of the DTMF tone is transferred to (pin11) through (pin14) outputs. The pin11 to pin14 of DTMF decoder are connected to the pins of microcontroller (Port A). The atmega16 is a 8-bit microcontroller, has 64 kB Flash microcontroller with 1 kB RAM. It provides the following features: 64 kB of on-chip Flash program memory with ISP (In-System Programming) and IAP (In-Application Programming), Four 8-bit I/O ports with three high-current Port A pins (16 mA each),Three 16-bit timers/counters. Outputs from port pins PB0 to PB7 are given to eight LEDs.

Page 15

PROGRAM
#include <avr/io.h> // includes input/output header file int main(void){ unsigned char i; DDRA=0xFF; //PORTA as output Port DDRB=0x00; //PORTB Input port connected to DTMF decoder IC PORTA=0xFF; while(1) // infinite loop{ i=PINB; if(i==1) //if Key 1 of cell phone pressed { PORTA=1; } if(i==0b00000010) //if Key 2 of cell phone pressed { PORTA=0b0000010; } if(i==0b00000011) //if Key 3 of cell phone pressed { PORTA=0b00000100; } if(i==0b00000100) //if Key 4 of cell phone pressed { PORTA=0b00001000; } if(i==0b00000101) //if Key 5 of cell phone pressed { PORTA=0b00010000; } if(i==0b00000110) //if Key 6 of cell phone pressed
Page 16

{ PORTA=0b00100000; } if(i==0b00000111) //if Key 7 of cell phone pressed { PORTA=0b01000000; } if(i==8) //if Key 8 of cell phone pressed { PORTA=0b10000000; } } return 1; }//main closed

Page 17

FLOWCHART

START

READ THE INPUT FROM DTMF DECODER PORTB

IF INPUT=1

LED 1

IF INPUT=2

LED 2

IF INPUT=3

LED 3

IF INPUT=4

LED 4

IF INPUT=5

LED 5

Page 18

SOFTWARES USED

AVR studio is an Integrated Development Environment (IDE) by ATMEL for developing applications based on AVR Microcontroller. AVR Studio 4 for writing and debugging AVR applications in Windows 9x/NT/2000/XP environments. Prior to installation of AVR Studio you have to install the compiler WinAVR. This will allow AVR Studio to detect the compiler.

Page 19

APPLICATIONS

Scientific
Remote Control Vehicles have various Scientific uses including hazardous environments, working in the deep ocean , and space exploration. The majority of the probes to the other planets in our solar system have been remote control vehicles, although some of the more recent ones were partially autonomous. The sophistication of these devices has fueled greater debate on the need for manned spaceflight and exploration. The Voyager I spacecraft is the first craft of any kind to leave the solar system. The martian explorers Spirit and Opportunity have provided continuous data about the surface of Mars since January 3, 2004.

Military and Law Enforcement


Military usage of remotely controlled military vehicles dates back to the first half of 20th century. Soviet Red Army used remotely controlled Teletanks during 1930s in the Winter War and early stage of World War II. There were also remotely controlled cutters and experimental remotely controlled planes in the Red Army. Remote control vehicles are used in law enforcement and military engagements for some of the same reasons. The exposure to hazards are mitigated to the person who operates the vehicle from a location of relative safety. Remote controlled vehicles are used by many police department bomb-squads to defuse or detonate explosives. See Dragon Runner, Military robot.

Recreation and Hobby


See Radio-controlled model. Small scale remote control vehicles have long been popular among hobbyists. These remote controlled vehicles span a wide range in terms of price and sophistication. There are many types of radio controlledvehicles. These include on-road cars, off-road trucks, boats, airplanes, and even helicopters.

Page 20

Advantages
1. Wireless control 2. Surveillance System. 3. Vehicle Navigation 4. Takes in use of the mobile technology which is almost available everywhere. 5. This wireless device has no boundation of range and can be controlled as far as network of cell phone

Disadvantages
1. Cell phone bill. 2. Mobile batteries drain out early so charging problem. 3. Cost of project if Cell phone cost included. 4. Not flexible with all cell phones as only a particular ,cell phone whose earpiece is attached can only be used

Page 21

Bibiliography
1. Wikipedia - The free encyclopedia www.Wikipedia.org 2. http://www.instructables.com/ 3. http://www.datasheetcatalog.com/ 4. http://www.atmel.com/tools/AVRSTUDIO4.aspx

Page 22

DATASHEET

Page 23

You might also like