0 Preface
With the development of short-range wireless communication technology, technologies such as WLAN, Bluetooth, IrDA, HomeRF, and ZigBee have been gradually applied in many fields such as smart home, industrial control, and environmental monitoring, and speech recognition technology has been used as an interdisciplinary subject. Widely used in industries, home appliances, medical and other fields. The combination of speech recognition and wireless communication technology in the field of smart home enables people to directly control home appliances through voice, enabling 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, safe and reliable, self-organizing network. This paper combines the 16-bit SPCE061A MCU with rich voice processing function and the RF chip CC2530 to design the ZigBee speech recognition node. It can communicate with the smart home control gateway based on SUMSUNG S3C6410 development platform. The gateway is processing. After the information, the state of the control device can be displayed, and the ZigBee wireless network communicates with multiple child nodes in the home, thereby realizing the voice intelligent control of the home appliance.
1 overall system design
The overall structure of the system is shown in Figure 1. It mainly includes the gateway based on Samsung's S3C6410 platform, the voice ZigBee sub-node based on SPCE061A, the ZigBee sub-node controlled by electrical relay, and the ZigBee sub-node of electrical infrared control. Each child node and the gateway are connected by a star topology.
After the voice sub-node is trained, when the voice node collects and receives the voice control command, the voice recognition instruction is executed, and the CC2530 transceiver module sends the corresponding control command to the master node of the gateway. The master node will receive the control command and upload it to the gateway host through the serial port. After processing the information, the host sends the corresponding control command to the control child node through the master node, and the control child node executes the corresponding command after receiving the corresponding command. Action, 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 the serial port. S3C6410 is based on ARM1176JZF-S 16/
32-bit low power consumption, high performance RSIC general purpose processor. Its development platform has a wealth of peripheral interface resources. Among them, it can support 4 UART interfaces, support DMA and Interrupt mode, and the maximum speed can reach 3 Mb/s. The ZigBee master node starts and controls the ZigBee network as a coordinator when the system is started. When the network is established, it is responsible for receiving control information of the voice node and transmitting corresponding control information to each ZigBee child node.
(2) Voice sub-nodes. It consists of Sunplus Technology's SPCE061A MCU and ZigBec Transceiver Node Module. SPCE061A is a 16-bit microcontroller with Sun'n SPTM as the core. It has 8-channel 10-bit A/D conversion input function, microphone input mode with built-in automatic gain control function and audio output function of dual 10-bit DAC mode. When using the SAC M_S240 Sunplus audio coding method, it can accommodate 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 consists of a relay module and a ZigBee transceiver node. Since the mains voltage in China is around 220 V, in order to realize the control of some household appliances switches, the relay module is adopted, and the I/O pins of the CC2530 chip of the ZigBee communication module and its peripheral driving circuit are used to realize the connection of the relay module. With release control. It can control switch type electric appliances such as curtains and lights.
(4) Infrared control subnode. It consists of a learning infrared control module and a ZigBee transceiver sub-node. At present, the proportion of household appliances of the infrared remote control type is gradually increasing. Therefore, in this design study, a learning infrared control module is adopted, which communicates with the ZigBee transceiver sub-node through the serial port. First, use one or more infrared modules to learn the signals of the infrared remote controllers of existing home appliances (such as TVs, DVDs, air conditioners, projectors, etc.), and store the corresponding codes in the memory of the infrared module E2PROM, each code Corresponds to an address. When
When the ZigBee node receives an instruction and needs to control a certain home appliance, the infrared module will transmit the infrared emission coded data under the address according to the instruction, thereby realizing the voice control of the infrared type household appliance.
(5) ZigBee wireless transceiver module based on CC2530. The CC2530 is a system-on-chip based on the IEEE 802.15.4 protocol introduced by TI. Built-in enhanced single-cycle 8051 CPU with 8 KB of SRAM, 2 USARTs supporting multiple serial communication protocols, 21 general-purpose I/O pins, wide voltage range (2 to 3.6 V), low power consumption (active mode RX: 24 mA; active mode TX at 1 dBm: 29 mA) and power supply monitorability. In the ZigBee protocol stack, the UART has two modes, interrupt and DMA. In this design, the UART interrupt mode is adopted.
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 design process of the lower computer: the acquisition, processing and identification of digital voice signals; the receiving, transmitting and executing of control signals by ZigBee transceiver modules. In the PC software design, it is mainly based on Visual C++ serial communication programming.
The main program flow chart of the host computer is shown in Figure 2.
The S3C6410 development platform has four UART interfaces. In the research and design, the chip MAX 3232 is 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 sub-node through the serial port, displays the control command in text after processing the data, and sends control command data to the child node through serial communication with the ZigBee master node.
The UART data format of the single-chip SPCE061A is only one type, and serial communication with the CC2530 module is required according to the specified data format. The program was developed in Sunplus's μ'nSP IDE integrated development environment, and uses the speech processing functions and function libraries provided by Sunplus Technology. The flow sub-node program flow chart is shown in Figure 3.
Since the single-chip SPCE061A performs voice recognition, only five voice commands can be recognized at one time. In order to increase the voice commands that it can recognize, this paper uses a grouping method to identify multiple voice commands if the memory allows. The node is trained when the program is first used by the programming program. Under the voice prompt of the node, four sets of commands are sequentially input, and five voice commands are used for each component. In order to improve the quality of the recognition, each command needs to be trained twice. After the voice training is finished, the smart home system can be activated to control the home voice and realize the voice recognition of the non-specific person.
In order to realize the "re-training" and "stop recognition" control of ZigBee voice sub-nodes by using voice commands, it is convenient for practical application. In this paper, goto unconditional statements are used in the program design process. Some program source code is as follows:
When using the learning infrared transceiver module to control the infrared appliance, the control signal must first be learned, and the code to be transmitted corresponds to the serial port command output by the CC2530. The program flow chart of the control command electric appliance infrared control ZigBee sub-node is shown in Fig. 4.
Power X (Qingdao) Energy Technology Co., Ltd. , https://www.qdpowerxsolar.com