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.
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.
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.
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.