Time-of-flight sensor

Also known as: ToF

On this page 7

A time-of-flight sensor (ToF sensor) is a distance sensor that emits modulated or pulsed light, usually near-infrared at about 850 or 940 nanometers, and calculates distance from the time the light needs to travel to an object and back. In robotics, the term covers both small single-point ranging modules and ToF depth cameras that measure distance for every pixel, giving robots a fast, compact source of 3D information for sensors-based obstacle detection, grasping and navigation.

Because light covers about 30 centimeters per nanosecond, a ToF sensor must resolve picosecond-scale time differences to reach millimeter-level precision. Two families solve this in different ways: direct ToF, which times individual pulses, and indirect ToF, which measures the phase shift of a continuously modulated signal.

How direct and indirect time of flight measure distance

Distance follows from a simple relation: distance equals the speed of light times the round-trip time, divided by two. The engineering challenge is measuring that time precisely in the presence of ambient light and noise.

Direct ToF (dToF) fires short laser pulses and records arrival times with highly sensitive detectors such as single-photon avalanche diodes (SPADs) and time-to-digital converters. Many pulses are accumulated into a histogram of arrival times, whose peak gives the distance. This method handles longer ranges and can separate multiple echoes, for example from a window and the object behind it.

Indirect ToF (iToF) illuminates the scene with light modulated at tens to over one hundred megahertz and samples the returning signal at several phase offsets, typically four. The phase shift between emitted and received light is proportional to distance. The method yields dense, high-resolution depth images, but phase repeats every modulation period, which creates an ambiguity range: at 20 MHz, distances repeat every 7.5 meters, so many cameras combine two or more frequencies to unwrap the result.

PropertyDirect ToFIndirect ToF
Measured quantityPulse arrival timePhase shift of modulated light
Typical detectorSPAD array with timing circuitsDemodulating CMOS pixels
RangeShort to long, depends on powerMostly short to medium
Spatial resolutionOften lowerHigher, dense depth maps
Multiple echoesCan be separatedMixed into one value
AmbiguitySet by pulse repetitionSet by modulation frequency
Direct and indirect ToF compared

Sensor formats and key specifications

ToF sensors range from single-zone ranging chips smaller than a fingernail to multizone sensors and full depth cameras with hundreds of thousands of pixels. The table summarizes typical characteristics; exact values depend strongly on the model, target reflectivity and lighting.

FormatOutputTypical rangeCommon robot use
Single-point moduleOne distance valueCentimeters to a few metersCliff and proximity detection
Multizone sensorSmall grid, such as 8 by 8 zonesUp to a few metersCoarse obstacle maps
iToF depth cameraDense depth imageAbout 0.2 to 5 meters indoorsGrasping, bin picking, mapping
dToF depth sensorSparse or dense depth pointsSeveral meters and beyondNavigation and outdoor perception
Typical ToF sensor formats

When comparing sensors, the most informative specifications are depth noise at a given distance and reflectivity, frame rate, field of view, ambient light tolerance and power consumption. A single accuracy figure without conditions says little, because a black surface at the edge of the field of view can behave very differently from a white wall at the center.

Time-of-flight sensors compared with other range sensors

Robots often combine a ToF sensor with other range sensors, because each technology fails under different conditions.

SensorPrincipleStrengthWeakness
ToF sensor or cameraLight travel timeCompact, works without textureMultipath and sunlight sensitivity
LiDARScanned or flash laser rangingLong range, precise geometryCost and moving parts in some designs
Stereo cameraDisparity between two imagesWorks outdoors, passiveFails on textureless surfaces
Structured lightDeformation of a projected patternHigh precision at short rangeWashed out by sunlight
Ultrasonic sensorSound echo timingDetects glass and transparent objectsWide beam, low resolution
ToF and neighboring sensing technologies

Many LiDAR units are technically direct ToF devices with scanning or wide-field optics, so the boundary between the terms is partly a matter of convention: “ToF sensor” usually denotes compact, short-range modules and cameras, while “LiDAR” denotes longer-range systems built for mapping.

Choosing a ToF sensor for a robot

The right ToF sensor follows from the perception task, not from the highest resolution available. A decision table helps match the format to the job.

TaskRecommended formatReason
Cliff or drop detectionSingle-point moduleOne fast, reliable reading is enough
Low-speed obstacle avoidanceMultizone sensorCoarse grid covers the path cheaply
Grasping objects in a biniToF depth cameraDense depth at short range
Navigation in large or bright spacesdToF sensor or LiDARLonger range, better sunlight tolerance
Matching ToF formats to robot tasks

Integration details matter as much as the sensor choice. The cover window must be infrared-transparent and placed so that it does not reflect emitted light back into the receiver, and a camera calibration relating the depth frame to the robot frame is needed before ToF data can be fused with other sensors.

Error sources and how to handle them

ToF measurements look clean in demonstrations but contain systematic errors that robot software must expect. Knowing them is essential for reliable perception.

  • Multipath interference: light bouncing off several surfaces, such as in corners, makes distances appear too long.
  • Flying pixels: pixels on object edges mix foreground and background and produce points floating in space.
  • Low or high reflectivity: dark materials return little light, while mirrors and glossy metal can saturate pixels or reflect light away.
  • Ambient sunlight: strong infrared background raises noise and can reduce range outdoors.
  • Cross-talk between sensors: several ToF devices facing the same area can disturb each other unless frequencies or timing differ.
  • Motion artifacts: iToF cameras combine several exposures, so fast motion creates distorted depth.

Standard countermeasures include confidence or amplitude thresholds, edge filters, temporal filtering and careful mounting that avoids looking straight into reflective corners. Eye safety must also be respected: emitters are designed to meet laser Class 1 limits under the relevant safety standard.

Understanding it simply

A time-of-flight sensor works much like shouting into a canyon and listening for the echo, except it uses invisible light instead of sound. It sends out a flash and measures how long the light takes to come back. The longer the wait, the farther away the object.

Light is so fast that the sensor has to measure incredibly tiny fractions of a second. Small versions give a robot one distance reading, like a tape measure; camera versions give a distance for every point in the picture, so the robot sees the shape of the room in 3D.

Applied in practice

A robot vacuum maker replaces the infrared bumper sensors of an older model with a front-facing multizone ToF sensor and four downward-facing single-point modules. The front sensor produces a small depth grid many times per second, so the robot slows before chair legs and walls instead of bumping into them, while the downward modules detect stair edges.

During testing, dark carpets and a glossy black cabinet produced unreliable readings. The engineers added confidence thresholds and combined the ToF data with wheel odometry and a bumper as a last safety layer. The final design cuts collisions substantially in household tests and prevents falls down stairs, with sensors small and cheap enough for a consumer product.