Introduction
The MQ-3 sensor is a gas sensor module that is commonly used to detect alcohol vapour concentration in the air. It belongs to the MQ series of gas sensors developed by Hanwei Electronics.
The MQ-3 sensor is particularly useful in applications such as breath analyzers, automotive systems, and industrial safety equipment where the detection of alcohol is crucial.
Principle of Operation
The resistance value of MQ-3 is different to various kinds and various concentration gases. So, When using this component, sensitivity adjustment is very necessary. we recommend that you calibrate the detector for 0.4mg/L ( approximately 200ppm ) of Alcohol concentration in air and use the value of Load resistance ( RL) of about 200 KΩ(100KΩ to 470 KΩ).
Specifications of the MQ-3 Sensor
- Sensing Element: Tin dioxide (SnO2).
- Operating Voltage: 5V DC.
- Heater Voltage: Typically around 5V.
- Heater Resistance: Approximately 31Ω ± 3Ω.
- Load Resistance: Around 20KΩ to 47KΩ.
- Sensitivity: Alcohol vapour.30 to 500 parts per million (ppm).
- Response Time: Less than 10 seconds.
- Operating Temperature: -10°C to 50°C.
Advantage Of MQ-3 Sensor
- High Sensitivity
- Low Cost
- Easy Integration
- Compact and Lightweight
Disadvantage of MQ-3 Sensor
- Cross-Sensitivity
- Calibration Requirement
- Environmental Interference
- Limited Detection Range
Application Of MQ-3 Sensor
- Breathalyzers
- Automotive Safety
- Home Brewing and Wine Production
- Hospitality Industry
Example With Arduino
Circuit Diagram With Arduino
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#define Sober 90 #define Drunk 300 #define MQ3pin 0 float sensorValue; void setup() { Serial.begin(9600); Serial.println("MQ3 warming up!"); delay(20000); } void loop() { sensorValue = analogRead(MQ3pin); Serial.print("Sensor Value: "); Serial.print(sensorValue); if (sensorValue < Sober) { Serial.println(" | Status: Stone Cold Sober"); } else if (sensorValue >= Sober && sensorValue < Drunk) { Serial.println(" | Status: Drinking within legal limits"); } else { Serial.println(" | Status: DRUNK"); } delay(2000); } |
Code With 16×2 LCD Display
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
#include <LiquidCrystal.h> LiquidCrystal lcd(12,11,10,9,8,7); #define sensor A0 #define led 13 #define buz 8 void setup() { Serial.begin(9600); lcd.begin(16,2); lcd.print("Alcohol Detector"); lcd.setCursor(0,1); lcd.print("www.prateeks.in"); delay(2000); pinMode(sensor, INPUT); pinMode(buz, OUTPUT); pinMode(led, OUTPUT); lcd.clear(); } void loop() { float adcValue=0; for(int i=0;i<10;i++) { adcValue+= analogRead(sensor); delay(10); } float v= (adcValue/10) * (5.0/1024.0); float mgL= 0.67 * v; Serial.print("BAC:"); Serial.print(mgL); Serial.print(" mg/L"); lcd.setCursor(0,0); lcd.print("BAC: "); lcd.print(mgL,4); lcd.print(" mg/L "); lcd.setCursor(0,1); if(mgL > 1.3) { lcd.print("Drunk "); Serial.println(" Drunk"); digitalWrite(buz, HIGH); digitalWrite(led, HIGH); } else { lcd.print("Normal "); Serial.println(" Normal"); digitalWrite(buz, LOW); digitalWrite(led, LOW); } delay(100); } |
Circuit Diagram With ESP8266
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> #include <SimpleTimer.h> #define BLYNK_PRINT Serial char auth[] = "chhjvdrhghyug"; char ssid[] = "just"; char pass[] = "123456789"; SimpleTimer timer; int mq3 = A0; int data = 0; void setup() { Serial.begin(115200); Blynk.begin(auth, ssid, pass); timer.setInterval(1000L, getSendData); } void loop() { timer.run(); Blynk.run(); } void getSendData() { data = analogRead(mq3); Blynk.virtualWrite(V2, data); if (data > 700) { Blynk.notify("Alcohol Detected!"); } } |
Video
Conclusion
The MQ-3 sensor is a popular gas sensor module designed to detect alcohol vapour concentration in the air. It operates based on the principle of changes in the electrical conductivity of a tin dioxide semiconductor when exposed to alcohol molecules. With proper calibration and precautions, the MQ-3 sensor can be an effective tool for alcohol detection in various applications.
Sensor