Types of Distance Sensor and How to select one?

When it comes to distance sensors, there are many types; ultrasonic, IR proximity, laser distance, etc. and selecting the right one for your next Arduino or Raspberry Pi project could be a tough task to handle. Hence, today we’ll be looking at the plethora of distance sensors, its types, and answering which one is best suited for you!

All about distance sensors: Types and Selection guide for makers

I’ll be covering the following:

  • What are distance sensors and how do distance sensor work?
  • Types of distance sensors
  • Distance sensor compared: How to choose a distance sensor?

What are distance sensors? 

As its name suggests, to easily define distance sensors, it is sensors used for determining the proximity of an object without any physical contact involved.

How does distance sensor work?

Commonly associated with ultrasonic sensors, it functions by outputting a signal (depending on technology; ultrasonic waves, IR, LED, etc.) and measuring the change when the signal returns.

  • Measurement of change can be in the form of:
    • The time it takes for a signal to return
    • The intensity of a returned signal

Distance sensor vs proximity sensors

As distance sensors can be commonly associated with proximity sensors due to a similar correlation, the functionality of either sensor can be easily misunderstood. Hence, here’s a quick comparison between both to help you understand what’s the difference between distance sensors and proximity sensors.

  • Proximity sensors sense if an object is within the sensing area where the sensor is designed to operate. Hence, not necessarily indicating the distance between sensor and object
    • Find out more about proximity sensors here!
  • Distance sensors sense distance from the object and the measuring device through outputting a current. Currents can be in the form of ultrasonic waves, laser, IR, etc.

Types of Distance Sensors

Now that we have an understanding of what distance sensors are, we’ll dive into the various distance measurement sensors on the market, each with its own sensing technologies.

Here’s the rundown of the different distance sensor types!

Ultrasonic Sensor

What is Ultrasonic Sensor?

Arguably the most common type of distance measuring sensor is the Ultrasonic Sensor, also known as the Sonar sensor, it detects the distance to objects by emitting high-frequency ultrasonic waves.

Working principle of an ultrasonic sensor

  1. The ultrasonic sensor emits high-frequency sound waves towards the target object
  2. Target object picks up the sound waves
  3. Sound waves are then bounced off and reflected back towards the ultrasonic sensor
  4. The time it took for the sound wave to return is used as the measurement of the distance between

Key applications for Ultrasonic Sensor

Now that we’ve understood how it works, we’ll take a look at what it’s used for. Here are the common ultrasonic distance sensor applications:

  • Distance Measurement
  • Robotic sensors
  • Smart cars
    • Yes, Tesla uses ultrasonic sensors as part of its Autopilot program!
  • Unmanned aerial vehicles (UAV)

Advantages of Ultrasonic Sensors

  • Not affected by object colour and transparency as it detects distance through sound waves
  • Works well in places that are dim
  • Tend to consume lower current/power
  • Multiple interface options for pairing with a microcontroller, etc.

Disadvantages of Ultrasonic Sensors

  • Limited detection range
  • Low resolution and slow refresh rate, making it not suitable for detection of fast-moving targets
  • Unable to measure the distance of objects that have extreme textures/surfaces

Recommended Ultrasonic Sensor

Grove – Ultrasonic Sensor: Improved version of the HC-SR04

For an ultrasonic sensor to be parable with an Arduino, you’ll need an ultrasonic sensor module. The Grove – Ultrasonic Sensor is my recommended pick that’s built with significant benefits over the popular HC-SR04!

Wonder why it’s a better option than the HC-SR04? Here’s a comparative table!

Grove – Ultrasonic Distance Sensor HC-SR04
Working Voltage 3.3V / 5V compatible
Wide voltage level: 3.2V – 5.2V
5V
Measurement Range 3cm – 350cm 2cm – 400cm
I/O Pins needed 3 4
Operating Current 8mA 15mA
Dimensions 50mm x 25mm x 16mm 45mm x 20mm x 15mm
Ease of pairing with Raspberry Pi Easy, directly connect to I/O of Raspberry Pi Requires voltage conversion circuit

From the table, we can observe that the Grove – Ultrasonic sensor is a more versatile option:

  • Supports a wider voltage level
  • Lesser I/O pins needed
  • Easier pairing with your Raspberry Pi

Interested to find out more? You can check out the following resources:


IR distance sensors

Second on this list is IR distance sensors, in short for infrared. Most commonly associated with the Sharp GP2Y0A21YK0F, it does distance or proximity sensing through emitting IR beam and calculating angle of reflection.

IR sensors come with two lenses:

  • An IR LED emitter lens that emits a light beam
  • A position-sensible photodetector (PSD) where the reflected beam will fall onto

Working principle of IR distance sensors

IR distance sensors work through the principle of triangulation; measuring distance based on the angle of the reflected beam.

Here’s an illustration of how IR distance sensors work through triangulation:

  1. Infrared light is emitted from the IR LED emitter
  2. The beam of light hits the object (P1) and is reflected off a certain angle
  3. The reflected light will reach the PSD (U1)
  4. The sensor in the PSD will then determine the position/distance of the reflective object

Key applications for IR sensors

  • TVs, computers, laptops
  • Distance measurement
  • Security systems such as surveillance, burglar alarms, etc.
  • Monitoring and control applications

Advantages of IR sensors

  • Small form factor; Common IR sensors like the ones from Sharp tend to be smaller in size
  • Applicable for daytime and nighttime usages
  • Secured communication through a line of sight
  • Able to measure the distance of objects that have complex surfaces unlike ultrasonic sensors

