• No results found

Design of Wireless Intelligent Home Security System

N/A
N/A
Protected

Academic year: 2021

Share "Design of Wireless Intelligent Home Security System"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

Design of Wireless Intelligent Home Security System

1

Wang Xinxin,

2

Zhao Jianlin

1

North China University of Water Resources and Electric Power, School of Mechanical

Engineering, Zhengzhou, China, wangxinxin@ncwu.edu.cn

*2

, Henan

Business College, Zhengzhou, China

Abstract

This article describes an intelligent wireless home security system based on global system for mobile communications (GSM) using single chip computer. This system uses the modular design ideas including the main control unit module, real time recording module, sensor module, GSM communication module, LCD module. Each module completes the whole system, design of hardware circuit and software realization and the communication between the GSM module and single chip computer, in order to realize the monitor of the wireless intelligent home system.

Keywords

: Single Chip Computer STC89C54; Sensors; Real Time Clock; GSM Module

1. Introduction

With the development of information technology and the improvement of people's living standard, modern home has become more digital, information and intelligence. Because of the use of a large number of household appliances and kitchen facilities, family security risk increased. And awareness of personal and property security awareness gradually raised, traditional security precautions have been unable to adapt to the demands of a modern society, the requirements of the security system are also gradually improved. The rapid development of mobile communications, currently mobile phones have been very common which lay the technology and materialfoundation for the development of security systems [1-3].

The design realized wireless remote smart home security system based on GSM module and single-chip microcomputer. This design can display the home information through local LCD, under the dangerous conditions start GSM module for telephone notification to get the purpose of intelligent home security [4, 5].

2. Overview of the system

This system adopts modular design ideas including master modules, real time recording module, sensor modules, LCD module, and GSM communication module [6-9]. Main control unit is mainly used to collect information such as the gas concentration, temperature, infrared signals collected from the sensors, which are sent to single-chip STC after appropriate conditioning circuit, then compared with the thresholds set in advance, when some of them exceeds the critical value, starts the appropriate button to control switch. Real time recording module uses DS1302 to record accurately the monitoring information of each time period, and provides effectively the time of each sensor signal exceeds the threshold value for easy system maintenance [10]. The sensor module is mainly composed of temperature sensor DS18B20, the pyroelectric infrared sensor, combustible gas concentration sensor MQ-2 and they complete the collection of fire alarm and other security information. LCD module selects LCD12864 to display of the real-time collection time and the sensor information [11, 12]. Wireless monitoring and control via GSM module, users can query the current running state of the system by mobile phone, the master unit can call the user via the GSM network when the exception occurred. Basic system block diagram is shown in Figure 1.

(2)

Figure 1. System block diagram

3. Hardware design of function module

3.1. Master module

System microprocessor selects STC of micro-crystalline company with super anti-jamming, high speed, low power consumption, and contains a reset circuit [13-15]. Do not need to use a special burner during buring program and choose serial connection port through which MCU and GSM communicated [6, 7, 8], reduce development costs.

3.1.1. Clock circuit design

There is one high gain reverse amplifiers used to form the internal oscillator inside STC89C54, the pin XTAL1and XTAL2 are respectively the input and the output of the amplifier [16, 17]. This amplifier and the external quartz crystal used as feedback components form the self-excited oscillator external quartz crystal oscillation circuit together. According to the specific situation of the single-chip computer, removing C1 is favor of starting and C2 is between 22-47pf typically. Within the permissible range the smaller the capacitance value is the better. If the value is large although it is conducive to the stability of the oscillator but long starting times will be used. So the system selects a 33pf capacitor. In order to receive standard error-free baud rate in serial communication, 11.0592MHz Crystal is used. Clock circuit is as shown in Figure 2.

C1 33p Y1 11.0592MHZ XTAL2 XTAL1 GND

Figure 2. Clock circuit 3.1.2. Voltage-stabilizing circuit design

The whole system needs +5V power supply, select three-terminal regulator 78 series chip LM7805 to be composed of voltage regulator circuit, which requires few external components, there are protection circuits which can prevent from over current overheating and can adjust tubes in the circuit. The output of LM7805 is +5V, the input voltage is 9~15V, so supply 12V switching power supply. Power supply circuit diagram is as shown in Figure 3.

(3)

1 2 JP 1 3 2 V V GND IN OUT U2 7805 S1 C2 0.33uf C3 0.1uf D1 LED R1 1K VCC +12V

Figure 3. Power supply circuit diagram 3.1.3 Reset circuit design

Although there is reset circuit internal single-chip computer STC, according to the need of the system, start sound and light alarm and loop when hazardous conditions appear. If stop the alarm, press the reset button. This system adopts manual key reset, circuit diagram as shown in Figure 4.

