A Novel Remote Monitoring and Control System Based on GSM for Home Security

—A powerful and cost effective home security system based on GSM communication network and wireless communication module CC1100 is proposed for anti-theft, fireproofing, waterproofing, anti-gas leak and remote appliance control. The system uses STC89C516 microcontroller as the core and real-timely detects the home environment through a variety of sensors. The dual detections are utilized to reduce the false alarm rate and enhance system reliability and interference immunity. The wireless data transmission is adopted between the main controller and sensor nodes, which does not require a lot of wiring. The bidirection communication between the main controller and the mobile terminal is realized by the GSM networks. Once detecting suspicious activities, the system sends an alarm message to the host’s mobile phone. The user can remotely query the home security status and control the home appliance by the GSM module. The communication is assured within the GSM coverage area, and the distance is unlimited. The GSM short message alarm overcomes the hidden troubles of vulnerable damage and no alarm when calling in the fixed telephone dialing. The interaction interface is optimized. The user can modify the passwords, change the target phone number, alter the upper and lower limits of alarm, query the alarm recording and deploy/cancel defense via the LCD and keyboard. The buttons are installed for help in case of emergencies. The test results show that the system can real-timely monitor and remotely query the home environment, control the appliances and initiatively send alarm messages in case of accidents. The system possesses full function, high reliability, low false alarm rate, strong expansion, friendly user interface and low cost. The application space is very broad


I. INTRODUCTION
The home security and control is a major issue for mankind. With the continuous improvement of people's life quality, there are higher and higher requirements on home safety such as theft, fire, gas leak, water and so on. The traditional residential district security only relies on installing security windows and doors which are not aesthetic and can not effectively prevent invasion. The valuables are often stolen. The incidents of gas poisoning and fire in the residents' daily life also occur frequently, which cause huge loss of life and property. The home security systems utilizing wired networks are difficult to install and move. The wireless technology can offer attractive benefits for home security and control due to the flexibility and convenience, which has become a research hotspot. It is particularly important to design a real-time, stable, reliable, economical, vast coverage, remote control home security and alarm system [1][2][3].
GSM (Global System for Mobile Communications) provides wide coverage even to remote rural area. The GSM association estimates that 90% of the global mobile market adopts the GSM standard. The communication distance is very long [4]. The information interchange is easy and low-cost. The home security monitoring and remote control system based on GSM module is proposed in Ref. [5][6][7]. The alert short message is sent to the user's mobile phone when the incident occurs. The user can remotely inquire and control the operational status of the household appliances. The novel hardware and software systems are proposed in the paper. The performance and cost of the circuits are optimized to meets the needs of general families. The user-friendly interface is designed.
The proposed system has competitiveness in some aspects such as good generality, perfect-function, security, efficiency, stability, low cost, easy installing and operation.
A wireless home security monitoring and control system with friendly interface is proposed. The MCU (microcontroller unit) control technology, sensor technology and GSM mobile communication technology are combined in the system. The paper is organized as following. The whole system architecture is proposed in section 1. The hardware system is described in detail in section 2. The software design is explained in section 3. The measure results are shown in section 4. Finally, concludes are given in section 5.

