IOT Lab Experiment No. 4
IOT Lab Experiment No. 4
The Grove - Gas Sensor (MQ2) module is useful for gas leakage detection (home
and industry). It is suitable for detecting H2, LPG, CH4, CO, Alcohol, Smoke or
Propane. Due to its high sensitivity and fast response time, measurement can be taken
as soon as possible. The sensitivity of the sensor can be adjusted by potentiometer.
Hardware Required:
Component Name Quantity
Arduino UNO 1
Gas Sensor 1
USB Cable 1
Breadboard 1
Steps of working:
Sketch:
This sketch works by setting 5V supply pin of Arduino as for the control of
relay module. After that the run a loop that continually sends that value as
voltage to the D6 with the delay given.
#define MQ2pin (0)
void setup( )
{
Serial.begin(9600); // set the serial port to 9600
Serial.println(“ “);
delay(20000); // wait 20 sec for next reading
}
Observations:
Sensor Voltage 205 mV