You are on page 1of 44

Abstract

The purpose of this project was done to focuses on the design and working of an arduino based
Adaptive Headlight System (AHS) for automotive. The highest fatal traffic accident rate occurs
on curved roads at nighttime. In most cases, the late recognition of objects in the traffic zone
plays a key role. These facts point to the importance of the role of automotive forward-lighting
systems. In order to provide enhanced nighttime safety measures, this work aims to design and
build a headlights by adapting a conventional static headlamp with a very close eye on cost and
reliability. The main purpose of this system is to present a cost effective technique to illuminate
blind spots while driving in the night and during the times when the visibility is reduced
significantly so as to make the objects visible in those darkened locations and thereby prevent
accidents.

The system functions in accordance to the controlled input from arduino uno atmega 328 mcu
board which drives the servo motors connected to the headlights. The system is also designed to
adjust the beam for front coming vehicles, the adaptive headlights are automatically switched on
when the amount of light measured by a photo diode falls below a threshold, thereby eliminating
the need for the driver to switch on the headlights.

1|P g.
Preface

This Project Report has been prepared in fulfilment the final project report requirement for the
H.N.D in Automotive Engineering course. For preparing the Project Report, we have visited the
company during the suggested duration for the period of 6 months, to avail the necessary
information.

And this project is based on the development of an Adaptive Headlight System. The Project
Report starts with the basic concepts of Adaptive Headlight System, history of Adaptive
Headlight System and also covers the general information of the Adaptive Headlight System.

2|P g.
Acknowledgement

This project consumed huge amount of work, research and dedication. Still, implementation
would not have been possible if I do not have a support of many individuals.

Therefore I would like to extend my sincere gratitude to all of them.

First of all I’m very thankful to ICBT for their kind support and for providing necessary
guidance concerning projects implementation.

I’m also grateful to Wheels Lanka Trading (PVT) LTD for provision of expertise, and technical
support in the implementation. Without their superior knowledge and experience, the Project
would like in quality of outcomes, and thus their support has been essential.

I would like to express my sincere thanks towards the lecturer panel, who devoted their time and
knowledge in the implementation of this project.

Nevertheless, I express my gratitude toward our families and colleagues for their kind co-
operation and encouragement which help us in completion of this project.

3|P g.
Table of content

Chapter 1- Introduction

1.1 Introduction……………………………………………………………………………….. 06
1.2 Problem Identification and Problem Formulation…………………………... 07
1.3 Object of study ……………………………………...…………….……………… 07
1.4 Scope of study…………………………………...……………….………………… 07
1.5 Data collection. ……………………………………………………………..... 07
1.6 Research tools applied ……………………………………...…………….…. 08 - 09

Chapter 2- literature review

2.1 Literature review………………………………......…………………...….…. 11 - 14

2.2 Conclusion…………………………………………………...…………...…… 15

Chapter 3 – Conceptualization and Research Methodology


3.1 Block diagram……………………………………..…………………...…….. 17

3.2 System Diagram..………………………………….…………………………. 18

3.3 What is Adaptive Headlight?............................................................................. 19 - 20

3.4 Ardunio UNO …………..………………………………………………...…………. 21

3.5 Microcontroller…………………………………………………………...…… 22 - 23

3.6 Working Principle of LDR …..…………………...…………………………………. 23 - 24

3.7 Interfering Ardunio with LDR………..........…………………………..…… 24

4|P g.
Chapter 4 – Data presentation and Analysis

4.1 Flow chart and sketch diagram………………….………..………………… 26 - 28

4.2 System software ………………………………………..…………..……..... 29 - 30

Chapter 5 – Development and Testing

5.1 program Testing …….…………………………………………..………….. 32 - 34

5.2 System Check………………………………………………………………. 35 - 37

Chapter 6 – Conclusions and Discussions


6.1 Discussion …….……………………………………………………..……… 39 - 40

6.2 Conclusion …….……………………………………………………….……. 40

References …………..……………………………………………………...….. 41 - 42
Appendix ………………………………………………………….……………. 43 - 44

5|P g.
Chapter 1

Introduction
1.1 Introduction

Based on this project safety is the main concern when operating a motor vehicle, aside from
functionality. The static headlamp just provides certain illuminating fields for drivers in the
nighttime and is insufficient to serve for curved roads and intersection, Over 80 percent of all
road traffic accidents occur in darkness and bad weather.

