Auto Adjusting Brightness of Headlights Using LDR and Ultrasonic Sensor To Prevent Night Glare
Auto Adjusting Brightness of Headlights Using LDR and Ultrasonic Sensor To Prevent Night Glare
14 (2021),1020 – 1026
Research Article
Auto Adjusting Brightness of Headlights using LDR and Ultrasonic sensor to prevent
night glare
Abstract: Around 40% of accidents happens in the night even though traffic reduces by 60% [2]. One way we can reduce
accidents during night is by reducing night glare. This is archived by using Arduino uno to automatically dim the headlight
when the vehicle is approaching in the opposite direction. Light dependent resistor (LDR) module is used to detect the
opposing vehicle by detecting the light from the opposing vehicle headlight and it is processed by Arduino UNO and
Ultrasonic sensor is used to detect when the vehicle passes and sends the signal to the Arduino. Arduino will process the data
and decide when to activate high beam. This model will help to prevent lots of accident which happen daily on the highways
and it will be very useful for heavy vehicle drivers as they drive long distances in the night time.
Keywords: Light dependent resistor, Arduino, Headlight glare, Ultrasonic sensor, Night driving
1. INTRODUCTION
There are a lot of accidents that take place on Indian roads. A lot of accidents take place because of lack of
vision when the vehicle coming from the opposite direction has high beam on. People tend to forget about
switching to low beam when they see a car coming from the opposite direction. This problem has a huge toll on
the number of road accidents. Therefore this project is based on automatic beam switching depending on the
vehicle coming from the other direction . Nowadays vehicles are equipped with head lights with high intensity. If
high intensity light hits human eyes we may feel whiteout or glare at least for seconds . Due to this problem they
used to plant lot bushes the highway lane which separates from and to roads .but nowadays there are no plants
on roadside . People used to paint middle of the headlight with a big black circle so that high intensity will not
hit the humans who come in opposite direction ,even this we cannot see people doing this nowadays. With
expanding age, mesopic vision diminishes and glare affectability increments, even without visual maladies. Due
to the expanding number of old drivers, more drivers are influenced around evening time vision challenges.
Vision tests, which precisely foresee late evening driving capacity, are accordingly of extraordinary intrigue.
People may also forget to switch from high beam to low beam when they are in city limits .so , it is necessary for
them to switch from high beam to low beam when ever it is required automatically
A device is going to be modelled which would sense the vehicles in the opposite direction and dims the headlight
.which will help to reduce accidents caused by high brightness of light due to vehicles in opposite direction
The expected outcome is to shift from high beam to low beam when a vehicle comes in opposite direction
Make sure that it works with the existing vehicle in the market
Human eye will be affected if intensity of light that hits you directly is more than 700 lumens. The below table
provides the range intensity of existing Headlights in high beam.
Some research results show that as glare increases, it is related to an increase in instability of the optics. It was
also studied that relation glare versus luminance and found that normal had a glare that was almost independent
1020
Turkish Journal of Computer and Mathematics Education Vol.12 No.14 (2021),1020 – 1026
Research Article
of luminance level, while cataract patients had decrease in glare sensitivity when the luminance reduced. Most
patients had a glare that matched to their glare problems.[6]
Driving at night, without adult supervision, with passengers, using alcohol, and being male were associated with
high driver injury crash rates.[7] Driving between 10 pm and midnight is very dangerous for young drivers.
High glare sensitivity is a very common complaint that elderly people or people with cataract do.[8]
It is therefore advisable for traffic safety if drivers with such complaints undergo a complete eye test before
starting to drive always.[9-11].
It can be seen that existing headlights in high beam will affect human eye and may lead to partial
blackout. The existing higher end cars uses cameras and radars for detecting collision and for
autonomous features. That can be used to detect vehicle in opposing direction but for lower end
vehicle if we include the same technology the cost of the vehicle will increase. Number of accidents
is around 40% when the amount of traffic in the night reduces by 60% .
A survey was conducted using google forms, to gain more information on what people experience on
roads and to know if this project would close a gap in the commercial market. Below are the results
It was found that more than 30% of the people go out on a drive more than 10 times a week
from the survey and the next highest were 8 and 9 equally.
It was found that most people prefer driving during the afternoon with evening and morning
following it. 11.6% of people preferred driving during the night.
Most of the reasons for their travel was for personal reasons at 60% followed by work
related at 29% and joy riding at 18.8%.
It was found that 75.4% of people experienced distraction due to night glare.
It was found that 43.5% of people found the level of distraction to be very high followed by 24.6% of
them who found it to be highly distracting.
1021
Turkish Journal of Computer and Mathematics Education Vol.12 No.14 (2021),1020 – 1026
Research Article
Figure 2. Histogram
Around 60% of people found it difficult to remember to dim their headlights when vehicles
came from the opposite direction.
75% of the people think that this could be a major reason for fatalities on the road.
Around 53% of the people accepted that they would buy a product which could
automatically dim headlights during a drive.
2. THIS MODEL
2.1. Components
2.1.1. Arduino uno:
The Arduino Uno is a microcontroller which is built with a open source platform. The microcontroller has 6
Analog (I/O) and 13 digital (I/O) which can be used to communicate between expansion circuits [5].
According to the project requirements required expansion boards are used. Its is the brain of our project this
microcontroller will receive data from both LDR module and Ultrasonic sensor and according to the data
received it determines whether the brighter bulb should be turned on or not.
2.1.2. LDR Module:
The LDR(Light dependent Resistor). The resistance of diode is inversely proportional tointensity of light
The sensitivity of the signal detection can be adjusted using potentiometer. Here too, it is used to detect the
intensity of the light and the Arduino decides whether the light has to be dimmed or not. The LDR module
is calibrated can be adopt to all existing Headlights and it is placed parallel to the vehicle direction and
facing toward the opposing vehicle.
1022
Turkish Journal of Computer and Mathematics Education Vol.12 No.14 (2021),1020 – 1026
Research Article
2.1.4. Software:
Arduino IDE (Integrated Development Environment) is a open source software which was
created to work with functions from C and C++. Using this software, we can code all
microcontroller built using Arduino platform. This software can be used in all existing
operating systems. The program can be transferred to Arduino board using a priority cable
2.2. Circuit
The components are connected to the appropriate pins as given in circuit diagram in Fig 2 .For
more reference pin assignments for the components are given in Table 2.
2.3. Code
The program to support the above circuit
whichshouldbeuploadedinArduinounoisgivenbelow
1. intthresholdLDR=600;
2. longthresholdUS =4;
3. longduration;
4. intdistance;
5. int light=1;
1023
Turkish Journal of Computer and Mathematics Education Vol.12 No.14 (2021),1020 – 1026
Research Article
6. voidsetup(){
7. Serial.begin(9600);
8. pinMode(3,OUTPUT);
9. pinMode(2, OUTPUT);
10. pinMode(13,OUTPUT);
11. pinMode(12,INPUT);
12. }
13. void loop(){
14. digitalWrite(2,HIGH);
15. if(analogRead(A0) >thresholdLDR)
16. {
17. digitalWrite(3,LOW);
18. while(analogRead(A0)>thresholdLDR)
19. {
20. delayMicroseconds(5);
21. light=1;
22. }
23. delayMicroseconds(10);
24. if(light==1)
25. {
26. do
27. {
28. digitalWrite(13,HIGH);
29. delayMicroseconds(10);
30. digitalWrite(13,LOW);
31. duration=pulseIn(12,HIGH);
32. distance=duration*0.00034/2;
33. }
34. while(distance<thresholdUS)
35. }
36. }
37. else{
38. digitalWrite(3,HIGH);
39. }
40. }
Once the main switch is turned ON low beam is kept active all the time. LDR module is activated when
vehicle comes in opposite direction light from the vehicle hits on LDR sensor which triggers controller to
1024
Turkish Journal of Computer and Mathematics Education Vol.12 No.14 (2021),1020 – 1026
Research Article
turn OFF the high beam.For every five micro seconds LDR module checks for light to confirm the vehicle
is still approaching in the opposite direction.
When vehicle passes LDR module the intensity of light reduces now ultrasonic sensor is activated and
sound is emitted and distance is calculated using time taken for reflection this helps to detect whether the
vehicle has passed. After the conformation the high beam is activated back. An override switch as been
added incase if the driver wants to force high beam. In the circuit. The state of the sensors and bulbs are
represented in the form of digital wave in fig 4.
3. CONCLUSION
A working model of this project was created successfully. In the test phase the vehicle was detected and
headlight was dimmed. As the working model is very small, it can be attached or fixed into existing
vehicles. As the model is very simple, it can be repaired or replaced easily in the vehicles. Cost is very less
and the sensors are easily available everywhere for easy replacement. It helps us reduce accidents in the
night, significantly. Sensors can be replaced with radars and image processing cameras for higher
accuracy in high end vehicles as the costof radars and cameras will be high LDR and Ultrasonic sensor
can be used in low-end vehicles. This research paper concludes with citing the reasons as to why this can
be used in all vehicles for reducing the number of accidents. There is also huge potential of using these in
bigger vehicles like logistics heavy vehicle, as they are fast moving 24/7 all 365 days. According to the
survey taken 74% of the people think that major reason for fatalities is night glare and 84.5% of people are
willing to buy vehicles with this technology or implementing this technology in their current vehicles to
help other drivers.
References
Gruber, N., Mosimann, U.P., Müri, R.M. and Nef, T. (2013). Vision and Night Driving Abilities of Elderly
Drivers. Traffic Injury Prevention, 14(5), pp.477–485.
Lata, H., Kaur, A. and Gupta, N. (2012). Effect of glare on night time driving in alcoholic versus non-alcoholic
professional drivers. International Journal of Applied and Basic Medical Research, [online] 2(2), p.128.
Available at: http://www.ijabmr.org/article.asp?issn=2229516X;year=2012;volume=2;issue=2;spage=
128;epage=131;aulast=Gupta [Accessed 26Mar. 2019].
Michal Kelemen, Ivan Virgala, Tatiana Kelemenová, ĽubicaMiková, Peter Frankovský, TomášLipták, and Milan
Lörinc, “Distance Measurement via Using of Ultrasonic Sensor.” Journal of Automation and Control, vol. 3,
no. 3 (2015): 71-74. doi: 10.12691/automation-3-3-6.
WhetselBorzendowski, S.A., Stafford Sewall, A.A., Rosopa, P.J. and Tyrrell, R.A. (2015). Drivers’ judgments of
the effect of headlight glare on their ability to see pedestrians at night. Journal of Safety Research, 53, pp.31–
37.
Arduino.cc. (2018). Arduino - Home. [online] Available at: https://www.arduino.cc/.
Abrahamsson M, Sjostrand J. Impairment of contrast sensitivity function (CSF) as a measure of disability glare.
Invest Ophthalmol Vis Sci.1986;27:1131–1136.
Rice TM, Peek-Asa C, Kraus J.Night time driving, passenger transport and injury crash rates of young drivers.
InjPrev 2003;9:245-50.
Soliday SM. Relationship between age and hazard perception in automobile drivers. Percept Mot Skills
1974;39:335–8
Jägle H, Besch D. Glare sensitivity and professional drivers' safety: A case of rod-cone dystrophy with negative
electroretinogram. ActaOphthalScand 2005;83:504-7.
1025
Turkish Journal of Computer and Mathematics Education Vol.12 No.14 (2021),1020 – 1026
Research Article
1026