S2 C4 20uf R2 100 VCC RST 1 6 2 7 3 8 4 9 5 J3 DB9 C1+ 1 V+ 2 C1-3 C2+ 4 C2-5 V-6 T2OUT 7 R2IN 8 R2OUT 9 T2IN 10 T1IN 11 R1OUT 12 R1IN 13 T1OUT 14 GND 15 VCC 16 U3 MAX232 C5 1uf C6 1uf C7 1uf C9 1uf C8 1uf +5V TXD RXD

Figure 4. Reset circuit diagram Figure 5. Serial port-level conversion circuit 3.1.4. Design of serial communication circuit

One feature of the MCU STC is that using ISP to download program online. Its principle is to connect two serial pins P3.0 (RXD) and P3.1 (TXD) to the computer, download and burn software program into it using PC computer. This method is very easy to save development costs and makes preparation for the minimum system connected to the GSM module. Because the serial port level of computer is 15V, and the power supply voltage of single-chip is 5v, the communication between them needs level translation. So it is necessary that access level translation chip MAX232 between the single-chip STC and computer. Serial port-level conversion circuit is shown in Figure 5.

3.2. Sensor modules

3.2.1. Indoor temperature detection design

Use temperature sensor DS18B20 produced by Dallas company to measure multipoint indoor temperature of different locations. 1-Wire bus can transmit either clock or data bi-directionally, this line is simple convenient for bus expansion and maintenance and hardware costs less [9]. This system uses 3 pin package and the power working methods, which can strengthen the anti-interference ability

(4)

of DS18B20 and guarantee work stability. At the same time the sink current not in the mode of push-pull of the microprocessor port is to 20mA, but the working current of DS18B20 is up to 1.5mA (generally about 1mA), so I/O ports can be used directly-driven load. It is required that data line connects a 4.7K ohm pull-up resistor RL, because in this way the bus is high level when it is idle and can improve the port driver. The circuit diagram between DS18B20 and MCU is shown in Figure 6.

1 2 3 U4 DS18B20 VCC R3 4.7K P1.0 1 2 3 U5DS18B20 VCC R4 4.7K P1.1

Figure 6. Hardware connection circuit diagram of DS18B20 and MCU 3.2.2. Design of infrared detection circuit

This system adopts pyroelectric infrared sensor module DYP-ME003, including amplifier and filter circuit, the infrared sensor is RE200B and a circular Fresnel lens to improve its reception angle detection and sensitivity. Its output is high level when a person enters the induction range of module and output is from high to low level automatically when people leave the scope [10]. After the output of the induction modules is from high to low level in each time, an embargo period is set (typically 2.5 seconds). During the period the sensor does not accept any sensor signal, thus it can effectively reduce the load in the process of switching of various interference. This sensor module can work in less than 100cone angle; the maximum distance is seven meters. In this system they are installed horizontally in the house directly above the door and balcony windows. The module has three pins two of which are power and ground, the other is OUT output signal-end which directly connects to the microcontroller I/O ports (the system select P1.2 and P1.3). When the output is high voltage alarm will be started. 3.2.3. Design of combustible gas detection circuit

In order to detect accurately combustible gas concentration in indoor air (particularly methane, liquefied petroleum gas), MQ-2 a gas sensor of high sensitivity is selected. There are six pins totally, four of which read signal, and the other two provide heating current. MQ-2 circuit includes the heating circuit and signal output circuit, in which heating voltage VH is 5V, heat resistance of 31, test voltage VC takes +5V, the size of sensor sensitive resistor RS is controlled by the effect signal output VL with its series of load resistance RL, that is RS/RL= (VC-VL)/VL.

Load resistance RL selects adjustable resistor 0 to 200K, by adjusting the RL 0 to 5V output voltage can be gotten. So the amplifier circuit is not required before MQ-2 connects to the microcontroller, but the sensor output is analog voltage values, in order to meet the processing requirements of the single chip, a digital voltage is conversed through ADC0809. Sensor signal collection circuit is as shown in Figure 7, the conditioning circuit between acquisition signal and single chip is as shown in Figure 8. The single chip computer provides clock to ADC0809 directly without frequency, and ADDA~ADDC is directly to the P2 or the ground, which can save the latch and simplify greatly the complexity of the hardware circuit [11].

(5)

A 1 B 2 H 3 H 4 B 5 A 6 U6 MQ-9 R5 200K SIGN GND VCC Test Voltage VC Heating Voltage VH

Figure 7. MQ-2 signal acquisition circuit

