Abstract. This paper mainly introduces a kind of ultrasonic distance measuring system with AT89C51 single chip as the core component. The paper expounds the principle of ultrasonic sensor and ultrasonic ranging, hardware circuit and software program, and the results of experiment and analysis.The hardware circuit based on SCM, the software design adopts the advanced microcontroller programming language.The amplitude of the received signal and the time of ultrasonic propagation are regulated by closed loop control. [1,2]The double closed loop control technology for amplitude and time improves the measuring accuracy of the instrument. The experimental results show that greatly improves the measurement accuracy of the system.