Sunteți pe pagina 1din 3

Breathalyzer

Reza Amoudeh, Frank Cruz, Anh Thu Doan, Vanessa Fernandez


California State Polytechnic University, Pomona Electrical Engineering ECE 323L Instrumentation
AbstractThis document provides information on construction of a simple breathalyzer and how to use it. the

Keywords-breathalyzer; gas sensor; arduino; analog to digital conversion; BAC

B. Arduino Uno The voltage output is sent to a microprocessor for interpretation. This project used the Arduino Uno board shown in figure 2.

I. INTRODUCTION A breathalyzer is used to measure the amount of alcohol on ones breath in order to determine what his or her blood alcohol content, or BAC, level is. This project uses a simple gas sensor and microprocessor to simulate a similar device. This paper will explore how each component works, the calibration process, and how BAC varies by the individual. It will also discuss probable errors and how to improve upon them. II. MATERIALS

Figure 2. Arduino Uno board

A. MQ-3 Gas Sensor The gas sensor used in this project is the MQ-3 gas sensor manufactured by Hanwei Electronics. The core of the sensor contains a ceramic tube that wraps around a heater coil. A semi-conductive layer of tin dioxide (SnO2) coats the tube. There is also a platinum electrode line that connects either side of the heater to the external pins, A and B. When the sensor is heated (i.e. a voltage is applied across the ceramic tube), the semi-conductor allows a current to flow through the electrode line. When the alcohol on ones breath comes into contact with the core, the ethanol is burned into acetic acid resulting in a higher current, or voltage. This voltage from the sensor is the value of interest. Figure 1 shows a picture of the sensor as well as the pin diagram and connection configuration.

This board can be powered from a USB port on a laptop or from a wall outlet and has a built in analog to digital convertor. As the sensor runs on 5V, the board will read a value of 0 to 1023. The analog input value may be displayed however the user chooses to (e.g. LED, seven segment display, LCD). III. CALIBRATION In order for the sensor to operate correctly, it needs to be calibrated with a series resistor. Figure 3 shows the relationship between the amount of alcohol on the breath and the ratio between the sensor resistances at 0.04 mg/L and various concentrations of gases, respectively.

Figure 1. MQ-3 gas sensor

Although there are six pins, only four need to be used. The sensor requires a source voltage of 5V across the heater; the pins marked H. One of the pins adjacent to the positive voltage side should also be connected to 5V. The pin adjacent to the ground is connected to an analog input of a microprocessor as well as a resistance of some value determined during calibration.

Figure 3. Sensitivity characteristics of the MQ-3

According to the graph, the ratio Rs/Ro is 1 when the breath alcohol content is 0.04 mg/L. However, a known value of breath alcohol content at 0.04 mg/L was not readily available to calibrate the sensor. Instead, the graph was reconstructed to determine the blood alcohol content, the signal voltage, and the corresponding digital values. A. Sensor Resistance The sensor outputs a voltage to the analog input port of the Arduino Uno board by means similar to a voltage divider as seen in fig. 4.

B. Blood Alcohol Content (BAC) Breathalyzers determine the amount of alcohol on the breath, while the blood alcohol content is a measure of alcohol in the blood. According to [1], the ratio of breath alcohol to blood alcohol is 1:2100. The relationship between the amount of alcohol on the breath and BAC is shown in the following table.
TABLE II.
Breath (mg/L)

BREATH ALCOHOL CONTENT


Blood (mg/L) BAC (%)

to AN0

10.00 8.00 6.00 4.10 2.50 1.70 1.00 0.40 0.22 0.10

21000 16800 12600 8610 5250 3570 2100 840 462 210

2.10 1.68 1.26 0.86 0.53 0.36 0.21 0.08 0.05 0.02

Figure 4. Internal sensor resistance in series with 199kO

With the sensor settled at a base digital value of 550, which translates to a voltage of 1.79, the sensor resistance is about 90k. This was chosen to represent the base level of the sensor, at 0.00% BAC. Using all-purpose 70% alcohol, the digital value reached about 890, which was used as the maximum reading. These two values determined the range of the sensor readings. The normalized values of the sensor resistance Rs is determined by the following equation, where (Rs/R0)max is 2:
Rs = (Rs / R0 )* 90000 (Rs / R0 )max

IV.

EXPERIMENTATION

After connecting everything and preheating the sensor for over 24 hours for calibration, the breathalyzer was ready. Each participant breathed on the alcohol sensor after each drink (1 beer: 355mL, 1 shot: 44mL). The Arduino Uno board was programmed to read one digital value every second. Each reading was carefully recorded for about 90 seconds at multiple times after each drink. A. Results For each persons results, the expected BAC level according to his or her weight and amount of drinks was identified with the corresponding digital value. Using MATLAB and tables I and II, a graph was constructed to show the relationship between the digital values and BAC levels as seen in figure 5. The blue line reflects the calculations, and the green line represents the best-fit line.

