Background
Drowsinessis one of the main cause of most traffic accidents. To prevent this accident, some sensors have been explored and exploited to be applied such as visual sensor and brain signal sensor. However, the effectiveness of the sensor is still far enough for the real application.
Therefore, we propose the driver drowsiness detector system equipped with Walabot radar as the main sensor. This sensor will identify the driver drowsiness from two perspectives: head/body gesture and heart rate. First, the Walabot radar will analyze the gesture of the driver through the radar imaging. The gesture of drowsiness can be yawn, bow, or droop. Since the human body has high dielectric constant value (relative permittivity constant is around 80), radar imaging is one promising sensor for detecting the human body gesture.
Others, RF radar, through A-scan signal processing, is also able to identify the heart rateand calculate the frequency of the beat. According to the prior research, this parameter can be one of the primary sign of driver drowsiness condition.
The result of drowsiness will be sent to raspberry and then Android sequentially. Based on the detected driver drowsiness sign from Walabot, Raspberry Pi will turn on the hard-rock music or high beat music on the android. Simultaneously, this Android phone will activate the vibration alert and contact the wife/husband to remind the condition of driver especially if the drowsiness level is serious. This system can work even in the cabin has unstable light conditions. Moreover, the flexibility and portability of this system also became one main advantage comparing other developed systems. We also consider the long-term expansion of the applications so that the driver can make his/her own plan to prevent any possible accidents because of the drowsiness.
The multimode of this system will also available to be expanded. For example, we can add a camera as visual correction of Walabot radar, especially in the bright enoughcondition. This camera can detect the expression of the driver. By using a multimodal system, we can enhance the drowsiness detection which significantly suppresses the traffic accidents.
System Design
Since in the driving, driver in the relatively on the constant position (static) so that the application of walabot radar for drowsiness detection is possible. Moreover, there is no such adaptive algorithm facing drastically movement.
Then, we determine the length of driver breath as basis information to determine the driver in the drowsy condition. Based on some references, the drowsy driver have slower breath. Since we receive the walabot creator version so that the imaging was not developed in this project. We will consider strongly the imaging technique in the future project.
The data of driver breathe is saved to local database on raspberry pi. The Android phone will receive the status and do an alert if the drowsy detected. Some alert employed in this system: vibration alert, musical alert and calling family. These three alerts are needed to prevent any accident as well as possible.
System Development
The system developed is shown below,
The walabot send data to raspberry pi by serial communication to be saved to logger database. Through local network, the data is send to driver phone (android). This communication using Json formatiing messaging. Then, the three alert employed: vibration, sound alert and calling family.
In the process of determining long/short breathe, we adapt and modify the algorithm from Walabreathe code in previous submitted project. In this code we use treshold 3 to separate breathe and not breathe. Then we count up to 10 sensing process. From the breathe counter, we decide whether long/short breathe and send to database (long breathe=fast breathe, short breathe=slow breathe). The code below shows the procedure,
if b_magnitude>3: #user is breathing
b_counter+=1
else: #not breathing
nb_counter+=1
if(gen_counter==10): #taking 15 'energy' values to classify into 'long' and 'short' breaths
if(b_counter>0 and nb_counter>0):
if(b_counter>nb_counter): #if energy magnitude is 'high' most the time among the 15 readings, then it is a 'long breath'
print('Long Breath')
lb_counter+=1
try:
x.execute("INSERT INTO data(status,bit) VALUES (%s,%s)",('Long Breath',1))
conn.commit()
except:
conn.rollback()
else: #when energy magnitude is 'low' most the time among the 15 readings, then it is a 'short breath'
print('Short Breath')
sb_counter+=1
try:
x.execute("INSERT INTO data(status,bit) VALUES (%s,%s)",('Short Breath',0))
conn.commit()
except:
conn.rollback()
else:
print('No Breath')
try:
x.execute("INSERT INTO data(status,bit) VALUES (%s,%s)",('No Breath',0))
conn.commit()
except:
conn.rollback()
if(b_counter==0):
bn_counter+=1
gen_counter=0
b_counter=0
nb_counter=0
Video below shows how the program works
In the android code, the system will update and count the slow breathe. If the slow breathe is more than the threshold value, the drowsiness is detected. The code is shown below,
if(shortcounter>treshCounter){ //drowsy detected
statusTextView.setText("Status: Drowsy Detected");
The three alerts used in this system are (with the main code):
- sound alert
mp=MediaPlayer.create(this, R.raw.sound);
mp.start();
-vibration alert
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
v.vibrate(1000);
-calling family number
try {
String number = "XXXXXXX";
Uri call = Uri.parse("tel:" + number);
Intent surf = new Intent(Intent.ACTION_DIAL, call);
startActivity(surf);
} catch (Exception e) {
}
Finally, the video below is how our proposed systme works. Of course an advance investigation is needed to improve the accuracy and feasibility of application this system in the real world.
Conclusion
We have described our project in this contest. We use the walabot radar system for detect the driver drowsines and then send alert to android phone and also call the family for preventing any possible accident in the future driving.
By Cepstromaniax Team
Comments
Please log in or sign up to comment.