Universal Automobile Headlight Control Module for High Beam Adaptation during Night Vision Travel an Embedded Design Approach

Received Dec 2, 2017 Revised Feb 3, 2018 Accepted Feb 20, 2018 Road accidents during night travel increases day by day and vision impairment due to high beam contributes to the majority of the total fatalities. Headlights of vehicles pose a great danger during night driving. The drivers of most vehicles use high/bright beam while driving at night. This causes a discomfort to the person travelling from the opposite direction. The driver experiences a sudden glare caused due to the high intense headlight beam from the other vehicle coming towards him from the opposite direction. We are expected to dim the headlight to avoid this glare. This glare causes a temporary blindness to a person resulting in road accidents during the night. To avoid such incidents, an embedded prototype of Automatic Headlight adaptor module is proposed. This embedded module automatically switches the high beam to low beam and returns backs to high beam, thus reducing the sudden glare effect. It also eliminates the requirement of manual switching by the driver to switch back to low beam Universal Headlight adaptor module is a unique solution to achieve the above objective, the headlight intensity of the incoming vehicles causing the glare is automatically attenuated to low beam wirelessly by the nearby vehicles affected by high beam. The interconnected modules at every vehicle independently takes the decision on the head light control of the source vehicle causing the glare by evaluating various parameters like vehicle speed, current GPS location, direction of vehicle etc.


INTRODUCTION
Around 33% of the traffic accidents are mainly attributed to the impairment in vision caused by the glare of impending headlights during the night travel. Earlier research done by researchers show that the potential risk associated with getting killed in a road accident during night travel is as much as twice of that which occur during the day time [1]. These alarming facts make the researchers to think on a system which would make the life of drivers easy during the night travel. In order to avoid these circumstances caused by glare while night driving, many approaches were prevalent from long time which proposed an electronic, mechanical design solutions to cater these issues [1]- [10].
The current headlights systems which are present in many of the low/high end automobiles do offer a provision to manually alter the intensity of operation of their own headlights [2]. The headlights/ tail lights of an automotive light system can be categorically fall into the below categories: Halogen headlights, LED headlights, tungsten filament headlights, etc. Each of the categories has their own intensity levels at high beam and low beam mode of operation. The user manually switches the mode either to high beam or low beam during the runtime of the vehicle. The user should have the intelligence to operate the headlights based on the road conditions and simultaneously concentrate on his driving as well. Hence the manual operation of the headlights is a laborious process which is prevalent in all the low end automobiles in market. If the switch over from High beam to low beam is not done during the presence of an incoming vehicle, then the opposite vehicle will suffer from the temporary blindness caused by the high beam from the source vehicle. The prevention of the temporary blindness is traditionally taken up as a challenge and many researches happened to solve the existent crisis. Hence it's high time to propose an embedded system which could be implemented as a universal model across all automobiles (High end to Low end). To begin with, we would know the various prevalent methodologies implemented across different automobiles.