II. SYSTEM STRUCTURE
The proposed wireless monitoring and control system consists of a main controller and several sensor nodes as shown in Fig. 1. The main controller is the control center of the system, which integrates the GSM module, time chip, EEPROM and the interface equipments. The sensor nodes are scattered in the rooms, which are equipped with various types of sensors to monitor the home environment. The STC89C516 microcontroller is the heart of the circuit. The main controller communicates with the sensor nodes through the wireless transceiver chip CC1100. The GSM module bridges the local home network to the common network. The system provides the interoperability of CC1100 and GSM to make it portable and easy to install. It provides bi-directional data transfer between the main controller and user's mobile phone. The body infrared inductive sensors, vibration sensors, smoke sensors, temperature and humidity sensors are fixed in the sensor nodes for theft, fire, water and gas leak prevention. The controller is added to implement the home control. The microcontroller of the sensor nodes collect and process the sensor data at regular intervals. Once the suspected activities are detected, the sensor nodes immediately commence the sound and light device to warn and transit the alarm information to the main controller via the CC1100 module. The main controller judges whether the condition comes into the alarm status. It determines the type of alarm, automatically records the information in the EEPROM and sends the warning short message to notify the remote host through GSM module when the alarm is confirmed. The host can take timely measures to minimize the damage. The user can also send the messages to query the home security situation and remotely control the home electrical equipment, lighting, curtains, windows and so on. The main controller receives the control signal from the user and transmits to the sensor nodes by the CC1100 module. The specified sensor node makes the corresponding controller execute the command or sends the sensor data to the main controller according to the command type. The main controller feeds the results back to the user. A button is set to send messages for help in case of emergency. The system effectively implements the monitoring of the home environment and remote control of household appliances, which offers the guarantee for residential safety.The characteristics are followed as: (1)The system is fully functional. It can be used for intrusion, fire, gas leak, water leakage alarm. The button is set for the emergency alarm. The appliances are remotely controlled. The main controller can store the transmitting and received messages to conveniently query.
(2)The system is real-time and reliable. The parameters in the house such as temperature, humidity, light and smoke are continuously monitored. Once an accident is detected, the system starts the sound and light devices instantaneously. And the user can obtain the alarm information about the incident sort such as fire hazards or unexpected intruder within a second. The GSM short message alarm overcomes the hidden troubles of vulnerable damage and no alarm when calling in the fixed telephone dialing. The wide area coverage of GSM network makes the user interact with the system even from a very remote place. There is no missing report. The false alarm rate is low. The thief invasion is confirmed by the dual detections of body infrared inductive sensors and vibration sensors.
(3) The system is flexible and easy to operate. The system is highly extensible. It is customizable to meet the specific requirements of the user at a low cost. The system adopts the wireless data transmission. It is convenient to increase, decrease the sensors or move the position according to the actual situation of the room without rewiring. The system has such characteristics as light weight, small size and easy installation. It has friendly user interface. The user can remotely query the home environment and control the home appliances by simple selection commands to transmit. The user can set the passwords via the keyboard, change the target phone number for sending alarm messages, alter the upper and lower limits of temperature and humidity alarm, check the alarm recording and deploy/cancel defense.
(4) It has low cost. The hardware design gives attention to both cost and performance requirements. The 8-bit microcontroller, sensors, CC1100 module and GSM module are inexpensive. A complete system only costs a few hundred RMB, which can be accepted by the ordinary families.

A. Sensor module
Several kinds of sensors are adopted for comprehensive detection, which is helpful to reduce the false alarm rate and enhance the reliability and robustness of the system.

1) Body infrared inductive sensors for human presence
The body infrared inductive sensor module HC-SR501 is utilized for the guard against theft. The pyroelectric LHI778 probe in the module transforms infrared with the center wavelength of 9-10 !m emitted by the human body into a weak voltage signal that is amplified by FET. The output voltage signal is processed by the infrared sensor signal processor BISS0001, as shown in Fig. 2. It has the advantages of no radiation, low power consumption, good concealing and low price. When someone enters the inductive scope of the probe, the circuit outputs a high level. When the man leaves, the circuit outputs a low level. Thus, detecting the output port of the sensor can recognize the invasion. PAPER A NOVEL REMOTE MONITORING AND CONTROL SYSTEM BASED ON GSM FOR HOME SECURITY

2) Combustible gas and smoke detectors
The fire alarm is triggered by the combustible gas and smoke sensor. The MQ-2 module is selected in the circuit, which is a semiconductor gas sensor based on gas-sensing material SnO 2 . The combustible gas or smoke adsorbs on the surface of SnO 2 in the form of positive ions and releases electrons. The electrical conductivity [8] of the gas sensor gradually increases along with the growth of the gas concentration. The resistance decreases correspondingly. When there is no combustible gas or smoke in the environment, SnO 2 automatically recovers the negative ion adsorption of oxygen. The conductivity decreases and the resistance increases to the initial value. The output resistor is converted into a voltage signal to compare with a reference voltage. A digital high/low level is obtained and fed to the microcontroller for processing. The MQ-2 can detect a variety of combustible gases such as liquefied petroleum gas, butane, propane, methane, ethane, alcohol, hydrogen, smoke etc.

