

But in this tutorial, we will be using an ultrasonic sensor for measuring the water level. NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE) Ĭlick here for the simulation of the Ultrasonic sensor with Arduino Uno.You must have seen several water level indicators but most of them use special float sensors that are not easily available and neither simple to use. The formula for measuring distance is expressed as L = C X T In the formula, L is the measured distance, and C is the velocity of ultrasonic spreading in the air, also, T is time (T is half the time value from the transmission to the receiver. Thus, with radar, the concept of ultrasonic distance measurement is the same. Using the already known air spreading velocity, the ultrasonic distance measurement concept estimated the time from start to reflection when the obstacle was encountered, and then determined the distance between the transmitter and the obstacle according to the time and velocity.

Since the ultrasonic spread velocity in the air is 340 m / s, we can calculate the distance (s) between the obstacle and the transmitter, based on the timer record t, namely: s = 340 t / 2, which is called the theory of time difference distance measurement. Finally, once it got the reflected wave, the ultrasonic receiver will pause the timing. Stretched in the air, and would automatically return when obstacles on the way were encountered. This particular sensor transmits an ultrasonic sound that is around 40 kHz in frequency. The sensor has two main components-a transducers that generate an ultrasonic sound wave, while its echo is listened to by the other portion Ultrasonic distance measurement principleĪn ultrasonic wave was generated in one direction by the ultrasonic transmitter and the timing began when it was launched.

Ultrasonic sound waves have an extraordinarily high pitch that can not be detected by humans This ultrasonic distance sensor provides steady and exact measurements of the distance between 2 cm and 450 cm. It has less than 15 degrees of focus and a range of almost 2 mm.

