Design of remote control car based on speech recognition

Publisher:Joyful222LifeLatest update time:2011-06-08 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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

Reference address:Design of remote control car based on speech recognition

Previous article:Application of COM Component Technology in Fieldbus Control System Configuration Software
Next article:Application of CAN bus solution in wire drawing machine

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号