IN-0 26 msb2-1 21 2-2 20 IN-1 27 2-3 19 2-4 18 IN-2 28 2-5 8 2-6 15 IN-3 1 2-7 14 lsb2-8 17 IN-4 2 EOC 7 IN-5 3 ADD-A 25 IN-6 4 ADD-B 24 ADD-C 23 IN-7 5 ALE 22 ref(-) 16 ENABLE 9 START 6 ref(+) 12 CLOCK 10 U7 ADC0809 EA/VP 31 X1 19 X2 18 RESET 9 RD 17 WR 16 INT0 12 INT1 13 T0 14 T1 15 P10 1 P11 2 P12 3 P13 4 P14 5 P15 6 P16 7 P17 8 P00 39 P01 38 P02 37 P03 36 P04 35 P05 34 P06 33 P07 32 P20 21 P21 22 P22 23 P23 24 P24 25 P25 26 P26 27 P27 28 PSEN 29 ALE/P 30 TXD 11 RXD 10 U1 STC89C54 P3.4 P3.5 P3.3 P3.6 P3.5 P3.3 P3.4 P3.6 VCC SIGN RXD TXD RST P1.0 P1.1 XTAL1 XTAL2 P1.2 P1.3 P1.5 P1.6 P1.7 P3.7

Figure 8. MQ-2 signal conditioning circuit 3.2.4. Sound and light alarm circuit design

The system adopts led and buzzer as the core of sound and light alarm circuit, which is mainly composed of diodes, resistors, capacitors, transistors, buzzer. When P3.7 foot is low level, the transistor breaks over, led and buzzer start alarm. The capacitor is parallel with the end of the buzzer to cut the spike voltage from the work of the buzzer. Alarm circuit diagram is as shown in Figure 9.

U8 BELL R6 220 D2 LED C10 0.01uf Q1 8550 VCC R7 1K P3.7 VCC2 1 X1 2 X2 3 GND 4 RST 5 I/O 6 SCLK 7 VCC1 8 U9 VCC BATTERY Y2 32.768MHZ P1.5 P1.6 P1.7

(6)

3.3. Real time recording and LCD display modules

In order to record the alarm time accurately and display on the LCD correctly in real-time, this system uses a real-time clock chip DS1302 and no character LCD KXM12864J. DS1302 is a high performance, low power consumption, real time clock chip with RAM. It has 31 bytes of static RAM, communicates with CPU synchronously through SPI and sends multiple bytes clock data and RAM data one time using burst-mode. Real-time clock can provide year, month, day, hour, minute, second and the week. If a month is less than 31 days it can adjust automatically and have automatic compensation function of leap year. Set control or status register of DS1302 through software programming, at the same time initialize the calendar, clock registers, which can be used after initial calibration. Its voltage is wide from 2.5V to 5.5V. Use dual power supply and also set the charging method with a standby power supply. Charge through juan fine current for back power. The use of standby power can save information and data in the absence of main cases [12]. Connection circuit diagram is as shown in Figure 10.

In order to achieve man-machine interactive graphic interface full Chinese, the system adopts KXM12864J which has free fonts but can display Chinese characters. Its number of dot-matrix is 128 column 64 lines, display 8 (line) 4 (rows) Chinese characters, also display graphics and characters. Five control bus and 8-bit parallel data input/output bus are connected to CPU. There is memory store and display data. Achieve switch settings, the starting line settings, the address pointer settings and data read/write functions with simple operating instructions [13].

3.4. GSM module

GSM module integrates on a printed-circuit with board RF chips, base band chip, memory, power amplifier device, SIM card slot with independent operating systems. Provide a standard interface to facilitate connection to the host computer or host controller. TC35i is the GSM communication module of Siemens, the Input/output interfaces is a R232-standard asynchronous serial port. It works in the CMOS level (2.65V), the data interface is configured to 8 data bits, 1 stop bit, no parity bit, can run in 300bps~115kbps baud rate [14, 15], here choose 9600Kbps. After level translation, the serial port can communicate directly with serial port of single-chip. There are the MAX232 level conversion circuits on the development onboard, have converted CMOS level to the R232-level,so connect directly with serial converter circuit of single chip machine. Then achieve user terminal mobile phone call alert feature through the use of serial port to send TC35i directive AT directive.

4. Software design of the functional module

The software design of the whole system is composed of various functional modules after they are debugged according to the expected process. Among these they are: initialize before power on the system, wait for the MQ-9 preheating, start the GSM system, initialize and run the DS1302; read the infrared sensor information, read the temperature sensor information through a single bus, read combustible gas concentration information, and compare all the information with the appropriate threshold values, if they do not exceed the threshold, determine whether to get into the system for the first time, display the "normal" and enter the calendar interface if yes, if this is not the first time then show calendar directly [16]. If someone is more than the threshold value, the calendar interface becomes "exception in your home!” interface and start the sound and light alarm then call the users mobile phone through the serial port and GSM network. Judge whether to start the replacement, recycle if it is yes, and else end the program. The whole process flow chart is shown in Figure 11.

5. Summary

