Optimized Design of Adaptive Headlights for Automobile

The adaptive headlights use a variable headlight control system geared to the driver's position on the road. This anticipative illumination of the road ahead is based on a system of sensors. The adaptive headlights direct two headlight modules rotated by motors after sensing steering during the ongoing course of the road, offering the driver a better view at the road ahead both in front and in curves. Adaptive Headlights automatically adjust the light to match the direction of travel. That enables the driver to react more quickly because he/she will see the road ahead more clearly. Sensors monitor steering angles to assure the proper distribution and control of the beam pattern .


Introduction
The present illumination systems for motor vehicles are static. That is to say they offer the same light distribution regardless of the conditions prevailing at the moments. That is functioning ideal because the conditions in real traffic are almost always changing. The road scene is changing; the traffic interaction with other road user and with different road condition is changing.
Over the years, the numerous studies have shown that the present vehicle illumination systems are not very good. Consequently, there are strong arguments for improving vehicle lighting. One potential improvement could be to make vehicle illumination systems adaptable to the changing circumstances in night driving.The term adaptive indicates that the vehicle lighting should in response to road condition and traffic condition. Vehicle illumination systems that adapt to the road conditions (e.g., road geometry) is termed adaptive headlight. Proposal for making the vehicle road illumination systems dynamic and adaptable are not new. However, the fast developments of electronics field and its application in road traffic, together with the developments in the sensor area, optical engineering and light source technology have changed the situation and opened new possibilities.

General Problem
The general problem is to design a system which can analyse road conditions to identify situations in which adaptive road illumination system could enhance visibility, and thereby substantially improve safety and/or comfort for road users. The main goal of this report and project is to discuss ways in which the present, static vehicle illumination systems could be improved by making them dynamic more adaptable to the ever changing road conditions.

Specific issues
Standard headlights shine straight ahead, no matter in which direction the car is moving. When going around curves, they illuminate the side of the road more than the road itself. Adaptive headlights react to the steering of the car and automatically adjust to illuminate the road ahead. When the car is steered in right direction, headlight will also swift towards right direction. Turn the car left, the headlights angle to the left. This is important not only for the driver of the car with adaptive headlights, but for other drivers on the road as well. The glare of oncoming headlights can cause serious visibility problems. Since adaptive headlights are directed at the road, the incidence of glare is reduced.

Figure 1: Convention versus Adaptive Headlight
A car with adaptive headlights uses electronic sensors to detect the how far the driver has turned the steering wheel. The sensors direct small electric motors attached with headlight to turn the headlights. A typical adaptive headlight can turn the lights up to 30 degrees from centre to lock, giving total of 60-degree range of movement.

Proposed Design
Designing a system which can detect the rotation of steering with high sensitivity and then processing the output of the sensor using microcontroller and then directing the motors attached to the headlight also adding feature that whenever driver switch off car or headlight system uses its memory for storing the position of headlight. So that memory system act as a feedback system which provides the current position of steering and lights automatically adapt to prevailing angle. Main consideration here is that it should detect angle as minimum as possible and sensor should detect equally in both direction i.e. clockwise and anticlockwise. So here benchmarking is done for different solutions and find out which one could fulfills purpose. A u g 2 5 , 2 0 1 3 After analyzing all four proposed designs, it was found that among the above proposed four designs rotary optical encoder will work best.

