Categories: EducationElectronics

Ultrasonic sensor

The ultrasonic sensor works on the same principles as a radar system. An ultrasonic sensor can convert electrical energy into acoustic waves and vice versa. The acoustic signal is an ultrasonic wave moving at a frequency above 18kHz. The famous HC SR04 ultrasonic sensor generates ultrasonic waves at a frequency of 40kHz.

In general, a microcontroller is used to communicate with an ultrasonic sensor. To start measuring the distance, the microcontroller sends a trigger signal to the ultrasonic sensor. The duty cycle of this trigger signal is 10µS for the HC-SR04 ultrasonic sensor. When triggered, the ultrasonic sensor generates eight bursts of acoustic waves (ultrasonic) and triggers a time counter. As soon as the reflected signal (echo) is received, the counter stops. The output of the ultrasonic sensor is a high pulse of the same duration as the time difference between the transmitted ultrasonic bursts and the received echo signal.

Representation of trigger signal, acoustic bursts, reflected signal and output of echo pin

The microcontroller interprets the time signal into distance using the following functions:

Theoretically, the distance can be calculated using the TRD (time/rate/distance) measurement formula. Since the calculated distance is the distance travelled between the ultrasonic transducer and the object – and vice versa – it is a two-way trip. By dividing this distance by 2, you can determine the actual distance between the transducer and the object. Ultrasonic waves travel at the speed of sound (343 m/s at 20°C).

The distance between the object and the transducer is equal to half the distance travelled by the sound wave.

The following equation can be used to calculate the distance of an object placed in front of an ultrasonic sensor:
distance=(travel time*speed of sound)/2

PravySoft Admin

Recent Posts

Survey Results: Top 5 Accounting and Bookkeeping Service Providers in UAE

After conducting a comprehensive survey of businesses operating in the UAE, we have compiled a…

4 months ago

Flutter Development in calicut

Flutter Development in Calicut: Why PravySoft is Your Best Choice In today’s fast-paced digital world,…

4 months ago

Building SEO-Friendly Astro Website with Tailwind CSS: A Step-by-Step Guide

Are you exploring modern web development tools to build a stunning website for your business…

4 months ago

HSST Computer Science Previous year solved question paper

Question Paper Code: 98/2011Exam: HSST Computer ScienceCategory No: 111/2010Date of Test: 01-09-2011Alpha code: B 1.Which…

11 months ago

HSST COMPUTER SCIENCE PART-4: 30 PAGE PREVIEW

Table of Contents .Introduction to programming languageA program is a set of instructions that advise the computer…

1 year ago

Machine Learning: Difference between accuracy, precision and recall

For simplicity, we can start with an example. Suppose you have a dataset of 100…

2 years ago