Sunteți pe pagina 1din 28

CHAPTER-1

INTRODUCTION

1
Driver fatigue is a significant factor in a large number of vehicle accidents. Recent statistics estimate that
annually 1,200 deaths and 76,000 injuries can be attributed to fatigue related crashes.
Drowsiness increases the impairment caused by alcohol. Teenagers, professional drivers (including truck
drivers) military personnel on leave, and shift workers are at particular risk.
Drowsiness appears in situations of stress and fatigue in an unexpected and inopportune way and may be
produced by sleep disorders, certain types of medications, and even, boredom, for example, driving for
long periods of time. The sleeping sensation reduces the level of vigilante producing danger situations and
increases the probability of an accident occurring.
The development of technologies for detecting or preventing drowsiness at the wheel is a major challenge
in the field of accident avoidance systems. Because of the hazard that drowsiness presents on the road,
methods need to be developed for counteracting its affects.
The innovations in the automobile industry over the last hundred years have made our vehicles more
powerful, easier to drive and control safer more energy efficient, and more environmentally friendly.
Majority of the accidents caused today by cars are mainly due to the driver fatigue. Driving for a long
period of time causes excessive fatigue and tiredness which in turn makes the driver sleepy or loose
awareness. With the rapid increase in the number of accidents seems to be increasing day to day.
Therefore a need arises to design a system that keeps the driver focused on the road. Data on road
accidents in India are collected by Transport Research Wing of Ministry of Road Transport & Highways.
The aim of this paper is to develop a prototype of drowsy driver warning system. Devices to detect when
drivers are falling asleep and to provide warnings to alert them of the risk, or even control the vehicle’s
movement, have been the subject to much research and development. Driver fatigue is a serious problem
resulting in many thousands of road accidents each year. It is not currently possible to calculate the exact
number of sleep related accidents because of the difficulties in detecting whether fatigue was a factor and
in assessing the level of fatigue. However research suggests that up to 25% of accidents on monotonous
roads in India are fatigue related. Research in other countries also indicates that driver fatigue is a serious
problem. Young male drivers, truck drivers, company car drivers and shift workers are the most at risk of
falling asleep while driving. However any driver travelling long distances or when they are tired, it is at
the risk of a sleep related accidents. The early hours of the morning and the middle of the afternoon are the
peak times for fatigue accidents and long journeys on monotonous roads, particularly motor-ways, are the
most likely to result in a driver falling asleep.
As a solution I made a smart cap an innovative solution to travel fatigue, the wearable device detects
driver’s movements that indicate drowsiness, drivers are alerted by vibrations, sound and lights from the
device, which looks like a common Cap.
Primarily, this headgear is intended for use by long distance truck drivers, as well as taxi drivers. Equally,
there is much benefit in use by non-commercial drivers too, and the regular public is not exempt from the
risk of themselves nodding-off while driving. The cap is equipped with gyroscopes and a number of
digital instruments that register the position and movement of a driver’s head. This high-tech cap analyzes
the readings of all of its onboard instruments and, if a sudden change in the position of the head or its
tilting is recorded, the cap begins to vibrate vigorously, as well blink LEDs into a driver’s eyes from their
location on the cap’s brim.
It is hoped and intended that this unique product and its system will shock a driver into lucidity
sufficiently enough to provide a burst of energy that will facilitate their finding a safe place to stop to
recuperate, before commencing their onward journey.

2
CHAPTER-2

PROBLEM

3
2.1 CAUSES OF ROAD ACCIDENTS IN INDIA
 Distracted Driving
 Holes in roads - especially during rainy season
 Driving in wrong way
 Incompletion lighting along the road at night
 Drowsy Driving
 Drunken Driving
 Rash and negligent driving
 Jumping from traffic signal
 Over take -over speeding and so on

In this project we are going to tackle the most under-rated cause of road accident which is drowsy driving.
Many traffic researchers believe drowsy driving has been under-reported and underestimated. It has been
estimated that drowsiness causes between 10% and 20% of traffic accidents, causing both fatalities and
injuries. Whereas within the trucking industry 57% of fatal truck accidents are caused by this problem.
30% of all traffic accidents have been caused by drowsiness.20% of all accidents are caused by fatigue
and lack of attention.
• In the USA, drowsiness is responsible for 100,000 traffic accidents.
• In Germany, one out of four traffic accidents originate from drowsiness.
• In England 20% of all traffic accidents are produced by drowsiness.
• In Australia 1,500 million dollars has been spent on fatalities resulting from this problem.

