A wireless security system based on GSM and Zigbee technology

This paper proposes a wireless security system based on GSM and Zigbee technology. The system is characterized by using the advantages of GSM and Zigbee wireless networks to realize the wireless networking of the security system, eliminating the cumbersome wiring process, and realizing the security information Multi-point, long-distance transmission improves the safety, reliability and concealment of the security system.

introduction

At present, the urban security system is receiving more and more attention, and customers have higher and higher requirements for the function and performance of the security system.

This paper proposes a wireless security system based on GSM and Zigbee technology. The system is characterized by using the advantages of GSM and Zigbee wireless networks to realize the wireless networking of the security system, eliminating the cumbersome wiring process, and realizing the security information Multi-point, long-distance transmission improves the safety, reliability and concealment of the security system.

1 System solution

The main design feature of the system scheme is to combine the Zigbee network with the GSM network. The use of a wireless network not only saves the trouble of wiring, increases the flexibility of the security sensor layout, but also prevents the communication cable from being damaged and improves safety. The whole system structure is shown as in Fig. 1.

A wireless security system based on GSM and Zigbee technology
Wireless security system structure

The system embeds the module with Zigbee protocol into passive infrared, glass broken, door sensor, smoke detector, gas leak and other security equipment, as a node of the wireless sensor network. For example, when theft occurs, the passive infrared sensor detects that the thief enters the monitoring area, it triggers the interruption of the node chip, thereby activating the node chip, the chip will automatically send out the alarm data packet through the Zigbee wireless transceiver module.

The Zigbee coordinator is the interface between the Zigbee network and the external GSM network. As the center of the system, it is responsible for the management of the entire network and the forwarding of data. It receives the data of the security monitoring node through the transceiver module, and the embedded controller performs the necessary data on the received data. It is then sent to the security center through the GSM network to realize fast and safe alarm.

The whole system can be divided into two parts: Zigbee coordinator and Zigbee wireless sensor node.

1.1 Zigbee Coordinator

As the center of the entire system, the Zigbee coordinator is responsible for many tasks, so the requirements for the controller responsible for managing this center are relatively high.

However, traditional single-chip microcomputers can no longer meet the requirements in some aspects. ARM is the first place to replace traditional single-chip microcomputers due to its high performance, low power consumption, and low cost. This design selects the ARM9 processor STR912FW44X6 chip as the center of gravity, and expands a series of functional modules on the periphery. The whole hardware structure is shown in Figure 2.

A wireless security system based on GSM and Zigbee technology
Zigbee coordinator structure diagram

Among them, STR912FW44X6 is the main control chip, which is a high-performance embedded chip based on ARM966E_S core launched by STMicroelectronics, with a computing speed of 96MIPS and supports single-cycle DSP instructions. The chip integrates 544kB of Flash and 96kB of SRAM, supports Ethernet, USB, UART, 12C and CAN communication, has 80 GPIOs, 8 channels and 1O bit AI) C, 3-phase motor controller, watchdog timer and 9 programmable DMA channels. The system uses a UART transceiver chip TL16C550 of TI Company to connect the GSM module to the GPIO of ARMCPU to realize GSM short message alarm sending.

The GSM communication module uses the Siemens TC35i module, which has stable performance and low price, has all the functions of GSM wireless communication, and supports short message encoding methods in TEXT and PDU modes. In the RF transceiver, TI’s Zigbee radio frequency transceiver chip CC2420 is used in this design. CC242o adopts OQPSK modulation mode, supports data transmission rate up to 250kbps, and can realize rapid point-to-multipoint networking. In addition, the coordinator has also designed RS232 interface, keyboard Display and on-site alarm circuit according to actual needs.

1.2 Zigbee wireless sensor node

The Zigbee wireless sensor node is composed of security sensors and Zigbee terminal equipment, as shown in Figure 3. Zigbee terminal equipment uses TI’s Zigbee radio frequency transceiver chip CC2430. CC2430 has a very high cost performance, integrating Zigbee radio frequency (RF), memory and on a single chip.