(1)

Using the source voltage of 4.48 volts and the calculated Rs values from Vsignal is determined by the voltage divider (1), equation.
Vsignal = Vmax *199000 (199000 + Rs )

(2)

The digital value is calculated with an analog to digital conversion. The tabulated results at various voltages are shown in table 1.
TABLE I.
(Rs/R0) Rs (k )

SENSOR CALIBRATION
Vsignal (V) Digital value

0.12 0.14 0.17 0.21 0.30 0.40 0.54 1.00 1.40 2.00

5.4 6.3 7.7 9.2 13.5 18.0 35.9 45.0 63.0 90.0

4.36 4.34 4.31 4.28 4.20 4.11 3.99 3.65 3.40 3.08

893 889 884 877 859 841 818 748 697 632

Figure 5. Trendline of BAC levels and corresponding digital values

B. Interpreting the results The graph easily shows that the higher the alcohol level on ones breath, a higher digital value will be read. More importantly, the digital value does not increase by much as the BAC levels increase. Most of the expected values were read within a 10 second timeframe. The results are shown in table III.
TABLE III.
Drinks Anh Thu (107 lbs) Digital BAC value Female Minh (99lbs) Digital BAC value

VI.

CONCLUSION

The sensor may have been accurate in its reading of alcohol levels, but we cannot conclude that it was precise. If we know what we are looking for, as in this experiment, this breathalyzer works adequately. However, in the real world, we need a working indicator of BAC levels.

TEST RSEULTS
Male Hong An (115lbs) Digital BAC value Frank (192 lbs) Digital BAC value Brian (124lbs) Digital BAC value

1 2 3 4 5 6

692 756 787 800 820 729

0.047 0.087 0.132 0.160 0.217 0.268

696 759 791

0.049 0.090 0.14

695 751 785 807

0.049 0.082 0.128 0.178

624 678 714

0.017 0.040 0.058

657 702 757 780

0.030 0.054 0.088 0.120

C. Displaying the results In an attempt to display the results on 10 LEDs, there were issues. First, we discovered that the BAC vs. digital value trend line was not linear, as we had assumed. Instead, the LEDs were used to show the continuous readings of alcohol levels as well as the peak level. V. ERRORS

Ones weight and amount of drinks do not affect the officers decision to arrest anyone whose alcohol level is over 0.08%. To improve this project, there needs to be a way that a persons alcohol level is read repeatedly so that his or her BAC can be accurately determined. ACKNOWLEDGMENT Thank you to all participants in testing the breathalyzer: Minh, Hong An, and Brian. REFERENCES
[1] [2] Blood Alcohol Content. Wikipedia. N.p.,n.d. Web. 26 Nov. 2011. <http://en.wikipedia.org/wiki/Blood_alcohol_content>. Park, Eun Jung. "Sensor Workshop: Sensor Report - MQ3 Gas sensor."Sensor Workshop. N.p., n.d. Web. 26 Nov. 2011. <http://sensorworkshop.blogspot.com/2008/04/sensor-report-mq3gas-sensor.html>. "Technical Data MQ-3 Gas Sensor."Sparkfun. N.p., n.d. Web. 26 Nov. 2011. <www.sparkfun.com/datasheets/Sensors/MQ-3.pdf>.

Throughout the course of this experiment, there were many errors that we ran into. Firstly, the gas sensors data sheet suggested we calibrate the sensor by heating it for at least 24 hours at a constant exposure to 0.4mg/L level alcohol. We did not have this readily available, so we used the graph provided by the data sheet to interpret the results. That itself would also produce an error in calculations. Also, the pins on the sensor were not labeled. In converting the blood alcohol level to breath alcohol level, we researched that it had a generally accepted 1:2100 ratio. We do not know how accurate this is, even in real breathalyzers. During experimentation, each participant may have contributed some error by not blowing consistently, or the experimenter may not have interpreted the result correctly. The sensor is highly sensitive to ethanol, so even opening a can of beer near it would set the sensor off. The ambient temperature also played a part in error contribution. We observed that at cooler temperatures, the expected value was read at a time closer to 10 seconds. At room temperature, it took much less time, about 5 seconds on average. In those same readings, however, the participants alcohol level was expected to be higher. Also, if one breathed on the sensor right after finishing a drink, the sensor took a longer time to read the expected BAC level. The sensor read a value for each second, while the true reading of the alcohol level may have been much more precise in much less than one second.

[3]

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