"The smart home controller introduced in this paper uses ZigBee technology to form a unified smart home system with many relatively independent household appliances in the family, so as to facilitate local operation of various electrical equipment in the home. At the same time, it can also realize remote control of various electrical equipment through the Internet or GPRS system.
ZigBee is a new wireless network technology with short distance, low complexity, low power consumption, low data rate and low cost. It has a wide application prospect in many fields.
Smart home is a multi-functional comprehensive technology system. It takes the family house as the platform and uses advanced computer technology, communication technology, network technology, control technology and information technology to organically connect various electrical equipment in the family through some form of network for networked comprehensive management and regulation, so as to provide people with a comfortable, safe Convenient, environment-friendly and efficient living environment
The smart home controller introduced in this paper uses ZigBee technology to form a unified smart home system with many relatively independent household appliances in the family, so as to facilitate the local operation of various electrical equipment in the home. At the same time, it can also realize remote control of various electrical equipment through the Internet or GPRS system.
1、 Introduction to ZigBee Technology
ZigBee technology is a wireless connection technology that has been gradually developed in recent years and has great market potential. It was born to meet the requirements of low power consumption, low data volume and low cost wireless network. It is based on the 80211514 standard of IEEE wireless personal area network (WPAN) working group, which is called ZigBee technical standard.
The complete ZigBee protocol consists of application layer, application aggregation layer, network layer, data link layer and physical layer, as shown in Figure 1.
Ieee80211514 standard defines physical layer (PHY) and data link layer (MAC); The protocols above the network layer are formulated by ZigBee alliance. The application layer includes application support sublayer (APS), ZigBee device object (ZDO) and application object formulated by the manufacturer.
ZigBee relies on independent working nodes and uses wireless communication to form three network structures: star, mesh and cluster through self-organization. Therefore, the functions of each node are not exactly the same. In order to reduce the cost of the system, ieee80211514 defines two physical device types: full function device (FFD) and reduced function device (RFD). FFD node has the function of controller, provides data exchange, can be used as network coordinator, routing node and terminal node, and can communicate with any type of equipment in the network; RFD can only be used as a terminal node and can only communicate with FFD. Communication between two RFD nodes is not allowed.
ZigBee, a wireless communication technology, has the characteristics of short distance, low complexity, low power consumption, low data rate, low cost, safety and reliability, large network capacity, strong self-organization and self-healing ability. It can be widely used in many technical fields and has broad market prospects.
2、 Design of smart home controller based on ZigBee Technology
The network communication of smart home system has the following characteristics:
① The amount of data transmitted is small, and there is no need for too high transmission speed; ② The capacity of the network is large to meet various household appliances in the family; ③ The real-time performance of information is good and the delay is short.
ZigBee's technical characteristics determine that it can well meet the above requirements of smart home network, especially with the ability of self-organization and self-healing. Such wireless communication technology is an ideal communication mode of smart home system.
1. Basic composition of energy home system
Smart home system can realize information interconnection through GSM / GPRS / CDMA / network, ZigBee personal area network, Internet and community information network. Users can control home appliances and lighting devices through mobile phones outdoors, and can also get alarm information such as anti-theft, fire prevention and gas leakage in time; Home appliances can be controlled by remote control at home. The controller also has the function of indoor host of visual intercom system, which can check all kinds of information released by the community, and send alarm and rescue signals to community security when necessary. The system is mainly composed of a smart home controller and several indoor monitoring ZigBee function modules. The system model is shown in Figure 2. The smart home controller realizes the interconnection of information with external facilities through two wireless communication networks, the Internet and two wired communication lines. Therefore, the smart home controller can be regarded as a digital home gateway.
The smart home controller is equipped with a mobile phone module, which can send and receive two-way short messages with the user's mobile phone through GSM (GPRS, CDMA) mobile communication network. Users can realize the power switch control, dimming and speed regulation control of household appliances through mobile phone short message; The controller sends an alarm signal to the user's mobile phone in the form of mobile phone short message for anti-theft, fire prevention, gas leakage and family emergency alarm.
A ZigBee module is installed inside the controller, which communicates with the monitoring device in the home through zig2bee wireless network and is used as ZigBee network coordinator (FFD). It is responsible for establishing smart home ZigBee network, receiving the instructions sent by the system control center and making corresponding processing. At the same time, the data received from the routing node (FFD) or terminal node (RFD) shall be sent to the system control center.
Indoor monitoring equipment can be divided into three categories according to purpose: the first category is switches and sockets. The simplest socket realizes the power switch control of household appliances (such as rice cookers, water dispensers, televisions, refrigerators, air conditioners, washing machines, electric curtains and lamps that do not need dimming) through the on-off of small electronic switches; More complex intelligent switches and sockets have the function of adjustable output power, which are used for dimming of chandeliers and floor lamps or speed regulation of electric fans. The second category is sensor products, in which pyroelectric infrared sensor and door magnetic sensor are used for anti-theft, smoke sensor is used for fire prevention, gas sensor is used to prevent gas leakage, and manual alarm button is used for alarm of emergencies (such as sudden onset of disease for the elderly). These nodes are equipped with ZigBee module as the terminal node (RFD) of the network. The third type is the handheld remote controller, which not only realizes the switching control and dimming speed regulation control of household appliances, but also has the function of lighting scene setting and control.
If the community is equipped with property management communication network and access control intercom system, the controller also has the function of indoor host of visual access control intercom system.
The LCD screen on the controller can display the image of the visitor and talk to the visitor or unlock the door. In addition, the controller can receive various text messages sent by the property management of the cell; When an indoor accident occurs, an alarm signal can be sent to the property management of the community. The controller is equipped with an Internet interface for users to control the operation of home appliances through the Internet and monitor events at home. The advent of the next generation Internet will provide great support for the application of this function. At that time, each home appliance and controller will have its own static IP address, so as to become a member of the network.
ZigBee cluster network integrates the characteristics of star and mesh structure. In practical application, we use smart home controller and ZigBee sensor nodes to form cluster network. It has good scalability. For large family or villa users, the network coverage can be expanded by adding routing nodes; For small family users, they can turn into a star network by reducing routing nodes, so as to save energy and speed up data transmission.
2. Hardware design of home controller
2.1 introduction to home controller
The core component of smart home system is smart home controller. Its composition block diagram is shown in Figure 3. It takes the embedded processor as the center and is composed of mobile phone module, ZigBee module and necessary auxiliary interfaces. Smart home controller is the control center of the whole smart home system, and its hardware core is the CPU. All tasks such as equipment control, task scheduling, communication protocol conversion, data transceiver and data management need the CPU. In terms of function, scalability, operating system support and power consumption, we choose the powerful 32-bit ARM9 microprocessor S3C2410X as the main processor, and 64M NAND flash and 64M SDRAM as the memory.
In terms of man-machine interface, 5-inch TFT LCD screen and corresponding touch screen are adopted. It can be used to display visitor images and various information sent by the property management of the community, and enable users to easily input data to control various household devices. In addition, in order to make the control mode more flexible, the keyboard interface is designed by using the I2C bus interface of the processor, so that various control and alarm modes can be expanded. The controller has two communication modules: mobile phone module and ZigBee module. The mobile phone module is composed of host module, SIM card interface, audio part and RF part, and adopts SIM300 chip (GPRS module) produced by simcom company. The standard RS - 232 interface is used for data transmission with arm, and the operation of the module is completed by using at command to realize the sending and receiving of short messages. ZigBee module collects the operation status of various household appliances and receives various fault alarm information, and transmits data with arm through RS - 232 interface.
The controller is equipped with Ethernet interface. With the web server established on the controller, users can monitor the home environment and various household appliances through the Internet. The RS - 485 interface in Figure 3 is used to communicate with the property management of the cell (cooperate with the original cell network). If it is a new cell, Ethernet interface can be directly used). Two USART transceivers of ARM9 can be combined into two RS - 232 ports and one RS - 485 port by MAX3232.
The audio interface is composed of the internal IIS bus interface of the microprocessor and the external audio digital signal encoder chip (UDA1341TS).
The video interface adopts the DSP chip of core micro to convert the video signal into JPG file format or binary image stream that can be processed by the microprocessor, and then send it to LCD screen for display after processing.
2.2 ZigBee module in home controller
ZigBee module adopts the type of full function device (FFD). It plays the role of network coordinator in the smart home system and can provide two-way transmission of information to connect other reduced function devices (RFD) in the smart home system.
CC2430 chip extends the architecture of the previous CC2420 chip and integrates ZigBee RF front-end, memory and microcontroller on a single chip. It uses an 8-bit MCU (8051), with 128KB programmable flash memory and 8KB ram. It also includes analog-to-digital converter, 4 timers, AES - 128 coprocessor, watchdog timer, 32kHz crystal oscillator sleep mode timer, power on reset circuit, power down detection circuit, and 21 programmable I / O pins.
CC2430 chip adopts 0118 μ M CMOS process, the current loss during operation is 27ma; In the receive and transmit modes, the current loss is less than 27ma or 25mA respectively. The sleep mode of CC2430 and the ultra short time characteristics of switching to active mode are especially suitable for applications requiring very long battery life.
CC2430 has two powerful us2art communication interfaces supporting several groups of protocols. Through one of these communication interfaces, S3C2410X processor can write or read configuration information to CC2430, or send and receive data. CC2430 chip integrates the functions of CRC and data integrity check, which reduces the programming workload of programmers, speeds up the communication speed and reduces the energy consumption. At the same time, the chip also uses cs2ma - CA technology to avoid competition and conflict in data transmission and reduce some unnecessary energy consumption. Therefore, CC2430 chip has ultra-low energy consumption, its service life can be calculated in years, and the price is cheap, which is in line with the characteristics that sensor networks need a large number of distributed nodes.
The controller uses ZigBee module to collect the operation status of various household appliances and receive various fault alarm information through RS - 232 interface.
3. Function of home controller
The operating system of smart home controller adopts the open-source embedded Linux operating system, which is transplanted to the controller hardware platform after reduction. The smart home controller integrates Linux, arm system, mobile phone module and ZigBee module to form a fully functional embedded system. It can easily realize the wireless connection of multiple nodes within the family by using ZigBee technology. The functions of smart home controller are
(1) 32-bit embedded RISC processor based on ARM architecture and open source embedded Linux operating system;
(2) It is not only the control center of smart home control system, but also the gateway of information appliance platform in home system;
(3) In case of theft or disease, press the emergency button to automatically report to the management center;
(4) It is configured in the family, and the LCD screen is used to display the cell notification, the working status and data of each part of the system;
(5) ZigBee sensor node is used to monitor various fault alarm data (fire, gas leakage, etc.) and automatically send it to users or community management center through mobile phone module;
(6) Communicate with the cell management center through Ethernet (or RS - 485);
(7) The wireless ZigBee module on the controller communicates with each sub node in the home system to control a variety of home appliances accordingly;
(8) Users can remotely monitor a variety of home devices through the Internet.
The smart home controller collects the operation status of various home appliances through ZigBee module and stores various fault alarm data in the database; Give priority to the fault alarm, automatically send short messages to the user's mobile phone or community property management through the mobile phone module, and store the on-site data in the database in real time, so as to further analyze and count various information. Here, the database becomes the middleware connecting the front and background, stores status data for remote monitoring and local LCD display, receives browser and local keyboard input, and completes the download of control commands and the upload of running status by communication program and CGI program; At the same time, the database also needs to realize fault analysis, statistics and query. In this system design, we use the embedded database SQLite to meet the requirements of system remote control data transmission and data sharing.
The software of the controller is mainly divided into four modules: communication program with data acquisition interface, fault alarm program, local human-computer interaction program and remote control program. In order to enable users to control the smart home network through the browser on the Internet, it is necessary to set up a web server on the controller (digital home gateway) to communicate with users, and call the background CGI program through the CGI interface. The CGI program establishes the connection between the web server and the control program, calls the specific control program, and realizes the specified operation of the internal nodes of the smart home network. It monitors the network, knows the status of devices in the network and controls the network anytime and anywhere
Our other product: