The MQ-3 is a gas sensor designed to detect alcohol vapors in the air. It operates on the principle of resistive change, where the sensor's resistance varies in the presence of specific gases. The MQ-3 provides an analog output proportional to the concentration of alcohol vapors, making it suitable for a wide range of applications.
The MQ-3 sensor is a compact and reliable device with the following key specifications:
Parameter | Value |
---|---|
Operating Voltage | 5V DC |
Load Resistance (RL) | 200 kΩ to 10 kΩ |
Heater Voltage (VH) | 5V ± 0.2V AC/DC |
Heater Power Consumption | ≤ 800 mW |
Detectable Gas | Alcohol vapors |
Detection Range | 0.04 mg/L to 4 mg/L (alcohol) |
Preheat Time | ≥ 24 hours for optimal performance |
Analog Output | 0V to 5V (proportional to gas concentration) |
Operating Temperature | -20°C to 50°C |
Humidity Range | 35% to 85% RH |
Sensor Life Span | ≥ 2 years |
The MQ-3 sensor typically comes with six pins, but only four are commonly used. Below is the pin configuration:
Pin Name | Description |
---|---|
VCC | Power supply pin (5V DC) |
GND | Ground pin |
AOUT | Analog output pin (provides gas concentration) |
DOUT | Digital output pin (threshold-based output) |
H1, H2 | Heater pins (internally connected in modules) |
Note: In most breakout boards, the heater pins (H1 and H2) are internally connected, so you only need to connect VCC, GND, AOUT, and optionally DOUT.
Power the Sensor:
Read the Output:
Preheat the Sensor:
Calibrate the Sensor:
Connect to a Microcontroller:
Below is an example of how to connect and use the MQ-3 sensor with an Arduino UNO:
// MQ-3 Alcohol Sensor Example with Arduino UNO
// Reads analog output from the sensor and prints alcohol concentration
const int sensorPin = A0; // MQ-3 analog output connected to A0
int sensorValue = 0; // Variable to store sensor reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ-3 Alcohol Sensor Test");
}
void loop() {
sensorValue = analogRead(sensorPin); // Read analog value from MQ-3
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage
// Print the sensor value and voltage to the Serial Monitor
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
Serial.print(" | Voltage: ");
Serial.print(voltage);
Serial.println(" V");
delay(1000); // Wait 1 second before next reading
}
Note: The analog value from the sensor can be mapped to alcohol concentration using a calibration curve, which depends on the specific application.
No Output or Incorrect Readings:
Fluctuating Readings:
Sensor Not Responding to Alcohol Vapors:
Digital Output Always HIGH/LOW:
Q1: Can the MQ-3 detect gases other than alcohol?
A1: The MQ-3 is optimized for alcohol detection but may respond to other gases like benzene or methane. However, its sensitivity to these gases is lower.
Q2: How do I calibrate the MQ-3 sensor?
A2: Use a known alcohol concentration to measure the sensor's output and create a calibration curve. Adjust the load resistance (RL) for fine-tuning.
Q3: What is the lifespan of the MQ-3 sensor?
A3: The sensor typically lasts for 2 years under normal operating conditions.
Q4: Can I use the MQ-3 with a 3.3V system?
A4: The MQ-3 requires a 5V power supply for the heater. You can use a level shifter to interface the analog output with a 3.3V system.
Q5: Is the MQ-3 safe for continuous operation?
A5: Yes, the MQ-3 is designed for continuous operation, but ensure proper ventilation to avoid overheating.