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.
| Property | Direct ToF | Indirect ToF |
|---|---|---|
| Measured quantity | Pulse arrival time | Phase shift of modulated light |
| Typical detector | SPAD array with timing circuits | Demodulating CMOS pixels |
| Range | Short to long, depends on power | Mostly short to medium |
| Spatial resolution | Often lower | Higher, dense depth maps |
| Multiple echoes | Can be separated | Mixed into one value |
| Ambiguity | Set by pulse repetition | Set by modulation frequency |
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.
| Format | Output | Typical range | Common robot use |
|---|---|---|---|
| Single-point module | One distance value | Centimeters to a few meters | Cliff and proximity detection |
| Multizone sensor | Small grid, such as 8 by 8 zones | Up to a few meters | Coarse obstacle maps |
| iToF depth camera | Dense depth image | About 0.2 to 5 meters indoors | Grasping, bin picking, mapping |
| dToF depth sensor | Sparse or dense depth points | Several meters and beyond | Navigation and outdoor perception |
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.
| Sensor | Principle | Strength | Weakness |
|---|---|---|---|
| ToF sensor or camera | Light travel time | Compact, works without texture | Multipath and sunlight sensitivity |
| LiDAR | Scanned or flash laser ranging | Long range, precise geometry | Cost and moving parts in some designs |
| Stereo camera | Disparity between two images | Works outdoors, passive | Fails on textureless surfaces |
| Structured light | Deformation of a projected pattern | High precision at short range | Washed out by sunlight |
| Ultrasonic sensor | Sound echo timing | Detects glass and transparent objects | Wide beam, low resolution |
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.
| Task | Recommended format | Reason |
|---|---|---|
| Cliff or drop detection | Single-point module | One fast, reliable reading is enough |
| Low-speed obstacle avoidance | Multizone sensor | Coarse grid covers the path cheaply |
| Grasping objects in a bin | iToF depth camera | Dense depth at short range |
| Navigation in large or bright spaces | dToF sensor or LiDAR | Longer range, better sunlight tolerance |
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.