It uses an 8-bit (8051) with 128kB of programmable flash memory and 8kB of RAM. It also contains an analog-to-digital converter (ADC), timer, AES128 coprocessor, watchdog timer, 32kHz crystal oscillator for sleep mode timing Device, power-on reset circuit, power-down detection circuit and 21 programmable I/O pins.

2 Zigbee technology introduction

Zigbee is a product of the Zigbee Alliance, which is an alliance composed of more than 100 software and hardware companies in the world to develop a short-distance, low-power, low-speed, and low-cost wireless sensor network standard. Wireless Sensor Network (Wireless Sensor Network, WSN) refers to an embedded wireless network composed of a large number of relatively low-cost sensor nodes with sensing capabilities, computing capabilities, and real-time communication capabilities. It is currently a research and application hotspot in many fields.

3 System software implementation

The GSM communication module TC35i is controlled by AT commands, and the data transmission adopts short message mode. The encoding and decoding methods of AT commands and short messages are the key to the software design of this system. The following focuses on the two in detail.

3.1 Introduction to AT commands

AT (Attention) command set is the industrial standard of modem communication interface, and most mobile phones on the market now support AT command set specified by GSM7.05. The instruction set is issued by ETSI (European Telecommunications Technology Commission), which contains the control instructions for SMS. General GSM modules support AT commands, so the computer or single-chip computer can directly send AT commands to the GSM module through the serial port to easily realize the sending, receiving and management of short message SMS.

3.2 Coding mode of short message

There are 3 modes for the control of short messages: BlockMode; PDUMode; TextMode. Currently, PDUMode has replaced BlockMode. TextMode does not support Chinese and most mobile phones do not support this mode. In China, both mobile phones and GSM modules support PDU mode. In order to meet the versatility of the system, this system uses PDUMode for short messages. So what is PDU mode? Simply put, it is a way to send or receive mobile phone SMS. On the surface of the PDU string is a string of ASCII codes, composed of numbers and letters such as o-9 and A-F. They are 8-bit hexadecimal numbers, or BCD code decimal numbers. The PDU string contains not only the message itself, but also a lot of other information, such as SMS service center number, destination number, reply number, encoding method, and service time. The structure of the PDU string sent and received is not exactly the same. The following describes the PDU encoding format of the short message (Table 1, Table 2).

SCA: The address of the SMS center, for example, Xi’an is 8613800290500;
FO: File byte header, set to 11 when sending text messages;
MR: Information type, usually 00;
DA: destination address;
0A: sender address;
PID: Protocol indicator, usually O0;
DCS: Data coding scheme, O0 is 7bit coding, F6 is 8bit coding, O8 is double byte coding;
VP: valid period;
UDL: User data length, that is, the length of the actual short message content;
UD: user data, that is, the content of the short message;
SCTS: Short message center time stamp.
PDU format for sending short messages

3.3 Send and receive short messages

To send and receive short messages, to exchange information between the GSM module and the mobile phone, the information must first be encoded and decoded in the PDU format. This system adopts Unicode encoding form. Unicode is a unified character encoding standard that uses double bytes to encode characters[ThecharacteristicofthisUnicodeisthatallcharactersarerepresentedbytwobytesnotonlyChineseusestwobytesbutEnglishalsousestwobytes

The steps for sending and receiving short messages in PDU mode are: use “AT CMGF=0” to set to PDU mode; use “AT CMGS=length” followed by PDU packets to send short messages; use “AT CMGR=serial number” to read the received Short message.

For example, if you need to send the message “Stolen at home!” to the mobile phone 13991885678, the MCU first sends AT CMGS=25 to the GSM module through the serial port, waits for the return of the ASCII character “>”, and then outputs the PDU data string and ends with the Ctrl Z key. The sending procedure is as follows:

4 Conclusion

This design scheme provides a flexible and convenient wireless solution for the construction of the security system with the help of the short message service of the GSM network and the Zigbee network technology. The system has good scalability and practical value, can realize all-round security monitoring and protection, and its very important point is that the system can reliably communicate with users through a wireless network, which enhances the security and reliability of the system Sex and concealment.

The Links:   MIG20J503H 2MB1300NB-060

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *