Home Sensor Projects Arduino and MQ-3 Gas sensor example

Arduino and MQ-3 Gas sensor example

by shedboy71

The MQ3 Gas Sensor module is useful for gas leakage detection (in home and industry). It is suitable for detecting Alcohol, Benzine, CH4, Hexane, LPG, CO. Due to its high sensitivity and fast response time, measurements can be taken as soon as possible. The sensitivity can be adjusted by using the potentiometer on the module.

I connected my sensor as follows

Arduino Connection Gas Sensor
5V VCC
GND GND
NC D0
Analog A0 A0

 

Code

[codesyntax lang=”cpp”]

void setup() 
{
  Serial.begin(9600);
}
 
void loop() 
{
  float sensorVoltage; 
  float sensorValue;
 
  sensorValue = analogRead(A0);
  sensorVoltage = sensorValue/1024*5.0;
 
  Serial.print("sensor voltage = ");
  Serial.print(sensorVoltage);
  Serial.println(" V");
  delay(1000);
}

[/codesyntax]

 

Results

I saw the following results in the serial monitor

sensor voltage = 1.83 V
sensor voltage = 1.78 V
sensor voltage = 1.74 V
sensor voltage = 1.70 V
sensor voltage = 1.66 V
sensor voltage = 1.63 V
sensor voltage = 1.59 V
sensor voltage = 1.56 V

 

Links

Mq-3 Gas sensor specs
MQ-3 Alcohol Ethanol Sensor Breath Gas Ethanol Detection

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More