- Home >> Technical Service >> MCU
Voice Warning System Design
Traffic risk voice warning system based on ultrasonic and single chip technology
At present, when people drive cars on the road, they still mainly judge with the naked eye, observe the road conditions, and use signal lights to transmit information in the workshop. Secondly, my country's vehicle-mounted road traffic warning system is relatively backward. Generally, ultrasonic technology is only used in reversing radar, and the scope of application is relatively narrow. In vehicles, most voice warnings are still GPS-based speed limit and speeding reminders. At present, the car reversing radar is mainly a car safety system with a distance display of a digital tube or an LCD screen and a voice alarm with a buzzer. There are very few devices equipped with real-time measurement of the distance between vehicles and the speed of front and rear vehicles on the car. Most cars do not have their own "eyes", and the cost of equipment such as laser ranging is relatively high. Tube display speed or distance, easily distract the driver's attention, causing many accidents.
1. Design principle of traffic risk voice warning system
The car voice risk warning device in this work includes a single-chip microcomputer control circuit, an ultrasonic distance measuring sensor, a voice chip, etc. The device organically combines all components, and completes the measurement of the speed through the transmission and reception of ultrasonic waves. At the same time, the single-chip microcomputer works. Complete the voice broadcast project. When the system is working, two ultrasonic probes are used to transmit and receive ultrasonic waves respectively to measure distance and relative speed. This system can measure the speed and distance of the front and rear vehicles. When the distance between vehicles is less than 5m, the voice will prompt the real-time distance and its relative speed, so as to play the role of prompting and alarming. This system utilizes the one-chip computer to collect the ultrasonic signal cycle continuously. The system includes an ultrasonic sensor, a single-chip microcomputer control, and a voice chip. This design can measure distance and speed continuously, and after the data is processed by the single-chip microcomputer, it will give voice broadcast warning.
1.1 Selection of Ultrasonic Module
According to the design requirements of this system, apply T/R-40 ultrasonic sensor to this system.
Ultrasonic emission process: The emission circuit is mainly composed of ultrasonic emission transducer T40 and inverter 74LS04. When working, the 40kHz square wave signal output by the P1.0 port of the single-chip microcomputer is sent to an electrode of the ultrasonic transducer after passing through the first-stage inverter, and the other square wave signal is sent to the ultrasonic transducer after passing through the two-stage inverter. The other electrode is to apply the square wave signal to both ends of the ultrasonic transducer in the form of push and switch, so that the emission intensity of the ultrasonic wave can be improved. Two inverters are connected in parallel at the output end to improve the driving capability. On the one hand, the upper resistors R1 and R2 can increase the damping effect of the ultrasonic transducer and shorten its free oscillation time; on the other hand, it can improve the drive capability of the high-level output of the inverter 74LS04.
Ultrasonic receiving process: The ultrasonic receiving circuit is composed of a two-stage amplifier circuit, an ultrasonic sensor and a phase-locked loop circuit. Since the reflected wave signal received by the ultrasonic sensor is very weak, a two-stage amplifier circuit is used to amplify the signal received by the sensor. When the phase-locked loop circuit receives the signal whose frequency meets the requirements, it sends an interrupt request to the microcontroller. Since the frequency of the ultrasonic wave sent is 40kHz, the center frequency of the phase-locked loop is adjusted to 40kHz to help adjust the relevant components, and only respond to the signal of this frequency, avoiding the interference of other frequency signals. When the ultrasonic sensor receives the ultrasonic signal, it is sent to a two-stage amplifier for amplification, and the amplified signal enters the phase-locked loop for detection. If the frequency is 40kHz, a low-level interrupt request signal is sent from pin 8 to the P3.3 end of the microcontroller. Stop the timer's work after detecting low level.
1.2 Selection of MCU
According to the actual requirements of this system design, the AT89S51 single-chip microcomputer is selected as the single-chip microcomputer of this design. The 51 series single-chip microcomputer is fully compatible with the standard 52 series single-chip microcomputer in terms of hardware structure, instruction system and on-chip resources. The 51 series MCU has low power consumption and fast execution speed. The maximum clock frequency can reach 90MHz. It can be programmed in both applications and systems without occupying user resources.
1.3 Choice of voice chip
The ISD2560 voice chip has a recording and playback time of 32s~120s, and the sound quality is good. The chip contains an oscillator, adopts CMOS technology, and has the characteristics of automatic gain control, microphone preamplification, smoothing filter, anti-aliasing filter, speaker driver and EEPRIM array. The sampling frequency of the voice chip is 8kHz. The lower the sampling frequency of the same series of products, the longer the recording and playback time, but the passband and sound quality will be reduced. ISD2560 can repeat recording and playback 100,000 times. It is a permanent memory voice recording and playback circuit. ISD2560 saves the A/D and D/A converters and has a high degree of integration.
1.4 Working principle of distance and relative speed calculation
When the system measures the distance and speed, the ultrasonic sensor installed on the same horizontal line emits ultrasonic waves. After encountering obstacles, the ultrasonic waves are reflected back and accepted by the receiver, and then the distance is determined by the time of ultrasonic reflection. The specific operation is firstly that the ultrasonic emitting probe emits ultrasonic waves in the direction of reversing. At the same time, the timer starts to work and records the time. As long as the ultrasonic waves encounter obstacles on the way in the air, they will be reflected back. When the ultrasonic receiver receives After reaching the reflected wave, a negative pulse will be sent to the microcontroller to stop timing immediately. In this way, the timer can accurately record the time it takes for the round-trip propagation between the ultrasonic emission point and the measured obstacle, and use the fixed formula to calculate the safe distance through the obtained data and give a prompt.
1.5 System C programming
The main program will first initialize the entire system, delete the necessary data, and then set the ultrasonic echo receiving flag, and make a port of the microcontroller output a low level to start the ultrasonic transmitting circuit, and the timer starts at this time At the same time, the subroutine for calculating the distance also starts to work, and then calculates the relative speed and distance to be measured according to the time recorded by the timer, and then calls the sound processing program to call the police. Finally, the main program completes the follow-up work by receiving the echo signal. In this way, the system will run continuously, using two measurement cycles as a calculation unit to calculate the relative speed, and then perform this operation continuously , and finally complete the measurement of distance and speed. The system adopts a modular design method, which consists of ultrasonic generating subroutine, main ultrasonic program, distance calculation subroutine, ultrasonic receiving interrupt subroutine and other programs.
2. Research on MCU of voice warning system
Learn about the physical properties of ultrasound and the basics of single-chip microcomputers by consulting materials. In fact, many methods have been demonstrated by experts and have achieved certain results, which can be used after modification. Due to the author's limited ability and lack of knowledge, I can only simply modify and organize the knowledge to be used, and apply it to my own ideas. By consulting the parameters of each selected device, see if it meets the mainstream application and whether it can meet the design requirements.
This work is based on the single-chip microcomputer to realize the prompt of distance and relative speed. It connects the ultrasonic distance measurement and the sensor, and uses the real-time control and data processing function of the single-chip microcomputer to measure and prompt the distance between the car and the obstacle and the speed relative to its own driving. In this way, the driver can directly judge the distance between the cars. The design of this device is simple, the degree of perfection is not high, but the scale is small, the components are few, the debugging is convenient, the cost is also low, the components are easy to replace, and it does not occupy the driver's visual space, which can completely relieve the driver's concerns and worries during the reversing process. Trouble, reduce the occurrence of accidents.
Summarize
The design of the automobile traffic risk warning system is mainly based on the control core of AT89C51 single-chip microcomputer, and at the same time, it is a voice alarm system based on ultrasonic distance measurement. Through theoretical analysis, the design scheme is basically feasible. When the system is working, the data collection is completed through the ultrasonic sensor, and then the single-chip microcomputer starts to work, calculates and processes the data, and finally prompts the driver with the result through the voice chip. Each device is cheap and easy to popularize. With the continuous development of science and technology, more and more ultrasonic technologies will appear in sensors. The application of ultrasonic can greatly improve the accuracy, and the design is simple and easy to operate. However, the technology in this area in our country is very limited at present. It is impossible to completely manufacture ultrasonic sensors. In the near future, ultrasonic technology will definitely meet the applications of various industries with the advantages of precision and convenience. This system lacks perfection, lacks correction, ignores the influence of temperature, and has relatively low accuracy. However, as a safety assistance system, combined with the driver's experience and subjective judgment, it can still avoid a certain degree of risk and has a relatively wide range of applications. foreground.
The above is the design of traffic risk voice warning system based on ultrasonic and single-chip microcomputer technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
- TOP