History: how sound learned to measure distance

Why beep. Behind the car the driver sees almost nothing: the bumper is low, a post or a kerb hides below the rear window. A parking sensor measures distance with sound that a person cannot hear, and turns it into what can be heard and seen: a beep, bars, digits.

wallpostreversingbeep-beep4 sensors in the bumper · the post is nearer the lower ones — their red is lit too
A car reversing towards a wall, top view. Four ultrasonic sensors sit in the bumper: each one pings and catches the echo. The closer the wall or the post, the more arcs light up and the faster the buzzer beeps in the cabin.
Spallanzani1794bats seewith earsLangevin1917sonaron quartzGriffin1938bat callsultrasonicCMOS 40001968counters,comparatorsPolaroid1978sonarautofocuspark assist1990sin thebumperHC-SR04todaya modulefor a dollarfrom bats to the beep behind the bumper — two centuries
How sound learned to measure distance: bats, sonar, ultrasound, chips, autofocus, the parking sensor and the cheap module.

1794 — bats. Lazzaro Spallanzani noticed that a blindfolded bat flies around stretched threads, but with its ears plugged it bumps into them. How it "sees" with its ears was understood only a century and a half later: in 1938 Donald Griffin recorded its cries with instruments — they are above 20 kHz, and a person cannot hear them. Later Griffin named this echolocation.

a motha call above 20 kHz → an echo → the echo time is the distance
A bat calls in ultrasound and listens to the echo: the echo time tells it how far the moth or the branch is. This is echolocation — the principle of the parking sensor.

1917 — sonar. At the height of the submarine war Paul Langevin made an emitter on a quartz crystal: apply a voltage — the crystal rings with ultrasound; the sound comes back — the crystal gives a voltage. The time between the beep and the echo is the distance to the submarine. The same principle is in every parking sensor.

shipsubmarinepingechotime from ping to echo = 2 × distance / speed of soundin water ~1500 m/s · in air ~343 m/s
Langevin's sonar, 1917: quartz rings with ultrasound, the echo comes back — the echo time gives the distance. A parking sensor does the same in air.

1978 — sonar in a camera. Polaroid released a camera with ultrasonic autofocus: a click — and the camera knows how far away the person is and focuses the lens by itself. Its ultrasonic sensors were later sold separately for years — the first robots that drove around walls were built on them.

The parking sensor. Ultrasonic sensors have been put into bumpers since the late 1980s; in the 1990s they became a common option. Inside is the same as in our kit: the sensors beep in turn, a counter measures the echo time, a comparator picks the zone, and the buzzer beeps the more often the closer it gets.

The speed of sound. Sound travels at about 343 m/s at 20 °C and changes by about 0.6 m/s for every degree. In winter and in summer the same milliseconds are different centimetres, so good parking sensors measure the temperature and correct themselves, and every device is calibrated — lesson 6.

Today. A hobbyist buys an HC-SR04 module for a dollar: two "barrels" — a speaker and a microphone, pins TRIG and ECHO. Our sensor in the simulator works the same way. And the logic around it is on CMOS 4000 chips of the 1970s, where every step can be seen.