Ultrasonic sensor uses the characteristics of sound waves to provide a non contact and accurate detection scheme for detecting the state and distance of objects. By transmitting high-frequency mechanical sound waves, the sensor receives the sound waves reflected from the encountered object, and calculates the time and energy between the transmitted and received sound waves to obtain the precise distance and state of the target.