How do sensors work?

Sensors work by detecting any variation in environmental factors like light, heat, motion, pressure, and so on. If any such variation is detected, then it is converted to an electrical signal so that other electronic devices can process it. Humans have a diverse hearing frequency ranging from 20Hz to 20KHz. Ultrasonic sensors work with a frequency above 20Khz.

Have you ever wondered how we measure the depth of the sea without actually going to the seabed? The answer is ultrasonic sensors. As we know, the formula to find the distance is.

Distance=Speed x Time

Sensors send a wave that bounces back from the surface of the object and receives it. The speed of the wave is known and time is determined by the sensor. The product of both speed and time gives us distance.

Distance sensors

It is a type of sensor which is used for non-contact measurement of the distance between the two objects. Some of the most frequently used distance sensors - ultrasonic sensors, infrared sensors, LIDARs (laser distance sensors), and time-of-flight sensors.

  • Ultrasonic sensors emit high-frequency sound towards target objects and record the time taken for the sound to return to the receiver.

  • Infrared sensors emit IR waves and calculate the distance based on the angle between the incident and reflected wave.

  • LIDARs work just like ultrasonic sensors, but in this case, they use laser instead of sound waves. It gives more accurate and faster results compared to its counterparts because it uses light waves which are faster than sound waves.

  • Time-of-flight sensors work similar to LIDARs and they can produce the 3-dimensional image and are used in applications requiring 3D imaging.

Ultrasonic sensors are the cheapest distance measurement sensors available. They provide real-time data about moving obstacles. Talking about their robust nature, ultrasonic sensors are insensitive to hindering factors like dust, smoke, mist, vapor, and so on. These factors are a major disadvantage for devices sensing by using light waves.

A major disadvantage of ultrasonic sensors is we cannot use them against sound-absorbing objects like clothes or carpets. Photoelectric sensors can precisely detect objects within a few meters, but they cannot detect black bodies, which is not the case with ultrasonic sensors.

Working principle of ultrasound

The ultrasonic sensors are piezoelectric transducers, which convert electrical signal to mechanical and mechanical signal to electrical. The first task is performed by a transmitter and the second task is performed by a receiver, both of which are integrated into the sensor. It sends an ultrasonic wave towards the target and the receiver encounters the sound after it has traveled back to the sensor. With ultrasonic sensors, the formula to find the distance is.

D=T2×C ....(1)

Here,

D is the distance in meters.

T is the time in seconds.

C is the speed of sound ~343m/s.

Note: Here, T is divided by 2 because the time we are calculating is the time required by the wave to do a round-trip. We know this method as time-of-flight measurement.

Features

The ultrasonic sensors have two most common applications, one being liquid level detection and the other being object detection. A vehicle uses ultrasonic distance sensors to detect the wall while the driver is parking it. The autopilot mode in cars uses these sensors for people's detection, vehicle detection, and so on. Other applications are the measurement of liquid levels in large containers in factories. Therefore ultrasonic sensors are also known as level sensors as we use them in the level measurement of liquids.

Works with transparent objects

The ultrasonic sound waves can reflect off transparent objects like liquid or glass surfaces. They work with target objects made of solid or liquid. Objects that have angled surfaces are difficult to detect. Since they do not have any moving parts and can take a non-contact measurement, they are recommended for usage in level measurement in tanks with corrosive, boiling, and hazardous chemicals. Their object detection and sensing property are unaffected even after changes in the chemical properties of the target objects.

Stainless-steel housing

Ultrasonic sensors have a wide variety of applications that include usage in harsh environmental conditions and hygienic applications. Some manufacturers sell these level sensors with stainless-steel housing to keep the sensor robust and easier to clean with sanitizing chemicals for food and packaging applications. Some ultrasonic sensors are cylindrical, which helps in detecting distance from small objects or objects in a small gap. Below is an image of a cylindrical distance and ultrasonic distance sensor with a stainless-steel housing.

A cylindrical ultrasonic sensor with stainless-steel housing
CC BY-SA 4.0 | Image Credits: https://commons.wikimedia.org | Bpducharme

IO-link is a serial communication protocol used to communicate with sensors and transducers. It is compatible with various position sensors.

  • Capacitive sensors
  • Distance sensors
  • Ultrasonic sensors
  • Photoelectric sensors

HC-SR04

An inexpensive ultrasonic sensor HC-SR04
CC BY-SA 3.0 | Image Credits: https://commons.wikimedia.org | Nevit Dilmen

One of the most popularly used ultrasonic sensors is HC-SR04. This module comprises an ultrasonic receiver, transmitter, and a control circuit.

Analog output and digital output

The ultrasonic signal sent by the emitter and received by the receiver is analog. This analog output is converted to a digital signal using ADC (Analog to digital converter). The sensor HC-SR04 has 4 pins namely, VCC, trig, echo, and GND. VCC is connected to the 5V power supply and GND is connected to the ground terminal. The trig pin is used to trigger ultrasonic waves and the ultrasonic transducer receives the waves. The echo pin generates a digital output of the time taken for the wave to come back, which is then used to calculate the distance. 

Context and Applications

This is a topic is an important part of the curriculum of various graduate and specialization courses. Some of them are.

  • Bachelors in Electrical Engineering
  • Bachelors in Science in Physics
  • Masters in Engineering in Embedded Systems
  • Masters in Engineering in VLSI

Practice Problems

1. An ultrasonic sensor detected the time taken for the ultrasonic sound wave to reflect from a surface was 10 seconds. Find the distance between the sensor and the target object.

  1.  1350m
  2. 1715m
  3. 1600m
  4. 1689m

Correct option- b

Explanation: Substituting the value of T=10 and c=343 in equation 1, we get a distance of 1715m

2. What is piezoelectricity?

  1. Process of using crystals to convert electrical energy to chemical energy.
  2. Process of using crystals to convert electrical energy to mechanical energy.
  3. Process of using crystals to convert chemical energy to electrical energy.
  4. Process of using crystals to convert mechanical energy to electrical energy.

Correct option- d

Explanation: Piezoelectricity is using crystals to convert mechanical energy to electrical energy.

3. What are ultrasonic sensors used for?

  1. GPS
  2. Humidity detection
  3. Proximity detection
  4. Image processing

Correct option- c

Explanation: Ultrasonic sensors are used to measure the distance between two objects hence, it is also a proximity detector.

4.  What is the frequency of ultrasonic sound waves?

  1. Less than 20 Hz
  2. Greater than 2000 Hz
  3. Greater than 20 kHz
  4. Less than 200 kHz

Correct option- c

Explanation: Sound waves below 20 Hz are infrared, while those above 20 kHz are ultrasonic sound waves. Ultrasonic sensors work above 20 kHz frequency.

5. Which of the following is suitable for metal detection?

  1. Inductive proximity sensors
  2. Capacitive proximity sensors
  3. Ultrasonic proximity sensors
  4. Magnetic proximity sensors

Correct option- a

Explanation: Inductive proximity sensors are used in metal detectors. These sensors detect magnetic loss due to eddy current loss in conductors by an external magnetic field.

  • Actuators
  • Transducers
  • Serial communication protocols

Want more help with your electrical engineering homework?

We've got you covered with step-by-step solutions to millions of textbook problems, subject matter experts on standby 24/7 when you're stumped, and more.
Check out a sample electrical engineering Q&A solution here!

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
EngineeringElectrical Engineering

Instrumentations

Transducers

Ultrasonics sensors

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
EngineeringElectrical Engineering

Instrumentations

Transducers

Ultrasonics sensors