77
$\begingroup$

There is a device available for about $\$40$, which fits in the palm of the hand, runs on two AA batteries, and can measure distances up to $50\,{\rm ft}$ to an accuracy of $\sim \frac{1}{8}''$ ($\sim 3\,{\rm mm}$).

Light travels $300,000\,{\rm km}\,{\rm s}^{-1}$, so it takes about $0.01\,{\rm ns}$ to travel the $3\,{\rm mm}$ equivalent to the device accuracy. If the device was counting ticks of a clock to measure the laser round-trip time (and therefore round-trip distance), the timing circuit would have to be running at about $50\,{\rm GHz}$. That's a pretty fast clock!

Is that how these devices actually work? Run a very fast clock to measure off round-trip time, or is there some other principle of optics which is used in conjunction with cheap and simple electronics?

$\endgroup$
  • 2
    $\begingroup$ The fundamental answer to your question is interference methods. It is exactly how that gravity wave detector thingy works, and moreover, you know when a person comes and tunes your piano? It is exactly how piano tuning works! Interferometers are a huge thing in engineering, they are a brilliant idea. Here's an outstanding one that was going to be five million kilometers long. lisa.nasa.gov $\endgroup$ – Fattie May 16 '16 at 0:43
  • 20
    $\begingroup$ FWIW, most of the inexpensive "laser" tape measures are actually a sonar range-finder and a laser pointer. If it has a relatively large cone-shaped indentation on the measuring end, it's not actually using the laser to do the measuring. $\endgroup$ – Fake Name May 16 '16 at 2:47
73
$\begingroup$

EDIT updated (improved) description of phase detection circuit


There are two principles used in these systems.

The first is the time-of-flight principle. As you noted, if you wanted to get down to 3 mm accuracy, you need timing resolution of 20 ps (20, not 10, because you would be timing the round trip of the light). That's challenging - certainly not the realm of cheap consumer electronics. The problem is not only the need to detect a fast edge - you have to detect the actual reflected pulse, and not every other bit of noise around. Signal averaging would be your friend: sending a train of pulses and timing their average round trip time helps. This immediately suggests that continuous modulation would probably work better - it has an inherent filtering characteristic.

That leads to the second way to get an accurate measurement: by comparing the phase of the emitted and returned signal. If you modulate your laser at a modest 300 MHz, the wave length of one complete "wave" is 1 m; to measure a change in distance of 3 mm (6 mm round trip), it is sufficient to detect a phase shift of $\frac{6}{1000}\times 2\pi$. This is quite trivial with a circuit that squares the transmitted and reflected wave, then takes the XOR of the two signals and averages the result. Such a circuit will give minimum voltage when the two signals are exactly in phase, and maximum voltage when they are exactly out of phase; and the voltage will be very linear with phase shift. You then add a second circuit that detects whether signal 2 is high when signal 1 has a rising edge: that will distinguish whether signal 1 or signal 2 is leading.

enter image description here

Putting the output of the logic gates into a low pass filter (resistor and capacitor) and feeding it into a low speed 12 bit ADC is sufficient to determine the phase with high accuracy. There are ready made circuits that can do this for you - for example, the AD8302

The only problem with the phase method is that you will find the distance modulo half the wavelength; to resolve this, you use multiple frequencies. There is only a single distance that has the right wavelength for all frequencies.

A possible variation of this uses a sweeping frequency source, and detects the zero crossings of the phase - that is, every time the phase detector output is zero (perfectly in phase) you record the modulation frequency at which this occurred. This can easily be done very accurately - and has the advantage that "detecting zero phase" doesn't even require an accurate ADC. A wise man taught me many years ago that "the only thing you can measure accurately is zero". The distance would correspond to the round trip time of the lowest frequency which has a zero crossing - but you don't necessarily know what that frequency is (you may not be able to go that low). However, each subsequent zero crossing will correspond to the same increase in frequency - so if you measure the $\Delta f$ between zero crossings for a number of crossings, you get an accurate measure of the distance.

Note that a technique like that requires very little compute power, and most of the processing is the result of very simple signal averaging in analog electronics.

You can read for example US patent application US20070127009 for some details on how these things are implemented.

