Voice Control Design of Smart Home System Based on ZigBee Node

0 Preface

With the development of short-range wireless communication technology, WLAN, Bluetooth, IrDA, HomeRF, ZigBee and other technologies have been gradually applied to many fields such as smart home, industrial control and environmental monitoring, and voice recognition technology as an interdisciplinary subject has also been Widely used in industry, home appliances, medical and other fields. The application of voice recognition and wireless communication technology in the field of smart homes enables people to control home appliances directly through voice, and enables people to enjoy the application of modern technology in real life. ZigBee communication technology based on IEEE 802.15.4 protocol has the characteristics of low power consumption, low cost, short distance, safety and reliability, and self-organizing network. This article combines the 16-bit SPCE061A microcontroller with rich voice processing function of Lingyang Technology and the radio frequency chip CC2530 to design the ZigBee voice recognition node. It can communicate with the smart home control gateway based on the SUMSUNG S3C6410 development platform, and the gateway is processing. After the information, it can display the status of the control device and communicate with multiple sub-nodes in the home through the ZigBee wireless network, thereby realizing intelligent voice control of household appliances.

1 Overall system design

The overall structure of the system is shown in Figure 1. It mainly includes a gateway based on Samsung's S3C6410 platform, a voice ZigBee subnode based on SPCE061A, an electrical relay control ZigBee subnode, an electrical infrared control ZigBee subnode, etc. Among them, each child node and the gateway are connected by a star topology structure.

System block diagram

After training the voice sub-node, when the voice node collects and receives the voice control command, it executes the voice recognition instruction, and sends the corresponding control command to the gateway master node through the CC2530 transceiver module. The master node uploads the received control commands to the gateway host through the serial port. After processing the information, the host sends the corresponding control commands to the control sub-node through the master node. After receiving the corresponding commands, the control sub-node will execute the corresponding Action to control the controlled object.

2 System hardware design

(1) Gateway. The Samsung S3C6410 processor based on the ARM11 architecture is used to communicate with the ZigBee master node through a serial port. S3C6410 is based on ARM1176JZF-S 16 /

32-bit low power consumption, high-performance RSIC general-purpose processor. Its development platform has rich peripheral interface resources. Among them, can support 4 UART interfaces, support DMA and Interrupt mode, the maximum speed can reach 3 Mb / s. When the system starts, the ZigBee master node acts as a coordinator to start and control the ZigBee network. After the network is established, it is responsible for receiving the control information of the voice node and sending the corresponding control information to each ZigBee child node.

(2) Voice subnode. It is composed of SPCE061A single-chip microcomputer and ZigBec transceiver node module of Sunplus Technology. SPCE061A is a 16-bit micro-controller with μ'nSPTM as the core introduced by Sunplus Technology. With 8-channel 10-bit A / D conversion input function, built-in automatic gain control function microphone input mode and dual-channel 10-bit DAC mode audio output function. When using SAC M_S240 Lingyang audio coding method, it can hold up to 210 s of voice data. Therefore, it is widely used in the field of digital speech recognition.

(3) Electrical control relay sub-node. It is composed of relay module and ZigBee transceiver node. Since the mains voltage in China is around 220 V, in order to realize the control of some home appliance switches, a relay module is used, and the relay module is attracted by the I / O pin of the CC2530 chip of the ZigBee communication module and its peripheral drive circuit With release control. It can control switch-type appliances such as curtains and lights.

(4) Infrared control sub-node. It consists of learning infrared control module and ZigBee transceiver sub-node. At present, the proportion of infrared remote control type household appliances is gradually increasing. Therefore, this article uses a learning infrared control module in the design research, which communicates with the ZigBee transceiver sub-node through a serial port. First, use one or more infrared modules to learn the signals of the infrared remote control of the existing home appliances (such as TVs, DVDs, air conditioners, projectors, etc.), and store the corresponding codes in the infrared module memory E2PROM, each code Corresponds to an address. Deserve

When the ZigBee node receives a command and needs to control a certain home appliance, the infrared module will call the infrared emission code data at that address according to the command to transmit, thereby realizing the voice control of the infrared type home appliance.

(5) ZigBee wireless transceiver module based on CC2530. CC2530 is a system-on-chip based on IEEE 802.15.4 protocol launched by TI. Built-in enhanced single-cycle 8051 CPU, with 8 KB SRAM, 2 USARTs supporting multiple serial communication protocols, 21 general-purpose I / O pins, wide voltage range (2 ~ 3.6 V), low power consumption (Active mode RX: 24 mA; active mode TX at 1 dBm: 29 mA) and power supply power can be monitored and other features. In the ZigBee protocol stack, UART has two modes of interrupt and DMA. The UART interrupt mode is adopted in this design.

3 System software design

The system software design mainly includes the lower computer software and the upper computer software design. There are two key points in the programming process of the lower computer: the collection, processing and recognition of digital voice signals; the reception, transmission and execution of control signals by the ZigBee transceiver module. In the software design of the host computer, it is mainly based on the programming of serial communication based on Visual C ++.

The flow chart of the main program of the host computer is shown in Figure 2.

The flow chart of the main program on the computer

The S3C6410 development platform has four UART interfaces. In the research and design, the chip MAX 3232 was used to solve the serial communication level conversion between the CC2530 chip of the ZigBee communication module and the development platform. The host computer receives the control command data of the voice subnode through the serial port, displays the control command in text after processing the data, and sends the control command data to the subnode through the serial port communication with the ZigBee main node.

There is only one UART data format of the single chip SPCE061A, and serial communication with the CC2530 module is required according to the specified data format. The program is developed in the Sun's μ'nSP IDE integrated development environment, and uses the voice processing functions and function libraries provided by Sun Technology. The flowchart of the voice sub-node program is shown in Figure 3.

Flow chart of voice subnode program

Because the single chip SPCE061A can only recognize 5 voice commands at a time when performing voice recognition. In order to increase the voice commands it can recognize, this paper uses a grouping method, which can recognize multiple voice commands when the memory allows. When the node is used for the first time after the program is burned, the node must be trained. Under the voice prompt of this node, enter 4 sets of commands in sequence, 5 voice commands per group. In order to improve the quality of recognition, each command needs to be trained twice. After the voice training is completed, the smart home system can be activated to control the voice of the home and realize voice recognition of non-specific persons.

In order to use voice commands to achieve ZigBee voice sub-node "retraining", "stop recognition" and other controls to facilitate practical application, this article uses goto unconditional statements in the program design process, part of the program source code is as follows:

program

When using a learning infrared transceiver module to control infrared appliances, the control signal must first be learned, and the code to be sent corresponds to the serial port command output by CC2530. The control flow chart of the electrical appliance infrared control ZigBee child node is shown in Figure 4.

Flow chart of voice subnode program

Enershare's commitment to future-ready energy solutions for smart home innovations, Enershare's Energy Storage Systems create a flexible energy maintenance system for homeowners who want to take more control of their home energy use, it is intended to be used for Home Battery energy storage and stores electricity for solar self-consumption, load shifting, backup power, and off-the-grid use. you can use it anytime you want-at night or during an outage.

Solar Energy System

Large Solar Battery System,Large Electric Power System,Large Solar Energy Storage System,Solar Energy System Unit,Solar Panel Inverter Lithium Battery Unit,Off-grid Hybrid Solar Battery Energy Storage System

Shenzhen Enershare Technology Co.,Ltd , https://www.enersharepower.com