There is insufficient data present on this problem in India.The Times of India has merely 800 results for
sleepy driver’ but a whopping 2.23 lakh for speeding car.
One in six (16.5%) of deadly crashes, one in eight of crashes resulting in a hospitalization, and one in
eight out of fourteen crashes in which a vehicle had to be towed involved a drowsy driver.
The National Highway Safety Administration (NHSA) estimates that drowsy driving results in 1,550
deaths, 71,000 injuries and more than 100,000 accidents per year.

4
2.2 WHAT IS DROWSY DRIVING?
Drowsy driving, also refers to as ‘driver fatigue’, occurs when someone is too tired to operate a motor
vehicle due to sleepiness and fatigue.

Drowsy driving, the dangerous combination of sleepiness and driving or driving while fatigued, and can
result from many underlying causes, including excessive sleepiness, sleep deprivation, changes in
circadian rhythm due to shift work, fatigue, medications with sedatives and consuming alcohol when tired.
The cumulative effects of these factors have severe effects on performance, alertness, memory,
concentration and reaction times.

2.3 WHAT CAUSES DROWSY DRIVING?


 Inadequate, interrupted or fragmented sleep
 Chronic insomnia or sleep disorders
 A work schedule that affects amount of sleep
 Driving for too long without a sufficient rest
 Use of sedatives, hypnotics and other sleep aids
 Consumption of alcohol or narcotics

DROWSY DRIVING IS CHARACTERIZED BY THE FOLLOWING


 Driving with less than 6-7 hrs of sleep.
 Driving if you have been awake for more than 12 hours.
 Yawning frequently.
 Trouble keeping your head up.
 Difficulty focusing, frequent blinking and heavy eyelids.
 Unable to remember the last few miles you've driven.
 Missing exits or traffic signs.
 Drifting from your lane, swerving or tailgating.
5
2.4 WHO IS AT RISK FOR DROWSY DRIVING?
Every driver is susceptible to drowsy driving, but this issue more commonplace with certain groups. Men,
for instance, are more likely to be involved in a drowsy driving accident than women.
There are many underlying causes of sleepiness, drowsiness, fatigue and drowsy driving. They include
sleep loss from restriction, interruption or fragmentation; chronic sleep debt; circadian factors associated
with driving patterns or work schedules; time on task; the use of sedating medications; and the
consumption of alcohol when already tired. These factors have cumulative effects and a combination of
any of these increases crash risk greatly.
The risk of having a crash due to drowsy driving is not uniformly distributed across the population. This is
due to two factors. First, crashes tend to occur at times in keeping with one’s circadian rhythms when
sleepiness is most pronounced, for example, during the night and in the mid-afternoon. Thus individuals
who drive at night are much more likely to have fall-asleep crashes. Second, people who are excessively
sleepy either because of lifestyle factors or because of an untreated sleep disorder are more likely to have
crashes related to excessive daytime sleepiness.
Research has identified young males, shift workers, commercial drivers and people with untreated sleep
disorders or with short-term or chronic sleep deprivation as being at increased risk for having a fall-asleep
crash. Individuals at an increased risk of drowsy driving include those who are:

• Young Drivers – Between age groups of 18-29 years


• Shift Workers
• Commercial Drivers
• Business Travelers
• People with Sleep Disorders

6
CHAPTER 3

SOLUTION

7
3.1 INNOVATION
SMART CAP

An innovative solution to travel fatigue. The wearable device detects driver’s movements that indicate
drowsiness. Drivers are alerted by vibrations, sound and lights from the device, which looks like a
common cap. It comes equipped with sensors capable of interpreting the driver’s head movements to warn
if the user is tired or sleepy behind the wheel.
The alert is issued by three kinds of signals:-
-vibration
-sound
-light flashes
to guide the driver to stop for a rest before following with the drip.

Primarily, this headgear is intended for use by long distance truck drivers, as well as taxi drivers. Equally,
there is much benefit in use by non-commercial drivers too, and the regular public is not exempt from the
risk of themselves nodding-off while driving. The cap is equipped with gyroscopes and a number of
digital instruments that register the position and movement of a driver’s head. This high-tech cap analyzes
the readings of all of its onboard instruments and, if a sudden change in the position of the head or its
tilting is recorded, the cap begins to vibrate vigorously, as well blink LEDs into a driver’s eyes from their
location on the cap’s brim.

