Fall 2013 ECE 445 Group #15 Driver Sleep Detection System Chenyang Xu Xiangyu Chen Yixiao Nie TA: Mustafa Mukadam
Motivation Sleepy driving – catastrophe!!
Benefits Sleepiness detection is efficient and alarms will be generated only when demanded. Advance algorithm to ensure the darkness detection ability Affordable cost for large installation Portable size and compatibility of car cigarette power jack
Overall Hardware System Introduction
Detection Algorithm
Detection Detail Use Haar Classifier Extract eye part Get base image Template Matching Histogram equalize
Detection Detail
Histogram Equalization Increase contrast Use for night time detection
Requirements Extract the eye portion The Kinect is placed in front of the driver meters away with the angle of + or - 15 degree Can detect if the driver’s eye is closed for more than 2 seconds Can not be too sensitive to detect the blink Works for both daytime(80W) and night(20W)
Verification and Problem Detect eye potion by using highlighted rectangle Can take the base image of open eye and close eye automatically Can detect and send out a signal when eye closed more than 2 secs Do not detect blink Accuracy about 93% at daytime and 82% at night Cannot use Kinect camera because OpenNI can not be installed on Beagloboard, but the final performance is good.
Difficulties Environment setting up: Opencv 2.4.3, Ubuntu Eye tracking algorithm: no such algorithm before, only face tracking Must not detect eye blink Bonus: can also work when wearing glass
DC-DC Power Supply Unit Design and objectives 1. Be able to charge the battery which is used to power up Bealge board and Webcam. Meanwhile, charg and other digital device such as smart phone, UPS receiver. 2. Supply warning system sufficient power
Power supply Unit Original Design and Requirements 1.Able to receive 1.8V control signals to drive buzzer and LED from BeagleBoard via GPIO pin. 2. Able to supply an output via USB port with 5V voltage with 5% tolerance when input of the power input supply unit varies ±3V. 3.Able to send GND control signal to Beagle board in order to take initial pictures for driver for reference (Change made by Bealge board signal reception ) 4.Able to turn off the alarming system by switch. (Include in later warning system)
Contains LM switching regulator and has maximum 6 USB output ports LED and Buzzer controlled by digital NMOS (Vth=1.0 V) supply 2A drain current with Vds=5 V and Vgs =1.8 V (Digital signal send by Beagle board). 1.8 V digital signal is insufficient to drive LED and Buzzer effectively.
Verification Max: V Min: V Peck to Peck Voltage 68.8 mV Output Ripple Voltage Iphone 4s Load
Verification The Beagle board is able to control LED and buzzer via sending digital signal Pushing button can send control signal back to Beagle Board to take reference pictures
Power Supply Performance & functional tests 1. Resistance load test (No load test, input from 7V to 20V )
2. Current load test
3. Converter efficiency (with 100 ohms load)
LED & Buzzer Warning System Objective and requirement 1. LEDs are able to flash at same frequency in different sequences. The frequency is 1Hz , 2Hz, and 4 Hz. 2. Under 5V± 5% tolerance input voltage, the buzzer sound can be heard within 2m range. 3. Turn off the warning system by slide switch when user need.
Buzzer made sound properly when digital control signal is sent 3 LEDs light up sequentially in same frequency (adjustable by code) Switch is able to turn off the LED warning system
Challenges and difficulties 1.Cadence design tool 2. Voltage ripple 3.Feedback adjustment R1=360 ohms R2=260 ohms 4. Later design change on NMOS
Overall system PCB view Warning module LED+NMOS Warning System slide switch USB power ports (6 in total) DC-DC converter module 8V to 20 V DC power supply Push button
Main processing unit: Beagleboard-xm 1-GHz ARM Cortex™-A8 4 USB Host Ports Able to run Linux(Ubuntu, Angstrom) Programmable GPIO Support installation of OpenCV
GPIO pin Sample bash code that makes LED toggle at 1Hz frequency. GPIO pins on Beagleboard Beagleboard Expansion Header
Image Capturing Requirement Able to communicate with webcam through USB Host port and collect images from it at frequency 3Hz. Verification The capture image refresh 3 times in each second on the computer monitor. A digital clock is applied to verify the time Loop12345Average Time/s
GPIO output Requirement Able to send 1.8V ±5% tolerance digital control signals through GPIO pins to LED array and buzzer to notify driver with frequencies of 1Hz. Verification Check if the LED array and buzzer behave correctly when the algorithm gives either negative or positive results Source: Source:
GPIO input Requirement When button is pressed a control signal of GND will be sent to Beagleboard. After that Beagleboard should move forward to record images and store on the disk. Verification Link the button output to Beagleboard. Verify that photos are taken and stored on the Beagleboard. Open.jpg Close.jpg Source:
Difficulties and Challenges Power supply: Commercial charger, PC USB port, DC power supply, Battery. Choice of Operating system: Angstrom or Ubuntu. Necessary tools and libraries: GUI, Compiler, OpenCV, etc. OpenNI can not be successfully installed due to bugs in installation files Limited processing power and code compatibility 。
Future work and improvement Use parallel programming such as CUDA to make code faster and more efficient To achieve a higher accuracy at night Enclosure for the hardware system Adding vibration to warning system Reduce voltage ripple by using more advanced components eg. Tantalum capacitor Write a bash script to allow the program to auto start after boot. Use OpenGL to control the frame rate to achieve a higher image capturing rate than 3Hz
Q&A
Thank you! Special Thanks to Prof. Jonathan Makela TA Mustafa Mukadam TA Joseph Shim TA Justine Fortier
Reference [1] "CT-1205CL-SMT Buzzer." Retrieved from SMT/ ND/ [2] "XM7 USB port Data sheet." Retrieved from A/OR1070-ND/ [3] "TPS61032 (ACTIVE) 5-V Output, 1-A, 96% Efficient Boost Converter." Texas Instruments, Jan