Intelligent electronic technology is widely used in smart home electronic products in real life. Especially with the rapid development and improvement of computer technology, network communication technology and information control technology, the family has realized the modernization of life and the comfortable and safe living environment. Smart home appliances integrate or control home electrical and electronic products by processing electronic technology, making home life more comfortable, safe and effective. Compared with ordinary household appliances, intelligent household appliances not only have the functions of traditional household appliances, but also can change the original passive static structure into an intelligent tool with active voice recognition and execution according to people’s voice command, optimize people’s lifestyle, help people effectively arrange their time, and enhance the safety and comfort of home life. In this paper, through the transformation of the traditional home lighting system, electric fan and TV, it becomes an intelligent home appliance with speech recognition function. Due to the limitation of conditions, the intelligent control system designed in this paper is simulated by driving LED display.
The voice output circuit is shown in the figure, in which vddh is the reference voltage and VSS is the analog ground of the system. The audio signal is output from the DAC pin of SPCE061A to the J4 end of the circuit, and is sent to the integrated audio power amplifier spy0030 through the adjusting end of the volume potentiometer R9. After audio amplification, the audio signal is output from the spy0030 and plays sound through the external speaker of the J2 port. SPCE061A has built-in 2-way 10 bit precision DAC, which only needs external power amplifier circuit to complete voice playback. The spy0030 in the figure is an audio amplifier chip of Sunplus, which can work in the range of 2.4 ~ 6V, and the maximum output power can reach 700MW. J5 is the voice output interface,; It is a two pin pin external horn, which is integrated by DAC output pin through voice.
The amplifier spy0030 amplifies and outputs. The spy0030 is an audio power amplifier. Because sound is waves of different amplitudes and frequencies, that is, AC signal current, the collector current of the triode is always equal to the base current β Times, β If a small signal is injected into the base, the current flowing through the collector will be equal to half of the base current β Then the signal is isolated by a DC isolation capacitor, and the current (or voltage) is the original β This phenomenon is called triode amplification. Through the common amplification of current and voltage, the power amplification is completed. R14 is an adjustable resistor. When the resistance value is adjusted, the input signal of the base is adjusted, and the final effect is the output signal, that is, the voice output volume. The magnification of spy0030 is fixed at 20 times.
The voice input circuit is shown in the figure, in which VMC provides the power supply for the microphone, avss1 is the analog ground of the system, VCM is the reference voltage, pin 1 and pin 2 are the positive and negative input pins of microphone X1 respectively, which are connected to the micp and NICn pins of SPCE061A. When speaking to the microphone, the 1-pin and 2-pin will generate different waveforms with the input sound of the microphone, and form two reversed waveforms at the two ports of SPCE061A, which are sent to the operational amplifier of SPCE061A controller for audio amplification. The amplified audio signal is converted into digital quantity through ADC converter and saved in the corresponding register. The A / D converter of SPCE061A has eight channels, one of which is mic-ni input. It is specially used for sampling speech signals. Voice signal is converted into electrical signal by MCI, and then input to SPCE061A internal preamplifier. Because the distance between the microphone and the mouth is different when people speak, the energy of the voice signal will be greatly different. At this time, if the input signal of the chip is too large or too small, the recognition accuracy will be affected. In spce06la, there is an automatic gain control circuit. AGC can track and monitor the output audio signal level of the preamplifier at any time. When the input signal increases, AGC circuit will automatically reduce the gain of the amplifier; When the input signal is reduced, the AGC circuit will automatically increase the gain of the amplifier, so as to compensate the signal that is too small or too large, so as to keep the signal entering the user a / D at the optimal level and minimize the clipping. SPCE061A chip has integrated audio input ADC and AGC amplifier circuit, because the external circuit of this chip is relatively simple.
Micp and MICn will change with the waveform generated by mic, and form two inverse waveforms at the two ports. After two-stage operational amplifier amplification, the amplified voice signal will be sent to ADC to convert into digital quantity. At this time, these data can be processed through MCU programming, and speech processing and recognition can be carried out. As we mentioned before, board 61 has powerful voice processing function, as shown in Figure 3-8, X1 is the mic input of voice, with automatic gain (AGC) control.
Spr4096 extended flash module
In this system, when we train, recognize and operate the system, there are some voice prompts. Because SPCE061A has only 32K words of flash space, except for part of the space as the storage of the program, the rest is not enough to store voice data, so flash is expanded outside the system. The connection mode of spr4096 and SPCE061A is: SCK is connected to iob0 of SPCE061A, SDA is connected to iob1 of SPCE061A. Spr4096 works in serial interface mode, and CF2 ~ cf0 should be connected to high level. CF7 selects flash at low level and SRAM at high level. Spr4096 is a high performance 4m bit (512 & times; 8-bit) flash, divided into 256 sectors. 2kbyte per sector. Spr4096 also has a built-in 4K & times; 8 bit SRAM. When programming / erasing flash, read / write of SRAM can be executed concurrently. Spr4096 has a built-in bus memory interface and a serial interface, which allows MCU to access flash / SRAM memory area through 8-bit parallel mode or 1-bit serial mode. The working frequency of spr4096 serial interface can reach 5MHz. Spr4096 has two power inputs VDDi and VDDQ. VDDi supplies power to internal flash and control logic; VDDQ is dedicated to I / O power supply.
Supply voltage VDDQ: 2.25V ~ 3.6V. The maximum reading current of spr4096 is 2mA, and the maximum programming / erasing current is 6mA. Spr4096 module includes bus memory interface, serial interface, SRAM, programming and erasing controller and a 4m flash. When the serial interface is selected, SCLK is used as the clock signal line and SDA as the 1-bit data line. If the read instruction of flash or read / write instruction of SRAM is received, the serial port will send these instructions to the programming and erasing controller to complete the corresponding operation. The serial interface mode is selected through CF2 ~ cf0. When CF2 ~ cf0 are connected to high level, the serial interface mode is selected. In the serial interface mode, flash is selected when CF7 is at low level, and SRAM is selected when CF7 is at high level. The chip has two working modes: SIF (serial interface) and BMI (busmemory interface), but DIP24 only supports SIF mode.
Global leader in electronic measurement technology and marketUxm new product experience meetingWill be opened in the near future, welcome to participate in the industry, your arrival, will be the biggest honor of keysight!Please click the following picture to enter the registration address: