Automatic Headlight Control Using Arduino-sensors
Automatic Headlight Control Using Arduino-sensors
This project primarily relies on light sensors to detect ambient light conditions
and automatically turn the headlights ON or OFF. The main sensor used is the
Light Dependent Resistor (LDR), but alternative sensors like the TSL2561
Light Sensor or BH1750 Light Sensor can also be used for enhanced
accuracy.Also IR sensor,Temperature and humidity sensor.
1. Light Dependent Resistor (LDR) – Primary Sensor
Working Principle:
Working Principle:
Infrared light is emitted, and its reflection is measured.
Fog, mist, or rain scatter the IR light, causing less reflection.
The Arduino detects this and activates the headlights when visibility is low.
3.Temperature and Humidity Sensor (DHT11/DHT22) –
For Foggy Condition Detection
Why Use It?
Measures humidity levels, which helps detect foggy weather conditions.
If humidity is above a certain level (e.g., 85%), the headlights automatically
turn ON to improve visibility.
Working Principle:
The sensor measures temperature and humidity and sends the data to
Arduino.
If high humidity + low light conditions are detected, the headlights are
turned ON.
Sensors Used For Cornering
1. Gyroscope and Accelerometer (MPU6050) – Best Choice
How It Works:
The MPU6050 sensor contains a gyroscope (detects rotation) and an accelerometer (detects
movement).
It detects changes in vehicle direction and tilt when turning left or right.
The Arduino reads real-time angular velocity data from the gyroscope.
If a turn is detected, extra LEDs or fog lights on that side are activated.
Example Working:
If turning left: MPU6050 detects a negative yaw rate → Left cornering light turns ON.
If turning right: MPU6050 detects a positive yaw rate → Right cornering light turns ON.
After completing the turn, the additional lights turn OFF
2. Wheel Speed Sensors (Hall Effect or ABS Sensor)
How It Works:
Uses Hall Effect sensors to measure individual wheel speeds.
During a turn, inner and outer wheels rotate at different speeds.
The Arduino detects the speed difference between left and right wheels.
If the difference is significant, it activates the cornering light on the turning side.
.
Example Working:
If left wheels slow down while right wheels speed up, it means the vehicle is
turning left → Left light ON.
If right wheels slow down while left wheels speed up, it means the vehicle is
turning right → Right light ON.
3. Steering Angle Sensor (Potentiometer or Rotary Encoder)
How It Works:
A rotary potentiometer or rotary encoder is attached to the steering column.
When the driver turns the steering wheel, the sensor measures the angle.
If the angle exceeds a certain threshold (e.g., ±15°), the corresponding cornering light
turns ON.
Example Working:
Steering >15° Left: Left-side extra light turns ON.
Steering >15° Right: Right-side extra light turns ON.
Lights turn OFF when the steering returns to the center.