Disadvantages of IR sensors

  • Limited measurement range
  • Affected by environmental conditions and hard objects; unable for usage through walls or doors

Recommended IR sensors

Grove – 80cm Infrared Proximity Sensor

Based on the SHARP gp2y0a21yk0f, this IR proximity sensor is a popular recommendation for anyone that’s looking for easy Arduino distance sensing.

Packed in a small form factor with low power consumption, this IR proximity sensor allows for continuous distance reading with a range of 10cm to 80cm!

Interested in finding out more? You can check out the following resources:

IR vs Ultrasonic

Now that we’ve understood both IR and Ultrasonic sensors, you may be wondering what’s the difference between IR sensors and ultrasonic sensors? Here’s a quick comparative table that showcases the differences:

IR distance sensor Ultrasonic Sensor
What it does Measure distance through reflected light waves Measure distance through reflected sound waves
How it measures Triangulation: Angle of a reflected IR beam is measured Time taken between transmitting and receiving sound waves are recorded
Human Relationship Invisible to the naked eye Unhearable
Object Requirements Suitable to be used to measure complex objects Not suitable to measure objects with complex surfaces

Laser Distance Sensors: LIDAR Sensors

LiDAR, in short for Light Detection and Ranging, can be considered as a laser distance sensor. It measures the range of targets through light waves from a laser instead of radio or sound waves.

Working principle of LIDAR

There are various ways where you could explain how LIDAR works (E.g. Triangulation, pulse base, etc.) but the following way is the easiest:

ref
  1. The transmitter on the LiDAR device emits laser light at the target object
  2. The pulse of the laser is then picked up by the target and reflected back
  3. Distance is then calculated by using the relationship between constant speed of light in air and the time between sending/receiving of the signal

Key applications of LiDAR

  • Environmental monitoring; forestry, land mapping, etc.
  • Distance measurement
  • Machine control and safety
  • Robotics

Advantages of LiDAR

  • High measurement range and accuracy
  • Ability to measure 3D structures
  • Fast update rate; suitable for fast-moving objects
  • Small wavelengths as compared to sonar and radar; good at detecting small objects
  • Applicable for usage in the day and night

Disadvantages of LiDAR

  • Higher cost as compared to ultrasonic and IR
  • Harmful to the naked eye; higher-end LiDAR devices may utilize stronger LiDAR pulses which may affect the human eye

Recommended LiDAR sensors

Fear not about the high cost that LiDAR brings as here at Seeed we offer a mini LiDAR proximity sensor that’s very much affordable and easily parable with your Arduino!

Interested to find out more about it? You can head to our product page!


LED Time-Of-Flight Distance Sensors

Lastly, we’ll take a look at the LED time-of-flight sensors. Most commonly associated with the VL53L0X, it’s part of the broader spectrum of LIDAR, that uses time-of-flight technology in measuring distances.

What are time-of-flight sensors and its working principle

Time-of-Flight sensors are one that measures the elapsed time it takes for a wave pulse to reflect off an object and return to the sensor. It’s capable of producing a 3D X, Y, Z image with a single snapshot by measuring the time it takes for light to travel from emitter to the receiver.

With time-of-flight technology, it provides significant benefits over other distance sensing methods covered:

  • Wider range
  • Faster readings
  • Greater accuracy

Time-of-flight sensors work similarly to LiDAR sensors, where:

  1. The transmitter on the time-of-flight device emits IR-LED light at the target object
  2. The pulse of the LED is then picked up by the target and reflected back
  3. Distance is then calculated by using the relationship between constant speed of light in air and the time between sending/receiving of the signal

Key applications of time-of-flight sensors:

  • Industrial applications
  • Machine vision
  • Robotics
  • People counting
  • Drones

Advantages of time-of-flight sensors:

  • Such technology offers high measurement range with accuracy
  • 3D imaging capable
  • Used in a wide variety of applications due to its ability to identify large objects

Disadvantages of time-of-flight sensors

  • Higher cost
  • Z depth resolution is still poor with general systems offering a 1cm Z resolution

Recommended time-of-flight sensor

Grove – Time of Flight Distance Sensor(VL53L0X)

Living up to its popularity, the VL53L0X integrates a leading-edge SPAD array and embeds ST’s second generation FlightSense patented technology. This allows for up to 2m when measuring absolute distances!

The above recommendation is part of our Grove system as well, making easy pairing with your Arduino!

Interested to know more about it? You can check out the following resources:


Comparing the distance sensors

Now, in order to help you select a suitable distance sensor, I’ve listed a summarised table below with what you should take note of when making your selection.

However, since all four of them each have their pros and cons, you’ll have to first identify your intended purpose/application before deciding on one!

Ultrasonic SensorsIR sensorLiDAR sensorsTime-of-Flight
Suitablility for Long Range SensingNoNoYesYes
High reading frequencyNoNoYes Yes
CostLowLowHighModerate
Suitability to use for complex objectsNoYesYesYes
Sensitive to external conditionsYesNoNoNo
3D imaging compatibleNoNoYesYes

From the table, we can conclude that both ultrasonic and IR distance sensors are more suited for Arduino projects that require shorter range sensing. While LiDAR and Time-of-flight sensors would be recommended for those that are looking for higher sensing capabilities and 3D imaging!


Summary

That’s all for today’s distance sensor guide. I hope it has helped you further understand and make a better purchase decision!

For distance sensor Arduino compatibility, you can consider the recommended Seeed products covered for each type! This will save you time in trying to make a distance sensor yourself too!

For more on proximity sensors, you can check out my previous article here!

Please follow and like us:

Calendar

December 2019
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Wordpress Social Share Plugin powered by Ultimatelysocial