Design of Auto Air Conditioning Control System Based on Speech Recognition

Nowadays, more and more electrical appliances are used in automobiles, and there are more and more electrical switches that drivers need to manually operate, which not only increases the burden on drivers, but also affects driving safety. This article takes the STM32F103VET6 (hereinafter referred to as STM32) chip as the control core and uses a high-performance LD3320 voice recognition chip to design a voice recognition-based automotive air conditioning control system. The system can effectively control the car air conditioner with voice, reducing the driver's operating burden and ensuring safety during driving.

1 System hardware design

Using voice recognition technology, combined with various sensors to detect real-time detection of various parameters such as the environment inside and outside the body (such as air temperature, sunlight intensity, etc.) and the state of the refrigeration compressor. Compared with the set parameters, the microcontroller performs arithmetic processing Make judgments and output corresponding adjustment and control signals. The actuator is adjusted and corrected in real time to realize the all-round and multi-functional adjustment and control of the air environment in the cabin. The execution mechanism of the system mainly includes temperature damper motor, mode damper motor, circulating damper motor, blower, compressor, defrost control relay, etc. Figure 1 is a block diagram of the system structure.

Voice recognition automobile air conditioning control system structure

1.1 Main controller

The main controller is a 32-bit microcontroller STM32F103VET6 based on the ARM Cortex-M3 core, built-in 64 KB RAM, 512 KB Flash, and rich enhanced I / O ports and peripherals connected to the two APB buses. The collection of voice signals, the transmission and reception of voice signals and the output of automotive air conditioning control signals.

1.2 Voice recognition module

The voice recognition chip used is ICRoute's LD3320 chip. The chip integrates a speech recognition processor and some external circuits, including A / D converter, D / A converter, microphone interface, and sound output interface. The design of this chip focuses on energy saving and high efficiency. It does not require any auxiliary chips (such as Flash, RAM, etc.), and can be directly integrated into existing products to achieve voice recognition. The recognized keyword list can be edited arbitrarily and dynamically.

Auto air conditioning voice recognition system module

Referring to the LD3320 data sheet, the voice recognition control circuit uses LD3320 and STM32 to connect via SPI serial mode. The voice recognition module control circuit is shown in Figure 2. First, connect MD to a high level, and connect the chip clock signal CLK to the STM32 clock signal output pin MCO (PA8). Pin MBS is the microphone bias, connected to an RC circuit to ensure that it can output a floating voltage to the microphone.

1. 3 SD card storage module

To realize the voice recognition control system with human-computer interaction function, a large number of MP3 audio files need to be stored. In this system, MP3 audio playback files are stored on the SD card, and voice recognition keywords are also stored on the SD card, so you can easily change the keywords to be recognized without changing the program content. The main control STM32 reads the MP3 data from the SD card in turn and sends it into the LD33 20 chip, so that the sound can be output from the corresponding pin of the chip. The SD card hardware connection is shown in Figure 3. The SD card and STM32 communicate via SPI. Connect the SD card selection signal CS, the data input signal DI, the data output signal DO, and the clock signal SCLK to the PC11, PD2, PC8, and PC12 pins of STM32, respectively.

Voice controlled auto air conditioning system SD storage module

1.4 Sensor analog signal input module

The sensor analog signal is the input signal source of the control system. After the sensor converts the non-electricity physical quantity into electricity, it is not necessarily suitable for the direct application of the A / D converter. It must also be amplified, filtered, isolated and protected before it can be sent to the microcontroller. The single chip microcomputer detects whether the temperature and humidity of the system meet the requirements of users by detecting these sensor signals. Taking the temperature sensor in the car as an example, the hardware connection diagram of temperature signal acquisition is shown in Figure 4. This system adopts NTC's high-precision in-vehicle temperature sensor Rntc, Rntc and resistor R0 to divide it and input it to the microcontroller. The Rntc resistance value can be expressed approximately by the following formula:

Voice control car air conditioner sensor equation

Among them, R1 is the resistance value at the absolute temperature T1, T is the temperature to be detected, Rntc is the resistance value at that temperature, and the B value reflects the relationship between the temperature change and the resistance value change. The voltage obtained from the signal input terminal of the single chip microcomputer is:

Sensor equation for voice-controlled automotive air conditioning systemOne

