iris.nyit.eduiris.nyit.edu/.../prj_reports/spring2014/project2.docx · web viewthe arduino master...
TRANSCRIPT
Electrical and Computer Engineering Final Report
Drowsiness Monitoring System
EENG 491 Senior Design Project Section W02
Fabio Casagrande, Team Leader
Thomas Marzec
Jingyi Wang
Submitted on May 16th, 2014
DEPARTMENT OF ENGINEERING AND COMPUTING SCIENCES
NEW YORK INSTITUTE OF TECHNOLOGY,
OLD WESTBURY CAMPUS
Drowsiness Monitoring System 1
Table of Contents
1. Title Page 1
2. Table of Contents 2
3. Abstract 3
4. Introduction 3
5. Objectives 4
6. Component List 5
7. Driver Monitoring System Design 6
8. Android Tablet App 7
9. Eye Tracking
Eye Detection 9
No Eye Detection 10
10.LCD Display System 11
11.Hardware and Wirings
Car Simulator Board 12
Programmable Arduino Display
13
System Hardware Connections 15
12.Milestones and Goals 16
13.Conclusions 17
14.References 18
15.Appendix 19
Drowsiness Monitoring System 2
Abstract
The purpose of this project is to create a system that allows the user to safely drive
while being monitored. This system would track the driver’s eyes in real time and if he or she
falls asleep, the system would turn up the volume of the radio and slow down the car until it
stops.
Introduction
Road accidents happen on a daily basis and the range and severity of injuries caused by
road accidents are enormous. Some injuries can have a short term impact on day to day life and
then heal permanently, while others can last for a lifetime. Road accidents sometimes affect
victim’s families, too. It can be a very real struggle for family members to provide the care and
support needed. There are many reasons why a car accident takes place. One common cause of
accidents is when the driver falls asleep while driving. Another cause could be having a stroke
while driving a high speed on the highway. Medical related causes are the impetus for the idea
we have created. The purpose of this project is to develop a system that can prevent the driver
from getting involved in a car accident. The “Drowsiness Monitoring System” will allow the user
to safely drive while being monitored. This system would track your eyes in real time and if you
fall asleep, the system would turn up the volume of the radio and slow down the car until it
stops. The driver would also be able to interact with the system through a touch screen LCD
video screen.
Drowsiness Monitoring System 3
Objectives
Tracking eye motion through Android Tablet
Data communication between “Android Tablet” and “Arduino” microcontrollers through
Bluetooth communication.
Display Status on the Programmable Arduino LCD Display.
Drowsiness Monitoring System 4
Component list
• 3 Arduino Mega
• 1 Display LCD
• 1 Bluetooth Receiver Module
• 1-Android Tablet
• 2 --7-segment displays
• 5 LED's
• 1- 120- 5.5V Power Transformer
Drowsiness Monitoring System 5
Driver Monitoring System Design
Figure 1: Drowsiness Monitoring Design
Drowsiness Monitoring System 6
The Drowsiness Monitoring System is graphically represented in Fig. 1. The “brain” of the
system is the Android Tablet. The driver is monitored with the built-in camera of the Tablet
through an Open Source app. The app tracks the eyes of the driver and, at the same time, sends
signals to the Arduino microcontroller. The real time eye tracking is also shown on the screen of
the Tablet. The Tablet communication with the Arduino is through Bluetooth. According to the
signal received from the Tablet, the Arduino (master) has two decisions to take. If the signal
says that the eyes are not tracked, the Arduino (Master) activates the Arduino (Slave). The main
task of the Arduino (slave), once activated, is to start a series of operations that will result in
stopping of the car only if the driver’s eyes have not been detected in a certain amount of time.
The Arduino (Slave) is active only when the eyes are not tracked from the software. On the
other hand, if the Arduino (master) receives the signal which says that the eyes have been
detected nothing happens. If in the previous state, the eyes were not detected and now they
are detected, the Arduino (Master) will turn off the alerts. Each states will also be displayed on
the LCD Display.
Drowsiness Monitoring System 7
Android Tablet App
Figure 2: Android Tablet App
When you first open the Android Tablet App, the app automatically connects the tablet to
the Bluetooth receiver installed on the Arduino (Master). Once the connection is established,
the app starts the eye monitoring and communicates with the Arduino microcontroller.
Drowsiness Monitoring System 8
Eye Tracking
Figure 3: Eye detection case
As we can see in Figure 3, the data coming from the built-in camera will be
analyzed from the app stored inside the Android Tablet. In this case, the eye is detected from
the camera and the system will then have to make a decision. If the alert in the previous state
was on, the system will then change the state of the alarm to off, turn off the hazard lights, and
Drowsiness Monitoring System 9
turn the radio off. Otherwise, if the alarm in the previews state was off, the system then will not
take any actions on the car.
Figure 4: No Eye Detection Case
As we can see in Figure 4, we can represent the “No Eye Detection Case” in three
phases. In the first phase, the App, through the built-in camera, does not detect any eyes. The
real time eye tracking will still display the video on the Tablet but with no eye tracked. In the
second phase, the App sends an alert signal to the Arduino (Master) which it will sends that
signal to the Arduino (Slave). The Arduino (Slave) will start the alert on. From the moment that
the alert is on, a countdown will start and it will take 4 seconds until the car stops. If in the
meanwhile the eyes get detected, the countdown will stop and the alert will go off.
Drowsiness Monitoring System 10
LCD Display
Figure 5: LCD Display
As we can see in Figure 5, the Arduino (Master) controls the LCD Display. The LCD Display,
according to the Data coming in from the Arduino (Master), will change the states to display.
Drowsiness Monitoring System 11
Hardware and Wirings
Figure 6: Car Simulator
As showed in Figure 6, the car simulator is mainly composed by five LEDs and two 7-
segment digital displays. On the bottom left side, there are three LEDs, the “Radio Volume
Down”, the “Alarm On” and the “Radio Volume Up”. Located at the center of the board, there
are two 7-segment digital displays that show the speed of the car. In the center upper part,
there are two LEDs that simulate the four hazard lights of the car.
Drowsiness Monitoring System 12
Speed of the Car
Hazard Lights
Radio Volume DownAlarm OnRadio Volume Up
Programmable Arduino Display
Figure 7: Connection between display module and Arduino board
Drowsiness Monitoring System 13
In Figure 7 is showed the connection between the display module and the Arduino
board. The +5V of the display module is connected to the +5V of the Arduino board, which is
labelled in red. The ground of both components are connected as well, labelled in black. The
RX pin of the display is connected to the TX pin of the Arduino board in order for one to
transmit data and the other to receive data, labelled in green. Similarly, the TX pin of the
display is connected to the RX pin of the Arduino board, which is labelled in orange. Finally, the
general input and output pins of the display module can be connected to the digital in and out
ports of the Arduino board, which are labelled in blue.
Drowsiness Monitoring System 14
System Hardware Connections
Figure 8: Connection between display module and Arduino board
As we can see in Figure 8, the Android Tablet is connected to the Arduino Master
through Bluetooth. The Arduino Master takes actions on the Arduino Slave and the LCD Display
System according on the data received from the Android Tablet. On the Arduino Slave is
mounted a printed circuit that simulates the car functions while the LCD Display System
displays the states.
Drowsiness Monitoring System 15
Android Tablet
Bluetooth Receiver
Arduino Slave and Car SimulatorLCD Display System
Arduino Master
Conclusion
With the successful implementations and distribution of this device, accidents and
fatalities caused by falling asleep while driving will be decreased substantially. This will create
safer roadways, reducing the cost of car insurance, health insurance and medical bills through
the prevention of accidents. Thus, far, this system has only been tested on a car system
simulation circuit due to time and project submission date. We believe that we can create a
more efficient product in due time, but are satisfied with the current standing for
demonstration purposes.
Drowsiness Monitoring System 17
References
Lexus eye monitoring system: “Toyota's New Eyelid-Monitoring System Wakes Up
Sleepy Drivers” available on-line at
http://www.switched.com/2008/01/24/upcoming-toyotas-will-watch-your-eyes/
Ford health monitoring system: “Ford car that can monitor your HEALTH as you drive”
available on-line at
http://www.dailymail.co.uk/sciencetech/article-2360694/Ford-car-monitor-HEALTH-drive--ill-
fall-asleep.html
Volkswagon: “Driver Alert System” available on-line at
http://www.volkswagen.co.uk/technology/passive-safety/driver-alert-system
Android eye detection and tracking with OpenCV available on-line at
http://romanhosek.cz/android-eye-detection-and-tracking-with-opencv
Communication between Arduinos through wires available on-line at
http://arduino.cc/en/Tutorial/MasterWriter
Drowsiness Monitoring System 18