Design and Implementation of Home Monitoring System Using RF Technology



Similar documents
Serial Communications

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems Peripherals

Using Xbee in Serial Communication

Lab Experiment 1: The LPC 2148 Education Board

Android based Secured Vehicle Key Finder System

Flash Microcontroller. Memory Organization. Memory Organization

Remote PLC system using GSM network with application to home security system

Location-Aware and Safer Cards: Enhancing RFID Security and Privacy

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

What is Easy-Radio? Devices Covered. Frequency Hopping Transceiver. Where x00 denotes frequency of operation. E.g. 400 = 433MHz

Serial Communications

ESP 8266: A BREAKTHROUGH IN WIRELESS SENSOR NETWORKS AND INTERNET OF THINGS

Implementing MOD bus and CAN bus Protocol Conversion Interface

Microtronics technologies Mobile:

SIM300 GSM Module Controller For Smart Home

Design of Wireless Home automation and security system using PIC Microcontroller

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Single channel data transceiver module WIZ2-434

Software User Guide UG-461

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

ANYTIME ANYPLACE-REMOTE MONITORING OF STUDENTS ATTENDANCE BASED ON RFID AND GSM NETWORK

Raghavendra Reddy D 1, G Kumara Swamy 2

MICROCONTROLLER BASED SMART HOME WITH SECURITY USING GSM TECHNOLOGY

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

Wireless power meter monitoring with power theft detection and intimation system using GSM and Zigbee networks

Cell Phone Based Liquid Inventory Management Using Wireless System

USART and Asynchronous Communication

Intelligent Home Automation and Security System

Plc Based Monitoring and Controlling System Using Wi-Fi Device

Wireless Sensor Network for Electric Meter Handling

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

Wireless monitoring system for temperature and humidity based on ZigBee

Technical Data Sheet UM-005. UM005-doc In reference to UM005-c-01.04

A RF18 Remote control receiver MODULE

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

Part Number Description Packages available

EMBEDDED GSM MONITOR AND CONTROL USING ANDROID APPLICATION

4 Character 5x7 LED Matrix Display

Figure 1.Block diagram of inventory management system using Proximity sensors.

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

Intelligent Fleet Management System Using Active RFID

DESIGN OF SMS ENABLED CAR SECURITY SYSTEM

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

RN-XV-RD2 Evaluation Board

ARCHITECTURE AND IMPLEMENTATION OF REAL TIME VEHICLE TRACKING SYSTEM USING WIRELESS, SENSOR DEVICES AND GOOGLE MAPS API

Implementation of Wireless Gateway for Smart Home

Bluetooth Based Home Automation and Security System Using ARM9

A Cellular Phone Based Home / Office Controller & Alarm System


Serial port interface for microcontroller embedded into integrated power meter

Automated Security System using ZigBee

GPS & GSM BASED REAL-TIME VEHICLE TRACKING SYSTEM.

How To Design A Code Lock System With A Status Display On A Cell Phone And A Password Code On A Smart Phone

Keil C51 Cross Compiler

Design And Implementation Of Bank Locker Security System Based On Fingerprint Sensing Circuit And RFID Reader

A PSTN Terminal for FSK Decoding and DTMF Dialing Applications

Process Control and Automation using Modbus Protocol

Development of an Internet based Embedded System for Smart House Controlling and Monitoring

Gsm Based Controlled Switching Circuit Between Supply Mains and Captive Power Plant

Bus Data Acquisition and Remote Monitoring System Using Gsm & Can

Wireless Security Camera

HAC-LM Series Low Power Data Radio Module

International Journal of Research in Advent Technology Available Online at:

Advanced Vehicle Tracking System Using ARM7

Wireless Communication With Arduino

Bluetooth to Serial Adapter

Pen Drive to Pen Drive and Mobile Data Transfer Using ARM

MCB3101 (Class I) WiRobot Serial Bluetooth Wireless Module User Manual

The design and implementation of the environment monitoring system of smart home based on EnOcean technology

Implementation of Wi-Ap; An IEEE b/g Based Electrical Switch Module With Web Enabled Interface for Electrical Appliances Control

TOSR0X-D. USB/Wireless Timer Relay Module. User Manual. Tinysine 2013 Version 1.0

2.0 System Description

Technical description MX-1 VB Edge

Design and Implementation of a Reliable Wireless Real-Time Home Automation System Based on Arduino Uno Single-Board Microcontroller

