Optics

The windscreen that feels the rain

Behind the rear-view mirror of most modern cars a small box decides when the wipers should run, and it does so without looking at the rain. It shines infrared light into the windscreen at forty-five degrees, steep enough to be trapped inside the glass by total internal reflection, and counts how much comes back out of the far end of the glass a few centimetres away. A raindrop on the outside changes the medium the glass is touching from air to water, and water's critical angle against glass is sixty-one degrees, not forty-one: at forty-five the light is no longer trapped, and nearly all of it leaves into the drop. The sensor measures the area the rain is touching, and the rain rate from how fast that area grows.

Assumes: The angle past which light cannot leave · The reflection that happens where the glass is not

The angle past which light cannot leave begins total internal reflection with Snell’s law. Light travelling from a denser medium into a less dense one bends away from the normal, and at a critical angle the refracted ray runs along the surface; beyond it, no refracted ray exists and all the light is reflected. For glass of refractive index 1.52 and air, the critical angle is forty-one degrees. The reflection is perfect — not ninety-nine per cent, as the best metal mirror manages, but all of it — which is why optical fibres can carry light across oceans and why the prisms in binoculars are better mirrors than silvered glass.

What the critical angle depends on is the ratio of the two refractive indices, and so it depends on what the glass is touching. A rain sensor exploits exactly that: it holds a beam of light inside a windscreen at an angle that is beyond the critical angle for air and short of the critical angle for water. Wherever the outer face of the glass is dry, the beam is totally reflected and stays in. Wherever a drop of rain touches it, the beam is no longer trapped and leaves. The sensor never looks at a raindrop. It counts how much light the outer surface of the windscreen still keeps.

The angle at which water lets the light out

The two interfaces — glass to air, and glass to water — have the same shape of reflectance curve, offset in angle.

The angle at which water lets the light out. The fraction of light reflected inside a windscreen of index 1.52 at its outer surface, unpolarised, against the angle of incidence, when the outer surface is dry (glass to air) and when it is wet (glass to water). Beyond 41.2° all the light is reflected from a dry surface; under water total reflection does not begin until 61.3°. Between the two angles, shaded, the surface is a perfect mirror where it is dry and a window where it is wet. A sensor working at 45° sits in that band: at a wet spot only 1.2% of its light is reflected and the rest leaves the glass into the water. The difference between a mirror and a window is the refractive index of what is touching the glass — a property of contact, not of what can be seen through it.
Fig. 1 Fraction of light reflected inside glass of index 1.52 at its outer face, against angle of incidence, for a dry face (glass to air) and a wet one (glass to water). Total reflection begins at 41.2° dry and 61.3° wet; between them, shaded, a dry face is a mirror and a wet one a window. At the sensor’s 45° a wet spot reflects only 1.2%.

At small angles both reflect only a few per cent of the light, by the ordinary partial reflection the Fresnel equations describe. The glass–air curve rises steeply as the angle approaches forty-one degrees and is at one, total reflection, beyond it. The glass–water curve does the same at sixty-one degrees, since water’s index of 1.333 is so much closer to glass’s that the light must strike the surface much more obliquely before it cannot get out. Between the two critical angles lies a band in which a dry surface is a perfect mirror and a wet surface very nearly a window. At forty-five degrees, in the middle of that band, a wet spot reflects 1.2 per cent of the unpolarised light and transmits the rest into the water.

That is an enormous contrast for so small a change in what touches the glass, and it is a contrast that does not depend on the water being visible, coloured or even very thick. It depends only on its refractive index and on its being in contact. A raindrop that sits on the glass changes the optical boundary condition at the glass’s surface for the area of its footprint, and the trapped light that arrives there leaves.

A beam the rain lets out

The sensor is a small module glued to the inside of the windscreen, usually behind the mirror where it is out of the driver’s view and inside the area the wipers sweep.

A beam the rain lets out. A cross-section of a windscreen 5 mm thick, in millimetres, with an infrared beam entering from a prism on the inside at 45° and zig-zagging between the glass's two faces by total internal reflection, touching the outside 4 times in 40 mm before a second prism takes it out to a detector; two raindrops sit on the outside. Where the outer face is dry each reflection is total. Where a drop is in contact, the beam passes out into the drop, only 1.2% of it reflecting on, and the light reaching the detector is reduced by that factor for every wetted bounce — drawn here as the beam's fading. The sensor sees through nothing and looks at nothing. It counts the light the outside surface still traps.
Fig. 2 A 5 mm windscreen in cross-section: an infrared beam enters from a prism on the inside at 45° and zig-zags by total internal reflection, touching the outside 4 times in 40 mm before a second prism takes it to a detector. At the two wetted bounces under raindrops only 1.2% reflects on, and the beam fades.