Calculate the resistance of the current temperature sensor according to the voltage of formula (2), and then calculate the temperature to be detected by formula (1).

1.5 Compressor drive module

The power of the compressor is provided by the engine, and the important electronic component connecting the engine and the compressor is the electromagnetic clutch. According to the operating condition of the automobile air conditioner and the working voltage of the compressor switch, the single-chip microcomputer controls the relay to be closed or opened, thereby controlling the closing and opening of the electromagnetic clutch of the compression molding machine. Once the temperature of the evaporator is lower than the set value, the compressor stops working; otherwise, the compression molding machine keeps working normally and starts cooling. The evaporator of an automobile air conditioner is a heat exchanger, and the gas entering the evaporator is changed into cold wind through heat exchange, so as to achieve the purpose of cooling. Controlling the temperature of the evaporator is an important task of the automatic control system of the air conditioner.

Voice control compressor module of automobile air conditioning system

1. 6 air door motor drive module

The DC motor is used for the automobile air conditioner servo motor. Servo motors are divided into internal and external circulation motors, hybrid damper motors, and mode damper motors according to their functions. The motor is driven by two TA8083F series chips, each chip can drive two servo motors. The input port of the chip can be directly connected with the single chip microcomputer, and the pins PE0 ~ PE3 of the STM32 single chip microcomputer are connected with the drive chip DI1A, DI2A, DI1B, DI2B pins respectively. The hardware circuit is shown in Figure 5.

Voice controlled motor drive for air conditioning system

According to the different input signals, the working conditions of the motor are also different. The specific working conditions are listed in Table 1.

Voice-controlled automotive air conditioning system motor drive worksheet

1.7 Blower drive module

The blower drive circuit is shown in Figure 6. A four-in-one integrated operational amplifier LM2902 is used to amplify the PWM output signal T050 of the single-chip microcomputer, and the amplified signal Blwc is transmitted to the fan speed regulating module, thereby adjusting the speed of the blower. The microcontroller output signal Blowoff control is used as the switch signal for controlling the blower. 2SC2412 is used as a switch to control the operation of the blower. When the single-chip microcomputer outputs a high level, the 2SC2412 turns on, and the blower stops running; when the single-chip microcomputer outputs a low level, the 2SC2412 ends in the reverse direction, and the blower operates normally.

Voice control blower module of automobile air conditioning system

1.8 Rear defrosting drive module

The frost layer on the front and side windshields is usually used to adjust the position of the mode damper in the air duct of the car air conditioning system, and use the heating (or flowing air) generated in the air conditioning system to achieve the purpose of removing frost. For the defrosting of the rear windshield, the defrosting hotline is often used. The defrost hot wire is to glue several electric heating wires (nickel chromium wire) evenly inside the rear window glass, and the two ends of each wire are connected to form a parallel circuit. When voltage is applied to both ends, the electric heating wire will heat up and heat the glass, so as to prevent or remove the frost layer. After defrost control circuit shown in Figure 7. IG2 is the power supply of automobile air conditioner. The output signal Defr of the single-chip microcomputer controls the on and off of the relay through the transistor NIF5002N, thereby controlling the on and off of the defrosting hotline to achieve the purpose of post-defrosting.

2 System software design

The software design of this system is developed with C language and compiled with Keil uVision4 software. The development process is carried out in modular blocks. The main modules of the system include a voice recognition module, a voice playback module, an SD card module, and an air-conditioning control module.

2. 1 speech recognition module

The voice recognition module works in an interrupted manner. Its work flow is roughly chip initialization, writing recognition list, starting recognition, interrupt response and obtaining recognition results. The speech recognition process is shown in Figure 8. In the initialization procedure, it mainly completes soft reset, mode setting, clock frequency setting and FIFO setting. Before writing to the recognition list, first read the value of register B2 to check whether the LD3320 is idle; then, write the recognition speech list information into the LD3320's 05 and B9 registers, each recognition entry is standard Mandarin Chinese Pinyin (Lower case), use a space between every two Chinese Pinyin. After the voice recognition list is added, the value of register 35 is set to 45H. The larger the value set here, the greater the volume of the microphone, and the longer the recognition distance, but it may produce more false recognition; the smaller the value, the smaller the volume of the microphone, and the need to speak at close range to activate the voice recognition function. , The recognition rate is also high. Set the value of register 37 to 06H and start speech recognition to start speech recognition. If the microphone collects sound, an interrupt signal will be generated regardless of whether a normal result is recognized. After entering the interrupt function, first clear register 29 and register 02; then, check whether the B2 register is 0x21. If the value is 0x21, it means idle, you can detect the value of 2B; if it is 1, it means that there is a result of voice recognition. The value read from register BF is 0x35, it can be determined that it is a speech recognition process that ends normally. The register BA indicates that there are several recognition candidate results for speech recognition. Finally, the register C5 can be read to obtain the recognition result.