How To Use An Adh8012 Gsm Gprs Module With A Gsm (Gsm) Gpros (Gsp) Gpls (Geo) Gsp (Gpl) Gs

Open Access The Wireless Environment Monitoring Alarm System Based on Selforganizing

BORDER ALERT AND SMART TRACKING SYSTEM WITH ALARM USING DGPS AND GSM

Computer Aided Design of Home Medical Alert System

8051 MICROCONTROLLER COURSE

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

FaultAnalysisandElectricalProtectionofDistributionTransformers

Application of Wireless Sensor Network and GSM Technology: A Remote Home Security System

Smart Home System Using Android Application

VEHICLE TRACKING ALONG WITH THE ADVANCED RTO TECHNOLOGY

Chip Card & Security ICs Mifare NRG SLE 66R35

A ZIGBEE AND EMBEDDED BASED SECURITY MONITORING AND CONTROL SYSTEM

This idea could limit unnecessary visits and help developing countries to provide healthcare remotely as well.

Fingerprint Based Biometric Attendance System

Display Message on Notice Board using GSM

GSM Interfacing Board

International Journal of Engineering Research & Management Technology

ADVANCED VEHICLE TRACKING SYSTEM USING ARM7

Bluetooth Serial Adapter

SAH2217 Enhanced ATHEROS GPS Module with ultra high sensitivity and antenna open/short detection/protection

Embedded Systems Design Course Applying the mbed microcontroller

Modbus Communications for PanelView Terminals

8 Gbps CMOS interface for parallel fiber-optic interconnects

Android based Alcohol detection system using Bluetooth technology

Remote control circuitry via mobile phones and SMS

Study on Differential Protection of Transmission Line Using Wireless Communication

Transcription:

International Journal of Advances in Electrical and Electronics Engineering 59 Available online at www.ijaeee.com & www.sestindia.org/volume-ijaeee/ ISSN: 2319-1112 Design and Implementation of Home Monitoring System Using RF Technology Nidhi Gaur 1, Shabarinath B.B 2 1 2 Department of Electronics and Communication Engineering 1 Assistant Professor, Amity University 2 Mtech-Embedded Systems Technology, Amity University 1 Email- ngaur@amity.edu Abstract- Home monitoring system uses the RF technology to monitor the status and control the electric device. The system has been developed to save energy. The system is implemented using modules which are capable of communicating with each other. In the existing method we can control the device like ON/OFF of the device remotely but we cannot know the status of the device whether the device is working or not. In the proposed method we overcome this disadvantage by providing good solution for monitoring and controlling of the LED s from the remote locations. The modules are designed using ARMLPC148 and AT89S52 microcontrollers, comparator-lm324 IC, CC2500 RF transceivers which are powered by a battery source. LED is used as device which is interfaced with AT89S52 and status of the LED can be monitored on LCD interfaced with LPC2148.This paper focuses on the software aspects of the design. Keywords CC2500, LPC2148, Home Monitoring System, RF Technology I. INTRODUCTION With the development of new electronic technologies and their integration with older, traditional building technologies, smart house is at last becoming a real possibility. Smart home is a house that uses information technology to monitor the environment, control the electric appliance and communicates with the outer world. Smart home is a complex technology, at the same time it is developing. A smart home automation system has been developed to automatically achieve some activities performed frequently in daily life to obtain more comfortable and easier life environment [1]. In wireless communication data is broad casted by radio frequencies [2]. As a result data may be captured when it is broadcasted. There are many wireless communication technologies such as WIFI, Cellular, Blue tooth etc. Different wireless technology has different communication range from centimeters to several hundred meters [3]. RF transceiver CC2500 consumes very less power between 2v to 3.6v. CC2500 can be directly interfaced to the micro controller it doesn t require any serial communication cable to transfer the data serially through wireless communication. Smart home appliances are typically controlled locally and can be monitored remotely [4] but the control of the device remotely is the new aspect. This can be achieved by incorporating ARM7 controller which has powerful features like multiple UART, quad package, in system programming, in application programming, PLL which acts as clock multiplier and 45 general purpose input/output pins. The on/off of the device can be achieved through serial communication programming of AT89S52 and LPC2148 micro controllers and the failed status of the device can be monitored by incorporating comparator circuit in the hardware. There are many technologies like GSM/GPRS, Bluetooth etc [5, 6] for monitoring the devices remotely. The purpose of choosing RF transceiver is to increase the distance of monitoring and also CC2500 IC was readily available in market for low cost. The status of the device can be monitored in LCD and also by blinking LED s on the monitoring device. CC2500 RF transceiver is specifically used at lower power levels in a frequency range of 2400-2483.5MHz. The initial processing of the system with getting started and initialization of the registers of CC2500 requires some time [7]. AT89S52 is chosen because of its full duplex serial port. Three LED s are integrated in the system whose status is monitored and controlled remotely. The rest of the paper is organized as follows. Hardware architecture is explained in section II. Working principle is explained in section III. Software development is presented in section IV. Result is presented in section V. Concluding remarks are given in section VI. ISSN:2319-1112 /V1N2:59-68 IJAEEE