8
Sensor is a device, module, or subsystem whose purpose is to detect events or changes in its environment
and send the information to other electronics, frequently a computer processor.
Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile sensor) and lamps
which dim or brighten by touching the base, besides innumerable applications of which most people are
never aware. With advances in micro machinery and easy-to-use microcontroller platforms, the uses of
sensors have expanded beyond the traditional fields of temperature, pressure or flow measurement,[1] for
example into MARG sensors. Moreover, analog sensors such as potentiometers and force-sensing
resistors are still widely used. Applications include manufacturing and machinery, airplanes and
aerospace, cars, medicine, robotics and many other aspects of our day-to-day life.
A sensor's sensitivity indicates how much the sensor's output changes when the input quantity being
measured changes. For instance, if the mercury in a thermometer moves 1 cm when the temperature
changes by 1 °C, the sensitivity is 1 cm/°C (it is basically the slope Dy/Dx assuming a linear
characteristic). Some sensors can also affect what they measure; for instance, a room temperature
thermometer inserted into a hot cup of liquid cools the liquid while the liquid heats the thermometer.
Sensors are usually designed to have a small effect on what is measured; making the sensor smaller often
improves this and may introduce other advantages. Technological progress allows more and more sensors
to be manufactured on a microscopic scale as micro sensors using MEMS technology. In most cases, a
micro sensor reaches a significantly higher speed and sensitivity compared with macroscopic approaches.

Different Types of Sensors

• Temperature Sensor
• Proximity Sensor
• IR Sensor (Infrared Sensor)
• Pressure Sensor
• Light Sensor
• Ultrasonic Sensor
• Smoke Sensor
• Gas Sensor
• Alcohol Sensor
• Touch Sensor
• Color Sensor
• Humidity Sensor
• Tilt Sensor
• Flow and Level Sensor

In this project we are going to use an accelerometer which is a type of tilt sensor in order to detect the
movement of head beyond a certain angle to activate the alert system.

9
3.2 BLUEPRINT

10
11
CHAPTER-4

ALGORITHM AND IMPLEMENTATION

12
4.1 ALGORITHM

Arduino Uno Board


Arduino is an open source electronics prototyping platform based on flexible, easy-to-use hardware and
software. It is a board based on ATmega328 microcontroller. It consists of 14 digital input/output pins, six
analogue inputs, a USB connection for programming the ICSP header and a reset button. It is operated
with a 16 MHz crystal oscillator and contains everything needed to support the microcontroller.

Block Diagram

An ACCELEROMETER, which is an electromechanical device, can be used for various applications


like tilt detection, obstacle detection, motion inputs, earthquake sensing, etc. Tilt detection is a simple
application of an accelerometer where a change in angular position of the system in any direction is
detected and indicated through an alarm or warning system. An Arduino Uno board is used to process the
data received from the accelerometer and respective warning signal is issued to indicate the direction of
tilt.

13
Circuit diagram

14
SOURCE CODE FOR ACCELEROMETER

#define OUTPUT_READABLE_YAWPITCHROLL
#define INTERRUPT_PIN 2 // use pin 2 on Arduino Uno & most boards
#define LED_PIN 13 // (Arduino is 13, Teensy is 11, Teensy++ is 6)
bool blinkState = false;

// MPU control/status vars


bool dmpReady = false; // set true if DMP init was successful
uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU
uint8_t devStatus; // return status after each device operation (0 = success, !0 = error)
uint16_t packetSize; // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount; // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer

// orientation/motion vars
Quaternion q; // [w, x, y, z] quaternion container
VectorInt16 aa; // [x, y, z] accel sensor measurements
VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements
VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements
VectorFloat gravity; // [x, y, z] gravity vector
float euler[3]; // [psi, theta, phi] Euler angle container
float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector

// packet structure for InvenSense teapot demo


uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' };

// ================================================================

15
// === INTERRUPT DETECTION ROUTINE ===
// ================================================================

volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high
void dmpDataReady() {
mpuInterrupt = true;
}

// ================================================================
// === INITIAL SETUP ===
// ================================================================