Actual Design
Adaptive headlight will consists of encoder wheel which will be attached to steering shaft and photo-detector (which gives digital output) which are used to detect the rotation of encoder wheel. Microcontroller will input encoder's output and process the output of the sensors. As memory is primary requirement so system will prefer to use microcontroller with inbuilt memory. After input is being processed controller will direct motors to rotate accordingly. Our prime concern is an Optical sensor so that system can be designed with high accuracy and with extremely high sensitivity. As steering can rotate in both directions i.e. clockwise and anticlockwise so there is need to co-opt for the optical sensor which can detect both rotation in both direction.  The HEDS-5540 is high performance, low cost, two and three channel optical incremental encoders. Encoder contains a lensed LED source, an integrated circuit with detectors and output circuitry, and a code-wheel which rotates between the emitter and detector IC. The HEDS series utilizes metal code-wheels which allows resolutions up-to 1024 CPR. Standard resolutions between 96 and 1024 counts per revolution are presently available. A u g 2 5 , 2 0 1 3 Features  Two channel quadrature output with optional index pulse  No signal adjustment required  Low cost  Resolutions up to 1024 counts per revolution  Small size -40°C to 100°C operating temperature  TTL compatible  Single 5 V supply Theory of Operation: The HEDS-5540 translates the rotary motion of a shaft into either a two or a three-channel digital output. As seen in the block diagram Figure 3, these encoders contain a single Light Emitting Diode (LED) as its light source. The light is collimated into a parallel beam by means of single polycarbonate lens located directly over the LED. Opposite the emitter is the integrated detector circuit. This IC consists of multiple sets of photodetectors and the signal processing circuitry necessary to produce the digital waveforms. The codewheel rotates between the emitter and detector, causing the light beam to be interrupted by the pattern of spaces and bars on the code-wheel. The photodiodes which detect these interruptions are arranged in a pattern that corresponds to the radius and design of the code-wheel. These detectors are also spaced such that a light period on one pair of detectors corresponds to a dark period on the adjacent pair of detectors. The photodiode outputs are then fed through the signal processing circuitry resulting in A, A, B and B. Comparators receive these signals and produce the final outputs for channels A and B. Due to this integrated phasing technique, the digital output of channel A is in quadrature with that of channel B (90 degrees out of phase).In the HEDS-5540 the output of the comparator for I and I is sent to the index processing circuitry along with the outputs of channels A and B. The final output of channel I is an index pulse PO which is generated once for each full rotation of the code-wheel. This output PO is a one state width (nominally 90 electrical degrees), high true index pulse which is coincident with the low states of channels A and B.

Figure 3: Internal Circuitry of encoder
Direction of Rotation: When the code-wheel rotates in the counter clockwise direction channel A will lead channel B. If the code-wheel rotates in the clockwise direction, channel B will lead channel A. Electrical Interface: To insure reliable encoding performance, the HEDS-5540 three channel encoders require 2.7 kΩ (10%) pull-up resistors on output pins 2, 3, and 5 (Channels I, A, and B). These pull-up resistors should be located as close to the encoder as possible. Each of the three encoder outputs can drive a single TTL load in this configuration Sensitivity/Resolution: Resolution of HEDS -5540 is 500cpr (counts per revolution) detecting angle upto .18 degrees.
Verification of sensors output: Verification and testing of cpr of sensors is done using software LabVIEW and interfacing DAQ Card NI PCI 6713. Output of sensors is attached to counter of DAQ card which counts the edges.   Benchmarking shows AVR leads 8051 in all respects except in case of cost but after considering many of its good features so it was decided to work with AVR controller: ATMEGA 16.
Other components are general needs not much specification.

Design Procedure:
Procedure followed for designing complete circuit and programming the controller is very level headed.
Step 1: Seven Segment with Memory Seven segments are connected with 7447 as an interface element check whether required memory function is working or not. AVR is programmed to write 1 to 99 on seven segments and whenever it is switched off and again switched on it starts writing from previous value only. It does not initiate from zero.

Figure 8: Memory Testing
Step 2: Rotary encoder reading Next step is to design a module which read the sensor output and shows the total count on seven segments. It is programmed for both direction clockwise & anti-clockwise direction and it was found that sensor was producing correct results.

Figure 9: Rotary encoder Testing
Step 4: Adap with led Next program was written which performs a function to light LED whenever encoder rotates.

Figure 10: Code testing with led
Step 5: Adap without memory Next interface L293D IC and then current was directed to DC motors, now whenever encoder rotates motor it will also rotates accordingly. This module lacks the function of memory and on/ off switch.
Step 6: Adap with On/Off In this step another feature of On/Off switch was added so that driver can switch off adaptive headlight feature but controller will still keep on tracking steering of car for further synchronization.

Algorithm
Illustration of complete code using flow chart. A u g 2 5 , 2 0 1 3