Ultrasonic Sensors - ofithcheallaigh/masters_project GitHub Wiki

Introduction

This section of the wiki will go into the operation of the ultrasonic sensor, which was part of the kit used to gather the data for this project.

How Does the Ultrasonic Sensor Work?

The ultrasonic sensor's operating principle is quite simple. It works by emitting a sound wave (at 40 kHz) then waits for that wave to be reflected back, calculating the distance the wave travelled based on the time it took to receive that return signal [1]. The set up is shown in the diagram below:

Typically, an ultrasonic sensor will have the transmitter and receiver built into the one unit. These sections can be seen in the image below, where the transmitter is marked with a T in the bottom left corner, and the receiver is marked with an R in the bottom right corner [2].

The distance is determined using the following equation:

$$ D = (C * T)/2 $$

Where D is the distance, C is the speed of sound in air (taken as 343m/s at room temperature) and T is the time.

The ultrasonic sensor used in this project was the HC-SR04 [3]. The main features of the HC-SR04 include which are important this project:

  • Range of 2 cm to 400 cm
  • Measuring angle of 15°

The sensor requires certain inputs which are provided my a microcontroller, which for this project, during the data collection phase is the Arduino Uno.

References

[1] https://www.arrow.com/en/research-and-events/articles/ultrasonic-sensors-how-they-work-and-how-to-use-them-with-arduino
[2] https://randomnerdtutorials.com/complete-guide-for-ultrasonic-sensor-hc-sr04/
[3] https://cdn.sparkfun.com/datasheets/Sensors/Proximity/HCSR04.pdf