RELATED WORK
The current systems capture the intensity of headlights of the oncoming traffic or detect the presence of incoming vehicle and control the headlights of their own system [5]. Such examples to follow, Mercedes Benz has introduced a technology named "Adaptive High beam assistthe Intelligent Headlamp", when an oncoming vehicle's headlight is detected using the installed camera, the vehicle automatically lowers the intensity of its own headlights. Toyota has introduced a technology named "Headlight regulation using camera", when the camera detects the presence of an on-coming vehicle, a mechanical block ensures that the oncoming vehicle is not affected. [5]-8] Many systems proposed to identify the presence of the oncoming vehicle using the light sensor, when the sensor reading crosses a threshold value, the intensity of its own vehicle's headlight is brought down. [6] Threshold value of the intensity breach is found using experimental setups. CMOS camera was used to identify the source of lights and various signal processing techniques used to differentiate the same. [7] Fuzzy logic implementation using a photo detector and laser detects the presence of a vehicle, fuzzifier receive inputs from above sensors and an interpolation table that relates intensity to distance was derived [10]. Thus the above methodologies only focused on their own headlight intensity control than to control the headlights of peer vehicles on road which caused the glare. Many wireless approaches took the issue on hand and controlled the intensity of the incoming vehicles rather than its own, but lacked many key parameters such as direction, speed, location of the individual vehicle on making accurate decision for the headlight control [10]-[1]- [3]. Thus the existing work on the wireless approach is the motivation of building up the universal model for headlight control.
As in the traditional systems, every vehicle would sense the incoming headlight's intensity breach and regulates their own headlight accordingly. As a result of this, the incoming vehicles (opposite) would be benefited, but the high beam of the incoming vehicle would still remain causing temporary blindness to the source vehicle. Hence the problem of temporary blindness is not completely eradicated. So the above systems fail to avoid problem of temporary blindness, So a newer system was thought upon which would sense the intensity of the headlights as in the earlier system but instead of reducing their own headlight intensity with respect to the other vehicle, it would reduce the intensity of the oncoming vehicle and vice versa so the problem of temporary blindness is completely avoided.
The proposed system scans the intensity of the headlights from the oncoming vehicle in analog form via photo transistor (light sensors) and identifies the intensity breach. Then, the Universal headlight control module pitches in to transmit the current direction, speed and location of the vehicle measured via various sensors to the nearby peer vehicles; this is done immediately as a wireless broadcast. Thus an X-Bee wireless medium is sought to have the immediate connectivity to the peer module installed in the incoming vehicles. The module located at every automobile shall actively listen to all the intensity breach alerts and needs to evaluate by their own of the possible intensity breach and take an action to control their headlights via pulse width modulated signal. The system calls for the interconnected vehicles on road via the interconnecting adaptor module. The system uses X-Bee transmitter and receiver because the transmission of signal using this is more efficient and faster. The fixation of intensity level causing breach is assumed from the previous works. The system is built upon to have a robust activation of headlights whenever the temporary blindness caused because of the peer vehicles only and hence the luminous intensity from other light sources are not in the scope of the design proposal. The Main focus was laid upon the identification of glare scenario, effective handling of glare scenarios caused by multiple vehicles and identification of vehicles inflicting the breach. The system response of interconnected vehicles during a glare scenario occurrence and the time to revert back to high beam is also taken up in the design. The design gives importance to the quick data acquisition of the connected sensors to the module and hence the updated vehicle information is always available at all modules to make the suitable headlight actuation. Figure 1 show the interconnected blocks for the construction of the module and the Figure 2 depicts the pictorial representation of the operation of the interconnected modules.

PROPOSED SYSTEM & APPROACH
The Final proposed system thrives on the interconnection of various system blocks as in the Figure 1, each and every block has their own purpose sorted out in collecting the real time data to supress the temporary blind conditions.The various blocks to be explained and the interaction between them shall also mark the feature of this module's functionality.

Micro Controller
The micro controller which is used in the system belongs to the ATmega162, 8-bit Microcontroller with 16K Bytes in-System Programmable Flash. [11]The Micro controller shall be interfaced serially with the X-Bee Transceiver and GPS module for the transfer of vehicle data and location respectively The microcontroller is further interfaced to electronic compass sensor at its 8 bit bi directional IO port. The direction data is obtained synchronously to know the vehicle direction at anytime via standard I2C protocol. The Micro controller further reads the current vehicle speed as an input, further controls PWM operated LED and LCD module. The peripherals which are interfaced to the micro controller unit are dealt in the coming chapters. Further chapters give more details on the handshake of data flow across various blocks.

Photo diode/Photo Transistor
A photodiode / photo transistor light sensor is interfaced via an analog input to the controller. The intensity of the incident light is directly converted to an analog value by the sensor. The voltage drop at the controller is continuously measured and maps to the standard luminous intensity values. The threshold for glare scenario is fixed from the characteristics of the light sensor and the standard high beam conditions. The Light sensor continuously monitors the difference in intensity levels exposed and triggers a glare scenario accordingly.

Vehicle Speed Sensor
The vehicle speed is obtained based on the connected digital input to the microcontroller. The rotary setup applies the high/low voltage levels at the port pin continuously. Accordingly the external interrupt trigger is configured at the controller, RPMs are converted to the kmph and the vehicle speed is obtained at the controller.

Vehicle location sensor
Vehicle location sensor fetches current position of the vehicle in terms of latitude and longitudinal coordinates of the earth. A GPS (Global Positioning System) module is fitted to the system via the serial port of the microcontroller asynchronously. High sensitivity and smart GPS antenna is the need of the hour since the refresh rate of the GPS plays an important role. GPS locations of the either of the vehicle is used for computing the distance of separation between them.GPS data acquisition for the fast moving vehicles is studied, see Table 1 and Figure 3 which show cases the time to refresh the GPS data versus update rate of the chosen GPS at 100 Km/Hr [12].  With the proper GPS module selected, the distance between two GPS locations will be used as an important parameter to know vehicle's distance of separation. The same is done as equation (1), refer Table 2 for converted values. Spherical Law of cosines: D = a cos (sin φ1 ⋅ sin φ2 + cos φ1 ⋅ cos φ2 ⋅ cos Δλ ) ⋅ R --(1) φ1 -Latitude 1 value in radians φ2 -Latitude 2 value in radians Δλ -Difference between longitudes in radians R -Radius of the earth (6371e3 meters) D -Distance between GPS coordinates in meters