An infrared light-emitting diode shines into a small prism of plastic or glass bonded to the inside of the windscreen with an index-matched adhesive, so that its light enters the glass without being refracted at the inner surface. The prism’s angle launches the light at forty-five degrees. The light crosses the windscreen, five millimetres or so of laminated glass, and strikes the outer surface; dry, that surface reflects it totally, and it crosses back to the inner surface, which is also dry (the inside of the car) and reflects it totally again. The beam advances along the glass by twice the thickness for each round trip, about a centimetre, and after a few bounces a second prism on the inside lets it out into a photodiode. The surface area it samples is a few square centimetres, a handful of footprints on the outside where the beam touches it.

Infrared is used because daylight contains little of it at the wavelengths where silicon detectors are sensitive and LEDs are cheap, and because the module modulates its LED at a few kilohertz and listens only for light flickering at that rate, which rejects the sun, street lamps and headlights entirely. Inside the car, the beam never leaves the glass where it is not meant to: the inner surface is touched only by air and by the bonded prisms.

The same principle — a beam trapped by total reflection and released where something touches the surface — is that of the reflection that happens where the glass is not, which follows the light’s evanescent field a fraction of a wavelength beyond the reflecting surface. A raindrop in contact sits inside that field and draws the light out. A drop held even a micrometre off the glass, on a film of something with a low index, would leave the reflection nearly total. The sensor detects contact at the scale of the light’s own wavelength, which for a raindrop resting on a windscreen is the same thing as contact.

Getting the light in, and out again

There is a difficulty hidden in the sensor’s design, and it is the reason for the prisms. Light shone onto a flat sheet of glass from the air outside can never end up trapped in it. Snell’s law, run forwards, says that a ray entering glass from air at any angle at all — even grazing the surface — is bent towards the normal and travels inside at less than the critical angle. That is the same law as the critical angle itself, read the other way: the rays that cannot leave are precisely the rays that could never have come in through a flat face. An LED simply held against the inside of a windscreen, with a thin layer of air between them, would fill the glass with light that escaped again at the first reflection.

So the light must be brought in through a face that is not parallel to the windscreen. A small prism, bonded to the glass with an adhesive whose index matches it, presents a face to the LED tilted so that light entering it square-on continues into the windscreen at forty-five degrees without refracting at the bond, since there is no change of index there. The adhesive is doing the job that the layer that makes a reflection vanish describes for coatings, at its extreme: a layer of matched index makes the boundary invisible to light, so that prism and windscreen become one piece of glass. At the far end a second prism takes the light out the same way. Without them the beam could neither enter its trap nor leave it.

The same geometry makes cut gemstones sparkle. A diamond’s index of 2.42 gives it a critical angle of only 24 degrees, and the window a diamond is cut inside shows how its facets are angled so that light entering through the crown is totally reflected from the pavilion’s facets and comes back out through the crown, and nowhere else. A raindrop is the opposite case: the drop that cannot hold the light it lets in shows that a sphere’s symmetry guarantees that any ray which enters it strikes the inside surface at the angle at which it entered, and so can always leave again. A drop cannot trap light by total reflection; a windscreen with prisms can.

The prisms in binoculars face the same constraint from the other side. The roof that splits a binocular’s image shows a roof prism folding the light path by total internal reflection at faces that must stay perfectly clean and dry: a fingerprint on a reflecting face of such a prism frustrates the reflection exactly as a raindrop frustrates the windscreen’s, and leaves a dark smudge in the view. Binocular makers seal their prisms for the reason a rain sensor exposes its windscreen.

How much of the light survives the rain

The detected signal falls with each wetted bounce.

How much of the light survives the rain. The light reaching the detector, as a fraction of its value on a dry screen, against the fraction of each bounce's footprint on the outer face that is covered by water, for beams that touch the outside 2, 4 and 8 times; at each bounce the dry part reflects fully and the wet part 1.2%. With 4 bounces, a tenth of the area wet removes 34% of the signal and a quarter wet 68%. More bounces make the sensor more sensitive to a light drizzle and saturate it sooner in a downpour. The signal is a measure of wetted area, not of how much water there is: a thin film and a heavy drop over the same footprint dim it equally, which is why a fogged inside surface — on the other face — leaves the outside reading untouched.
Fig. 3 Detector signal, as a fraction of its dry value, against the wetted fraction of each bounce’s footprint, for beams touching the outside 2, 4 and 8 times; the dry part of each footprint reflects fully and the wet part 1.2%. With 4 bounces a tenth wet removes 34% of the signal and a quarter wet 68%.