3) Temperature and humidity sensor
The ambient temperature and humidity measurement are performed using the digital sensor DHT11. The resistive humidity-sensitive elements, temperature measurement devices and 8-bit microcontrollers are integrated in the sensor. It can accurately measure temperature from 0 to 50 and humidity from 20% to 90%. It provides the measurement accuracies of ± 2 temperature and ± 5% humidity respectively. The sensor communicates with the microcontroller by the single-bus serial interface. It has the characteristics of good long-term stability, fast response, strong antiinterference ability, high performance-price ratio, small size and low power consumption.

B. GSM module
The industrial-grade GSM module TC35 developed by Siemens is utilized to receive and send the short messages. TC35 is a dual-band 900/1800 MHz GSM module [9]. The circuit includes four parts: baseband processor, RF circuits, power and flash. The power supply is 3.3-5.5V.
The standard AT commands of text and PDU(protocol description unit) mode are provided. The bidirectional instruction and data transfer is realized. The TXD and RXD ports of TC35 use CMOS level that needs to be converted by MAX232 chip before serially communicating with the microcontroller. The selectable baud rate range is 300bps-115kbps. The IGT of TC35 is a trigger pin. When IGT is high level, TC35 does not work. In order to make the TC35 enter into operation, a low level pulse signal longer than 100 ms should be provided by the software program for IGT. The circuit is shown in Fig. 3.

C. Indoor wireless communication module
The low-cost low-power single-chip radio-frequency transceiver CC1100 of TI is utilized to communicate between the indoor main controller and sensor nodes [10]. The band frequency can be 315, 433, 868 and 915 MHz. The circuit includes the configuration registers, command status registers, status registers, receiving FIFO and transmission FIFO. CC1100 needs to be configured to achieve optimal performance for different application. The reading/writing data, reading status information, setting

IV. SYSTEM SOFTWARE DESIGN
The software design is key for the monitoring and control system, which to a large extent determines the function achievement and reliability. The software is written in C-language for programming the sensor, GSM and CC1100 module to monitor the home environment in real time and remotely control the household appliances.

A. Receiving and transmitting short message by TC35 module
The GSM module TC35 is responsible for sending the alarm short message and receiving the control commands from the user's mobile phone.
TC35 communicates with the microcontroller by the serial port. The baud rate is 9600 bps. The data includes 8 data bits and 1 stop bit. The receiving and transmitting of the messages uses standard AT instruction. The text and PDU mode are supported. The code of text mode is simple and easy to implement without coding. However, it can only receive and send short messages in english. The PDU mode can sent the short message in english and chinese. The message content should be encoded before sending. The PDU message encoded by UCS2 includes the calling number, called number, protocol identifier, data coding scheme, the validity, user data (up to 70 chinese characters, all data are expressed in hexadecimal). The AT commands for sending messages are set as follows: (1)determine whether the serial port normally works: AT enter (2)set the short message format(0-PDU, 1text):AT+CMGF=0 enter PAPER A NOVEL REMOTE MONITORING AND CONTROL SYSTEM BASED ON GSM FOR HOME SECURITY (3)set the data length: AT+CMGS=29 enter (4)send the chinese message in PDU mode(the data is ASCII code) The AT commands for receiving messages are set as follows: (1)determine whether the serial port normally works: AT enter (2)set the short message format(0-PDU, 1text):AT+CMGF=1 enter (3)cancel the short message: AT+CMGD=1 enter (4)set the prompt way when a new message is arriving: AT+CNMI=1, 1, 2 enter The microcontroller firstly triggers the IGT pin and initializes the serial port when it receives the short messages by TC35 module. Then AT instructions are sent to set the parameters. The microcontroller waits until the serial port receives a new message. After the completion of message processing, it deletes the messages and waits for receiving new message. The software flow chart is shown in Fig. 4.