Using the strong coverage features of the GSM, the security monitoring of remote home system is completed. After the installation of an on-site probe and verification of all kinds of actual situation, this system can properly detect important environmental parameter in the home system and it can notify the user in a timely manner when an exception occurs. This system has characteristics of small volume,

(7)

easy to install, strong anti-jamming, wide range of applications and others with a strong practical value and market development prospect.

Figure 11. System control software flow chart

6.

References

[1] Lin Chenghua, Qin Qingsheng, “Remote Control System Base on GSM”, Electrical Automation, vol. 34, no. 1, pp.40-42, 2012.

[2] GAO Pu, YIN Jian, “The Design On the GSM Communication Intelligent Window”, Techniques of Automation & Applications, vol.31, no. 9, pp.32-35,2012.

[3] BIAN Jianyong, YANG Runfeng, “GSM Home Alarm System based on ATmegal 6”,Modern Electronics Technique, vol. 34, no.16,pp.17-19,2011.

[4] Bi Ningqiang,Zhu Ruixiang, “Soil Information Remote-monitoring System of GSM based on Tc35i”, Journal of Agricultural Mechanization Research , no.3. pp.187-190, 2012.

End Start Delay for MQ9 preheating,Launch GSM Initialize run DS1302

More than the corresponding thresholds? Read infrared sensor

Send to the unit 1

Read temperature sensor Send to the unit 2

Read Combustible gas concentration, Send to

the unit 1

Enter the system for the first time? Show Calendar Show "normal"

Show "exceptions" Start the sound and light

alarm Start a manual reset? N Y Y Y N N

Notify the user through GSM

(8)

[5] Hao Chen, "The Construction of Intelligent Home Based on Wireless Sensor Networks", IJACT, Vol. 4, No. 16, pp. 312 ~ 319, 2012

[6] Lu Shi, "A Study on the Macro-Control Policy of China Real Estate Development", AISS, Vol. 5, No. 1, pp. 202 ~ 211, 2013

[7] Yongxian Song, Ting Chen, Juanli Ma, Yuan Feng, Xianjin Zhang. Design and Analysis for Reliability of Wireless Sensor Network.Journal of Networks, Vol 7, No 12 (2012), 2003-2010. [8] YU Chi-ye,SONG Yue, “A System Design of Smart Home Remote Monitoring System”,

Electrical Measurement& Instrumentation,vol.48, no.542, pp.63-49,2011.

[9] HUO Yin-long, ZHAO Fu-sheng, “Design of Remote Monitoring System in Smart Home Based on DSP”, Machine Building & Automation, vol.41, no.3, pp.151-155, 2012.

[10]Wang Xingzhi, 805l 8098 Single - Chip Microcomputer principle and interface design, Weapon Industry Press, China, 1998.

[11]CHEN Hui, CHEN Mei, “Based on B/S structure of intelligent household remote patrol the design of monitoring and control system”, Automation & Instrumentation, no.1, pp.32-35, 2012.

[12]Zhang Ximin, Wang Guoqing, “Development of an Internet home automation system”, Chinese Journal of Scientific Instrument, vol.30, no.11. Pp.2423-2427, 2009.

[13]Huang Jusheng, single-Chip Microcomputer principle and interface technology, National Defense Industry Press, China, 2007.

[14]Li Qunfang, Xiao Kan, Principle interfaces and Application of Single Chip Microcomputer, Tsinghua University Press, China, 2005.

[15]Graphic dot matrix LCD module using manual of kxm12864j-3.

[16]Zhang Yun, Xiong Chengyan, “Analysis of short message service protocol based on GSM”, Radio Engineering of China, vol. 31, no. 4, pp.21-32, 2001.

References

Related documents

Crucially, anticipation accuracy of skilled players was significantly lower in high-SF deceptive trials (when non-kinematic information was highlighted) than normal- or

Analysis of BRAF point mutation and RET/PTC rearrangement refines the fine-needle aspiration diagnosis of papil- lary thyroid carcinoma. Utility of BRAF V600E mutation detection

Currently, the U.S health care system ranks low compared to other industrialized nations and yet costs taxpayers and consumers considerably more than residents of other countries.

Domestic financial markets in developing countries can be stylised as follows: credit markets are segmented, competition among banks is weak, joint ownership between the

 Controlled companies: taxation of the variation on the value of the investment in controlled company (directly or indirectly owned) that is equivalent to its profits before

For K = 500 and θ = 30°, 45° and 60° the value of frictional coefficient increases plastic strain also increases or from increasing value of Hardening exponent slope of

When a person has a relationship with God, God connects to them in way that spiritually and morally transforms them. When God connects with a person, God supernaturally changes

Kavitha V.2019, Synthesis and Characterization of Sulfur Doped TiO 2 Nanoparticles for the Improved Photocatalytic Degradation of Rhodamine B by sol-gel Route. Int