The aim is to improve visibility for the driver, thereby achieving significant increase in road
safety and driving comfort. Adaptive Front-lighting Systems (AFS) swivel the headlight beams
in advance of the vehicle's turning. This places light into the turning radius, with the result that
the driver’s cornering visibility being dramatically improved. The vehicle’s data network also
contains real-time sensor data on steering angle and wheel speed. Based on this information,
AFS equipped headlamps can match the light distribution with the vehicle’s turning angle so that
upcoming curves and intersections receive maximum illumination, especially at the driver’s gaze
point.

6|P g.
1.2 Problem Identification

Adaptive headlight system is one of the most useful system for Automobile. It doesn’t have
manual beam control system. And also doesn’t need to adjust the headlight beam every time
because it will adjust itself for the given conditions. And also it will provide self-protection
because some people always forget to adjust the beam in manual control. Also it contains the
programming part and electronic and electrical part.

1.3 Objective of Study

 Make clear visible for the driver

 Make automatic headlight system for automobile

 Completely High safe


 Reduce drivers stress

1.4 Scope of Study

 Programming the Microcontroller by using Ardunio software


 Electrical and Electronic to Design the Circuit

1.5 Data Collection


 Internet source
 AT mega 640/1280/1281/2560/2561 data sheet
 Relevant Books
 Training Company

7|P g.
1.6 Research Tools Applied

Software

 Arduino

Arduino is a tool for making computers that can sense and control more of the physical world
than your desktop computer. It's an open-source physical computing platform based on a simple
microcontroller board, and a development environment for writing software for the board.

Arduino can be used to develop interactive objects, taking inputs from a variety of switches or
sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects
can be stand-alone, or they can communicate with software running on your computer (e.g.
Flash, Processing, MaxMSP.)

The Arduino programming language is an implementation of Wiring, a similar physical


computing platform, which is based on the Processing multimedia programming environment.

 fritzing

Fritzing is an initiative that makes electronics accessible as a creative material for anyone. A
community website and services in the spirit of Processing and Arduino, fostering a creative
ecosystem that allows users to document their prototypes.

8|P g.
Hardware

 The Arduino UNO microcontroller board based on the ATmega1280


 Breadboard
 LDR sensor
 Servo Motors

9|P g.
10 | P g .
Chapter 2

Literature Review

This literature review explain the themes of the research question of this project which is,
“Adaptive headlight system”. The themes include an overview of “Adaptive headlight”.

And also chapter explain the current research related to Adaptive headlight system and its
working method. The review explores the existing systems that function using different
sensors/technologies. Lastly, the chapter concludes with a comparison of the existing systems to
extract the problem identification.

2.1 Literature review

History of Adaptive headlight system

We can hardly imagine a car without headlamps nowadays, as driving an automobile


during night without these now-mandatory parts is surely impossible. However, there were times
when people actually drove vehicles without headlamps (sure, they weren't actually "real"
vehicles and only a few of them were in fact powered by combustion engines). As time passed
by, technology evolved and headlamps became mandatory in all countries across the globe.

Modern automotive vehicles include a variety of different lamps to provide illumination under
different operating conditions. Headlamps are typically controlled to alternately generate low
beams and high beams. Low beams provide less illumination and are used at night to illuminate
the for- ward path when other vehicles are present. High beams pro- vide significantly more light
and are used to illuminate the vehicle’s forward path when other vehicles are not present.
Daylight running lights have also begun to experience wide- spread acceptance.

11 | P g .
There are a number of different adaptive headlight technologies, but they are all designed to
improve the driver’s sight distance at night. Most adaptive headlight systems improve sight
distance in corners, but some are also capable of adjusting in response to weather conditions, the
presence of other vehicles, and other factors. Various types of adaptive headlights have been
around throughout nearly the entire history of automobiles, but a resurgence of interest in the
technology has occurred in recent years.

Fi gure 1 Types of Adaptive

12 | P g .
Vehicle and their Headlight problem

The first vehicle headlamps were officially introduced during the 1880s and were based
on acetylene and oil, similar to the old gas lamps. In essence, these two substances were used to
fuel the headlamps but, due to the high costs of both oil and acetylene, improving the existing
systems was fairly impossible. Although they were often praised for their resistance to currents
of air and tough weather conditions such as snow and rain, they were soon replaced by electric
lamps.

The first electric headlamp was produced by the Electric Vehicle Company based in Hartford,
Connecticut in 1898 but, just like the previous systems, they had numerous disadvantages that
blocked companies from adopting and improve it. For example, filaments implemented inside
the Electric headlamps could be burned pretty fast, especially when traveling during difficult
conditions. Moreover, the early system demanded small energy sources which, again, demanded
more investments and high costs that nobody could support at that time.