Auto air conditioning control voice recognition module

2.2 Voice playback module

The software design process for voice playback includes general initialization, MP3 playback initialization, playback volume adjustment, start playing sound, and interrupt response. In general initialization, first read register 06 continuously, which is equivalent to activating the chip; then, set the values ​​of related registers in order. When MP3 playback is initialized, first set the value of register BD to 02H to start the MP3 playback module; then, write 48H to register 17 to activate the DSP. The volume of the voice playback module is divided into 16 levels, expressed in 4-bit binary. Here, you need to set the value of bits 2 to 5 of register 8E to adjust the playback volume. When playing voice, first need to clear it to start playing position. Set the third bit of register 1B to 1, and then execute the loop. When the playback condition is true, the MP3 data is sequentially placed into register 01 (1 byte at a time), and the playback position value is increased by 1. When the third bit of register 06 is equal to 0 or the playback position is less than the total length of the MP3 file, the loop is exited. After the chip plays this segment, it will issue an interrupt request, and the interrupt function will continue to receive data until the FIFO-DA-TA is full or the sound data is over.

2. 3 SD card module

This module is divided into SD card initialization and SD card data reading. When the SD card is initialized, before sending the CMD command, if the chip select is valid, at least 74 clocks must be sent first, otherwise there may be a problem that the SD card cannot be initialized. Then, you can send the reset command CMD0. After sending the reset command, wait for 8 clock cycles, enter the SPI bus mode, and then send the CMD1 command. If the response signal is received correctly, it means that the SD card has been initialized and can accept subsequent read and write commands. After the initialization is complete, send the CMD17 read command. Determine whether the response value is all 0, and then determine whether the received data start token is 0xfe. If it is, you can receive the official data and CRC code.

2.4 Air conditioning control module

The air-conditioning control module mainly includes five sub-modules: a signal acquisition module, a damper motor control module, a blower control module, a compression molding machine control module, and a rear defrost control module. The air conditioning control flow is shown in Figure 9. First, the system is initialized. If the ignition switch starts normally, the signal acquisition module starts to collect sensor data, and according to the collected data, it is judged whether the fan starting condition is satisfied. If the conditions are met, the PWM duty ratio of the fan is set, and then the size of the air volume is adjusted. When the air volume meets the requirements, the next step is to determine whether the compressor starting conditions are met. If the conditions are met, the compressor is started; if the conditions are not met, it is determined whether the damper position meets the conditions. If the condition is not met, adjust the damper motor rotation until the condition is met. Finally, it is judged whether the defrost condition is satisfied, and if it is satisfied, the defrost relay is started after it is started.

Voice control car air conditioning system

In software design, methods such as instruction redundancy, software traps, and repeated setting of control words in various working modes are used to eliminate interference. Use the "Watchdog" timer to monitor the operation of the program in real time; use the CPU calculation and control functions, and use the arithmetic average method to implement digital filtering to eliminate the disturbance signal of the sensor channel.

Conclusion

This article introduces the automotive air conditioning control system based on speech recognition, and introduces the hardware circuit and software design in detail. This system has low development cost and superior performance. System testing shows that this system has certain application value and can be used in low-end and mid-range cars.

Special-shaped customized screen design novel, creative unique, beautiful shape, according to the use of environment and requirements to customize the corresponding material content, the product is particularly eye-catching.

Right Angle LED Display

Creative products widely used today include:Rubik's cube.Advertising player.Front flip display .Right Angle LED Display.Right Angle LED Display.Spherical LED Display ect. 

custermized screen

Spherical LED display

Customized Led Display

Customized Led Display,Color Full Led Display,Circular Led Display,Customized Led Display Screen

Shenzhen Vision Display Technology Co,.LTD , https://www.ledvdi.com