Tuesday, August 6, 2019
Complete Home Automation Using Zigbee
Complete Home Automation Using Zigbee Chapter 1 Introduction to Home Automation HOME AUTOMATION What is automation? When you have automatic control on different things and functions at your home then we can say that you have home automation. This automation can be via aRemote or wired. simply things can be control according to your wish in history differentMethod and techniques are use to implement the home automation. Why people day by day are inclined towards home automation. there are lots of reason behindThis but the main reason is that you dont need to rebuild your home, you dont need to moveThe walls of home, it is easy to implement and without investing lot of money you can install itAt your home. a middle class person can afford the expense of home automation. ItsInstallation is very simple and easy. And a very y less time is required to automate the whole Home with different available products. Home automation gives a facility to user that he can control the things according to his wish inVery easier way. home automation may include different task like home security, a utomaticOn/off of lighting, control of sound system and etc. In a home automation a user can control the Things from any place in the home. Also sometime a user himself can implement home automation in his home via differentProducts those are easily available in the market. Plus points of home automation There is a reason that why till now most people keep on using home automation facility. theMain reason is that they got much convenience in using home automation. as in modern age aPerson want to do lot of work. also with the lavish style of life people are going to be lazy andThey want much convenience in work of their life. so to get convenience they need homeAutomation in their daily life. Let take an example of first home automation application. the first home automation exampleWas the TV remote control. before this application you have to face lot of difficulties like you?Have to sit near the television to change the channels and to control the volume. also you haveTo wake up at a particular time to turn on your TV set. Now with the help of a single remoteControl you can do all this task easily. how much convenience you can get with a single homeAutomation product. you can observe from the above example. Human desire never comes to an end. so the invention of single remote contr ol was not theUltimate goal. it was the initialization of home automation. different home automation taskWere keep on adding in home automation like heater, washing machine, control of lights, warm your mattress before you enter the room, and automation heating and cooling of yourWashroom water before the few minutes earlier of your wake up alarm. IS IT CONVENIENCE OR NEED? Convenience is not only the reason for home automation. there can be other reason for homeAutomation like NEED of using home automation. there can different need. one need may beThe security, it is also convenience but it fall under the category of need. before automation inHome security you have to use different security devices and guards but now with the help ofSimple and cheap home security you can provide home security. MISCILANEOUS BENEFITS Thieves and unknown persons can be monitored via motion sensor and you can get updateFrom the remote position that who is trying to enter to your home. also different door openingAnd locking systems are used at the particular door so that if some unauthorized person triesTo enter the home then a security alarm may be passed to the higher authorities. This alert mayBe send to you via email, mobile text message or a pre recorded call. Also when you come to your home late at night and you feel fear to enter in the dark home. butWith the help of home automation you can turn on your home lights when you are near to yourHome via a message or call. the pre assigned light will automatically turn on when you willEnter to your home and you will not feel any any more fear. Also this can be done that when youJust unlock the main door of your home then with this all the lights turn off automatically. itWorks like a mobile profile. At different occasion you switch on different mobile profiles. AsWhen you are in your meeting with boos then you just turn on your silent profile with a singleButton. all other related settings got automatically selected. In similar way with the help ofSingle button, message, email or a call you can get your desired lighting control. Automatic opening and closing of main door of home also fall under the category of need. ifYou dont have this facility then you have to hire a security guard for 24 hours at the door, whoWill open and close the door when your car will give horn. but with the help of simple ho meAutomation you can achieve this task. when your car comes in front of main gate, a cameraThere recognize that is this car is allowed to enter the home, if yes then the system there willAutomatically open the door and after you enter the home the door will be automatically close. Safety Safety is another point due to which people use home automation. for example if there is waterIn your home basement due to heavy rain at your home then with the help of homeAutomation you can receive an alert message for excess of water in the basement. Also if the temperature of any particular room or location of your home falls beyond theNormal limits then a high/low temperature alert activated. in case of fire and smoke at anyPlace at the home this home automation application may be very successful and heavy loss canBe avoided. Home automation charge cost but this cost looks no more that the benefits you got from theHome automation. for example you are sleeping and there is fire or high temperature in anyArea of your home then imagine that if you dont get the alert then what happen if youKeep on sleeping. might be possible that you yourself caught in the fire. a person can enjoy theHome safety at a very low cost. Home automation is little bit technical but it is not difficult to i mplement. when you haveDifferent home automated products then you need the methods to implement these products. There different method and techniques for implementation of home automation. one methodMay be superior than the other. there are different methods of home automation. and toMethod of implementation will guide you that how much cost you are required. by using efficientMethods you can save lot of money. before implementing home automation to your home, youMust analyze that which method can be suitable and efficient for you according to your needs, cost, choice and life style. In mostly home automation setup a remote is used. and this remote work only for the systemThat are installed at different home appliances. with the help of this single remote you haveComplete control on the automated applications at your home. with the help of this singleRemote control you can control the lighting system, cooling and heating system, safety system, security system, irrigation controlling and all other related home appliances. this remote canWork from any place in the home without any delay. within seconds you can implement youDesired task. In movies you observe the many home automated things that look different to implement inOur life. but as the technology is advance now so that automation can be applied at home withThe help of gadgets and new technology features of devices. IT IS A PART OF HOME ITEMS Peoples views about home automation are different. some say that it is wastage of money andThere is no need for it but some say that it is a part of your home items. they use to say that it isA part of home like other things in home, like other home appliances. so they dont think it 0asSeparate thing and consider it a need for a complete home. while other think that it is a luxuryAnd there is no much need for it,If you buy new and different things on regular basis then there would the best way that youShould buy or invest your money in different home automated things cause in homeAutomation newer and newer technologies are evolving day by day and there is no limit forHome automation. simply it depends on your pocket that how much you can invest. According to need and convenience of different people there are different levels for homeAutomation. but the basic and necessary home automation must include the following things, that can be different categories for home automation Security Security always remain a big issue in home automation. most of the work have been doneRegarding this. in old home automation system there were not include the security alarm. youHave to implement security separately. but now security alarm are the built in feature of theHome automation. old security alarms turn on when someone break the window glass or try toCross the wall or try to unlock the door. when security alarm turn on then the thief haveEnough time to escape. before you reach there the thief had run away. Now with the help of built in and automatic alarm you dont need to search for the thief in yourHome. you can just press the alert button if you feel any fear. then if there would be thief inPart of your home then the lights of that place will automatically turn on and if the thief wouldBe in the room or inside the home then the main door will automatically locked so that heCouldnt ran. according to police that a good lighting arrangement can help in protection ofHome from t hiefs. in your home where you want to turn on or off light automatically you justNeed to install a module there and your desired task can be easily achieved. Mostly people install home automation system for money safety and high alert alarms areInstalled near the money safe. but modern home automation system not only consider themoney safety but also the human safety. In fact the safety is much important than the moneyAnd your property. with the help of home automation you can insure the safety and security ofYou and your whole family. with the help of single button you can easily do this. CONVENIENCE As this is the age of technology. everyone is enjoying the benefits of modern technology. soWhy you will not want? By using the home automation you can enjoy the muchConvenience. Your complete home control is in a single remote control. and with this singleRemote you can control every automated thing at your home. you dont need to do much hardWork. in fact with the latest technology people are going to be lazy. and also you yourself wantTo be relaxing. You daily waste much or your time in on/off you home and street lights, waste time in checkingThe locks of all doors before you sleep. you have to be alerted regarding gas and electricHeater. You cant get the second chance for leakage of gas. in this entire how much you have to beAttentive and alert. a sharp memory and hard work is required for this. but with the help ofSingle remote you can save lot of mind work and avoid lot of hard work. if everything would beAutomated then just imagine how it would be relaxing and enjoying. And eve ryone likes to use that single remote. Also it looks very attractive and pleasant to have home automation at your home. every guestMay impress with the unique and advance features of home automation that you have installedAt your home. complete home is in your hand via a single remote control. you can do everyThing with the help of this remote like turn on/off light, your TV, sound system and safety andSecurity system. In previous home automation system compatibility was the major issue. but now a device isCompatible with lot of other devices. so you have great flexibility. Home automation can improve your life style and standard. after having the completeKnowledge through about home automation, you should buy the home automation devices soThat you could enjoy the automation according to your wish and desire. Now there are lot off companies in the market that provide home automation and home safety. you just needs to call the vendor and they will install the home automation at your home. firstlyYou have to analyze that where you need home automation at your home then install and thenCall for company. You are the best person who can think that where you need automation at your home. EXTRA COMFORT In this modern age people are adopting different technologies for relax and comfort. They useTo buy different products as they want to make their life simple and much easier. due to thisReason they are also inclined to install home automation system at their homes. It is the homeAutomation due to which they have complete control on every electronic device at their home. as there is many electronic devices at your home like air conditioner, heater, and cooler, microwave oven, sound system, etc. every one want to control all these electronics devicesWith as much easiness as he can. Home automation provides you the height of easiness and comfort. for example if you busy inWatching your TV program. let suppose that you are watching cricket match and you dont wantTo be disturbed and you forgot to switch off the other room lights. then with the help ofWireless home automation you can easily do this. now modern home automation system haveTouch screen instead of remote control. Also exciting feature of home automation is that now days you can do automation remotely. it is not necessary that you must be present at the home. if you are at your office and you wantTo turn on/off your home lights then you can do it with help of internet or simply with the helpOf your small touch phone. you just need to access the your home automation control consoleVia a website then you can do what you want to do. with this facility you can make setting ofEverything before you reach the home. for example you can play song of your own choice, make setting of light according to your wish and need, get your air conditioner on so that whenYou reach home; your room will automatically cool. In fact you are virtually present at your home. now you dont have to pay lot off for forgettingThings. and you can avoid lot of losses. You can watch and observe every person at your home with the help of cameras that are linkedWith internet. you just excess this facility by just surfing the website. with the help of thisFeature you can enjoy the completely safety from the outsiders and thief. Today the home automation system is very good, comfortable and reliable. these cant beEasily trapped by anyone. previously this was a main drawback of the home automationSystems EASY TO IMPLEMENT Home automation system is very easy and there is not difficulties in implementing this. it can be Implement with very less cost and no extra loss for its installation is required. SAVING OF ENERGY By using home automation you can save lot of energy. if you use automatic control of lights in Your home then you can easily turn off light in the morning via a simple remote control or simply You can configure that these lights should be turn on for a specific duration. and your home Automation system will automatically switch on or off the lights according to the given schedule. INFRARED TECHNOLOGY As it was discussed earlier that the TV remote was the first home automation application. andInfrared technology was used in it. so infrared technology put the basic for wireless homeAutomation. as this technology is very cheap so it can be easily used by the low budget personsIf there are advantages of using infrared then there are also disadvantages of infrared. one ofIts disadvantage is that it is a very short range and it always require a line of sight connectionFor working. you cant control any infrared application while sitting in the other room. Mostly remote control in the current age have this infrared technology. they are still haveImportance and commonly used in daily life. they are wide use in mobile, laptops and differentElectronics machines like automatic bar reader and different scanner at big departmentalStores. You can easily turn on/off a single light with infrared but what happen when you want to turnOn/off bulk of lights. do you need multiple infrared receivers fo r each light. as at the any holyOccasion or at marriage ceremony, you want to turn on all the light in the evening and want toTurn off all the light in the morning. how you can do this task with the help of infrared. in factInfrared can do this but this would be more costly. so you need to think advance and try toThink different way to implement task like the above task. so at that time there was a need ofNew technology. In door and out lighting is commonly controlled via remotely. some homeAutomation systems have thermostat facility that can easily achieve the automatic on and offLighting. in home automation system by pressing the single button multiple task can beAccomplished. X10 technology To improve the drawbacks of previous technologies the X10 technology came into the field. This is a very famous technology and their different products are available in the market. thisTechnology was mostly liked by the users. It was very popular technology at it age. let try toKnow what was this technology in actual. X10 is a communication technique that is used by the devices working on X10 technology. these devices implement the task given by the users. you can say that X10 is a language thatDifferent devices can understand. this act as a translator between the different devices thatDont know the same language for working. one feature of it is that it compatible with relatedDevices. to implement X10 you dont need to work hard and you dont need to break, cut andMove your home walls. X10 is just work with the electrical outlets and wiring that are alreadyInstalled at your home. you dont need to use hard wire for implementation of X10. so it is alsoCheap and affordable and can be eas ily implemented. you just need to buy the X10 elementsThat are easily available in the market. due to its simplicity and affordability it became veryPopular in the world. its communication tool installation is very simple. you just need to installIts transmitter into the outlet in the wall. and similarly you need to install a receiver at theOutlet in the wall. Both transmitter and receiver are connected with a device when aTransmitter sends any signal then the device receives the signal and tries to know that what isThis signal in actual. and then pass it to the receiver and the desired task is can be performedEasily. 256 different units can be operate with a simple X10 unit. so now you can easily turn on/off your light at wedding or holy gathering easily. a unique operation is performed with aSingle assigned address but a single address can be assigned to two different things so that aSame task can be implemented on the both things or devices. for example you want to turn offYour s treet lights then you can assign the same address to all the streets lights. one plus pointOf X10 is that its all products are compatible with each other there is no compatibility issue. CHAPTER 2:Related Work and Hardware Description 2. 1 Literature Review : We discussed some previous techniques used for home automation. There features and drawbacks. 2. 1. 2 Home Automation using Bluetooth: It is a chip technology enabling us to communicate with a lot of devices. It is a popular way of short range communication. By enhancing this technology we can use it to automate homes. It employs the 2. 4Ghz unlicensed band and has data rate up to 720Kbps. Its range is usually 10 meters but can be increased to 100 meter by using higher powered antenna. Its only draw back Is it short range. . RANGE :10m DATA RATE : 20 To 250 kbps DATA RATE : 720Kbps ENERGY : Multi-year battery life ENERGY : Multi-day battery life Table 1: zigbee and bluetooth comparison 2. 1. 3 Home Automation using GSM: GSM stands for Global system for mobile communication. As it works in cells there are different types of cells. and each cell cover different areas. cell radius depend on antenna gain, power, height. GSM has three types of services. * Tele Services:* Calls, short message service. tele-fax. * Bearer services* asynchronous and synchronous data* Supplementary services* call forwarding ,call barring* usually in home automation we send commands with mobile in form of SMS. The drawbacks of this techniques are service dependent, its possible that because of congestion On the network your might SMS delivered late. Or you get a delayed SMS from home mounted module about the current status of the different household equipment. 2. 2 DESIGN ARCHITECHTURE 2. 2. 1 Command Unit 2. 2. 2 Control Unit 2. 3 COMPONENT SELECTION 2. 3. 1 Zigbee Module (XBee Pro) We use XBee Pro as a transceiver module because it consumes very low power and has long range and nominal data rate. more information on this module is given in hard ware overview chapter. 2. 3. 2 Microcontroller (Atmega 16) We use ATMEGA16 because it is a low power and has greater SRAM and EEPROM memory And it can be easily interfaced with zigbee and other components. More information is available in Hardware review chapter. 2. 3. 3 MAX 232 It is used to convert a signal from TTL logic to RS232 level. It is used to communicate with computer. More detai is given in hardware review chapter. Summary Chapter 3: Hardware and Software Methodlogy 3. 1 Using Atmega Timers: 3. 1. 1Timers with LED The timer code enable the number of led after the time given by the user. In the timer code PORTB is set as an output. The timer counter control register(TCCR1B) is used to set the timerThe clock source with eight prescaler and the normal mode is used in the timer. Timer counter register (TCNT1) is used to initialize the timer. TIMSK is used to enable overflow interrupt and SREG enables the global interrupt. The similar task is also done without timer. 3. 1. 2 Timers with LEDs ,Push button and Buzzer Figure 3: Timers With Leds ,Push button ,Buzzer In this code we simply USE A push button to enable the timer and used a BUZZER. The buzzer will on with the led but buzzer will off after 500 ms and led remains on. 3. 2 LCD INTERFACING WITH ATMEGA 16: The PORTD and PORTB is set as a output. The comand_set function is used to give the necessary instruction to the LCD. The data_set function is used to send data to the LCD through PORTB. The display function is used to latch the data. 3. 3 KEYPAD INTERFACING WITH ATMEGA 16: A 4*4 keypad is interfaced with the microcontroller ATMEGA 16 to select the fixed load and variable load and to give the time after which the load has to on. The PORTA is used as you can see in the figure. 3. 4 Selection Of A Fixed Load We select a fixed load 2 from keypad. Figure : Selection Of A Fixed Load Load 2 is selected. Now it is on. The status of load 1 is on. The status of load 2 is off. 3. 4 Accessing EEPROM In EEPROM_WRITE function the EEPROM is being checked that, either it is being written previously or not. Then the address has passed to EEPROM and after this the data has passed to EEPROM. The EEMWE bit has set to logic one an after this the EEWE bit has set to logic one. [1] 3. 5 Using ADC In ADC analog voltage is converted into dc voltage with 10 bit resolution. In ADMUX register of ADC the voltage reference is set, The ADC left adjust result is set to logic zero and channel is selected. In ADCSRA the ADC enabled bit and ADC start conversion bit are set to logic one. When ADC conversion completes bit 4 is set. All the codes are given in the cd. [1] SUMMARY Chapter 4: SOFTWARE OVERVIEW The following software we use in our project* CodeVisionAVR C Compiler* AVR Studio 4 debugger * Proteus Version (6. 9) 4. 1 Code VisionAVR CodeVisionAVR is the c compiler that is used to program the ATMEL microcontrollers. It is very easy to use. You can develop applications for embedded systems by using it. 4. 1. 2 Features of CodeVisionAVR The CodeVisionAVR C Compiler has following features:* CodeVisionAVR is compatible with Atmel and AVR Studio Debugger * A new project is created by using it* Compilation of the C Code* Editing of the C Code* It runs on the operating system i. e. Windows,XP,7,VistaIt is the new microcontrollers with high memory. It is the only compiler through which we can programmed the ATMEL microcontrollers. 4. 1. 3 Creating a new file A new file can be created by clicking on the toolbar button. After this save the file. 4. 1. 4 Creating a new project Click on the toolbar button. Now click on the ââ¬Å"Noâ⬠button. Now save the project. 4. 1. 5 Configuring the project Select the atmega 16 and set it clock 4. 0MHz. Choose the application as a program type. Now add the file under the project name. 4. 2 AVR Studio 4 4. 2. 1 Features of AVR Studio 4 For proper controlling the Zigbee modules accurate codes and programming was needed. Wehave divided the our big task into smaller task. By doing so we easily wrote the code anddebugging was easy. ââ¬Å"AVR Studio 4 is the integrated development Environment (IDE) for developing 8-bit AVR applications in windows 2000/XP?VISTA/7 environmentsâ⬠[2 ]The features that AVR Studio provides are supporting run control including source and instruction level stopping and memory,registers,breakpoints and watch variable and allow you to see what your code will do in reality with microcontroller. 4. 3 Proteus The Proteus software is used to design the PCB and to do a microprocessor simulations. Its latest version is compatible with windows XP,VISTA,7. 4. 3. 1 Features of Proteus * 3D Board Visualization* Professional PCB layout module* Basic simulation* 2D Drawing with symbol library SUMMARY CHAPTER5 HARDWARE OVERVIEW ATMEGA 16: Overview: ââ¬Å"Atmega16 is low-power AVR enhanced RISC Architecturebased CMOS 8-bit microcontroller. By Executing instructions in a single clock cycle it achieves throughputs approaching 1 MIPS per MHz. â⬠Features: The ATmega16 has16K bytes of In-System Programmable Flash Program memory which Consists of 512 bytes EEPROM, 1K byte SRAM. It has 32 general purpose I/O lines, 32 General purpose working registers. It has On-chip Debugging support and programming And has three Timer/Counters having Internal and External Interrupts. For serial commun-Ication it has programmable USART. For analog to digital conversion it has 8-channel, 10-bit ADC with optional differential input stage with programmable gain. It has a Wat-Chdog Timer having internal Oscillator and it can be programmed. [1]Pin configuration: Pin descriptions: port A We use Port A to serves as the analog inputs to the A/D Converter. It 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. 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 whena reset condition becomes active, even if the clock is not running. [1] Port B it is an 8-bit bi-directional I/O port with internal pull-up resistors. 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. [1] Port C It is an 8-bit bi-directional I/O port with internal pull-up resistors. 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. [1] Port D Port D is an 8-bit bi-directional I/O port with internal pull-up resistors. The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As I nputs, 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. [1] RESET PIN : It Reset the Input. A low level on this pin will generate a reset, even if the clock is not running. AVCC : It is the supply voltage pin for Port A and the A/D Converter. It should always be externally connected to VCC, even if the ADC is not used. It should be connected to VCC through a low-pass filter if the ADC is used. [1] AREF : AREF is the analog reference pin for the A/D Converter. VCC Digital supply voltage. (Input voltage) GND ground. 5. 2 XBEE PRO 5. 2. 1 Overview The XBee Pro module is designed to support low power,low cost wireless sensor networks. It requires minimal power and provide reliable communication between remote devices. 5. 2. 2 Features * Long Range: Indoor 100m and Outdoor 1500m. Transmit Power 100 mW(20 dBm)Receiver Sensitivity -100 dBm * Low Power: Tx Current 210 mA @ 3. 3VRx Current 80 mA @ 3. 3V* Advanced Networking Security Retries and Acknowledgement Self routingDirect Sequence Spread Spectrum * Easy to use No configuration required for out of box RF communicationAT and API command modes for configuring module parametersSmall form factorExtensive command set 5. 2. 3 Pin Description Some pins can be set as Analog Input, Digital Input, Digital Output, or Analog Output (PWM). The numbers of pins are up to seven channels of analog input, nine channels of digital I/O and two channels of PWM. Pin # Name Direction Description 1 VCC Power supply 2 DOUT Output UART Data Out 3 DIN / CONFIG Input UART Data In 4 DIO12 Either Digital I/O 12 5 RESET Input Module Reset (reset pulse must be at least 200 ns) 6 PWM0 / RSSI Output PWM Output 0 / RX Signal Strength Indicator 7 PWM1 Output PWM Output 1 8 [reserved] Do not connect 9 9 DTR / SLEEP_RQ / DI8 Either Pin Sleep Control Line or Digital I/O 8 10
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.