B. Wireless communication
The receiving and sending information between the main controller and sensor nodes are performed through the wireless transceiver chip CC1100. The microcontroller stores the data in the transmitting FIFO and sets the sending command. The CC1100 module begins to synchronously send data. The transmitting FIFO is cleared after the packet has been completely sent (GDO0 output a low level). During the receiving process, the microcontroller sets the receiving commands and waits until the data have been received completely (GDO0 output a low level). The data length and checksum read from the receiving FIFO are verified. The data are cleared after they are successfully received.

C. Overall system program
The software design of the system includes two sections: the main controller's and the sensor nodes'. The main functions are sensor data collection, over-limit alarm, remote indoor environmental information query and home appliance control. The main controller completes the receiving of the alarm information from the sensor nodes, alarm judgment, sending the alarm short message to remind the host, receiving the query and control command from the user and forwarding to the sensor nodes. The sensor nodes are responsible for collecting the home environment information, controlling the electrical equipment according to the commands, communicating with the main controller and warning over limit. The software flow chart of the main controller is shown in Fig.  5. Each sensor node is assigned a unique address. The user can select the query and control commands stored in the mobile phone and transmit to the main controller, which is convenient to operate. The main controller has a good man-machine interface. The user can modify the called phone numbers, the system time and the upper/lower limit of the temperature/humidity, query the alarm information and alter the passwords by the keyboard.

V. SYSTEM MEASUREMENT AND RESULTS
In order to validate the performance of the proposed system, the comprehensive measurements are performed. The prototype main controller system is implemented as shown in Fig. 6. Based on the prototype system [11][12], the typical applications are tests, which include the home indoor environment monitoring, short message alarm, querying the environment variables and controlling the appliances by the user' mobile phone.

A. Home environment monitoring and short message alarm
The short message alarm function is verified by the body infrared inductive sensor and vibration sensor installed in the balcony (position 1). When someone enters the scope of the infrared inductive sensor, the sensor node 1 turns on the sound and light alarm immediately. When the vibration sensor detects the signal, the main controller gives the sound and light alarm. The LCD displays the address and type of the alarm. And the user's mobile phone receives an alarm short message informing him about the security breach, as shown in Fig. 7. The result verifies that the dual detections of the body infrared inductive sensor and vibration sensor confirm the thief invasion. PAPER A NOVEL REMOTE MONITORING AND CONTROL SYSTEM BASED ON GSM FOR HOME SECURITY

B. Remote control of the home electronics appliance
The user sends the short message by the mobile phone to make the light 2 in the position 1 open. The main controller forwards the command to the sensor node 1. The sensor node 1 executes the action by the controller 1 and feeds back the information. The main controller sends the reply to the user's mobile phone. The user can query the content and time of the sending and receiving messages by pressing the "query" button in the manmachine interface of the main controller, which is easy to manage.
The field experiments show that the system can realtimely monitor the home environment and automatically send the alarm short message. The user can send the messages to inquire the home situation and remotely control the appliances at any time. The good man-machine interface makes it easy to operate. The stability of the proposed system is proved.

VI. CONCLUSIONS
A remote low-cost alarm and control system based on GSM module for home security is proposed for the general user to real-timely monitor the home environment, send the alarm message in the accidents, remotely query the present condition of the house and control appliances. The various kinds of sensors are adopted for comprehensive detection. The TC35 module is utilized to connect the home network to the GSM network for communicating with the mobile terminals. The whole system transmits data in a wireless way, without rewiring. It has good flexibility and expansibility. It is validated that the system has a timely response to the alarm information and can effectively protect the home safety. The system has stable and reliable performance, comprehensive functions, no missing report, low false alarm, friendly man-machine interface, easy operation, high performance-price ratio. It can meet the security needs of different home users, and has wide application prospect.