Examples of Flow Chart
Examples of Flow Chart
Examples of Flow Chart
ISSN : 0975-4024
1608
Parameters Bandwidth Current Draw (Transmission) Current Draw (Standby) Protocol Stack Size Strong hole Transmission Range(meters) Battery Life (days) Network Size (No. of nodes) Application Throughput (kb/s)
Wi Fi Up to 54 Mbps 40 Ma 20 mA 100 High data transfer 1 100 0.5 5 32 Web, Email, Video 11,000
Bluetooth 1 Mbps 40 mA 0.2mA 100 Interoperability cable replacement 1 10 1-7 7 Cable Replacement 720 250 kbps 30 Ma <0.1Ma
Zigbee
4 32 Long battery life, low cost 1 100 100-1000 >64,000 Monitoring and Control 20 - 250
Unlike Wi-Fi and BLUETOOTH, which are designed to transmit continuous data streams, ZIGBEE is designed for periodic data delivery. Considering that battery life and low cost are more important for BA than high data rates, ZIGBEE is an appropriate technology for these applications.Typical battery life for Wi-Fi devices would be approximately 0.5 to 5 days, and Bluetooth devices would need new batteries from 1-7 days. ZIGBEE devices, however, can last up to several months with a single set of batteries. Hence we can use the ZIGBEE device for wireless communication between two controllers. C.Microcontroller An Embedded system is a combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a specific function. Embedded systems are usually a part of larger, complex system. Dedicated applications, designed to execute specific activities, are implemented and embedded in systems. These embedded applications are required to collaborate with the other components of an enclosed system. Embedded application components interact mostly with the non-human external environment. They continuously collect data from sensors or other computer components and process data within real-time constraints. Microcontrollers are "embedded" inside some other device (often a consumer product) so that they can control the features or actions of the product. Another name for a microcontroller, therefore, is "embedded controller." Microcontrollers are dedicated to one task and run one specific program. The program is stored in ROM and generally does not change. They are often low-power devices. 1) PIC Microcontroller: There are a wide variety of microcontrollers available to implement various tasks, among them the 8051 and PIC are the mostly used. The 8051 is probably the most popular 8-bit microcontrollers ever. Many different I/O features are integrated around the 8051 core to create a microcontroller which needs only very little extra hardware to do most of the jobs. The main disadvantage of the standard 8051 core is that there's only one 16 bit pointer register available. Moving a block of data is a very tedious job which takes far too much data moving overhead. It also does not have an internal Analog to Digital Converter (ADC). PIC16F877A is an 8-bit microcontroller which has 40 pin DIP and is based on Harvard Architecture. PIC stands for Peripheral Interface Controller and F for flash memory. The PIC16F877A features 256 bytes of EEPROM data memory, self-programming, an LCD, 2 Comparators, 8 channels of 10-bit Analogue -to-Digital converter, 2 capture/compare/PWM functions, the synchronous serial port can be configured as either 3-wire Serial Peripheral Interface for the 2-wire Inter-Integrated Circuit bus and a Universal Asynchronous Receiver Transmitter . All of these features make it ideal for more advanced level A/D applications in automotive, industrial, appliances and consumer applications. So we have utilised the MICROCHIP PIC16F877A microcontroller in the project. 2)Reason for Selecting PIC16F877A: Rich in peripherals: The PIC microcontroller has many built in peripherals which can be utilised for various purposes. The 40 pins of PIC make it easier to use the peripherals as the functions are spread out over the pins. This makes it easier to decide what external devices to attach without worrying too much if there enough pins to do the job. Reprogrammable controller: The PIC16F877A has 8kb flash memory which can be used to erase and rewrite the programs for the controller. Hence the devices can be re-programmed up to 100,000 times. Low power consumption: The controller works with a low power supply such as 5V DC. Easy programming, cheap and reliable: It is easy to program the PIC microcontroller in embedded C language or assembly level language.
ISSN : 0975-4024
1609
Inbuilt ADC: The single 10 bit Analogue to Digital Converter can have up to 8 inputs for a device multiplexed from input pins. The Port A is dedicated for this function. The ADC can be used during sleep but you have to use the RC clock mode. One benefit of this is that there will be no digital switching noise so you will get better conversion accuracy. D.Device Control The device in the building can be controlled only when the occupancy of the building is known so a RFID technique is applied to get the information. Radio Frequency Identification, or RFID, is a rapidly-emerging identification and logging technology. RFID systems use tiny chips, called "tags," to contain and transmit some piece of identifying information to an RFID reader, a device that in turn can interface with computers. In its simplest form, an RFID system is much the same as the barcode readers: it also can identify a package. However, unlike barcodes, RFID tags don't need a direct line of sight: within limits, we can now scan an unpacked skid of boxes. The RFID tags are mini databases, or as barcodes that can be written to, and that can accumulate information as they travel. At this point, RFID diverges qualitatively from bar coding, giving it great new potential. A Radio-Frequency Identification system has three parts: A scanning antenna A transceiver with a decoder to interpret the data
A transponder - the RFID tag - that has been programmed with information. 1) Advantages of RFID tags over barcodes: The tag need not be on the surface of the object. The read time is typically less than 100 milliseconds. Large numbers of tags can be read at once rather than item by item. E.Alarm System A sensor is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument. It is a device which receives and responds to a signal. They are used in everyday objects such as touch-sensitive elevator buttons (tactile sensor) and lamps which dim or brighten by touching the base. There are also innumerable applications for sensors of which most people are never aware. Applications include cars, machines, aerospace, medicine, manufacturing and robotics. A sensor's sensitivity indicates how much the sensor's output changes when the measured quantity changes. Sensors that measure very small changes must have very high sensitivities. Sensors also have an impact on what they measure. 1) Smoke Sensor Fire Alarm: The important feature of a fire detecting system is the smoke sensor. By detecting smoke the fire accident can be escaped. There are a wide variety of smoke sensors used in fire alarm systems. Smoke detectors operate on the principle of detecting the presence of a certain level of smoke particles within the area being monitored. Once the threshold level of smoke particles in the area has been exceeded, the smoke detector indicates the alarm condition. Such smoke detectors may operate on photoelectric light scattering principle, or on an ionization principle. 2) IR Sensor Intrusion Alarm: The infrared security node adopts a Infrared sensor (IR). IR sensor responds to the infrared radiation of human body whose radiation is strongest at wavelength between 9.4 m and 10.4 m. The sensor can be placed in the entrances of rooms or other areas. IR sensors are used to detect intrusion in the building. The basic idea is to send infra-red light through IR-LED, which is then reflected by any object in front of the sensor and the reflected radiations are collected by another IR LED. 3) Advantages of IR Sensor: Cheap cost and readily available in the market. Easy to interface with microcontroller. This sensor can be used for most indoor applications. F.GSM A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate. Computers use AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. A GSM modem is just like a dial-up modem. In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. The number of SMS messages that can be processed by a GSM modem per minute is very low [2]. They are only about six to ten SMS messages per minute.
ISSN : 0975-4024
1610
II.METHODOLOGY A. Approaches at the Receiver Side 1)Complications with PIC: At the receiver side the ZIGBEE and GSM should be interfaced with the main controller unit. Since already there is a controller at the transmitter side another controller at the receiver might be expensive for a building automation system. And moreover the PIC MCU has two communication ports, so one should be dedicated to the GSM and the other should be dedicated to the ZIGBEE which leaves no communication between the PC and MCU. If this happens then the condition or status of the system cannot be viewed by the programmer at the receiver end. So if any damage or problem occurs to the system or if any malfunctioning of the system takes place we would not be able to spot the error. 2) LabView: There are various complications involved at the receiver side so instead of the MCU the modules are connected to the PC via the COM port in the CPU of the PC. The LABVIEW in the PC is used as a interface in this section to communicate with both the ZIGBEE and GSM modules. LABVIEW (short for Laboratory Virtual Instrumentation Engineering Workbench) is a platform and development environment for a visual programming language from National Instruments. The purpose of such programming is automating the usage of processing and measuring equipment in any laboratory setup. 3) Structure: LABVIEW ties the creation of user interfaces (called front panels) into the development cycle. LABVIEW programs/subroutines are called virtual instruments (VIs). Each VI has three components: a block diagram, a front panel and a connector panel. The last is used to represent the VI in the block diagrams of other, calling VIs. Controls and indicators on the front panel allow an operator to input data into or extract data from a running virtual instrument. However, the front panel can also serve as a programmatic interface. Thus a virtual instrument can either be run as a program, with the front panel serving as a user interface, or, when dropped as a node onto the block diagram, the front panel defines the inputs and outputs for the given node through the connector pane. This implies each VI can be easily tested before being embedded as a subroutine into a larger program. Each Virtual Instrument (VI) has 2 Windows Front Panel User Interface (UI) Controls = Inputs Indicators = Outputs
Block Diagram Graphical Code Data travels on wires from controls through functions to indicators Blocks execute by Dataflow
ISSN : 0975-4024
1611
4. Interfacing: A key benefit of LABVIEW over other development environments is the extensive support for accessing instrumentation hardware. Drivers and abstraction layers for many different types of instruments and buses are included or are available for inclusion. These present themselves as graphical nodes. The abstraction layers offer standard software interfaces to communicate with hardware devices. The provided driver interfaces save program development time. III.IMPLIMENTATION There are various modules in the whole setup and are to be integrated after proper studying and analyses of the modules. A.Transmitter Modules PIC16F877A is the main microcontroller unit used in the implementation to control the various peripherals. It is programmed in embedded C language and compiled using a PIC CCS C compiler. Once the hex code is generated it is dumped into the controller using a PIC1618Q programmer. RFID is interfaced with the PIC via the external UART 16C550. Whenever a RFID tag is flashed the tag value is obtained by the reader attached to the PIC and is transferred to the PC via the RS 232 cable. The PIC is to be programmed in such a way so that whenever the room is unoccupied the lights should be switched off. To find the occupancy of the building the RFID is utilised [11]. Relay circuit is the extension of the RFID module. It consists of a transistor, resistor, DPDT switch and a light bulb connected to the supply. This relay is used to control the operation of the light. Sensor interfacing with PIC. The smoke sensor is connected to the channel 1 of PORT A of the PIC. The sensor input is fed the ADC channel and the digital output is obtained. ZIGBEE is interfaced with the PIC through the external UART 16C550. Whenever the intrusion occurs this module becomes active. It sends the message wirelessly to the ZIGBEE at the receiver end. It works based on the 802.15.4 protocol [13]. RS-232 cable is used as a serial interface between the PIC and the PC. The messages are send from PIC to PC via these cables to be displayed on the serial window, PC TERM software is used to view this output. B.Receiver Modules PC is used in the receiver side to which the ZIGBEE and GSM modem are connected to the COM port. ZIGBEE is interfaced to the receiver PC via a one to one cable. The message received from the transmitter ZIGBEE is obtained onto the PC through the serial port in the CPU. The LABVIEW is used to obtain and display this message. GSM modem is interfaced with the PC via a one-to-one cable [12]. Then the LABVIEW is used to send the message received from the ZIGBEE to the modem after a time delay.
ISSN : 0975-4024
1612
C.Block Diagram
The various modules are connected as per the block diagram and the supply is given to all components accordingly. When a person enters the building the RFID tag is flashed and his presence is followed by switching on the lights. At this time the controller starts registering the number of entries to the room. As long as the building is occupied the lights will be on and once the room is unoccupied, the number of persons in the room becomes zero and automatically the lights are switched off. When the smoke sensor senses abnormal values the fire alarm message is displayed on the screen and when the IR sensor detects a motion the ZIGBEE is activated and a message is sent to the control room and is received by another ZIGBEE connected to a PC and then a SMS is sent from the GSM module to a specific mobile number.
ISSN : 0975-4024
1613
D. Experimental Setup
ISSN : 0975-4024
1614
Number of people, a
NO
Is Tag Flashed?
YES
Is Tag Valid?
YES Check , a
NO
Is a>= 1
YES
NO
ON the light
ISSN : 0975-4024
1615
2) Sensor: START
Initialization of IR sensor-interrupt
Is value <=3
YES Smoke detected
NO
Clear INTF
F.Compilation The coding is compiled using the CCS C compiler and the object file is generated. If any errors are present in the program then the output will not be generated but the errors will be pointed out. When all the errors are corrected the hex code is generated.
ISSN : 0975-4024
1616
ISSN : 0975-4024
1617
G.Block Diagram at the Receivers Section In the LABVIEW a design is to be made to receive the message from ZIGBEE and send the same to GSM modem. At the receiver PC there is only one COM port so at a time both the ZIGBEE and GSM modem cannot be connected so certain steps were taken and the block diagram was designed in such a way the projected method is feasible.
ISSN : 0975-4024
1618
The total sequence is divided into 3 sub sequences, ZIGBEE reception Time delay
GSM modem transmission 1)ZIGBEE Reception: In this section the message received by the ZIGBEE is obtained from the serial port block and stored in the read buffer.
2) Delay Section: A delay of 8secs is introduced in between both the sections so that once the message has been sent the connecter from the ZIGBEE can be removed and connected to the GSM modem.
ISSN : 0975-4024
1619
3)GSM Transmission: When the intrusion message has received the GSM modem is powered up by sending the AT commands and then the SMS is sent to the required mobile number. For this a series of loops has to be designed. First the message from the ZIGBEE is obtained and then the modem is configured by sending the AT commands to the modem. These commands are written in a for loop and then they are sent one by one to the modem, after receiving the acknowledgement for each command from the GSM modem. The GSM transmission is initiated by sending the command, AT, to the GSM modem and AT means attention.
4)Front Panel: In the front panel the unwanted modules are hidden and only the vial components are displayed. The buzzer, COM ports and the buffer space is shown. When message is received by the ZIGBEE it will be seen in the buffer space.
ISSN : 0975-4024
1620
IV.RESULTS A.CCS C Compiler Output The program is written in embedded c language and compiled using CCS C compiler. When there is no error in the program, it is compiled successfully and the object file is created, i.e the Hex code is generated.
B.PC TERM OUTPUTS 1)RFID Output: The output of the RFID segment is viewed through the serial window, PC term. From this it is clearly evident that the required output is achieved through the software. The device is switched on when the room is occupied and switched off when unoccupied.
ISSN : 0975-4024
1621
2)Sensor Output:
Whenever intrusion occurs the message is displayed on the screen. And continously the smoke values have been monitored and displayed on the screen.
ISSN : 0975-4024
1622
When no smoke is present the value will be 03 and no message is printed but when smoke is detected by the sensor immediately the value decreses from 03 and reaches 00, at this instant the controller prints a message stating that smoke has been sensed. Absence of smoke : Value=03 Value1=00 to ff When smoke is present: value < 03 value1 =00 to ff. Value1 And value are adresl and adresh registers respectively in which the ADC output is stored. Since the output is 10 bit it needs two 8 bit registers to save the result. 3)LABVIEW Output: When intrusion occurs the ZIGBEE message is received and displayed in the front panel of LABVIEW. At this time the buzzer set in the LABVIEW goes red. After this the message is sent to the cell phone through the GSM modem.
V.CONCLUSION In the paper low cost, secure, universally accessible, remotely controlled solution for automation of homes has been introduced. The approach discussed in the paper is novel and has achieved the target to control home appliances remotely using the SMS-based system satisfying user needs and requirements. GSM technology capable solution has proved to be controlled remotely, provide home automation and is cost-effective as
ISSN : 0975-4024
1623
compared to the previously existing systems. Hence we can conclude that the required goals and objectives of home appliances control system have been achieved. Based on protocol features implemented in IEEE 802.15.4, ZIGBEE has a bright future. BASs, however, is the biggest market for ZIGBEE-enabled devices. ZIGBEE are recognized as a cost-effective and flexible solution for building automation and control. They can be remarkably affordable and accessible. ZIGBEE provide an ideal solution in harsh, dangerous, and difficult environments where devices are widely distributed. Over the coming years, ZIGBEE will become more dominant in commercial buildings. A number of features and benefits from ZIGBEE will change the way people look and think about building construction, operation and maintenance. Deploying ZIGBEE for process and automation networks can save time and money as there is no need to hardwire devices together. New developments offer redundancy, security and scalability which are crucial to process and factory automation networks. REFERENCES
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] K. Balasubramanian and A. Cellatoglu, IEEE, Analysis of Remote Control Techniques Employed in Home Automation and Security Systems, 2009. Yanbo Zhao and Zhaohui Ye, IEEE A Low Cost GSM/GPRS Based Wireless Home Security System, 2010. Wenqi (Wendy) Guo, Student Member, IEEE, William M. Healy, and Mengchu Zhou, Fellow, IEEE, ZigBee-Wireless Mesh Networks for Building Automation. Tahmina Begum, Md. Shazzat Hossain, Md. Bashir Uddin and Md. Shaheen Hasan Chowdhury Design and Development of Activation and Monitoring of Home Automation system via SMS through Microcontroller 2009. Xuemei Li, Guangzhou, China and Gang Xu , Li China, RFID Based Smart Home Architecture for improving lives. http://www.simonhuggins.com/courses/cbasics/course_notes/session2.html. http://www.cprogrammingreference.com/ShortNotes/ShortNote4.php. http://www.best-microcontroller-projects.com/temperature-recorder.html http://w3.id.tue.nl/nl/intranet/e_atelier/phidgets/components/ http://www.technovelgy.com/ct/Technology-Article.asp?ArtNum=2 http://en.wikipedia.org/wiki/Radio-frequency_identification http://www.developershome.com/sms/GSMModemIntro.asp http://www.zigbeeoperator.com/download/ZigBeeOperatorQuickStart.pdf http://thebookshq.com/books/interface-zigbee-with-pic16f877a.html.
ISSN : 0975-4024
1624