void setup() {
// join I2C bus (I2Cdev library doesn't do this automatically)
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
Wire.begin();
Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
Fastwire::setup(400, true);
#endif

// initialize serial communication


// (115200 chosen because it is required for Teapot Demo output, but it's
// really up to you depending on your project)
Serial.begin(115200);
while (!Serial); // wait for Leonardo enumeration, others continue immediately

// NOTE: 8MHz or slower host processors, like the Teensy @ 3.3V or Arduino

16
// Pro Mini running at 3.3V, cannot handle this baud rate reliably due to
// the baud timing being too misaligned with processor ticks. You must use
// 38400 or slower in these cases, or use some kind of external separate
// crystal solution for the UART timer.

// initialize device
Serial.println(F("Initializing I2C devices..."));
mpu.initialize();
pinMode(INTERRUPT_PIN, INPUT);

// verify connection
Serial.println(F("Testing device connections..."));
Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection
failed"));

// wait for ready


Serial.println(F("\nSend any character to begin DMP programming and demo: "));
while (Serial.available() && Serial.read()); // empty buffer
while (!Serial.available()); // wait for data
while (Serial.available() && Serial.read()); // empty buffer again

// load and configure the DMP


Serial.println(F("Initializing DMP..."));
devStatus = mpu.dmpInitialize();

// supply your own gyro offsets here, scaled for min sensitivity
mpu.setXGyroOffset(220);
mpu.setYGyroOffset(76);
mpu.setZGyroOffset(-85);
mpu.setZAccelOffset(1788); // 1688 factory default for my test chip

17
// make sure it worked (returns 0 if so)
if (devStatus == 0) {
// turn on the DMP, now that it's ready
Serial.println(F("Enabling DMP..."));
mpu.setDMPEnabled(true);

// enable Arduino interrupt detection


Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)..."));
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING);
mpuIntStatus = mpu.getIntStatus();

// set our DMP Ready flag so the main loop() function knows it's okay to use it
Serial.println(F("DMP ready! Waiting for first interrupt..."));
dmpReady = true;

// get expected DMP packet size for later comparison


packetSize = mpu.dmpGetFIFOPacketSize();
} else {
// ERROR!
// 1 = initial memory load failed
// 2 = DMP configuration updates failed
// (if it's going to break, usually the code will be 1)
Serial.print(F("DMP Initialization failed (code "));
Serial.print(devStatus);
Serial.println(F(")"));
}

// configure LED for output


pinMode(LED_PIN, OUTPUT);
}

18
// ================================================================
// === MAIN PROGRAM LOOP ===
// ================================================================

void loop() {
// if programming failed, don't try to do anything
if (!dmpReady) return;

// wait for MPU interrupt or extra packet(s) available


while (!mpuInterrupt && fifoCount < packetSize) {
// other program behavior stuff here
// .
// .
// .
// if you are really paranoid you can frequently test in between other
// stuff to see if mpuInterrupt is true, and if so, "break;" from the
// while() loop to immediately process the MPU data
// .
// .
// .
}

// reset interrupt flag and get INT_STATUS byte


mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();

// get current FIFO count

19
fifoCount = mpu.getFIFOCount();

// check for overflow (this should never happen unless our code is too inefficient)
if ((mpuIntStatus & 0x10) || fifoCount == 1024) {
// reset so we can continue cleanly
mpu.resetFIFO();
Serial.println(F("FIFO overflow!"));

// otherwise, check for DMP data ready interrupt (this should happen frequently)
} else if (mpuIntStatus & 0x02) {
// wait for correct available data length, should be a VERY short wait
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();

// read a packet from FIFO


mpu.getFIFOBytes(fifoBuffer, packetSize);

// track FIFO count here in case there is > 1 packet available


// (this lets us immediately read more without waiting for an interrupt)
fifoCount -= packetSize;

#ifdef OUTPUT_READABLE_QUATERNION
// display quaternion values in easy matrix form: w x y z
mpu.dmpGetQuaternion(&q, fifoBuffer);
Serial.print("quat\t");
Serial.print(q.w);
Serial.print("\t");
Serial.print(q.x);
Serial.print("\t");
Serial.print(q.y);
Serial.print("\t");

20
Serial.println(q.z);
#endif

#ifdef OUTPUT_READABLE_EULER
// display Euler angles in degrees
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetEuler(euler, &q);
Serial.print("euler\t");
Serial.print(euler[0] * 180/M_PI);
Serial.print("\t");
Serial.print(euler[1] * 180/M_PI);
Serial.print("\t");
Serial.println(euler[2] * 180/M_PI);
#endif

#ifdef OUTPUT_READABLE_YAWPITCHROLL
// display Euler angles in degrees
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
Serial.print("ypr\t");
Serial.print(ypr[0] * 180/M_PI);
Serial.print("\t");
Serial.print(ypr[1] * 180/M_PI);
Serial.print("\t");
Serial.println(ypr[2] * 180/M_PI);
#endif

#ifdef OUTPUT_READABLE_REALACCEL
// display real acceleration, adjusted to remove gravity

21
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetAccel(&aa, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity);
Serial.print("areal\t");
Serial.print(aaReal.x);
Serial.print("\t");
Serial.print(aaReal.y);
Serial.print("\t");
Serial.println(aaReal.z);
#endif

#ifdef OUTPUT_READABLE_WORLDACCEL
// display initial world-frame acceleration, adjusted to remove gravity
// and rotated based on known orientation from quaternion
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetAccel(&aa, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity);
mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q);
Serial.print("aworld\t");
Serial.print(aaWorld.x);
Serial.print("\t");
Serial.print(aaWorld.y);
Serial.print("\t");
Serial.println(aaWorld.z);
#endif

#ifdef OUTPUT_TEAPOT
// display quaternion values in InvenSense Teapot demo format:

22
teapotPacket[2] = fifoBuffer[0];
teapotPacket[3] = fifoBuffer[1];
teapotPacket[4] = fifoBuffer[4];
teapotPacket[5] = fifoBuffer[5];
teapotPacket[6] = fifoBuffer[8];
teapotPacket[7] = fifoBuffer[9];
teapotPacket[8] = fifoBuffer[12];
teapotPacket[9] = fifoBuffer[13];
Serial.write(teapotPacket, 14);
teapotPacket[11]++; // packetCount, loops at 0xFF on purpose
#endif

// blink LED to indicate activity


blinkState = !blinkState;
digitalWrite(LED_PIN, blinkState);
}
}