IJAEEE,Volume1,Number 2 Nidhi Gaur and Shabarinath B.B II. HARDWARE ARCHTECTURE The system consist two microcontroller modules which are communicated through RF wireless communication as shown in figure 1. Fig. 1 Block Diagram First module consists of LPC2148 micro controller to which LCD, switches and CC2500 are connected to monitor and control the devices. The LCD, switches are connected to the port pins which are configured as INPUT/OUTPUT. RF transceiver is connected to the TXD and RXD pins of UART0. The system has a provision for in system programming (ISP). Second module consists of AT89S52 controller to which CC2500, Relays, comparator and Devices are connected. The RF transceiver is connected to the TXD and RXD pins of UART and devices (LED s) are connected to the controller through relays as shown in figure 2. Fig. 2 LED connected via Relay A relay is a electrical switch that opens and closes under the control of another electric circuit. The CC2500 RF transceiver is configured for obtaining optimum register settings and to meet the design aspects of the communication channel. Microcontrollers are able to: 1. Read and write buffered data to and from CC2500 for loss less communication. 2. Program CC2500 in different modes to meet the requirements of the communication channel. In transmit mode, the packet handler adds all fields to the packet stored in TX, and in the receive mode it deconstructed the data packet. The packet transfer depends on modes. When TX is activated, the chip will remain in transmit mode until the signal is successfully transmitted and when RX is activated, the chip will remain in receive mode until the signal is successfully received. AT89S52 requires 5v power supply which can be provided through transformer, bridge rectifier, capacitor and voltage regulator and LPC2148 need 3.3v.AT89S52 is operated at 33MHz clock frequency provide through crystal oscillator and

Design and Implementation of Home Monitoring System Using RF Technology 61 LPC2148 is operated at 60 MHz clock frequency which is provided through in built phase locked loop (PLL) circuit. The input frequency given to PLL circuit is multiplied by a factor to obtain required frequency. III. WORKING AND PRINCIPLE Initially all the devices are in OFF state, then the switches as initialized as input by placing one s through coding. Suppose to turn ON device1, it can be done by pressing particular switch present on the board. When switch is pressed it becomes high and the high state of switch gives indication to controller and that data is sent to another controller where devices are connected through RF transceiver. The data is send through the TXD pin of UART0 to the RXD pin of CC2500 and then send to CC2500 connected to the second controller wirelessly. The data received by the transceiver will transmit data to the controller through TXD pin to the RXD pin of UART of the controller and then it turns on the device connected to it. When device is turned ON the controller sends the acknowledge message to the controller through TXD pin of UART to RXD pin of transceiver, other transceiver receives the data through antenna and sends through TXD pin of transceiver to RXD pin of controller and status can be displayed on LCD connected to LPC2148 controller. On the other hand the status of the device is monitored continuously by comparing the device output voltage with a reference voltage fed to comparator circuit. When the device is shorted the microcontroller port pin is triggered as a result the failed message will be sent. IV.software development Embedded C language is used for coding. Embedded C is a mid-level language with high-level features (such as support for functions and modules) and low-level features (such as good access to hardware via pointers). It is very efficient. To create an embedded c program super loop (or) endless loop is required because there is no operating system to return to in our microcontroller i.e., our application will keep looping until the system power is removed. ARMLPC2148 Code Designing: LPC2148 port pins have multiple functions which are to be carefully defined for required function using PINSEL special function register. IOSET and IOCLR registers are used to produce a high level output and low level output at port pins configured as GPIO in an output mode.

