Description
The Alcohol Gas Sensor Module detects the presence and amount of alcohol / ethanol present in the air.
PACKAGE INCLUDES:
- Alcohol Gas Sensor MQ-3 Module
KEY FEATURES OF ALCOHOL GAS SENSOR MQ-3 MODULE:
- Sensor type used in breathalyzer applications or detecting alcohol spills
- Analog sensor output
- Digital sensor output with user adjustable sensitivity and LED indicator
- 5V operation
The module includes the sensor which provides a direct analog output. In addition, the module has a comparator IC and adjustment potentiometer to provide a digital output with an adjustable set point, power LED, digital output active LED and a header for easy hookup.
These modules can be used to detect the presence and amount of alcohol present in the air. This can be used to create an alarm for monitoring the presence of alcohol, such as from a spill, or more typically it can be used to try to quantify the amount of alcohol present in a person’s breath aka create a breathalyzer like the police use.
Heating Element
The sensor contains a small heater, so the power draw is about 130mA. The sensor will get warm to the touch after it has been operating for awhile. The module can be powered off a 5V power pin on the MCU, but it draws too much power to try to power it off a digital pin. For accurate measurement, the sensor needs to be fully warmed up. The sample code below has a 1 minute warm-up, but for maximum accuracy the warm-up time before use can be extended.
Sensing Element
The sensor uses SnO2 (tin dioxide) for the sensing element which is heated and changes resistance when exposed to alcohol in the air. A voltage divider is used to provide an analog output voltage that correlates to the amount of alcohol in the air. When the sensor is left in storage for long periods, the calibration of the device can drift. When first being put into use after a long storage (1 month or more), the device benefits from being powered on for 24-48 hours to break it in for maximum accuracy. We have noticed that sensors tend to drop about 30-40 points after operating for about 24 hours with no alcohol present when we first receive them.
When bench-top testing, the sensor will take 5-10 minutes to fully warm up. During the warm-up time, the sensor will read high and slowly decrease until the reading stabilizes.
The output of the sensing element is available as an analog output proportional to the level of alcohol being sensed. This output is typically fed into an analog input on an MCU so that it can be measured. That analog output is also run through an LM393 comparator which provides a digital output. The trigger point for the digital output is adjustable using the potentiometer on the back of the module. An LED labeled D0 is lit when the analog output exceeds the limit as set by the potentiometer and the digital output (D0) goes LOW.
Module Connections
There is a right-angle male header on the board for making connections.
1 x 4 Header
- VCC – Connect to 5V
- GND – Connect to ground
- D0 – Digital output of comparator circuit. Active LOW when alcohol set point is reached
- A0 – Analog output of sensor. Voltage increases with alcohol detection
OUR EVALUATION RESULTS:
These devices work as expected, in that they detect the presence of alcohol and provide an analog output relative the amount of alcohol that is detected. Somewhat surprisingly, even having a glass of wine within a couple of feet of the sensor is detected. Don’t ask me how I know that….. Taking it to the next level such as correlating the data it outputs to a specific Blood Alcohol Content (BAC) that will stand up in court is a whole different ball game.
Part of the difficulty is that temperature and humidity have an effect on the readings. This can be demonstrated by running the sample program below and breathing lightly on the sensor (with no alcohol involved). The sensor reading will go up due to humidity and heat in the breath. Then try blowing hard on the sensor and the reading will go down since the strong air blowing on the sensor cools it down which causes a lower reading. The sensor has a built-in heater, so for best stability it should be given some time to heat up (warm to the touch) which will minimize the effect of temperature.
The other part of the difficulty in a BAC application is in coming up with a standard by which to calibrate the reading you are getting to a specific BAC.
To avoid getting too scientific, I went the route of trying to correlate the readings by drinking wine in known 5oz (1 serving) quantities over time and comparing that to standardized BAC charts that you can find on the internet that estimate your BAC given your weight, the amount of alcohol consumed and the time span over which you drank it. Here is an example chart.
Note that you take .01% off for every 40 minutes of time while drinking. Below is a chart I filled out as part of my scientific quest. The last entry was with an alcohol swab placed over the sensor to determine the upper limit of the measurement.
Drink is 5 oz of wine
(1 serving) |
Per BAC Chart | Time | Per BAC Chart
Adj w/ Time |
Sensor Reading 5 mins after finishing drink | Drunkedness |
Start | :00 | 90 | Stone Cold Sober | ||
1 Drink | .03 | :20 | 300 | ||
2 Drinks | .06 – .07 | :40 | .05-.06 | 362 | |
3 Drinks | .1 | 1:07 | .09 | 404 | Should be legally drunk |
4 Drinks | .13 | 1:30 | .11 | 435 | Even Drunkerer |
Alcohol swab | 811 |
To hook up the module:
- Connect the A0 analog output pin to any analog input pin on the MCU. We are using A0 in our example.
- If using the digital output, connect the D0 pin to any digital input pin on the MCU. We are using D8 in our example.
- Hook up Vcc to 5V and ground to ground.
Alcohol Gas Sensor MQ-3 Module Example Program
/* MOQ-3 Alcohol Sensor Module Test This type of sensor is commonly used for breath analyzer applications where the blood alcohol content is estimated by measuring the amount of alcohol being released when a person exhales onto the sensor. Monitor sensor analog output 'A0' on ADC input A0 Monitor sensor digital output 'D0' on digital input pin 8 */ // Define pins used below #define ADC_PIN A0 // Use any available ADC Pin, connect to A0 sensor pin #define DIGITAL_PIN 8 // Use any available digital pin, connect to D0 sensor pin #define WARMUP_TIME 30 // Warmup time in Seconds #define SOBER 150 // Max value considered to be sober #define DRUNK 400 // Min value considered to be drunk //=============================================================================== // Initialization //=============================================================================== void setup() { Serial.begin(9600); // Set Serial Monitor window comm speed Serial.println("Warming up the sensor "); //Wait while we warm up the sensor for (int i=0; i<= WARMUP_TIME; i++) { Serial.print(". "); delay(1000); } Serial.println(" Warmup Complete"); } //=============================================================================== // Main //=============================================================================== void loop() { int val_ADC = analogRead(ADC_PIN); // Read analog value from sensor int val_Digital = digitalRead(DIGITAL_PIN); // Read digital value from sensor Serial.print("Alcohol Analog Data = "); // Printout the raw data Serial.print(val_ADC); Serial.print(" Digital Output = "); Serial.print(val_Digital); // Printout our estimate of drunkenness if (val_ADC <= SOBER) Serial.println(" Conclusion: Stone Cold Sober!"); else if (val_ADC > DRUNK) Serial.println(" Conclusion: Yep, your DRUNK"); else Serial.println(" Drinking - but within legal limits"); delay(1000); // Take a reading every second for test purposes. }
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
- Inspected
- Tested for basic alcohol detection
- Packaged in a resealable ESD bag for protection and easy storage.
Notes:
- None
Technical Specifications
Operating Ratings | ||
Vcc | 5V | |
I(typ) | 130mA (typ) | |
Vout | Analog Output | 350mV to 4V (typ) |
Sensor Output | Measurement Range | 25~500 ppm alcohol |
Dimensions | ||
Sensor Probe Board | L x W (PCB) | 32mm x 20mm (1.26 x 0.8″) |
Datasheet | MQ-3 Sensor |