Direction of the vehicle
A digital compass module Figure 4 is interfaced via standard I2C protocol. The sensor shall convert any magnetic field to a differential voltage output on 3 axes. The Digital output value is measured continuously as the vehicle moves and the corresponding direction

X-Bee Transmitter & Receiver
An X-Bee transmitter and receiver in Figure 5 is setup serially to the microcontroller of every module. The X-Bee transfers the indication of glare event to the peer vehicles and it is a broadcast message to all the nearby modules. X-Bee transceiver system is much superior and efficient to the ZigBee systems in terms of range and line of sight. The X-Bee modules can send or receive the data within the range of 100m or 300ft and has a line of sight of 1.6Kms.The X-Bee is incorporated in all the headlight modules of vehicle and typically shares the vehicle location via GPS, direction, speed to the nearby vehicles.

DESIGN AND ARCHITECTURE
The previous chapter dealt with the functionality of the each interconnected blocks .The design for evaluating the high beam conditions with corresponding actuation shall be discussed here. The chapter also deals with the design decisions and challenges in building up the system.The functionality of the embedded module thrives on the 3 software routines, they are, a. Universal headlight adaptor module Job routine. b. Universal headlight adaptor module X-Bee reception routine. c. Universal headlight adaptor module event handler routine.

Universal headlight adaptor module Job routine
The IO peripherals needs to be initialized before the call of the main routine .In the main job routine of the design in Figure 7, the embedded module continously evaluates the high beam status at the connected photo transistor/photo diode sensor , speed of the vehicle ( RPM to Kmph) , direction of the vehicle,location of the vehicle interms of latitude and longitude.Incase of a breach in intensity the broadcast via X-bee transceiver shall be triggered to the near by modules via a standard format.The X-bee broadcast shall consist of affected vehicle's current speed,direction and location.

Universal headlight adaptor module X-Bee reception routine
As shown in Figure 8, The X-Bee transceiver actively listens to the messages from the nearby connected modules and the receive interrupt is triggered on when a valid frame is received in the UART serial port. The type of frame is parsed and corresponding action is taken. A broadcast X-Bee frame typically of a fixed size (uniform standard) and the contents are fixed. The received X-Bee frame consists of the affected vehicles direction, speed and location. Apparently the received vehicle needs to evaluate whether the glare is caused by its own high beam, if yes then the control transfers to the event handling routine. The identification of the glare event at the affected is decided based on its own high beam status, evaluation of opposite direction scenario wrt one another and distance of separation between the vehicles. If the current high beam status is ON, the direction of vehicles are opposite and distance of separation is within the high beam range, then a glare event is declared and the low beam needs to be activated. The control now shifts to the event handling routine.

Universal headlight adaptor module Event handler routine
As shown in Figure 9, Once the High beam to low beam request is identified, the vehcile which inflicts the glare takes the responsibility to switch off the high beam to low beam . The duration of high beam to low beam actuation is computed based on the distance of separation and relative speeds of the vehicle.Once the duration of low beam actuation is completed , then the vehicle can work on the high beam as per the initial conditions untill a new glare request is received.

EXPERIMENTAL SETUP & RESULTS
The experimental setup in Figure 10 consists of the I/O peripheral blocks interfaced and the results in Table 3 are obtained in the laboratory level. The theoretical design proposed based on the above chapters is proven with the experimental setup. The experiment consists of two identical headlight adaptor modules placed apart each other, the high beam scenario is induced in one of the modules to evaluate the reaction to the glare scenario at the other module. The vehicle data measured at individual modules are captured serially at the individual UART interfaces via a computer terminal. From the Table 3 simulated to fixed values, position of the direction sensor is pre-determined, the GPS modules also read current latitude and longitudinal values. An external light source is used to illuminate the vehicle 2 and vehicle 1 high beam is always high. Since the glare is purposefully induced in the vehicle 2, it sends an X-Bee broadcast of vehicle 2 data to the vehicle 1. Now the vehicle 1 reads the values received and compares with its own vehicle data, evaluate the possible glare scenario from its own headlights. If YES, is takes the action on its PWM controlled headlights to dim the high beam to low beam and time to high beam to low beam is also evaluated internally at vehicle 1. The above procedure is tried out for different values at each of the vehicles after an induced high beam scenario at vehicle 2 and readings are tabulated.

CONCLUSION
The proposed embedded design system strives to remove the temporary blindness caused to the drivers during the night vision travel. The universal embedded module automatically switches the high beam into low beam and returns backs to high beam based on road conditions, thus reducing the sudden glare effect. The interconnected modules connected wirelessly at every vehicle independently control the headlight by evaluating various parameters like vehicle speed, current GPS location, direction of vehicle etc.