A variation of the above is actually the basis of an incredibly sensitive instrument called the lock-in amplifier. The principle of a lock-in amplifier is that you know there is a weak signal at a known frequency, but with unknown phase (which is the case for us when we look at the reflected signal of a modulated laser). Now you take the input signal, and put it through an IQ detector: that is, you multiply it by two signals of the same frequency, but in quadrature (90° phase shift). And then you average the output over many cycles. Something interesting happens when you do that: the circuit acts, in effect, as a phase sensitive bandpass filter, and the longer you wait (the more cycles' output you average over), the narrower the filter becomes. Because you have both the I and the Q signals (with their phase shift), you get both amplitude and phase information - with the ability to recover a tiny signal on top of a hug amount of noise, which is exactly the scenario you will often have with a laser range finder. See for example the wiki article.

The quadrature detection becomes quite trivial when you use a clock at twice the modulation frequency, and put two dividers on it: one that triggers on the positive edge, and one that triggers on the negative edge. A couple of (fast, electronic) analog switches and a simple RC circuit complete the project. You can now sweep the driving frequency and watch the phase on the two outputs "wrap" - and every time it makes a full circle, you have increased the frequency by an amount $\Delta f = \frac{c}{2d}$ where $c$ is the speed of light, and $d$ is the distance to the target. Which has turned a very hard measurement into a really easy one.

$\endgroup$
  • 1
    $\begingroup$ If the frequencies are [incommensurable](en.wikipedia.org/wiki/Commensurability_(mathematics)), I think only two would be necessary. $\endgroup$ – PyRulez May 16 '16 at 5:26
  • 1
    $\begingroup$ Using encoded pulses (e.g Gold code) with correlation for phase retrieval is common in other - more expensive - applications (e.g. radar ranging, GPS) is there any chance this has ever been implemented in consumer laser rangers ("tape measures")? $\endgroup$ – uhoh May 16 '16 at 5:37
  • 1
    $\begingroup$ @PyRulez indeed two carefully chosen frequencies can be enough - but assuming there is some noise in the system, more frequencies gives a more robust solution. $\endgroup$ – Floris May 16 '16 at 5:45
  • 1
    $\begingroup$ @uhoh I am not aware of any in a consumer system; but it has been done in scientific experiments for sure (eg LISA, the space based interferometer). $\endgroup$ – Floris May 16 '16 at 5:46
  • 2
    $\begingroup$ @tpg2114 since you could be bothered to dig up the references, I could be bothered to update my plot! Thanks again - you made me a better person today. $\endgroup$ – Floris May 17 '16 at 21:54
24
$\begingroup$

The timing circuit doesn't have to run that fast. It just needs a time-to-digital converter which has a high enough resolution (0.1ns is nearly trivial with off the shelf CMOS technology) and then it can average many pulses (hundreds or thousands) to get the resolution improved by another order of magnitude. These are all fairly standard engineering techniques that sound complicated, but they are actually rather simple to implement. You could build something like that at home with an FPGA and cheap analog components.

If you want to see how it can be done, look at the schematics of an old DG535 Delay Generator from a company called Stanford Research Systems. That's an instrument that you can find in almost any physics lab and that can generate pulses with something like 5ps timing resolution. There is absolutely nothing spectacularly fast in there, it's just a really ingenious circuit. The DG535 is the opposite of the circuit you have in mind, i.e. it's a digital-to-time converter, but in my mind somewhat easier to understand than the circuit of the same company's SR620 Time interval/frequency counter, which does the time-to-digital conversion that you were asking about. The SR620 is probably also not quite as common, but if you can get hold of a manual on eBay, go for it. The company used to publish their schematics and one can learn a lot from their designs.

$\endgroup$
  • 5
    $\begingroup$ There are also distance measurers which use ultrasound for the time of flight measurement and have a laser pointer incorporated in them. Their range is about 60 feet whereas the laser based device works over at least 300 feet. $\endgroup$ – Farcher May 15 '16 at 4:14
20
$\begingroup$

You don't have to run a clock that fast, and you don't need any new physical principles either, just some clever electronic design, mixing analog and digital components and making a few critical parts (switches, in essence) very fast.

One simple technique, as described here on wikipedia, is a two-slope ramp. At the start of the time to be measured, you start charging a capacitor with a constant current; at the end of the time to be measured, you stop charging and start discharging it with a current, say, 1000 times lower, meaning that the discharge takes 1000 times as long as the charge. Supposing you time the discharge with a very reasonable 100MHz clock, you know the discharge time to within 10ns, and so the charge time to within 10ps, which is the accuracy you're asking for.

There are various sources of noise and error that make the accuracy of this simple design worse than it would be ideally, but there are also more advanced techniques and tricks that increase accuracy, and 100MHz isn't even the fastest feasible clock. My point isn't to go into great detail, but to show that nothing too exotic is needed. I know of a device based on a 6-year-old design that a hobbyist can build with off-the-shelf parts for about \$50 that provides 125ps resolution and around 500ps RMS error; if you allow for things to improve a bit in the past years, for a manufacturer doing mass production to be more cost-effective than a hobbyist, and perhaps for a bit of overstatement in the specs of consumer products, a \$40 100ps device seems within the realm of reason.

$\endgroup$
10
$\begingroup$

Instead of attempting to time the round-trip of individual pulses (which depends on a good way to separate reflected pulses from ambient noise), you can also build a phase-locked loop.

Control the sending of outgoing pulses by a voltage-controlled oscillator, sending one pulse at each rising zero crossing. Whenever you see an incoming pulse just before the zero crossing, decrease the frequency slightly; if you see an incoming pulse after the zero crossing, increase the frequency. When the dust settles, the round-trip time will be some integer multiple of the period of the oscillator, and you can figure out which multiple using cruder measurements.

Measuring the period is now just a matter of counting how many pulses there are in, say, 100 ms, with an appropriate combination of frequency dividers and slow digital counters.

$\endgroup$
6
$\begingroup$

Laser is coherent light, so with a technique called interferometry you can actually measure distance with a resolution of less than a micro-meter, regardless of your timing resolution.

It should be noted that the measurement produced by interferometry has half-wavelength periodicity (e.g. 200-350nm for visible light). This means that in order to absolutely measure a distance greater than half a wavelength, a measuring device must employ also other ranging techniques (for instance the laser modulation / phase shift detection technique explained in the selected answer for this question).

The combination of the two techniques allows an absolute distance measurement with sub-micrometer resolution, but without requiring extremely accurate timing.

While this approach is not used in the cheap handheld devices the original poster referred to, devices that use this approach do exist.

$\endgroup$
  • 6
    $\begingroup$ Interferometry is great measuring relative distances with sub-wavelength precision, but poor for measuring absolute distances as in this question. $\endgroup$ – rob May 15 '16 at 19:34
  • 3
    $\begingroup$ Indeed, but it is possible for a device to use a combination of time-of-flight and interferometry measurements to achieve absolute distance measurement with sub-micrometer resolution. Again, this is just an FYI and not related to the specific device the OP is writing about. $\endgroup$ – Sagie May 16 '16 at 0:59
  • 2
    $\begingroup$ @user2934229: not only possible, but pretty common in the industry (see leicas "absolute interferometers") $\endgroup$ – PlasmaHH May 17 '16 at 8:56

protected by Qmechanic May 15 '16 at 12:00

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.