Overview

The MQ-3 is a low-cost semiconductor gas sensor manufactured by Winsen Electronics, engineered specifically for detecting ethanol (C2H5OH\text{C}_2\text{H}_5\text{OH}) gas and alcohol vapor in ambient air.

The sensor element consists of a micro ceramic tube coated with Tin Dioxide (SnO2\text{SnO}_2), heated internally by a nickel-chromium heating coil. Clean air exhibits low electrical conductivity; when alcohol vapor is present, the surface conductivity of SnO2\text{SnO}_2 increases proportionally to gas concentration.

Standard MQ-3 breakout boards pair the 6-pin sensor head with an LM393 voltage comparator, providing both a continuous analog voltage output (AO) for concentration measurement and a digital threshold output (DO) with an adjustable potentiometer. It is widely used in DIY breathalyzers, alcohol detection alarms, and environmental monitors.

Quick reference

Operating voltage (VCC)5.0 V DC (required for internal heater)
Heater resistance (RHR_H)31 Ω±3 Ω31\ \Omega \pm 3\ \Omega at room temp
Heater power consumption800 mW\le 800\text{ mW} (~150 mA at 5V)
Detection gasAlcohol / Ethanol vapor
Concentration range0.05 mg/L0.05\text{ mg/L} to 10.0 mg/L10.0\text{ mg/L} (25 ppm25\text{ ppm} to 500 ppm500\text{ ppm})
OutputsAnalog Voltage (AO) & Digital Threshold (DO)
Warm-up time24–48 hours initial preheating / 3 minutes before sampling

Pinout

Standard 4-pin 0.1" (2.54 mm) breakout module header:

PinNameTypeDescription
1VCCPowerSupply input (+5.0 V DC required for heater)
2GNDPowerGround reference (0 V)
3DODigital OutputLM393 comparator digital output (Low when gas exceeds threshold)
4AOAnalog OutputAnalog output voltage proportional to alcohol concentration

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply VoltageVCCV_{CC}4.95.05.1VDC
Heater VoltageVHV_H4.95.05.1VAC or DC
Heater CurrentIHI_H130150180mAVCC=5.0 VV_{CC} = 5.0\text{ V}
Sensing ResistanceRsR_s1.010.0In 0.4 mg/L0.4\text{ mg/L} Alcohol
Concentration RatioRs/RoR_s/R_o0.20.6Rs(0.4mg/L)/Rs(Clean Air)R_s(0.4\text{mg/L}) / R_s(\text{Clean Air})
Response Timetrest_{res}10\le 10s90%90\% response
Recovery Timetrect_{rec}30\le 30s90%90\% recovery

Calibration & Sensor Resistance Formula

The analog output voltage (VAOV_{AO}) is measured across a load resistor (RLR_L, typically 10 kΩ10\text{ k}\Omega on breakout boards):

Rs=(VCCVAOVAO)×RLR_s = \left( \frac{V_{CC} - V_{AO}}{V_{AO}} \right) \times R_L

  1. Clean Air Calibration (RoR_o): Measure VAOV_{AO} in fresh air, calculate RsR_s, and divide by the clean air constant (60\approx 60) to obtain RoR_o.
  2. Gas Concentration Calculation: Calculate ratio RsRo\frac{R_s}{R_o} and apply log-log interpolation based on the datasheet sensitivity curve:

Alcohol Concentration (mg/L)=0.4×(Rs/Ro0.4)1.4\text{Alcohol Concentration (mg/L)} = 0.4 \times \left( \frac{R_s/R_o}{0.4} \right)^{-1.4}

Wiring

MQ-3 PinArduino UnoESP32 (with 3.3V ADC divider)Notes
VCC5VExternal 5V Power SupplyDo not power from 3.3V
GNDGNDGNDSystem ground
AOAnalog Pin A0VP / GPIO36 (ADC1)Use voltage divider on ESP32
DODigital Pin D2GPIO 4Digital threshold trigger
Warning

High Heater Power & Warm-Up Time Warning:

  • The MQ-3 internal heater draws up to 180 mA at 5V, getting warm to the touch during normal operation. Do not attempt to power VCC from low-current 3.3V pins or FTDI serial adapters.
  • New MQ-3 sensors require an initial 24 to 48-hour burn-in period powered continuously to burn off factory coating and stabilize baseline readings.

Example

cpp
const int mq3AnalogPin = A0;

void setup() {
  Serial.begin(9600);
  Serial.println("MQ-3 Alcohol Sensor Warming Up...");
  delay(10000); // 10 second quick warm-up
}

void loop() {
  int rawADC = analogRead(mq3AnalogPin);
  float voltage = (rawADC / 1023.0) * 5.0;

  Serial.print("Raw ADC: "); Serial.print(rawADC);
  Serial.print(" | Voltage: "); Serial.print(voltage); Serial.print(" V -> ");

  if (voltage > 2.0) {
    Serial.println("ALCOHOL DETECTED!");
  } else {
    Serial.println("Air Clean");
  }

  delay(1000);
}

Common mistakes

  • Powering VCC with 3.3V: Operating the heater below 4.9V prevents SnO2\text{SnO}_2 from reaching its operating temperature (300C300^\circ\text{C}), rendering the sensor insensitive.
  • Skipping preheating: Taking readings immediately after applying power results in false high readings during the first 3 minutes of heater warm-up.

Notes

  • MQ Sensor Family: MQ-2 (Gas/Smoke), MQ-3 (Alcohol), MQ-7 (Carbon Monoxide), MQ-135 (Air Quality/Ammonia).

Assets & downloads