Abstract This paper presents the design of an ultrasonic distance measurement system based on the STM32 single-chip microcomputer. Experiments were conducted using two ultrasonic sensor modules, HC-SR04 and RCWL-1605, to compare their performance. The SG90 servo motors is utilized to rotate the ultrasonic sensor, and the object's contour and position scanned by the ultrasonic waves are displayed on the TFT-LCD screen. Given that the velocity of ultrasonic waves in air varies with temperature, the DS18B20 sensor is employed to measure the ambient temperature, and calibrate the sound velocity at this temperature, thereby enhancing measurement accuracy.
Ge Xu (Thu,) studied this question.