Interfacing Gas Sensor With Arduino

by Mudit5246 in Circuits > Arduino

5988 Views, 3 Favorites, 0 Comments

Interfacing Gas Sensor With Arduino

MQ2-Gas-Sensor-708x398.png

The MQ-2 smoke sensor is sensitive to smoke and to the following flammable gases:

LPG, Butane, Propane, Methane, Alcohol, Hydrogen. The resistance of the sensor is different depending on the type of gas. The smoke sensor has a built-in potentiometer that allows you to adjust the sensor sensitivity according to how accurate you want to detect gas.

How Does It Work?

smoke-sensor-label.jpg
smokepicture.jpg

The voltage that the sensor outputs changes accordingly to the smoke/gas level that exists in the atmosphere. The sensor outputs a voltage that is proportional to the concentration of smoke/gas.

In other words, the relationship between voltage and gas concentration is the following:

  • The greater the gas concentration, the greater the output voltage
  • The lower the gas concentration, the lower the output voltage

Components Required:

MQ-6-Gas-Sensor.jpg
download (1).png
download (4).jpg
download.jpg
download (2).jpg
download (3).jpg

Components required are:

1. Arduino UNO

2. Breadboard

3. Gas Sensor

4. Buzzer

5. LED's

6. Resistors (220 ohms)

7. Jumper wires

Circuit Diagram:

Gas_Sensor Interfacing.png

First make the connections of Gas sensor:

1. Connect B1, H2 & B2 to the 5v of the Arduino and H1 directly to the ground.

2. Connect a 220-ohm resistor to A2 and connect the other end to gnd.

3. Connect the A1 to the analogPin A0.

Now make the connections for led's and buzzer:

1. Connect the 220-ohm resistor to the negative leg of all the led's and another end of the resistors to the gnd.

2. Connect the positive legs to digitalPin of the Arduino i.e. 2, 3 & 4.

3. Connect the negative leg of the buzzer to gnd and positive leg to digitalPin 5.

Code:

For credit, please follow my following accounts.

Thanks

Connect with me on:

Youtube: Click here

Facebook page: Click here

Instagram: Click here