Voice Control Design of Smart Home System Based on ZigBee Node

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 communication with multiple child nodes in the home through the ZigBee wireless network, thereby realizing 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.

System block diagram

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 corresponding control command is sent to the master node of the gateway through the CC2530 transceiver module. 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 microcontroller 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, built-in microphone input mode with 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, this paper uses a learning infrared control module in the design research, 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.

Main program flow chart

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 under 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.

Voice subnode program flow chart

Since the single-chip SPCE061A performs voice recognition, it can only recognize 5 voice commands at a 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 arranged for each component. In order to improve the quality of recognition, each command needs to be trained twice. After the completion of the voice training, 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.

Voice subnode program flow chart

The nickel–cadmium battery (NiCd battery or NiCad battery) is a type of rechargeable battery using nickel oxide hydroxide and metallic cadmium as electrodes. The abbreviation NiCd is derived from the chemical symbols of nickel (Ni) and cadmium (Cd).

Pocket Type Nickel Cadmium Battery capacity range is from 10ah to 1200ah, have three series: low discharge rate, medium discharge rate and high discharge rate. 

Pocket Type Nickel Cadmium Battery

Nickel Cadmium Batterie,Nicd Battery Pocket Plate,Railway Nicd Battery,10~1200Ah Nicd Battery

Henan Xintaihang Power Source Co.,Ltd , https://www.taihangbattery.com

This entry was posted in on