Monday, 24 March 2014

The paper of NSPTS National Seminar On Physics and Technology of Sensors "Smart Home using LabVIEW (DAQ-6009)"


Smart Home using LabVIEW (DAQ-6009)
Mohammed Zahid, Gharpure D. C.
Department of Electronic Science, University of Pune, Pune, 411 007
Address
dcg@electronics.unipune.ac.in
zms@electronics.unipune.ac.in

Abstract:
Recent progress in the various fields in science and technology are mainly focusing to make better human life. One way to improve the quality of life is by making the home environment a more comfortable place to live in by turning it into a smart home environment. The terms smart homes, intelligent homes, home networking have been used for more than a decade to introduce the concept of networking devices and equipment in the house.

Generally IR sensors, humidity sensor, gas sensor, temperature sensor, motion sensor etc. are used to monitor the environment in a smart home. For this paper all the sensor modules are tested manually to check its individual performance by using LabVIEW DAQ-6009. The present Smart Home concept will be used as a “safe home” and “intelligent home”. One can easily communicate with the smart home by using computer or laptop having good looking graphical user interface program by LabVIEW and also it is intelligent to operate its own. For example when a person come inside home it will turn on light and fan. If we don’t require it we can turn off by using front panel of LabVIEW GUI.  It designed such a way that at the time of fire, it sounds buzzer and turn ON exhaust fan as well as at the time of burglary it turns ON buzzer automatically.

In the present paper we focused on LabVIEW based Smart Home using DAQ card (NI-DAQ-6009). This consists of a 1 BHK mechanical house structure, sensors, home appliances and DAQ card. Firstly using LabVIEW we interface sensors and home appliances individually and the system was tested using a Smart home model designed in the lab. This structure is made up from low cost materials like acrylic, plywood etc. which also has sufficient mechanical strength. To facilitate the goal of the present paper, it consists of various sensor modules interfaced to a few home appliances. The graphical user interface of this paper is such a way that any layman can understand and operate it.


Keywords: sensors, home appliances, smart home, comfort, security, LabVIEW Software, Graphical user interface (GUI), DAQ card-6009, laboratory training.



Introduction:
A “smart home” can be defined as a residence equipped with computing and information technology which anticipates and responds to the needs of the occupants, working to promote their comfort, convenience, security and entertainment through the management of technology within the home and connections to the world beyond. Lifestyle in the modern society along with human behavior and thinking is changing dramatically with the advancement of technology, and the concept of a simple home is changing into a smart home. The home is an important place for the people. It not only affects the overall quality of life, but is also a place where many people (especially older) spend a large part of their time. It is self-evident that constantly improving and developing this area of life takes an important role. A step in this direction is the so called smart home environments. And that is the purpose of this project to provide convenience, safe and secure home.

The concept of smart home has been discussed in a number of papers/1/. A microcontroller based smart home including ZigBee, GSM, GPRS, IrDA or Bluetooth has been proposed /1 &2/. In the present paper we have focused on the development of a Smart Home with a graphical user interface (GUI). The implementation uses LabVIEW for the GUI and USB interfaced DAQ card for monitoring and controlling the parameters. The next section describes the Hardware interface.

Theoretical Background and Hardware Overview of the System:
This smart home control consists of three units: Smart home module, NI DAQ-6009 and PC (or Laptop) having LabVIEW. A block diagram of the Smart home model is depicted in Fig1.

Fig 1: positions of sensor


              It consist of three IR (Infrared) sensors, one PIR (pyro-electric Infrared) sensor, two LED arrays, one Gas sensor, one humidity sensor, one temperature sensor and one fan. At the door one IR sensor is there which is used to detect whether person is coming or not. Basically it just detects status of the door. There are two windows in this home, both have IR sensor. This is use to detect burglary at home (mostly at night). When window is detected after the door detection then it is obvious, it is not sign of burglary. PIR sensor is used to detect presence of humans. It is also used to turn on Fan and Light (LED module) on detecting presence of human. To detect the fire at home it has temperature sensor and gas sensor. And to control humidity it has humidity sensor. The sensors and signal conditioning is described below.
The Infrared (IR) sensor: IR sensor module contains pair of LED and photo detector, in which LED spread light continuously and other detect reflected light. There is a potentiometer available on the module to set distance between module and object. IC LM358N used as a driver IC for this module. Output voltage varies from 3.31V to 3.39 V when it detect.
PIR Motion Sensor Module: PIR Motion Sensor Module is a compact, complete and easy to use Pyro-electric Infrared (PIR) Sensor Module for human body detection. This module consists of a Fresnel lens and motion detection circuit. It is high sensitivity and low noise. It shows low (0V) output which is made high (5V) by using op-amp as an inverter whenever it detects presence of human being.
Temperature sensor: It is used to indicate the ambient temperature inside kitchen to the user. LM35 temperature sensor is used for the same purpose. It requires 5v supply and gives 2.982 V output at 29 degree.

LPG Gas sensor: MQ-6 gas sensor has high sensitivity to Propane, Butane and LPG, also response to Natural gas. The sensor could be used to detect different combustible gas, especially Methane; it is with low cost and suitable for different applications. LPG gas sensor has 5 V as input and it gives low put i.e. 0 V when gas is detected.

Humidity sensor: Humidity sensor (SY-HS220) used to monitor humidity level inside home. If humidity level is more than specified condition then turn on exhaust fan. For more detail one can use datasheet of recommended sensors.

