ZigBee is an emerging short-range, low-complexity, low-power, low-data-rate, low-cost wireless network technology that has broad application prospects in many fields.
Smart home is a multifunctional integrated technology system. It uses the family residence as a platform and utilizes advanced computer technology, communication technology, network technology, control technology, and information technology to organically connect various electrical appliances in the home through some form of network, conduct networked integrated management and regulation, and provide people with a comfortable, safe, convenient, environmentally friendly and efficient living environment.
The smart home controller introduced in this article uses ZigBee technology to connect many relatively independent household appliances in the home into a unified smart home system, so as to facilitate local operation of various electrical appliances in the home, and also to realize remote control of various electrical appliances through the Internet or GPRS system.
1 Introduction to ZigBee Technology
ZigBee technology is a wireless connection technology that has gradually developed in recent years and has great market potential. It was born to meet the requirements of low-power, low-data-volume and low-cost wireless networks. It is based on the 80211514 standard of the IEEE Wireless Personal Area Network (WPAN) Working Group and is called the ZigBee technology standard.
The complete ZigBee protocol consists of the application layer, application convergence layer, network layer, data link layer and physical layer, as shown in Figure 1.
The IEEE80211514 standard defines the physical layer (PHY) and the data link layer (MAC); the protocols above the network layer are developed by the ZigBee Alliance, and the application layer includes the application support sublayer (APS), ZigBee device object (ZDO) and application objects developed by manufacturers.
ZigBee relies on independent working nodes, uses wireless communication, and forms 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 types of physical devices: full-function device FFD (Full Function Device) and reduced function device RFD (Reduced Function Device). FFD nodes have the functions of controllers, provide data exchange, can be used as network coordinators, routing nodes, and terminal nodes, and can communicate with any type of device in the network; RFD can only be used as a terminal node and can only communicate with FFD. Two RFD nodes cannot communicate with each other.
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, self-organization, and strong self-healing ability. It can be widely used in multiple technical fields and has broad market prospects.
2 Design of smart home controller based on Zigbee technology
The network communication of the smart home system has the following characteristics:
① The amount of data transmitted is small, and a very fast transmission speed is not required; ② The network capacity is large to meet the needs of various household appliances in the home; ③ The information is real-time and has short delays.
ZigBee's technical features determine that it can well meet the above requirements of smart home networks, especially its self-organization and self-healing capabilities. Such wireless communication technology is an ideal communication method for smart home systems. [page]
2.1 Basic composition of energy-saving home system
The 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 prevention in time; at home, they can control home appliances through remote controls. The controller also has the function of indoor host of the video intercom system, which can check various information released by the community and send alarm signals to community security when necessary. The system mainly consists 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 information interconnection with external facilities through two wireless communication networks, the Internet and two wired communication lines, so the smart home controller can also 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 the GSM (GPRS, CDMA) mobile communication network. Users can control the power switch, dimming and speed control of household appliances through mobile phone short messages; the controller sends alarm signals to the user's mobile phone in the form of mobile phone short messages for anti-theft, fire prevention, gas leakage prevention and home emergency alarm.
The controller is equipped with a ZigBee module, which communicates with the monitoring devices in the home through the Zig2Bee wireless network and is used as a ZigBee network coordinator (FFD). It is responsible for establishing the smart home ZigBee network, receiving instructions sent by the system control center, and making corresponding processing. At the same time, it also sends the data received from the routing node (FFD) or the terminal node (RFD) to the system control center.
Indoor monitoring equipment can be divided into three categories according to their uses: the first category is switches and sockets. The simplest sockets realize the power switch control of household appliances (such as rice cookers, water dispensers, TVs, refrigerators, air conditioners, washing machines, electric curtains, and lamps that do not require dimming) by turning on and off small electronic switches; more complex intelligent switches and sockets have the function of adjustable output power, which is used for dimming of chandeliers, floor lamps or speed regulation of electric fans. The second category is sensor products, among which pyroelectric infrared sensors and door magnetic sensors are used for anti-theft, smoke sensors are used for fire prevention, gas sensors are used for gas leakage prevention, and manual alarm buttons are used for emergency alarms (such as sudden illness of lonely elderly people). These nodes are equipped with ZigBee modules as terminal nodes (RFD) of the network. The third category is handheld remote controls, which, in addition to realizing the switch control, dimming and speed control of household appliances, also have the functions of lighting scene setting and control.
If the community is equipped with a property management communication network and a door access intercom system, the controller also functions as the indoor host of the video door access intercom system.
The LCD screen on the controller can display the visitor's image and conduct intercom or unlocking operations with the visitor. In addition, the controller can receive various text messages sent by the community property management; when an accident occurs indoors, it can send an alarm signal to the community property management.
The controller is equipped with an Internet interface, which allows users to control the operation of home appliances through the Internet when they are away from home, and monitor events happening at home. The advent of the next generation of the Internet will provide great support for the application of this function. By then, each home appliance and the controller itself will have its own static IP address, thus becoming a member of the network.
ZigBee's cluster network combines the characteristics of star and mesh structures. In practical applications, we use smart home controllers and ZigBee sensor nodes to form a cluster network. It has good scalability. For users of large apartments or villas, the network coverage can be expanded by adding routing nodes; for users of small apartments, the network can be reduced to form a star network to save energy and speed up data transmission.
2.2 Hardware Design of Smart Home Controller
2.2.1 Introduction to Smart Home Controller
The core component of the smart home system is the smart home controller. Its block diagram is shown in Figure 3. It is centered on an embedded processor and consists of a mobile phone module, a ZigBee module, and necessary auxiliary interfaces. The smart home controller is the control center of the entire smart home system. Its hardware core is the central processing unit. All tasks such as device control, task scheduling, communication protocol conversion, data transmission and reception, and data management require the central processing unit. Considering the functions, scalability, operating system support, and power consumption, we choose the powerful 32-bit ARM9 microprocessor S3C2410X as the main processor, and the memory uses 64M NAND Flash and 64M SDRAM.
In terms of human-machine interface, a 5-inch TFT LCD screen is used and equipped with a corresponding touch screen. It can be used to display visitor images and various information sent by the community property management, and allows users to easily input data to control various home appliances. In addition, in order to make the control method more flexible, the keyboard interface is designed using the processor's I2C bus interface, so that various control and alarm methods can be expanded.
The controller has two communication modules: mobile phone module and ZigBee module. The mobile phone module consists of a host module, a SIM card interface, an audio part and a radio frequency part, and uses the SIM300 chip (GPRS module) produced by SIMCOM. The standard RS-232 interface is used for data transmission with ARM, and the module is operated by using AT commands to realize the sending and receiving of short messages. The Zigbee module collects the operating status of various household appliances and receives various fault alarm information, and transmits data with ARM through the RS-232 interface.
The controller is equipped with an Ethernet interface. With the Web server built on the controller, users can monitor the home environment and various home appliances through the Internet. The RS-485 interface in Figure 3 is used to communicate with the community property management (coordinated with the original community network. If it is a new community, the Ethernet interface can be used directly). Using MAX3232, the two USART transceivers of ARM9 are combined into two RS-232 ports and one RS-485 port.
The audio interface is composed of the IIS bus interface inside the microprocessor and the external audio digital signal encoder chip (UDA1341TS).
The video interface uses SMIC's DSP chip to convert the video signal into a JPG file format or binary image stream that can be processed by the microprocessor, and then send it to the LCD screen for display after processing. [page]
2.2.2 Zigbee module in home controller
The ZigBee module adopts the full-function device (FFD) type. 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.
This module uses Chipcon's CC2430 chip, which uses the architecture of the previous CC2420 chip and integrates the ZigBee radio frequency (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, and also includes an analog-to-digital converter, 4 timers, AES-128 coprocessor, watchdog timer, sleep mode timer with 32kHz crystal oscillator, power-on reset circuit, power-off detection circuit, and 21 programmable I/O pins.
The CC2430 chip is produced using 0118μm CMOS technology, and the current consumption during operation is 27mA; in receive and transmit modes, the current consumption is less than 27mA or 25mA respectively. The CC2430's sleep mode and ultra-short time to switch to active mode are particularly suitable for applications that require very long battery life.
CC2430 has two powerful US2ART communication interfaces that support several protocols. Through one of these communication interfaces, the S3C2410X processor can write or read configuration information to CC2430, and can also send and receive data.
The CC2430 chip integrates functions such as CRC and data integrity check, which reduces the workload of programmers, speeds up communication, and reduces energy consumption. At the same time, the chip also uses CS2MA-CA technology to avoid competition and conflict when sending data, reducing some unnecessary energy consumption. Therefore, the CC2430 chip has ultra-low energy consumption, its service life can be calculated in years, and it is cheap, which meets the characteristics of sensor networks that require a large number of distributed nodes.
The controller uses the Zigbee module to collect the operating status of various household appliances and receive various fault alarm information through the RS-232 interface.
2.3 Functions of the home controller
The operating system of the smart home controller uses an open source embedded Linux operating system, which is ported to the controller hardware platform after being tailored. The smart home controller integrates Linux, ARM system, mobile phone module and ZigBee module into a whole, forming a fully functional embedded system, and using ZigBee technology to easily achieve wireless connection of multiple nodes within the home.
The functions of smart home controller are
(1) Using ARM architecture 32-bit embedded RISC processor and open source embedded Linux operating system;
(2) It is the control center of the smart home control system and the gateway of the information appliance platform in the home system;
(3) In case of theft or illness, press the emergency button to automatically report the incident to the management center;
(4) Configured on a family basis, using an LCD screen to display community notifications, the working status and data of each part of the system;
(5) Use ZigBee sensor nodes to monitor various fault alarm data (fire, gas leakage, etc.) and automatically send them to users or community management centers through mobile phone modules;
(6) Communicate with the community management center via Ethernet (or RS-485);
(7) Communicate with each sub-node in the home system through the wireless ZigBee module on the controller to control various home appliances accordingly;
(8) Users can remotely monitor various home devices at home via the Internet.
The smart home controller collects the operating status of various household appliances through the Zigbee module and stores various fault alarm data in the database; it gives priority to fault alarms, automatically sends short messages to the user's mobile phone or community property management through the mobile phone module, and stores the on-site data in real time in the database for further analysis and statistics of various information. Here, the database becomes the middleware connecting the front and back ends, storing status data for remote monitoring and local LCD display, while receiving browser and local keyboard input, and the communication program and CGI program complete the download of control commands and upload of operating status; 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: the communication program with the data acquisition interface, the fault alarm program, the local human-computer interaction program and the remote control program. In order to enable users to control the smart home network through a browser on the Internet, it is necessary to set up a Web server on the controller (digital home gateway) to communicate with the user and call the background CGI program through the CGI interface. The CGI program establishes a connection between the Web server and the control program, calls the specific control program, and implements the specified operation of the internal nodes of the smart home network. It monitors the network, knows the status of the devices in the network anytime and anywhere, and controls various devices in the network. Network monitoring is also very important in the home network, allowing users to understand the status of the network at any time, such as the entry and exit of devices, device failures, etc.
3 Conclusion
ZigBee technology fills the gap in the low-cost, low-power and low-rate wireless communication market. The smart home controller hardware consists of an advanced ARM9 embedded system, a mobile phone module and a ZigBee module; the operating system uses embedded Linux, and the home network uses a ZigBee wireless network, which has good security and complete system functions, and can meet the needs of future smart home development.
Previous article:Design and implementation of remote wireless monitoring system based on ARM
Next article:Implementation and Application of MODBUS Protocol Based on ARM Cortex-M3
Recommended ReadingLatest update time:2024-11-16 17:54
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Tuya Sandwich Wi-Fi & BLE SoC NANO Main Control Board WBRU+ Unboxing
- Why use WDM-PON in 5G fronthaul
- 【Iprober 520 Current Probe】Evaluation Report (II) Basic Performance Test
- MicroPython Hands-on (28) - Yeelight for the Internet of Things
- Basic operations and precautions for exporting Gerber files from PCB design (Part 1)
- Allegro cannot be installed due to VC2005. Is there any way to fix this?
- Has anyone used Sensortile Box? Please help~
- The serial clock SCL and serial data SDA of the PROM are connected to the master MCU and then to the SC of the clock IC...
- Cost-cutting design cannot be delayed
- A negotiation on salary and shares