Built to order

Automatic Vehicle Headlight Dimmer with Ambient Light Sensing

This project builds an automatic headlight dimmer that switches a vehicle's headlamp between high and low beam without the driver touching the stalk. An LDR aimed forward senses the glare of oncoming headlights; when the reading crosses a calibrated threshold, an Arduino drops the beam to low via a relay, and when the road clears it restores high beam after a short hold delay. A second LDR watches ambient daylight so the system only arms at night, and a manual override keeps the driver in ultimate control. Suitable for B.E./B.Tech final-year projects in Electronics, Electrical and IoT &

IoT & Embedded Arduino UnoArduino IDE16x2 LCDRelay moduleLDR sensors ×212 V headlamp demoHysteresis controlManual overrideHardware
Automatic Vehicle Headlight Dimmer with Ambient Light Sensing — project thumbnail preview
More project photos (3)

The problem

High-beam glare from oncoming traffic is a genuine road-safety hazard — momentary blindness at closing speeds leaves no margin — yet most drivers dip their beams late or not at all, out of inattention or forgetfulness. Automatic high-beam systems exist in premium cars as sealed modules; the sensing principle, however, is simple enough to build and fully understand as a student prototype. This project implements it with an Arduino: a forward-facing LDR behind a simple lens tube measures oncoming light intensity, and when it exceeds a student-calibrated threshold the controller switches the headlamp relay from high to low beam. A short hold delay prevents flicker when the oncoming vehicle passes through the sensor's edge, and an ambient-light LDR arms the system only after dusk so daytime driving is unaffected. The build demonstrates threshold-based control, relay switching of a real load, and anti-flicker timing logic on hardware.

SYSTEM FLOW

7 components 6 connections

Live flow
Drag to explore
100%
sensorAmbient LDR

Measures daylight; below the dusk threshold the automatic path arms.

Follow the working sequence

How it works

  1. The ambient LDR continuously measures daylight; below the dusk threshold the system arms, otherwise it stays in manual pass-through.
  2. When armed, the forward LDR is sampled every 100 ms; readings are smoothed with a short moving average to reject noise.
  3. If the smoothed glare reading exceeds the calibrated threshold, the Arduino de-energizes the high-beam relay contact, dropping the lamp to low beam, and lights the LOW indicator.
  4. When the reading falls back below the threshold minus a hysteresis margin, a hold timer (typically 2–3 seconds, design range) starts.
  5. If the road stays clear through the hold period, the relay re-engages high beam; any new glare during the hold restarts the wait.
  6. The hysteresis band plus the hold delay together prevent flicker at the threshold edge.
  7. The manual override switch, when engaged, bypasses the automatic path entirely and the LCD flags MANUAL mode.

Tech stack:

  • Arduino Uno (ATmega328P)
  • 2× LDR light sensors with dividers (glare + ambient)
  • 5 V relay module (high/low beam switching)
  • 12 V automotive-style headlamp demo unit
  • 16×2 character LCD + status LEDs
  • Manual override switch
  • Arduino IDE (C/C++ firmware)
Parameter Value
Controller Arduino Uno
Glare sensing Forward LDR in lens tube, 100 ms sampling
Ambient sensing Second LDR, dusk arming threshold
Switching Relay, high/low beam select
Hold delay 2–3 seconds typical (design range, configurable)
Hysteresis Threshold ± margin band (calibrated)
Response time Beam dip within approximately 300 ms of threshold crossing (design target)
Display 16×2 LCD + beam-state LEDs
Power 12 V DC (lamp + logic via regulator)

Project features

  • [Oncoming-glare sensing] A forward-facing LDR in a lens tube measures the intensity of oncoming headlights while rejecting most side and sky light.
  • [Automatic high/low switching] The Arduino drives a relay that switches the headlamp between high and low beam filaments the moment glare crosses the calibrated threshold.
  • [Anti-flicker hold delay] After the glare clears, the system waits a short hold period before restoring high beam, so a single passing vehicle does not cause rapid beam toggling.
  • [Dusk-only arming] A second LDR measures ambient daylight and arms the dimmer only after dusk; daytime driving always stays on the driver's manual selection.
  • [Manual override] A dashboard switch forces high or low beam regardless of the automatic logic, keeping the driver in ultimate control as road-safety practice requires.
  • [Status indication] LEDs and a 16×2 LCD show the current beam state, sensor readings and whether the system is armed.
  • [Student calibration] Both LDR thresholds are set by the student with a real headlamp at measured distances, logged on the calibration sheet — the trigger point is measured, not assumed.

What is included

  • Working prototype: sensor head, controller, relay, demo headlamp, LCD
  • Complete firmware (sampling, threshold logic, hysteresis, hold delay, override)
  • LDR calibration procedure with distance-based log sheet
  • Wiring diagram and 12 V automotive-style wiring notes
  • Project report PDF (background, LDR sensing theory, control logic design, methodology)
  • PPT presentation for final review
  • Viva Q&A preparation document

Limitations & prerequisites

  • This is a tabletop demonstrator with a 12 V demo lamp — it is not certified automotive equipment and must not be fitted to a real vehicle without proper automotive-grade engineering.
  • The LDR responds to light intensity, not to vehicles: bright streetlights or reflective signs near the threshold can influence it, which is why calibration distance and the lens tube matter — the report discusses this honestly.
  • Heavy rain or fog scatters oncoming light and changes the effective trigger distance; the system is a clear-weather demonstrator.
  • The 100 ms sampling plus relay time gives a dip response of roughly 300 ms (design target) — adequate for demonstration, not a claim about production timing.
  • Only one lamp channel is switched in the demo build; a real vehicle has two headlamps plus high-beam assist integration, listed as future scope.

Frequently Asked Questions

How does it detect an oncoming vehicle?

It does not detect vehicles — it detects their headlights. A forward-facing LDR measures light intensity ahead; when the smoothed reading crosses the calibrated threshold, the controller treats it as oncoming glare and dips the beam.

What stops the beam from flickering when a car passes?

Two things: a hysteresis band (the restore threshold sits below the trigger threshold) and a 2–3 second hold delay after the glare clears. Together they prevent rapid toggling at the edge.

Does it work in daytime?

No, by design. An ambient-light LDR arms the system only after dusk; in daylight the lamp follows the manual switch only.

Can the driver still control the beam?

Yes — a manual override switch forces high or low beam regardless of the automatic logic, and the LCD flags MANUAL mode. Driver authority is a deliberate design requirement.

How is the trigger threshold set?

By the student during calibration: a real headlamp is shone at the sensor from measured distances, readings are logged, and the threshold is picked from the data — documented on the calibration sheet.

Is this project suitable for a final-year project?

Yes — for Electronics, Electrical and IoT & Embedded programs. It demonstrates light sensing, threshold control with hysteresis, relay switching of a real load and anti-flicker timing on a road-safety application. Suitable for B.E./B.Tech final-year projects in Electronics, Electrical and IoT & Embedded Systems.

Components & software requirements
  • Arduino Uno (ATmega328P)
  • 2× LDR light sensors with dividers (glare + ambient)
  • 5 V relay module (high/low beam switching)
  • 12 V automotive-style headlamp demo unit
  • 16×2 character LCD + status LEDs
  • Manual override switch
  • Arduino IDE (C/C++ firmware)
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation