A Method of Detecting Driver's Alcohol Concentration

Drivers drunk driving can bring a lot of harm. The paper studies a device that is placed in the car to detect whether the driver is drunk driving. The system consists of a core processor, an alcohol sensor, a display device, and an alarm device. The fitting curve of the alcohol sensor was determined through experiments, and the correspondence between the output voltage and the alcohol concentration was obtained. The design can detect the state of the driver’s alcohol concentration in real time in the car. When the system thinks that the driver’s alcohol concentration exceeds a certain value, a voice alarm is issued, and the device can effectively prevent the driver from drunk driving.


Introduction
Drunk driving is harmful which brings to social problems, particularly in traffic accidents. In order to prevent the damage caused by drunk driving, the detector designed to test the content of alcohol in the blood by human sweat is significant and promising.
The concentration of alcohol is calculated by using the highly sensitive alcohol sensor that can convert alcohol molecules volatilized from body fluids, which exposed to human skin contents a certain level of alcohol after drinking, correspondingly to electrical signals.
The detector can increase active safety when driving since it's highly sensitive, sanitary, portable, and lowcost.

Overall design of the system
As seen in Figure 1, the system is composed of microprocessor, alcohol sensor, alarm device, etc. The internal resistance of TGS822 alcohol sensor changed accordingly to the variation of alcohol concentration in body fluid, then showed by sampling the variation of resistance divider. Firstly, delivering TGS822's reactions to alcohol volatilized from body fingers into PCF8591 analog digital converter(ADC) in the form of sampling voltage, and then the microcontroller starts to analyze data transformed by analog digital converter(ADC), we can finally judge whether drinking driving or drunk driving by contrasting transformed data with the alarm threshold set in microcontroller, at the same time, we can also figure out the alcohol concentration showed on the liquid crystal display panel(LCD), and voice alarm system will be started based on the actual situation. 1 Figure 1 The overall design block diagram of the detecting system

Selection of microprocessors
The detector in this study uses STC89C52 in order to reduce power consumption and cost. STC89C52 is a CMOS 8 bit microcontroller with low power consumption, high-performance, and programmable flash memory in an 8K system, which produced by STC company. Although STC89C52 uses the classic McS-51 kernel, it has the function that traditional 51 microcontroller does not have, and it's smallest system includes power circuit, reset circuit and crystal oscillation circuit.

Performance of alcohol sensor
Considering the sensor needed to require higher sensitivity to accurately detect the content of alcohol from the sweat of body fingers, higher stability and longer service life, system use the TGS822 alcohol sensor for its highly sensitive and good value for money .
Circuit connection presented in Figure 2 that consists of two parts: heating circuit and signal output, Rs is sensor's surface resistance which will change with changes in alcohol concentration. VC is the heating voltage, the value is 5V in the circuit; RL is the load resistance, the value is 10KΩ.The relation between Rs and VRL is

Concentration curve fitting of alcohol sensor
The sensitivity property of sensor showed in Figure 2. The ordinate represented by the resistance ratio (Rs/Ro) of sensor, Rs and Ro respectively defined as following: resistance value of gas with different concentration and resistance value of ethanol containing 300ppm. Before the alcohol test, the sensor needs to be preheated. Under the condition of 26℃ and preheat treatment, a test of Rs showed 19833Ω. Then we can figure out that Ro is 1133Ω, which established on the resistance ratio (Rs/Ro) of 17.5. Figure 2 sensor circuit connection diagram A number of values selected in this design to calculate the corresponding VRL, and the range of values for alcohol concentration is 50ppm to 5000ppm. Then the fitted curve for alcohol concentration to output voltage obtained by software, presented in Figure 3. In fact, the fitted curve can be represented by polynomials in program design to ensure the continuously corresponding relations between alcohol concentration and output voltage. We can determine the alcohol concentration by the output voltage.  Figure 3 mg/L corresponds to VRL

Design of display module
In order to visually display the test results of alcohol and embody human-based design, we selected 12864 LCD screen in this design, which has Chinese Fonts, 128×64 resolution and built-in 8192 Chinese characters of 16*16 and 128 ASCII character sets of 16*8. Besides, 12864 LCD screen has other feature including flexible interface modes, convenient operating instructions, low voltage and low power consumption. Compared with the same type of graphical dot-matrix LCD, 12864 LCD has more succinct circuit structure and display routine, and lower price.

Design of AD
PCF8591 with I2C bus interface was used in design of AD. I2C bus interface realizes information exchange only by data line (SDA) and clock line (SCL), which is the serial bus produced by Philips company. And I2C bus interface has the following advantages when compared with conventional parallel bus, such as succinct structure, easy maintainability, easy extension, easy standardization and high reliability. Circuit scheme of PCF8591 showed in Figure 4.

Design of voice alarm
To enhance user experiences, voice alarm launched from starting the system to drunk driving. We adopted YF017 sound chip that is OTP sound standard chip with the output of PWM. And YF017 series are sound standard chips that can control as many as 32 sounds to call and compose by at least one IO of microcontroller, as well as specific fixed standard modules. Several speech segments stored in YF017 sound chip in advance, then trigger them by the corresponding number of pulses to realize voice alarm. PCB 3D mode presented in Figure 5.   Figure 5 Hardware model of the system

The main program frame
The thought of modularization used in this design. By calling subroutines of AD, LCD and alarm from the main function to implement function of detector.
AD keeps collecting, transforming and comparing data with alarm threshold after initializing the modules of system. Microcontroller will judge whether there is a light alarm or an acoustooptic alarm when alcohol concentration exceeds different alarm limits, and it will transfer the corresponding information to LCD to display. The main program frame of alcohol detector showed in Figure 6.

Design of other Subprogram
After AD finished initialization, the corresponding digital quantity of 0 to 255 firstly obtained by inputting analog voltage of 0 to 5V, then it translated into the corresponding alcohol concentration via specified linear proportion.
The operating members of alarm program are buzzer and LED lights with three colors. Normally, the green light is on, it goes out when converted digital quantity of AD exceeds the digital quantity of alarm limit about "drinking driving", then the yellow light flashes. When converted digital quantity of AD exceeds the digital quantity of alarm limit about "drunk driving", then the yellow light stops flashing and the red light starts to flash. In fact, the voice alarm runs when reaches the limit of "drinking driving" to warn the driver. There is either welcome interface or preheat interface in the stage of initialization for LCD12864. When entering the phase of detection, LCD always displays the current concentration of alcohol. Then, warnings with graphic displayed when alcohol concentration exceeds the corresponding concentration of drinking driving and drunk driving.

Conclusion
The paper produced a preventive drunk driving detection device and conducted an experiment. When the temperature was 26 degrees, the output voltage is stable at 0.24V after 1 minute and 20 seconds of power-on. When the temperature is 28 degrees, the output voltage is stable at 0.28V after 1 minute and 20 seconds of power-on. Tests show that the system can detect alcohol concentration well, indicating that the design has good precision and reliability, and the physical map is shown in Figure 7 .