IJAEEE,Volume1,Number 2 Nidhi Gaur and Shabarinath B.B Fig.4 Monitoring Device Flow Chart Explanation of flow chart: User Defined Functions related to serial communication 1. Initialize the Serial Communication This function is used to initialize the serial communication between UART0 of LPC2148 micro controller and CC2500. -Using PINSEL0 register the port pin functionalities of P0.0, P0.1, P0.8, P0.9 is selected as TXD, RXD (UART0) and TXD, RXD (UART1). This means that the CC2500 IC is interfaced with LPC2148 at these selected port pins. -U0DLL is initialized as 97. The U0DLL (Divisor latch register) is a part of UART0 fractional baud rate generator and holds the value used to divide the clock supplied by the fractional pre scalar in order to produce the baud rate clock. -U0LCR is initialized to 83H. LCR is the line control register which represent the format of the byte transmitted. 8-Bit character is selected 1 stop bit Parity generation and checking is disabled Odd parity. Number of 1 s in the transmitted character and the attached parity bit will be odd Disable break transmission Divisor latch access bit (DLAB) is disabled

Design and Implementation of Home Monitoring System Using RF Technology 63 2. Character transmission This function is used to transmit a character from micro controller to CC2500 module. The function call initializes a required character to the variable defined in the argument of the function. Check whether transmit hold register is empty. The character is assigned to U0THR i.e., transmit hold register for serial communication. void Send_char_Uart0(unsigned char ch) while(!(u0lsr & 0x20)) ; U0THR = ch; 3. Character reception : This function is used to get a character from CC2500 to microcontroller which is received from another board. U0LSR is a read-only register that provides status information on the UART0 TX and RX blocks. Bit0 of U0LSR is receive data ready (RDR). Check whether receive buffer register contains valid data. If RBR contains valid data return that valid data to the called function. unsigned char getchar0(void) while (!(U0LSR & 0x01)); return (U0RBR); The LCD code is all about initializing LCD and defining functions for the printing the required message at correct position. The LCD is configured in 4 bit mode. void lcd_print(unsigned char *str) unsigned char ch; while(*str!='\0') ch=*str; lcd_putchar(ch); str++; Infinite loop: Phase1:--For checking the failed status of the device In this based on the port pin status of the devices in the 8052 board, if the pins are shorted which means the device is not working. If it happens we are transmitting characters c, d, e corresponding to the devices D1, D2, D3 to LPC2148 through UART0. So the received data is store in the buffer register if the devices are shorted. Check whether the receiver buffer register contains the valid data. Assign the contents of the buffer register to the character variable ch. If ch=c D1 is not working similarly if ch=d, e D2 and D3 are not working so the corresponding device message FL is displayed on the LCD. if((u0lsr & 0x01) == 1)

IJAEEE,Volume1,Number 2 Nidhi Gaur and Shabarinath B.B ch = U0RBR ; if(ch == c) lcd_write_control(0xc0); lcd_print("fl "); IO0SET = 0x00000800; for(i=0;i<2;i++) delay(); Phase2:--For switching on or off of the device Switches are connected to port pins. IO1PIN register contains the logical value of the corresponding port pins. On status of the switch is indicated by the logic0 in the PIN register. The corresponding logic0 of the three switches is checked. Suppose switch1 connected via relay1 is pressed the character 1 is transmitted to the 8052 board requesting to switch on the device 1. 8052 controller sets the device on. The corresponding on or off status of the device is printed on the LCD screen. Similarly the characters 2 and 3 are transmitted for switches 2 and 3. The LED s are connected via port pins. The corresponding LED s are switched on and off by using PINCLR0 and PINSET0 registers. if(io1pin & 0x00010000 == 0x00000000) Send_char_Uart0(1); if(m==0) IO0CLR = 0x00000800; m = 1; lcd_write_control(0xc0); lcd_print("on "); else IO0SET = 0x00000800; m = 0; lcd_write_control(0xc0); lcd_print("off"); for(i=0;i<3;i++) delay(); AT89S52 Code designing: Control of the 8052 ports through software is carried out using special function registers (SFR s). Physically SFR is a area of memory in internal RAM. For 8052, in order to read from a pin, we need to ensure that the last thing written to the pin was one. Also software delay is used for generating delays which requires no hardware timers.