Selection of appliances: Some basic appliances have been selected to fulfill the goal of this paper. List of the appliances and its expected location is given in figure 1. The LED type lights were selected to be used in hall, kitchen and bedroom to fulfill the requirement. The number of LEDs (4 Nos.) operating on 5 V DC were selected in such a way that it should illuminate the room with reasonable intensity. The SMPS fan is used to provide the ventilation to the bedroom area.

          NI DAQ-6009 is used to monitor and control various modules to implement the smart home. We can interface eight analog inputs and twelve digital inputs / outputs through this DAQ card. One can easily connect this card to the computer by using USB connector provides by National instrument. One can easily access and operate the input and output of DAQ card using LabVIEW software.


Implementation of Smart home:
To implement home automation concept a smart home VI has been developed in LabVIEW. It consists of the NI DAQ-6009card to interface various sensors and actuators.  Various modules implementing the logic described below have been designed and tested individually. Further they are integrated to form the Smart
 Home VI as discussed below.


Fig 2: Input, output and DAQ card for the project
Three IR sensors were placed near to main door, hall window and bedroom window. The status of IR sensors and PIR sensor used to detect unauthorized entry in home. Two sensors are placed at window and other placed at door. If windows will open after door or only door open, it indicate authorized entry which result in turning  on lights and Fan inside home. If door open after window or only window open, it indicate unauthorized entry which results in sounding the  buzzer as well as on the LEDs of hall at the  front panel or graphical user interface of LabVIEW. It is used as burglar alarm. Temperature sensor is used to monitor temperature of home. At the time of high temperature exhaust Fan has been turned ON.
To detect the fire we uses two sensors, one is temperature sensor and other is gas sensor. Temperature sensor use to detect the rise in temperature and gas sensor is use to detect smoke, at time of fire &LPG leakage. As soon as fire is detected turn on Buzzer and exhaust fan. This paper is also use to turn on / off home appliances like AC, Fan, and Light etc. by using LabVIEW VI. Turn on fan when home environment become dry because some people have problem from dry environment. This is detected by Humidity sensor situated near to the kitchen. Implementing a virtual concept of home automation in real word was really challenging task but useful to learn way of implementation theoretical concept to make it practical.
NI DAQ-6009 contain eight analog inputs, two analog output channels and 12 TTL/CMOS digital input / output lines has been used to implement the Smart home concept as shown below in Fig 2. It is Low-Cost, Bus-Powered Multifunction DAQ for USB. PC or laptop should contain LabVIEW with DAQ card-6009 software installation.
Digital inputs, outputs are at right hand side and analog inputs are at left hand side of above figure. DAQ card can’t provide voltage and current for all sensors and actuators therefore signal conditioning circuit is being used. External power supply is used to provide sufficient current and voltage for analog input/output. Signal conditioning circuit is designed in such a way that all analog inputs and outputs take sufficient current to work. It uses transistor as amplifier to provide specific current for analog system.
Front panel of smart home VI
Front panel or graphical user interface (GUI) of LabVIEW program is consist of smart homes photo, controllers and indicators as depicted  in figure below.

Fig 3: Front panel of the smart home
In above figure, home is at right hand side and all controllers & indicators are present at left hand side of front panel or GUI. In the present figure Fan and bedrooms light is ON because buttons are ON and door is open. Temperature is above 36 degree in the hall therefore LED on the left hand side is ON and the LED of hall is ON in the photograph of smart home module. By using left top section of GUI one can turn ON or OFF home appliances. Left bottom consist of indications or status of sensors or buzzer. In this section one LED is on which indicate that temperature is above 36 degree.
Conclusion:
The Smart home VI has been designed and used successfully for the model home.  Interfacing of all sensors and home appliances are done individually including digital and analog input/outputs. A signal conditioning circuit for interfacing the sensors and actuators is being designed. Further work on using a microcontroller for the same purpose and e-mail for notification are underway. Work on incorporating wireless interface like SMS / Zigbee /Bluetooth to turn on / off home appliances like AC, Fan, and Light etc. and monitor status of sensors and appliances will also be carried out.
It is very easy and time saving to use online. One can operate friendly using its graphical user interface or block diagram panel given in fig3. One can’t operate it offline because DAQ card is not use to burn the program. To overcome this problem use of microcontroller is being designed. Way of programming of LabVIEW is simpler than microcontroller. It is very easy to send e-mail by using LabVIEW containing some sub VIs only and it is very difficult using microcontroller.

References:
1.      Aghav S. T., Karpe P. D., Gharpure D. C., Shaligram A. D.,"A Smart Home Concept Module for Laboratory Training", "National Conference on Recent Initiatives towards Green Electronics" 8th and 9th February 2013.
2.      F. Aldrich, Inside the Smart Home. Springer London, April 2006, ch.Smart Homes: Past, Present and Future.
3.      Kevin Bouchard, Amir Ajroud, Bruno Bouchard, AbdenourBouzouane, SIMACT: A 3D Open Source Smart Home Simulator for Activity Recognition, Advances in Computer Science and Information Technology Lecture Notes in Computer Science Volume 6059, 2010, pp 524-533.
4.      Zahra ForootanJahromi and Amir Rajabzadeh, Ali Reza Manashty,AMulti-Purpose Scenario based Simulator for Smart House Environments, International Journal of Computer Science and Information Security,Vol. 9, No. 1, January 2011.