Ultrasonic Sensor

Ultrasonic sensor is a sensor that works on principle similar to radar or sonar. It generates high frequency sound and calculate the time interval between the sending of signal and the receiving of echo. Therefore, ultrasonic sensor can be used to measure distance. HC-SR04 ultrasonic sensor consists of a transmitter, a receiver and a control module.

735 Views, 03 Nov 2017 12:12 pm

Description

Ultrasonic sensor is a sensor that works on principle similar to radar or sonar. It generates high frequency sound and calculate the time interval between the sending of signal and the receiving of echo. Therefore, ultrasonic sensor can be used to measure distance. HC-SR04 ultrasonic sensor consists of a transmitter, a receiver and a control module. The working principle of ultrasonic sensor is as below: 1. Send at least 10us of HIGH signal to trigger pin. 2. Detect the pulse width of echo signal sent back. 3. Apply some calculation to get the distance. The pulse width of echo is proportional to the distance travelled. We know that the speed of sound travelling in air is 0.034 cm/microseconds. When the transmitter send a signal out, the receiver receives back the signal sent. Now that the distance travelled by the signal is double of the distance of interest. So we need to divide it by two. By using basic physics principle, velocity = distance/time. Therefore, the distance travelled is the product of velocity and time. We can calculate the distance by following formula: distance= duration*0.034/2 the obtained distance is in centimeters. Sensor

Pins • VCC: +5VDC • Trig : Trigger • Echo: Echo • GND: GND Specifications • Model: HC-SR04 • Working Voltage: 5V DC • Working Current: 15mA • Static Current: Less than 2mA • Output Signal: Electric Frequency signal, high level 5V, low level 0V • Sensor angle: not more than 15 degrees • Detection Distance: 2cm to 450cm • High Precision: Up to 3mm • Mode of Connection: VCC / Trig / Echo / GND • Adopt I/O trigger through supplying at least 10µs sequence of high level signal Applications: • Can be used to detect the level of water tank • Can be used to detect the Level of the dustbins