If a fraction ff of each footprint on the outer face is wet, each outer reflection returns 1−f+fRw1 - f + f R_w of the light, with RwR_w the 1.2 per cent of a wet spot, and after NN bounces the detector sees that fraction raised to the power NN. With four bounces, a tenth of each footprint wet takes a third of the signal; a quarter wet takes two-thirds. More bounces make the sensor more sensitive to a light drizzle, since the same drops are sampled more times, and saturate it sooner, since there is nothing left to remove when the screen is half wet; designs choose two to six bounces and a footprint size to suit.

The signal measures wetted area and nothing else. A thin film of water and a large drop dim the light equally if they cover the same area, since the transmission at a wet spot is set by the indices, not by how much water lies beyond. That is a virtue: the sensor responds to how much of the glass the driver’s view is obscured over, which is what wipers are for. It is also why mist on the inside of the windscreen does not trigger the wipers. A fogged inner surface is wetted on the inside, where the prisms are, and fog’s droplets do change the inner reflections; sensors are designed so that the inner surface is touched by the beam only under the bonded prisms, where the fog cannot reach.

Everything the sensor can mistake for rain

Because what the sensor detects is the index of whatever is in contact with the glass, it is not specific to water.

Everything the sensor can mistake for rain. The critical angle inside glass of index 1.52 against the refractive index of whatever is touching the outside, from air to the glass's own index, where total reflection disappears entirely; with the sensor's 45° drawn across. Air's critical angle, 41.2°, lies below the line, so a dry screen traps the beam; everything else marked lies above it, lets the beam out and reads as wet: ice 59.5°, water 61.3°, washer fluid 63.5°, oil film 75.3°. Only something with an index below 1.07 — nothing liquid or solid at hand — would read as dry. So the sensor sees ice, washer fluid and an oil smear as rain too; what it cannot see is a drop that is not touching the glass. It is a detector of optical contact.
Fig. 4 The critical angle inside glass of index 1.52 against the index of what touches the outside, with the sensor’s 45° drawn across. Air’s critical angle, 41.2°, lies below the line, so a dry screen traps the beam; ice (59.5°), water (61.3°), washer fluid (63.5°) and an oil smear (75.3°) lie above it and read as wet.

Anything with a refractive index above about 1.07 lets the beam out at forty-five degrees. That includes every liquid and every solid. Ice, with an index of 1.31, reads as wet; so does washer fluid, which is mostly water and alcohol; so does an oil smear from the road or a film of wax from a car wash, with indices near 1.47 that let out almost all the light. A dead insect on the sensing area, a sticker or a crack filled with grime read as permanently wet, and sensors are designed to adapt their baseline slowly so that a constant obstruction is gradually treated as the dry level. Snow is more subtle: a layer of snow touches the glass only at the points of its crystals, with air between them, and dims the beam much less than its coverage suggests, which is why sensors respond sluggishly to dry snow and promptly to the wet snow that melts against warm glass.

The sensor’s angle is a design choice that sets what counts as rain. At a steeper angle, say fifty-five degrees, the glass–water reflectance is still low but ice is closer to its own critical angle; at an angle beyond sixty-one degrees the sensor would be blind to water and see only oils. Forty-five degrees is chosen to sit comfortably inside the band for every liquid likely to be on a windscreen and to be easy to make with a simple prism.

The rain rate read off the falling light

The controller that drives the wipers reads not the level of the signal but its rate of change.

The rain rate read off the falling light. A simulation of the detector's signal over twelve seconds in three showers — a drizzle of one drop a second on the sensing area, rain of five and a downpour of twenty-five — with each drop wetting a twentieth of the area and the wiper clearing it every 6, 3 and 1 s respectively. Each drop knocks the signal down a step; the wiper restores it. In the drizzle the signal sags slowly between sweeps, in the downpour it falls most of the way in under a second. A wiper controller does not need to know how much water is on the glass, only how fast the trapped light is being lost between sweeps, and it sets the wiping interval from that rate — the same quantity that tells a driver how hard it is raining.
Fig. 5 A simulated detector signal over twelve seconds in a drizzle (1 drop a second, wiper every 6 s), rain (5 a second, wiper every 3 s) and a downpour (25 a second, wiper every 1 s), each drop wetting a twentieth of the sensing area: a step down per drop, restored by each sweep.

Each drop that lands on the sensing area knocks the signal down a step; each sweep of the wiper restores it, as the blade clears the glass. In a drizzle the signal sags slowly between sweeps; in a downpour it falls most of the way within a second. The controller measures how quickly the signal falls after each sweep, which is in effect a measure of the rate at which drops arrive per unit area, and adjusts the interval between sweeps to keep the signal near its dry level. Wiping more often than necessary wears the blades and distracts the driver; wiping too rarely leaves the view obscured. The light trapped in the glass is the quantity that tells the controller how hard it is raining, and it is the same quantity — the fraction of the view still clear — that the driver cares about.