This didn't stop Cadillac from rolling out the first modern electric headlamp system in 1912, a
new assembly which, compared to its predecessors, could be used even during rain or snow
without the risk of getting burned.

1915 but, since most systems required drivers to step out of the car and turn on the lights
manually, Cadillac developed its own assembly activated by an interior-mounted lever
controlling the exterior lights. But even so, the first modern light bulb, incorporating both the
low and the high beams, saw daylight in 1924, being followed by a foot-operated dimmer switch
invented three years later.

13 | P g .
The first halogen headlamp was officially unveiled in 1962 in Europe and became mandatory in
several countries except the United States that used non-halogen sealed lamps until 1978.
However, thanks to their capability of producing more light than traditional lamps using almost
the same amount of power made halogen headlights the most popular around the world, with
most automakers still using them on their latest models.

A couple of car manufacturer, however, slowly migrated to high-intensity discharge systems,


also known as xenon headlights, which are said to provide even more light than halogen units.
The first model to implement such a system was the 1991 BMW 7 Series.

Last-generation models incorporate even a more advanced system compared to HID, this time
based on LEDs. Unfortunately, but, due to high costs of research, development and engineering,
companies are still in doubt whether to migrate to this kind of headlamps.

14 | P g .
2.2 Conclusion

According to my above researches there are many types of headlight system is currently
used, but even there are problems and safety issues for drivers. Therefore using the Adaptive
headlight system technology mainly the sensors are widely usable in trades can be attachable to
real-time sensor data on steering angle and wheel speed. Based on this information, AHS
equipped headlamps can match the light distribution with the vehicle’s turning angle so that
upcoming curves and intersections receive maximum illumination, especially at the driver’s gaze
point. And also the static headlamp also trustable but low safety. Using Adaptive headlight
system is more safety for drivers and more trustable

15 | P g .
16 | P g .
Chapter 3

Conceptualization and Research Methodology

3.1 Block diagram

This diagram is about, the rotation for the bend and use microcontroller and the sensing device
detect the incoming vehicle and if it’s detect the incoming vehicle or if it’s going in bend the
output is system sent the signal to the micro controller and change the beam and position of the
headlight else it will remain the same.

Fi gure 2 bl ock diagram

17 | P g .
3.2 System hardware

This diagram is about accomplish through the Arduino board, motor and sensing system, Output.
When the sensor sense the given condition the headlight beam and position will be change this is
how this device designed and when its sense, the Signal is generated and the data sent to the
microcontroller which is fixed in Arduino board, and according to the input the output will
display.

Fi gure 3 s ys tem bl ock di a gra m

18 | P g .
3.3 What is Adaptive Headlight?

Adaptive headlights are an active safety feature designed to make driving at night or in
low-light conditions safer by increasing visibility around curves and over hills. When driving
around a bend in the road, standard headlights continue to shine straight ahead, illuminating the
side of the road and leaving the road ahead of you in the dark. Adaptive headlights, on the other
hand, turn their beams according to your steering input so that the vehicle’s actual path is lit up.

Similarly, when a vehicle with standard headlights crests a hill, the headlight beams temporarily
point upwards towards the sky. This makes it difficult for drivers to see the road ahead and for
oncoming motorists to see the driver approaching. In contrast, adaptive headlights use a self-
levelling system that points the light beam up or down, according to the position of the vehicle.

Fi gure 4 Vehicle with adaptive headlight a nd without a daptive headlight

19 | P g .
How does it work?

Standard headlights shine straight ahead, no matter what 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, speed and elevation of the car and automatically adjust to illuminate the
road ahead. When the car turns right, the headlights angle to the right. 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.

A car with adaptive headlights uses electronic sensors to detect the speed of the car, how far the
driver has turned the steering wheel, and the yaw of the car. Yaw is the rotation of the car around
the vertical axis - when a car is spinning, for example, its yaw is changing. The sensors direct
small electric motors built into the headlight casing to turn the headlights.

20 | P g .
3.4 Arduino Uno

Fi gure 5 Ardui no Uno Boa rd

The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with an AC-to-DC adapter or battery to get started.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a
USB-to-serial converter.

21 | P g .
3.5 The microcontroller (ATmega328)

Figure 6 Atmega328 microcontroller

The high-performance Atmel 8-bit AVR RISC-based microcontroller combines 32KB ISP flash
memory with read-while-write capabilities, 1KB EEPROM, 2KB SRAM, 23 general purpose I/O
lines, 32 general purpose working registers, three flexible timer/counters with compare modes,
internal and external interrupts, serial programmable USART, a byte-oriented 2-wire serial
interface, SPI serial port, 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF
packages), programmable watchdog timer with internal oscillator, and five software selectable
power saving modes. The device operates between 1.8-5.5 volts.

