Ultrasonic Sensor 🦇

Introduction 📝

An ultrasonic sensor is an electronic device that is used to measure distances by emitting high-frequency sound waves and calculating the time it takes for these waves to bounce back after hitting the object.

It works on the principle of echolocation - the same principle is used by bats for navigation.

Untitled

It has two main components:

  1. Transmitter: This part of the sensor is responsible for sending out ultrasonic (inaudible) sound waves at a high frequency, usually above 20 kHz.

  2. Receiver: After the sound waves hit the object, they bounce back and are detected by the receiver. The sensor then measures the time it takes for the sound waves to return

    Distance = (Time * Speed of Sound)/2 Time - Time is calculated by the receiver Speed of sound - 340 m/s (approximately) The division by 2 is necessary because the sound wave makes a round trip from the sensor to the object and then back.

Working ⚙️

There are many types of Ultrasonic sensors but for this research, we are looking at the HC-SR04 module. It is used to measure distance in range of 2cm-400cm with an accuracy of 3mm.

Untitled

  1. High level signal is sent for 10us using Trigger.
  2. The module sends eight 40 KHz signals automatically, and then detects whether pulse is received or not.
  3. If the signal is received, then it is through high level. The time of high duration is the time gap between sending and receiving the signal

Untitled

The module works on the natural phenomenon of ECHO of sound.

A pulse is sent for about 10us to trigger the module. After which the module automatically sends 8 cycles of 40 KHz ultrasound signal and checks its echo.

The signal after striking with an obstacle returns back and is captured by the receiver. Thus the distance of the obstacle from the sensor is simply calculated by the formula given as

Distance = (Time * Speed of Sound)/2

Circuit Diagram ✏️