| In recent years,as the Internet and intelligent manufacturing,artificial intelligence IoT AIo T,and Made in China 2025 have brought new technological industry platforms,the process of modern urban smart transportation has been continuously promoted,and more and more cities have introduced smart roadside parking systems to ease Urban traffic pressure.The current development of roadside parking toll collection equipment is mainly based on real-time video detection,and the current main detection methods are laser detection and infrared detection,which have the disadvantages of high power consumption and low accuracy.The original design adds ultrasonic detection technology to the roadside parking tolling device to detect whether a vehicle is entering the parking space in real time,which has low power consumption,high detection accuracy and stability.This project specifically proposes a real-time detection vehicle system based on the principle of ultrasonic ranging and STM32 microcontroller.First of all,the basic concepts and characteristics of ultrasonic waves are analyzed,and the ultrasonic sensors and ultrasonic ranging theory are explained,which provides a theoretical basis for the construction of the ultrasonic detection system of the project.Secondly,the scheme design of the ultrasonic detection system is proposed,the main parameters required by the system are selected,and the main electronic devices are selected to meet the system operation requirements.Again,the hardware circuit of the project was designed,including the core circuit of the main controller,the ultrasonic transmission and reception circuit,the power supply circuit,the level conversion circuit,the ADC drive circuit,etc.Specifically,the integrated transceiver sensor is used;the STM32single-chip microcomputer uses an internal high-speed clock(HSI)to work,no crystaloscillator,and comes with an ADC and temperature sensor,which reduces the complexity of circuit peripheral design and improves the integration of modules;The ultrasonic driving and signal processing chip E524 is adopted,which can greatly improve the processing speed and quality of the signal;the use of a special center tap transformer has simple principles and more stable operation.Finally,the flow chart is drawn according to the logical relationship of the ultrasonic detection system and the C program is used to realize the software design of the system.The software design takes STM32 microcontroller as the core,and realizes the control and response to the main program,ultrasonic subprogram,sound and light alarm subprogram,IO line communication subprogram and other modules.The ultrasonic subroutine calculates the width of the echo envelope data and the detection distance,detects the presence of vehicles or other interfering objects,and wakes up the roadside parking toll collection equipment in time.After the construction of the ultrasonic detection system is completed and analyzed through experiments,the software and hardware are operating normally,and the signals at each measurement point are normal.The test results in the laboratory and the actual environment show that the technical indicators meet the design requirements and the detection accuracy reaches 99.8%. |