Interfacing with MQ-3 Alcohol Sensor Module
MQ-3 gas sensor has high sensitivity to alcohol, and has good resistance to disturbances of gasoline, smoke and vapor. The sensor could be used to detect alcohol with different concentration; it is with low cost and suitable for different application. Sensitive material of MQ-3 gas sensor is SnO2, which with lower conductivity in clean air. When the target alcohol gas exists, sensor’s conductivity is proportional to the gas concentration.
Description:
1. Model No: MQ-3.
2. Heater voltage: 5±0.2V.
3. Loop voltage: ≤24V (DC)
4. Load resistance: Adjustable.
5. Heating Resistance: 31Ω±3Ω (Room temperature).
6. Heating Power: ≤ 900mW.
7. Surface thermal resistance: 2Kohm-20Kohm (0.4mg/L alcohol).
8. Sensitivity: Rs (in air)/Rs (0.4mg/L alcohol) ≥ 5.
Application Example with Arduino Uno:
Connect the MQ-3 alcohol sensor module to Arduino Uno board as shown below:
Programming Code
/* MQ-3 Alcohol Sensor Circuit with Arduino */
const int AOUTpin=A0; //the AOUT pin of the alcohol sensor goes into analog pin A0 of the arduino const int DOUTpin=8; //the DOUT pin of the alcohol sensor goes into digital pin D8 of the arduino const int ledPin=13; //the anode of the LED connects to digital pin D13 of the arduino int limit;
int value;
void setup()
{
Serial.begin(115200);
pinMode(DOUTpin, INPUT);
pinMode(ledPin, OUTPUT); }
void loop()
{
value= analogRead(AOUTpin); //reads the analaog value from the alcohol sensor's
AOUT pin limit= digitalRead(DOUTpin); //reads the digital value from the alcohol sensor's DOUT
pin Serial.print(" Alcohol value: ");
Serial.println(value); //prints the alcohol value
Serial.print("Limit: ");
Serial.print(limit); //prints the limit reached as either LOW or HIGH (above or underneath)
delay(100);
if (limit == HIGH)
{
digitalWrite(ledPin, HIGH);//if limit has been reached, LED turns on as status indicator
}
else{
digitalWrite(ledPin, LOW); //if threshold not reached, LED remains off
}
}
Result:
Open up the Serial Monitor with Baud rate of 115200, the alcohol level detected will be shown as analog value. The alcohol limit value can be set with sensitivity potentiometer: if the alcohol level detected is below the set limit, the D0 green indicator will be off. If detected alcohol level is beyond the set limit, the DO LED will light up.