MQ-3 - Gas Sensor (Ethanol)

The MQ-3 is an alcohol sensor designed to detect ethanol (C₂H₅OH) vapors in the air. It uses a tin dioxide (SnO₂) sensing material that changes resistance with alcohol concentration. Operating at 5V, it provides both analog and digital outputs. The MQ-3 is highly sensitive to alcohol, making it ideal for breathalyzer devices, vehicle alcohol detection systems, and safety applications requiring alcohol monitoring.

MQ-3 Gas Sensor Module
Fig.: MQ-3 Gas Sensor Module
Detailed view of the sensor inside the plastic housing
Fig.: Detailed view of the sensor inside the plastic housing

Technical Specifications

Accuracy: 0.05mg/l to ~10mg/l alcohol vapors
Operating voltage: 5V ±0.1
Current consumption: 165mA (heater on); 60mA (heater off)
Load resistance 200kΩ
Heater resistance 33Ω ± 5%
Heating consumption <800mw
Sensing Resistance 1 MΩ – 8 MΩ
Temperature range: -10°C to ~70°C
Concentration Range 25ppm to 500ppm
Preheat Time >24h
Response times: <1s
<30s Response time after switch-on
Sensitivity: High sensitivity to ethanol; low sensitivity to gasoline
Detected substances: Ethanol (C₂H₅OH), Gasoline, Methane (CH₄), Hexane (C₆H₁₄), LPG, Carbon monoxide (CO)
DO output (TTL): Digital HIGH and LOW (0.1V or 5V)
AO output: 0.1V to 0.3V (depending on air contamination) up to 4V at maximum concentration
Dimension (L×W×H): 32mm × 22mm × 18mm
Weight: ~10g

📄 MQ-3 datasheet (56 kB)

Internal circuit diagram of the MQ-3 Gas Sensor Module
Fig.: Internal circuit diagram of the MQ-3 Gas Sensor Module
Infrared image of the MQ-3 module; the sensor element reaches more than 60°C.
Fig.: Infrared image of the MQ-3 module; the sensor element reaches more than 60°C.

Important notes

Please keep the following notes in mind before using/connecting the MQ-3:

Connections

Terminal diagram of the MQ-3 Gas Sensor Module
Fig.: Terminal diagram of the MQ-3 Gas Sensor Module
Pin name Description
VCC Power supply (5V)
GND Ground connection
AO Analog output
DO Digital output

Digital Output DO

Using the potentiometer on the back of the board, you can set the threshold at which the DO output switches from HIGH to LOW. The DO pin can be connected directly to a microcontroller or a development kit.

Analog Output AO

The sensor also has an AO analog output, which should be connected to the A/D converter (e.g.: analog input on Arduino). This allows for more accurate determination of the alcohol content by measuring the proportional voltage signal.

Used Components

Programming

Direct indicator

Through the DO output, it is possible to operate a signal LED directly on the MQ-3 module using TTL logic. The following circuit diagram shows the corresponding setup. The LED lights up as soon as a certain amount of alcohol is detected and turns off once the value drops below that threshold again. The threshold for this transition can be adjusted using the built-in trim potentiometer.

Circuit diagram for connecting the MQ-3 Sensor Module with a single LED
Fig.: Circuit diagram for connecting the MQ-3 Sensor Module with a single LED

Arduino UNO

Note that the Arduino UNO is connected via USB to the PC but has ONLY a ground (0V) connection to the rest of the circuit.

Circuit diagram for connecting the MQ-3 Sensor Module with the Arduino Uno
Fig.: Circuit diagram for connecting the MQ-3 Sensor Module with the Arduino Uno
#define PIN_AO  A0
#define PIN_DO  7
#define PIN_LED 8

void setup() {
    Serial.begin(9600);
    pinMode(PIN_LED, OUTPUT);
    pinMode(PIN_AO, INPUT);
    pinMode(PIN_DO, INPUT);
}

void loop() {
    float sensorValue, sensorVolt;

    sensorValue = analogRead(PIN_AO);
    sensorVolt = sensorValue / 1024 * 5.0;

    Serial.print("Sensor: " + String(sensorValue) + " (" + String(sensorVolt) + "V)");

    if (digitalRead(PIN_DO) == LOW) {
        digitalWrite(PIN_LED, HIGH);
        Serial.print(" Ethanol present");
    } else {
        digitalWrite(PIN_LED, LOW);
    }

    Serial.println("");
    delay(1000);
}

The test for the MQ-3module was conducted with a Glen Garioch Single Malt Scotch Whisky. After a small sip, the sensor was breathed on, and the values were observed in the serial console.

Output of the measurement on the serial console of the Arduino IDE
Fig.: Output of the measurement on the serial console of the Arduino IDE

To display the measured alcohol levels over time as a graph, the following code is used:

#define PIN_AO  A0

void setup() {
    Serial.begin(9600);
    pinMode(PIN_AO, INPUT);
}

void loop() {
    Serial.println(analogRead(PIN_AO));
    delay(1000);
}
Output of the measured alcohol values on the serial plotter of the Arduino IDE
Fig.: Output of the measured alcohol values on the serial plotter of the Arduino IDE

ESP32

Since the ESP32 is generally operated at 3.3V and its input pins are not 5V-tolerant, the AO output of the MQ-3 must be conditioned using a simple voltage divider.
Note that the ESP32 is connected via USB to the PC but has ONLY a ground (0V) connection to the rest of the circuit.

Circuit diagram for connecting the MQ-3 Sensor Module with the ESP32
Fig.: Circuit diagram for connecting the MQ-3 Sensor Module with the ESP32

To display the measured alcohol levels over time as a graph, the following code is used:

#define PIN_AO 13

void setup() {
    Serial.begin(9600);
    pinMode(PIN_AO, INPUT);
}

void loop() {
    Serial.println(analogRead(PIN_AO));
    delay(1000);
}
Output of the measured alcohol values on the serial plotter of the ESP32
Fig.: Output of the measured alcohol values on the serial plotter of the ESP32
Last edited by Christian Grieger on 2025-05-12
X
  1. [top]
  2. Technical Specifications
  3. Important notes
  4. Connections
  5. Used Components
  6. Programming