Features

– Up to 20 MIPS Throughput at 20 MHz


– Fully Static Operation
– 32 x 8 General Purpose Working Registers – External Oscillator: up to 20MHz
– On-chip 2-cycle Multiplier

22 | P g .
• High Endurance Non-volatile Memory Segments
– 4/8/16/32K Bytes of In-System Self-Programmable Flash program memory
(ATmega48PA/88PA/168PA/328P)
– 256/512/512/1K Bytes EEPROM (ATmega48PA/88PA/168PA/328P)
– 512/1K/1K/2K Bytes Internal SRAM (ATmega48PA/88PA/168PA/328P)
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C
– Optional Boot Code Section with Independent Lock Bits

3.6 Working Principle of LDR

Fi gure 7 LDR Sens or

When light falls i.e. when the photons fall on the device, the electrons in the valence band of the
semiconductor material are excited to the conduction band. These photons in the incident light
should have energy greater than the band gap of the semiconductor material to make the
electrons jump from the valence band to the conduction band. Hence when light having enough
energy is incident on the device more & more electrons are excited to the conduction band which

23 | P g .
results in large number of charge carriers. The result of this process is more and more current
starts flowing and hence it is said that the resistance of the device has decreased.

3.7 Interfering Ardunio with LDR

If everything is set up right, you can connect the board to the serial (or USB) port of your
computer and, if necessary, to the power supply. The power LED should light up and the next
step is to export the program which reads the state of the switch to the board. Open the ap-
ReadAnalog.pde file in Arduino, set the right serial port and baud rate, compile the program, and
then press the reset button on your board and click on the export icon to send the program to the
board.

Fi gure 8 Interferi ng Arduni o wi th LDR

24 | P g .
25 | P g .
Chapter 4

4.1 Flow chart and sketch diagram


The objective of the project is to detect the front coming vehicle or bend, according to that
condition write a program for detect sensor and then send the signals to Servo to operate and also
send signal to LDR to control the beam. This chapter will show those system development
diagrams, flow charts.

Flow chart for Headlight

Fi gure 9 Fl ow Cha rt di a gra m for Hea dl i ght

26 | P g .
Fi gure 10 Sys tem Fl ow Cha rt

27 | P g .
Fi gure 11 Sketch Diagram

28 | P g .
4.2 System software

According the programming, first we have to programming for attaching Servo, LED and LDR

//This is my Final Project, Adaptive Headlight System


#include <Servo.h>

int LDR=0;

int LDRValue=0;

int light_sensivity=900;

Servo servo;

int pos = 0;

void setup()

Serial.begin(9600);

pinMode(8,OUTPUT);

pinMode(10,OUTPUT);

servo.attach (2);

servo. write (0);

void loop()