23
4.2 HEAD-MOVEMENT DETECTION
The first step is to create the accessory which came from a study conducted to identify the movements
from the truck driver that are related to its normal work routine and the movements that indicate
drowsiness. This database was then transferred to the central processing unit of the cap which works
connected to an Accelerometer and Gyroscope to identify each type of situation.

Definition of Tilt Angle


This system uses head movements as the sole input method; more precisely head’s tilt angles are used.
Head tilt angles define how much the head is rotated along an axis.
There are three possible head tilt movements, which are shown in Figure, and they are defined as:

• Pitch, the vertical head rotation movement (as in looking up or down).


• Roll, the head rotation that occurs when tilting head towards the shoulders.
• Yaw, the horizontal head rotation movement (as in looking to left or right).

24
4.3 APPLICATION

• Automobiles.
• Security Guard Cabins.
• Operators at nuclear power plants where continuous monitoring is necessary.
• Pilots of airplane.
• Military application where high intensity monitoring of soldiers is needed.

25
CHAPTER-5

RESULT

26
5.1 SUMMARY
To obtain the result, system was tested for different people in different conditions. For this project I used
a circuit consisting a programmed accelerometer in arduino, vibrator motor, LED and a buzzer fitted inside a
cap to a battery to prevent the driver from falling asleep behind the wheels.

5.2 ADVANTAGES
 Cheap
 Affordable by anyone
 Anyone can use it while driving
 More efficient
 Simple design
 Uses more than one senses to alert the driver

5.3 DISADVANTAGES
 All studies have been done in unrealistic environment. For assessing the prevalence of drowsy
driving in real traffic, and in order to investigate what drivers actually do when they receive a
sleepiness warning it is absolutely necessary to study their natural behavior when they go about
their daily routines.
 Lack of control on situations. Sometimes it gets activated when driver is not actually feeling sleepy
because of touching the required angle.

5.4 FUTURE WORKS


In the real time driver fatigue detection system it is required to slow down a vehicle automatically
when fatigue level crosses a certain limit. Instead of threshold drowsiness level it is suggested to design a
continuous scale driver fatigue detection system. It monitors the level of drowsiness continuously and
when this level exceeds a certain value a signal is generated which controls the hydraulic braking system
of the vehicle.

5.5 CONCLUSION
Thus, I have successfully designed a prototype drowsiness detection system using sensor technology. The
system so developed was successfully tested, its limitations identified and a future plan of action
developed.

27
REFERENCES

[1] T Brandt, R Stemmer, B Mertsching, A Rakotonirainy, Affordable visual driver monitoring system for
fatigue and monotony. Proceedings of the IEEE International Conference on Systems, Man and
Cybernetics (SMC '04), October 2014 , 6451–6456
[2] Z Tian, H Qin, Real-time driver's eye state detection Proceedings of the IEEE International
Conference on Vehicular Electronics and Safety, October 2015, 285–289
[3] Peters, Robert D. "Effects of Partial and Total Sleep Deprivation on Driving Performance", US
Department of Transportation, February 2009
[4] NHTSA, Evaluation of techniques for ocular measurement as an index of fatigue and the basis for
alertness (National Highway Traffic Safety Administration,USA, 2017)
[5] Philadelphia.cbslocal.com/2013/10/02/drowsy-driving becoming-dangerous-problem/
drowsydriving.org/about/whos-at-risk

28

S-ar putea să vă placă și