Home / Hardware y Moviles / One photon is enough: this is how your phone’s LiDAR measures the distance to the wall

One photon is enough: this is how your phone’s LiDAR measures the distance to the wall

Behind the black glass that sits next to the cameras on a phone there is a component that takes no pictures. It emits light, but not to illuminate anything: it fires pulses a few nanoseconds long and times how long they take to come back. That is the principle of direct time-of-flight LiDAR (dToF), the sensor that builds a depth map of the room you are standing in and that, in self-driving cars, has become one more eye alongside radar and cameras.

An impossible stopwatch: 67 picoseconds per centimetre

Light travels about 30 centimetres per nanosecond in air. Because the pulse has to go out and come back, every nanosecond of delay equals 15 centimetres of distance. If the sensor wants to resolve one centimetre, it has to measure the interval to within roughly 67 picoseconds, that is, 0.067 nanoseconds. No ordinary circuit times that: at 3 GHz a clock cycle lasts 333 picoseconds, five times longer than the window to be measured.

The trick is not to time better but to count. A very short laser pulse is fired and a detector capable of seeing a single photon watches for the instant the first photon comes back. The process is repeated thousands of times per point. The measured times pile up in a histogram, with bins a few hundred picoseconds wide, and the distance comes from the peak of that histogram, not from any single measurement.

The detector: a diode on the edge of collapse

That photon counter is a SPAD (Single-Photon Avalanche Diode), a photodiode reverse-biased above its breakdown voltage. In that state, also called Geiger mode, a single absorbed photon creates an electron-hole pair that triggers an avalanche of carriers: a measurable current out of one quantum of light. The avalanche has to be quenched immediately, with a passive or active quenching circuit, and that imposes a dead time of tens of nanoseconds during which the detector is blind.

Two figures explain almost all of the system’s performance. The first is jitter, the timing spread with which the detector stamps the arrival of a photon: one or two hundred picoseconds of uncertainty translate directly into centimetres of error. The second is photon detection efficiency (PDE), which in silicon at 905 nanometres sits around 10-30 %: of every hundred photons that arrive, eighty are lost.

Why the pulse comes back almost empty

Light falls off with the square of distance, and on top of that a wall returns only a small fraction of what it receives. At five metres the sensor recovers a handful of photons per pulse and competes with the sun, which floods the scene with billions of photons per second. One shot is not enough: thousands are fired and their histograms are added together. Signal-to-noise grows with the square root of the number of accumulated pulses, so doubling the range demands four times the integration time or the power.

The histogram, moreover, does not have a single peak. A pane of glass returns part of the pulse and lets the rest through; a thin object in front of a wall produces two echoes; side reflections create later false echoes. Firmware has to decide which one is right, and that is where walk error appears: weak echoes are detected slightly later than strong ones, which shifts the reading unless it is corrected.

905 or 1,550 nanometres: a decision about eye safety

Almost every consumer LiDAR emits at 905 or 940 nanometres because silicon is sensitive there and SPADs are cheap. The catch is that this light passes through the eye and reaches the retina, so the permitted power is very low (class 1 of IEC 60825). Automotive LiDAR units that use 1,550 nanometres need InGaAs detectors, pricier and noisier, but that wavelength is absorbed by the cornea and the aqueous humour before it can be focused: far more energy can be emitted and objects can be seen much further away.

When a hundred cars light up the same street

In a traffic jam dozens of LiDARs may be pulsing in the same lane at once, and each one receives the others’ pulses as ghost echoes. The usual defence is to encode the emission: pseudo-random pulse sequences, or phase variations, that the receiver correlates against its own pattern and discards whatever does not match. The deeper alternative is coherent FMCW LiDAR, which emits a frequency chirp and mixes the returning light with a local sample: it measures range from the beat frequency and, as a bonus, velocity through the Doppler effect. It is immune to sunlight and to its neighbours, but it requires stabilised lasers and coherent detection, and today it costs considerably more.

What comes out of the sensor: a point cloud, not an image

The result is a 3D point cloud, tens of thousands of points per frame, each with coordinates and an intensity value. To be useful it needs calibration of each detector’s intrinsic parameters and of the LiDAR’s exact position relative to the camera, and then the two must be fused: the cloud supplies geometry, the image supplies colour and texture. On a phone you notice it when measuring a room with the measuring app or focusing at night; in a car, when telling a pedestrian apart from a shadow.

Its limits are physical too. Rain and fog scatter the pulse and cut the range; a matte black surface returns very little; a hi-vis vest returns so much that it saturates the detector. And yet counting photons one at a time is still the most direct way we have of asking the world how far away it is.