.Introduction
With the development of computer technology, single-chip microcomputers, as a branch of computers, are widely used in industrial control, intelligent instruments, household appliances, high-tech toys and other fields. The development of voice technology has shortened the distance between human and machine interfaces and enhanced interactivity and intelligence. The intelligent remote control car with voice recognition function integrates voice recognition, wireless remote control and mechanical control. The single-chip microcomputer is the main control component to complete the predetermined tasks such as moving forward, backward and turning. However, general single-chip microcomputers do not have voice processing functions and require external special voice recognition chips. For example, the integrated voice recognition chip RSC-364 is used to complete voice recognition [1]. RSC-364 is an 8-bit MCU from Sensory Company. It is very convenient to connect with the 51 single-chip microcomputer, but it requires an external codec circuit, which makes the circuit complicated. Using Lingyang's SPCE061A with voice processing function as the control core can easily realize voice control [2~3], but because the SPCE061A microcontroller is placed in the car body, when the car is running, the noise of the motor and the surrounding environment will interfere with the recognition of voice commands, and the car will appear "cannot hear any sound" if the distance is a little far. This paper uses Lingyang's SPCE061A microcontroller combined with the infrared transmitter chip TX-2B to form the remote control part, which overcomes the defect that the chip will be affected by noise when it is in the car body, and has a certain reference value for equipment that needs to realize long-distance wireless voice control.
1. System overall structure
This system mainly includes voice recognition module, infrared remote control module and motor drive module. The overall structure of the system is shown in Figure 1. Lingyang SPCE061A microcontroller is responsible for voice recognition. After receiving the effective voice signal, it converts the voice signal into a digital signal and transmits it to the infrared transmitter chip TX-2B. The signal transmitted by TX-2B is received by the infrared receiver chip RX-2B, and then decoded to control the motor drive circuit, thereby realizing long-distance voice remote control of the car. Figure 1 Overall structure of the system
1.1 Speech Recognition
Lingyang SPCE061A single-chip microcomputer is a 16-bit controller with DSP computing function, built-in 8-channel 10-bit A/D and 2-way D/A converter, and its high processing speed enables it to have the ability of digital speech recognition. The software programming adopts C language and assembly language mixed programming, which integrates the advantages of the two languages and simplifies the programming process [4-5]. SPCE061A directly converts the voice analog signal into a voltage signal, and then through the built-in automatic gain control, the internal ADC module converts the signal into a digital signal, which is stored in the memory after encoding and matched with the original voice digital signal encoding in the memory for pattern recognition. If the recognition is successful, the corresponding command is transmitted from 61AIOA 0~IOA 3 to the control end of the infrared transmitter chip TX-2B.
1.2 Infrared remote control
TX-2B/RX-2B is a paired infrared transmitter and receiver chip produced by Silan. It is a paired remote control chip specially used for toy cars. It is manufactured using CMOS technology, has low power consumption, and an operating voltage of 1.5-5V. TX-2B/RX-2B already contains encoding circuits and decoding circuits. There is no need to perform software programming decoding on the received signal in the subsequent circuit, so the hardware circuit is simple. The infrared transmitter circuit is shown in Figure 2. Pins 1, 4, 5, and 14 in TX-2B are respectively the right turn (RIGHT), back (BACKWORD), forward (FORWORD), and left turn (LEFT) control terminals, which receive signals sent from IOA 0 to IOA 3 of 061A. The infrared receiver circuit is shown in Figure 3. RX-2B includes a built-in amplifier, an operator, and a latch. An external 250 kΩ resistor forms an RC oscillator to match the frequency of the transmitter circuit. After receiving the signal, RX-2B decodes and outputs the control signals of right turn, left turn, backward and forward through the corresponding pins 6, 7, 10 and 11, and transmits them to the motor drive circuit to control the car to produce corresponding actions.
1.3 Motor drive circuit
The car has a four-wheel structure. The two front wheels are steering mechanisms that control the car to turn left and right; the two rear wheels are forward and backward driving wheels. Both motors are DC motors, and the drive adopts an H-bridge power drive circuit. This circuit can easily realize the change of the motor's forward and reverse rotation [6], thereby controlling the car's left and right turn, forward and backward state change. Since the circuit is simple, it will not be described here.
2. System software design SPCE061A provides a good voice playback and recording mechanism and simple API interface programming, which greatly simplifies the software design of the car. This mainly describes the software design of voice recognition (including: voice training, voice recognition) and timer interrupt control.
2.1 Voice recognition
Lingyang SPCE061A makes the voice recognition function into a module and implements it through API function calls. The built-in SACM-LIB solves the problem of large storage space occupied by voice files. This design adopts SD mode. The car can only recognize the voice commands of specific users. The voice recognition process includes voice training and voice recognition [7]. The specific steps include the following:
2.1.1 RAM initialization Call int BSR_Delete SDGroup(0) for SRAM initialization. When the return value is 0, it means the erasure is successful. Otherwise, it returns -1.
2.1.2 Voice training Call int BSR_Train (int WordID, int TraindMode) for voice command training after power-on. BSR_TRAIN_TWICE means that each instruction is trained twice. If the training is successful, the return value is 0.
2.1.3 Voice recognition
Call int BSR_InitRecognizer(int AudioSource) for voice recognizer initialization. The voice recognizer turns on the FIQ_TMA interrupt with a sampling frequency of 8KHz and starts to fill the sampled voice data into the data queue of the voice recognizer.
2.1.4 Start real-time monitoring Call function VoidBSR_EnableCPUIndicator(void) to start real-time monitoring to ensure the normal execution of the recognizer.
2.1.5 Get recognition result Call int BSR_GetResult(void) to complete speech recognition and return the speech recognition result. Return value is 0, no command recognition; return value -1, the recognizer is stopped and not initialized; return value -2, recognition failure; recognition success returns the command number.
2.1.6 Stop recognition Call void BSR_StopRecognizer(void) to stop recognition. When calling this function, FIQ_TMA interrupt is closed.
The flow chart of the car voice training is shown in Figure 4. The voice recognition part is in the main function, and the setting of port A, that is, the logic control part of the car, is placed in the InitIO.asm file.
2.2 Timing Interrupt The motion control of the car is a combination of voice control and interrupt timing control. The car's movements are triggered by voice, and the car's motion state can be changed by voice commands while the car is driving. The timer is started at the same time as each action is triggered. If the car cannot receive voice commands normally for some reason, the interrupt service program will issue a command to stop the car when the timing time is up.
3. Conclusion
After testing, the designed car has an effective remote control distance of up to 5 meters, and the voice recognition rate for specific users can reach more than 95%. Within the effective range, the car can respond to the user's voice commands in real time, realize forward, backward, left and right turns, and there will be a voice response at each state change, which enhances interactivity. If no voice command is issued within 10 seconds, the car will stop automatically.
The innovation of this design is that it uses the Lingyang SPCE061A microcontroller with voice processing function and the dedicated infrared remote control chip TX-2B to form a remote control circuit, combining voice control with infrared remote control, enhancing the car's anti-noise ability, and increasing the controllable distance of the car. The system is easy to implement.
Previous article:Application of COM Component Technology in Fieldbus Control System Configuration Software
Next article:Application of CAN bus solution in wire drawing machine
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Live broadcast at 10 am today [The rapid growth of Renesas RA MCU family members helps build safe and stable industrial control systems]
- Evaluation Weekly Report 20220411: GigaDevice's value-for-money MCU F310 is here, TI's heterogeneous multi-core AM5708 thousand yuan industrial board
- Program space issues
- Buy more time with the Raspberry Pi Pico
- Is this seller a scam?
- RT-Thread device framework learning PIN device
- [Raspberry Pi Pico Review] 4. Connect Pico to the temperature sensor DS18B20 to read the temperature
- Qorvo's leading RF solutions
- 3.EV_HC32F460_UART debugging
- The basic physics of ultrasonic sensors and the time difference between received signals