{LDRValue=analogRead(LDR);

Serial.println(LDRValue);

delay(50);

if (LDRValue > light_sensivity)

29 | P g .
{

digitalWrite(8,HIGH);

delay(200);

digitalWrite(8,LOW);

digitalWrite(8,HIGH);

digitalWrite(10,LOW);

servo.write (10);

else

digitalWrite(8,LOW);

digitalWrite(10,HIGH);

servo.write (0);

30 | P g .
31 | P g .
Chapter 5

Development and testing

5.1 Program Testing


After that, testing for the valid coding to make this device work, using Ardunio software to
compile the code, and there are some process before compile, first have to upload the code
before compiling and we to compile.

Fi gure 12 Upl oading Code

32 | P g .
Fi gure 13 while compiling

33 | P g .
Fi gure 14 done compiling

34 | P g .
5.2 System checking

Fi gure 15 Full s ystem

35 | P g .
Testing system device

When LDR detect nothing

Fi gure 16 Red LED is on when LDR not detect the l ight

36 | P g .
When LDR detect light

Fi gure 17 Green LED is on when LDR detect the light

37 | P g .
38 | P g .
Chapter 6

Discussion and conclusion

6.1 Discussions
Using an Arduino simplifies the amount of hardware and software development you need to do
in order to get a system running.

The Arduino hardware platform already has the power and reset circuitry setup as well as
circuitry to program and communicate with the microcontroller over USB. In addition, the I/O
pins of the microcontroller are typically already fed out to sockets/headers for easy access (This
may vary a bit with the specific model).

On the software side, Arduino provides a number of libraries to make programming the
microcontroller easier. The simplest of these are functions to control and read the I/O pins rather
than having to fiddle with the bus/bit masks normally used to interface with the Atmega I/O
(This is a fairly minor inconvenience). More useful are things such as being able to set I/O pins
to PWM at a certain duty cycle using a single command or doing Serial communication.

While the final results of the project will show that the total project is success and when the
device switching on the Red light, its mean the vehicle’s head light is in high beam now.

When the light detected, if the light detected by the LDR device, light on the Green LED and the
servo is turn down and its mean the vehicle’s head light is in low beam now.

When the device detect nothing, no change will happens in system.

39 | P g .
Further developments

This project can be continued further project where more thing can be added relevant to
headlight such as climate controlling, headlight wiper system (For the clear view) can be added
specially so that person who drive the car can be satisfy with his car.

6.2 Conclusions

Before undertook this project, knowledge about headlights was limited. After doing an extensive
research for this project now have a wider knowledge of this field in automotive technology,
learnt useful information about different types of headlights. I have searched in the library for
relevant books and the internet for additional information. During the build of an experimental
model of adaptive headlights I have improved my skills and technical problem solving ability
Carrying out test with the project vehicle has proved that this concept works and although such
lights are not widely used even nowadays, it helps to reduce black spots while cornering and
therefore reduces the risk of accidents, by auto low beam for front coming vehicle and helping to
notice persons or objects hidden in a bend earlier in advance. I’m looking forward to see more
road vehicles equipped with adaptive headlights in serial production.

40 | P g .
References

Arduino.cc,. 'Arduino - Servo'. N.p., 2015. Web. 8 May 2015.

Bmw-motorrad.com,. 'BMW Motorrad : Safety Concept : Lighting'. N.p., 2015. Web. 8 May
2015.

Electrical4u.com,. 'Light Dependent Resistor | LDR & Working Principle Of LDR | Electrical4u'.
N.p., 2015. Web. 8 May 2015.

Element14.com,. 'Arduino | Projects, Tutorials, Videos And More | Element14'. N.p., 2015. Web.
8 May 2015.

Forum.arduino.cc,. 'Arduino Forum - Index'. N.p., 2015. Web. 8 May 2015.

Fritzing.org,. 'Fritzing'. N.p., 2015. Web. 8 May 2015.

GmbH, Interone. 'BMW Technology Guide: Adaptive Headlights'. Bmw.com. N.p., 2015. Web. 8
May 2015.

Grabianowski, Ed. 'How Adaptive Headlights Work - Howstuffworks'. HowStuffWorks. N.p.,


2015. Web. 8 May 2015.

Jameco.com,. 'How Servo Motors Work'. N.p., 2015. Web. 8 May 2015.

Learn.adafruit.com,. 'Overview | Arduino Lesson 14. Servo Motors | Adafruit Learning System'.
N.p., 2015. Web. 8 May 2015.

My.teslamotors.com,. 'Based On Current Technology, Is Xenon Or LED Headlights Better In


Terms Of Brightness, Visibility, And Safety? | Forums | Tesla Motors'. N.p., 2015. Web. 8
May 2015.

Schindel, Morton, and Peter Fleischmann. Alexander And The Car With A Missing Headlight.
New York: Viking Press, 1967. Print.

Scribd.com,. 'Steering Controled Headlights Project Report'. N.p., 2015. Web. 8 May 2015.

41 | P g .
Storr, Wayne. 'Light Sensor Including Photocell And LDR Sensor'. Basic Electronics Tutorials.
N.p., 2013. Web. 8 May 2015.

Technologystudent.com,. 'Light Dependent Resistors'. N.p., 2015. Web. 8 May 2015.

Toyota-global.com,. 'Toyota Global Site | Technology File'. N.p., 2015. Web. 8 May 2015.

42 | P g .
Appendix

Code for the system program

//This is my Final Project, Adaptive Headlight System


#include <Servo.h>

int LDR=0;

int LDRValue=0;

int light_sensivity=900;

Servo servo;

int pos = 0;

void setup()

Serial.begin(9600);

pinMode(8,OUTPUT);

pinMode(10,OUTPUT);

servo.attach (2);

servo. write (0);

void loop()

{LDRValue=analogRead(LDR);

Serial.println(LDRValue);

delay(50);

if (LDRValue > light_sensivity)

43 | P g .
{

digitalWrite(8,HIGH);

delay(200);

digitalWrite(8,LOW);

digitalWrite(8,HIGH);

digitalWrite(10,LOW);

servo.write (10);

else

digitalWrite(8,LOW);

digitalWrite(10,HIGH);

servo.write (0);

44 | P g .

You might also like