Automotive Rain-Sensing Control System
A working automotive prototype that watches the windshield for rain and automatically lights the headlights and runs the wipers at the right intensity. Optical detection feeds a two-stage adaptive response, and the whole loop closes in under two seconds.
- Sensor
- Optical rain
- Response
- 2-stage adaptive
- Drivers
- MOSFET + relay
- Activation
- < 2 s tested
One dashboard, every subsystem
Click the image to expand. In the lightbox, click again or press the 1:1 button to read the schematic, control flowchart, and measured results at native resolution.
The dashboard above is the whole project on one page: the physical prototype on its aluminium-extrusion frame, the schematic for the sensor and driver electronics, the control flowchart, the measured automatic-activation and illumination-distance results, the response-time number, and the mechanical CAD for the enclosure.
Rain in, response out
The whole loop, in plain English.
An optical rain sensor sits where the rear-view mirror would go. Every raindrop that lands on the windshield reflects light back into the sensor; the controller counts those reflections.
Drop counts are bucketed into three categories: none, light, or heavy. There is no continuous mapping, no rolling average for the driver to second-guess; just three honest states the rest of the system can react to.
When the bucket changes, two outputs change with it. A MOSFET running pulse-width modulation sets the headlight brightness: off in dry, dim in light rain, full in heavy rain. A relay pair drives the wiper motor and steps it between two speeds, reversing direction cleanly at each end of travel.
Power for the whole prototype comes from a 12 V rechargeable battery, the same voltage a real automotive accessory bus runs at, so the demo behaves the way the production version would.
Six subsystems, one closed loop
Sensor to decision to driver to physical output. Each piece is sized for its job.
Optical rain sensor
An FSIR-02 optical sensor watches the windshield surface and counts incoming raindrops. Drop counts fall into one of three intensity buckets: none, light, or heavy. That bucket drives every other subsystem.
Adaptive headlights
Headlight brightness is set by a MOSFET running pulse-width modulation. In light rain the headlights run dim; in heavy rain they ramp to full brightness and project at least 50 feet down the road.
Smart windshield wipers
A small DC motor drives the wiper arm through a relay pair that flips polarity to reverse direction. The control loop steps through two speed levels, slow for light rain and fast for heavy, and reverses cleanly without stalling.
Power electronics
MOSFETs handle the headlight load; relays handle the higher-current wiper motor. Each driver is sized for its job, so the controller stays cool and the LEDs and motor see clean switching.
Control logic
An Arduino UNO reads the sensor, decides which response bucket the rain belongs in, and writes the matching brightness and wiper speed. The decision tree is three branches deep — easy to audit, easy to extend.
Portable 12 V system
The whole prototype runs from a 12 V rechargeable battery so it can be demonstrated anywhere, not just on a bench. The same rail that powers a real automotive accessory bus powers this one.
The non-obvious parts
A rain-and-wipers demo is easy to fake on a slide. These six decisions are what separate a slide from a working prototype.
Reliable raindrop counting
Optical sensors get noisy under headlight glare and stray light. The counter is debounced and bucketed so a single false count doesn't trigger a phantom response.
Two-stage response, not one
A wiper that just runs or doesn't run is a toy. Light rain gets a dim headlight and a slow wiper; heavy rain gets full brightness and a fast wiper. Both modes were tuned on a real water test, not just the simulator.
Activation under two seconds
From the first raindrop landing on the sensor to the wiper sweeping and the headlights brightening, the average response is 1.885 seconds — fast enough to feel intelligent, slow enough to filter noise.
Reversing the wiper without coast
Direction is changed by flipping the relay pair, not by braking the motor in software. The wiper reaches its travel limit and reverses with no audible coast and no overshoot.
Mechanical packaging that proves the system
An aluminium-extrusion enclosure with a clear acrylic windshield holds the sensor, headlights, motor, and battery in real automotive geometry. The demo isn't a breadboard — it looks like a car.
Headlights that hit fifty feet
The lighting subsystem was tested for illumination distance, not just on/off. At full brightness the prototype reliably projects useful light at least fifty feet down the road, every run.
Reaction time you don’t have
A driver hit by sudden rain is the worst time to ask them to find the wiper stalk.
Most production cars now ship with rain-sensing wipers and automatic headlights, but the integration is rarely transparent — drivers still override the system, the response is sluggish, or the two outputs don’t agree on what the weather is doing.
This prototype keeps the loop honest: one sensor, one bucketing decision, two coordinated outputs. The headlight and wiper both react to the same intensity at the same time, so the driver never has to reconcile two competing automations.
The same control architecture extends naturally to defrost, fog lamps, and adaptive interior dimming — anywhere the vehicle should react faster to weather than the driver can.
Need custom hardware designed?
From sensor-to-driver automotive systems like this one to full board-level products, scoped, designed, and shipped by one engineer.