Home / Hardware y Moviles / When a raindrop lands on the windscreen, it changes the angle at which light can escape

When a raindrop lands on the windscreen, it changes the angle at which light can escape

There is an awkward moment in any modern car: you drive into a tunnel, or under a bridge, and the windscreen wipers sweep a couple of times across perfectly dry glass. It is not a software quirk, nor a design flaw: it is the inevitable consequence of the way the rain sensor glued to your windscreen works. And that sensor never once looks at the sky.

A lens against the glass, nothing more

The module is mounted on the inside, behind the rear-view mirror, pressed against the glass with a transparent silicone pad. Inside there is very little: an infrared LED, a lens that collimates its light, another lens that collects it and a photodiode. The LED emits in the near infrared, typically between 880 and 950 nanometres, a wavelength that crosses the glass without heating it and that the human eye cannot see. The whole assembly covers barely two or three square centimetres and costs cents at volume.

The key lies in the angle at which that light enters the glass. Glass has a refractive index of roughly 1.52; the surrounding air, 1.00. When a ray travels from a denser medium into a less dense one at a sufficiently steep angle to the normal, it does not come out: it bounces entirely back inside. The effect is called total internal reflection, and the angle at which it begins follows from Snell’s law. For a glass-air boundary that critical angle is around 41 degrees.

The sensor is designed to work above that threshold. The LED fires the beam at the inner face of the windscreen at an angle of about 45 degrees, the light reflects off the outer face — the one facing the weather — and returns to the photodiode. As long as the glass is dry, virtually all the energy comes back. The windscreen behaves, quite literally, as a flat optical fibre.

One drop ruins everything (on purpose)

When a drop lands on the outer face, the boundary is no longer glass-air but glass-water. Water has a refractive index of 1.33, much closer to glass. That pushes the critical angle up to about 61 degrees. A beam arriving at 45 degrees is no longer trapped: part of the light refracts and leaves, into the drop and beyond. The photodiode receives less energy and the circuit registers the drop.

The wetter the surface, the more light escapes. This is not an all-or-nothing switch but a continuous measurement of intensity: the system estimates whether it is drizzling, raining hard or whether there is only a thin film of water. The electronics turn that photodiode current into a voltage through a transimpedance amplifier, digitise it with an analogue-to-digital converter and compare the result against thresholds with hysteresis, precisely so the wipers do not switch on and off on every sweep.

One detail separates a cheap sensor from one that actually works: the LED does not glow continuously but is pulsed, modulated at tens of kilohertz. The photodiode is read in sync with those pulses, so only light flickering at exactly that rate counts. That rejects the low sun ahead, the headlights of an oncoming car and the glow of a street lamp. It is the same synchronous detection technique laboratory instruments use to rescue a tiny signal from noise.

What the sensor cannot know

The system sees an area of a few square centimetres. It cannot tell a fine drizzle from the spray thrown up by a lorry, nor from the water of a puddle kicked up by the car ahead. That is why manufacturers cross the signal with speed: at 120 km/h the same amount of water justifies more sweeps than at 30. In newer cars the rain and light sensors share a module, and increasingly the decision combines infrared photometry with image processing from the forward camera, which spots drops through the blur and edges they leave in its field of view.

The same mechanism explains its best-known failures. Worn blades leave a badly spread film of water that confuses the reading; a layer of ice or mud can cover the optical window and drive the system crazy or blind it; a low sun hitting it at just the right angle saturates the photodiode. And the tunnel: on entering, ambient light drops abruptly and the algorithm, which keeps adjusting its reference, takes a few seconds to rebalance. Hence that free double sweep over dry glass.

One message on the bus, no mystery

The result does not travel on a dedicated wire: the module hangs off the LIN bus, the slow, cheap serial network used for body peripherals, and publishes its state as just another message. The body control module then decides the sweep speed, whether the washer is needed and when to try again. The whole mechanism we have described fits in one sentence: a lens, an LED, a photodiode and a law of refraction from 1621.

The next time the wipers start on their own under a bridge, you will know what happened. Nobody looked at the sky. It was a beam of infrared light that, for a few seconds, found a way out.