The geometry also sets a limit on what a single sensor can know. Its sensing area is a few square centimetres; raindrops arrive at random, and in a light drizzle only a few land on it per minute. Its estimate of the rain rate is then a count of a few events, uncertain by the square root of the count, and the controller must average over many sweeps before it can tell a drizzle from a pause. Larger sensing areas and more bounces trade that statistical uncertainty against cost and the space behind the mirror.

Fingerprints, touch screens and molecules

Detecting contact by frustrating total internal reflection is old and widespread. Fingerprint scanners of the classic kind are a glass prism under a lit surface: where a ridge of the finger touches the glass the total reflection is frustrated and the image goes dark, where the valleys hold air between skin and glass it stays bright, and a camera photographs the pattern. Some touch screens work the same way, with infrared light trapped in a sheet of acrylic and released wherever a finger presses. In microscopy, the mirror that lights a tenth of a micrometre uses the evanescent field of a totally reflected beam to illuminate only the molecules within a hundred nanometres of a glass slide; in chemistry, the attenuated-total-reflection spectrometer measures the infrared absorption of a liquid touching a crystal by how much of the trapped beam it absorbs.

In every case the principle is that a totally reflecting surface is a perfect mirror whose perfection depends on what is touching it, within a fraction of a wavelength. The angle at which total reflection stops being total shows a thin gold film doing the same at one particular angle, where its surface plasmons absorb the light, and the angle shifts with the index of whatever touches the gold; biosensors read the binding of molecules from that shift. The windscreen sensor is the coarsest member of the family, sensing millimetres of water rather than nanometres of protein, and the most widely used.

Why the outside and not the inside

There is one more design question, and its answer reveals the sensor’s whole logic. A sensor could in principle be built to detect rain by looking through the glass, with a camera, or by measuring scattered light. Cameras behind windscreens now do this for lane-keeping and can detect rain, but they are confused by everything else in view: wet roads, headlights, darkness. The total-reflection sensor sidesteps the outside world entirely. Its light never leaves the glass except into whatever is touching it. The road, the sky, the dark and the oncoming headlights do not exist for it.

That is a common move in physics instrumentation: choose a measurement that is blind to the background by construction, rather than one that sees everything and must subtract. The corner that sends light home does something similar for direction, returning light to its source whatever the angle of arrival, so that a reflector on a road sign shines back only towards the car that lit it. The windscreen sensor returns its light only to itself, unless the glass is wet.

One wavelength, one index, one footprint

Reflectances are Fresnel’s for an unpolarised beam at a single wavelength, with indices of 1.52 for the glass, 1.333 for water and representative values for ice, washer fluid and oil; real windscreens are laminated, with a plastic interlayer of index about 1.48 between two glass sheets, which slightly bends the beam and adds weak reflections not drawn. The glass is taken as five millimetres thick and the beam’s footprints as distinct spots; real beams are a few millimetres wide and their footprints overlap. Wet spots are treated as uniform contact; a real drop’s edge, where it meets the glass at its contact angle, frustrates the reflection over a slightly smaller area than its outline. The rain simulation uses drops of a fixed wetted area landing at random at fixed rates and a wiper that clears the area completely; real drops vary in size by a factor of ten, and a smeared film left by a worn blade dims the beam even after a sweep.

Still open: telling what kind of weather it is

The rain sensor is good at telling wet from dry and at estimating the rate, but not at telling what is wet. A driver would want the wipers to behave differently for rain, sleet, wet snow, road spray and a splash of washer fluid, and the light alone does not distinguish them, since each is simply an index above 1.07 touching the glass. Combining the sensor with temperature, humidity and a camera’s view, and learning from drivers’ manual corrections, is the current direction; whether a more specific optical signature — the dynamics of a drop’s footprint as it spreads and runs, or the different scattering of ice — can be read from the trapped light itself is an open engineering question.

The habit worth carrying away is to ask what a measurement is blind to. A beam trapped in a windscreen at 45° — beyond glass’s 41.2° critical angle against air and short of its 61.3° against water — stays in where the glass is dry and leaves where anything touches it, 98.8 per cent of it through each wet spot, so a few bounces turn the wetted area into a signal that falls with every drop and is blind to everything outside the glass. A rain sensor is a mirror that stops working where it is touched.

Part 9 of 9

This essay is one argument about Total internal reflection. The others:

The objects named here

The third axis, after the field and the reading path: the things themselves, and every essay that touches each one.

Critical angleEvanescent waveFresnel equationsFrustrated total internal reflectionOptical contactRefractive indexSensorTotal internal reflection