Design and Implementation of Home Monitoring System Using RF Technology 65 Explanation of flow chart: User defined functions: Initialization of serial communication This function is used to initialize the serial communication of 8052 micro controller. The serial port is full duplex, meaning it can transmit and receive simultaneously. It is also receive buffered, meaning it can commence reception of a second byte before a previously received byte has been read from the receive register. The serial port receive and transmit registers are both accessed at special function register SBUF. Writing SBUF leads the transmit register and reading SBUF accesses a physically separate receive register. Initialize timer1 in mode 2 to set baud rate. Timer1 operation is enabled whenever TR1 control bit in the TCON register is set. 8-bit UART mode. Disable the multiprocessor communication feature. Enable serial reception. void SerialInit(void) TMOD = 0x20; TH1 = 0xfd; SCON = 0x50; TR1 = 1; Character transmission: This function transmits the character from 8052 to CC2500 module serially. void serial_tx(unsigned char temp) unsigned int j; SBUF = temp; while(!ti); TI = 0;

IJAEEE,Volume1,Number 2 Nidhi Gaur and Shabarinath B.B Fig 5. Device Board Flow Chart Infinite loop Monitor RI flag of the SCON register. RI is the receive interrupt flag set by hardware at the half way through the stop bit time. Must be cleared by the software. If RI is set, check for the content of SBUF register. IF SBUF is 1 which means switch corresponding to device1 is pressed. So input logic high level to the device1 connected through relay. Similarly 2 and 3 for devices 2 and 3.

Design and Implementation of Home Monitoring System Using RF Technology 67 Clear RI flag. Suppose if the devices are shorted the characters c, d, e is sent to LPC2148 board which displays the fail status of the device. if(ri == 1) if(sbuf == 1) if(m==0) m = 1; LcdCmd(0xc0); LcdPuts("ON "); D1 = 1; else m = 0; LcdCmd(0xc0); LcdPuts("OFF"); D1 = 0; Monitor the comparator output connected to port pins. If the pin value is triggered then the device is said to be in failure. So transmit acknowledgement and switch off the device. if(i1 == 1) if(m==1) serial_tx(c); LcdCmd(0xc0); LcdPuts("FL "); D1 =0; for(i = 0; i< 3; i++) for(j = 0; j < 40000; j++); The system is implemented as shown in the figure V. RESULT

IJAEEE,Volume1,Number 2 Nidhi Gaur and Shabarinath B.B Fig 6. Designed modules Fig 7. LCD displaying output VI.CONCLUSION and FUTURE WORK The home monitoring system has been successfully designed and tested.presence of every module has beenreasoned out and placed carefully thus contributing to the best working of the unit. Secondly advance IC s has been used. By monitoring the status of the device the device can be switched off accordingly so that energy can be saved. Also by incorporating central server real time data like weather can be transmitted. REFERENCES [1] Design and implementation of smart house control using LABVIEW International Journal of soft computing and Engineering ISSN:2231-2307, volume1, issue-6, January 2012. [2] Su, G., Tan, L., A trade off scheme in multi-user system with block diagonal geometric mean decomposition, The computing science and technology international journal, vol 1, no.1, pp.5.14, August 2011. [3] Li, F, Opportunistic Relaying in Cooperative OFDM Networks with limited feedback, The computing science and technology international journal, Vol.1, no.1, pp 15.19, December 2011. [4] A. R. Al-Ali, M. Al-Rousan, Java-based home automation system, IEEE Transactions on Consumer Electronics,vol. 50, no. 2, pp. 498 504, May 2004. [5] A. Alheraish, Design and implementation of home automation system, IEEE Transactions on Consumer Electronics, vol. 50, no. 4, pp. 1087 1092, Nov. 2004. [6] A.R.Al-Ali, M.A. Rousan, M. Mohandes, GSM-based wireless home appliances monitoring & control system, 2004 International Conference on Information and Communication Technologies: From Theory to Applications, 2004. Proceedings. April 19-23, pp. 237-238, 2004. [7] A. Z. Alkar, and U. Buhur, An Internet based wireless home automation system for multifunctional devices, IEEE Transactions on Consumer Electronics, vol. 51, no. 4, pp. 1169 1174, Nov. 2005. [8] G. Song, Z. Wei, W. Zhang, W. and A. Song, Design of a Networked Monitoring System for Home Automation IEEE Transactions on Consumer Electronics, vol. 53, no. 3, pp. 933 937,, Aug. 2007.