What is gas sensor?

A gas detector is a device that detects the presence of gases in an area, often as part of a safety system.This type of equipment is used to detect a gas leak or other emissions and can interface with a control system so a process can be automatically shut down. A gas detector can sound an alarm to operators in the area where the leak is occurring, giving them the opportunity to leave. This type of device is important because there are many gases that can be harmful to organic life, such as humans or animals.




TheMQ-2 Gas Sensor has an electrochemical sensor, which changes its resistance to different concentrations of varied gasses. The sensor is connected in series with a variable resistor to form a voltage divider circuit (Fig 1), and the variable resistor is used to change sensitivity. When one of the above gaseous elements comes in contact with the sensor after heating, the sensor’s resistance change. The change in the resistance changes the voltage across the sensor, and this voltage can be read by a micro-controller. The voltage value can be used to find the resistance of the sensor by knowing the reference voltage and the other resistor’s resistance. The sensor has different sensitivity for different types of gasses.



They are useful in gas leakage detection of LPG, propane, methane, i-butane, alcohol, Hydrogen, and smoke.


  • Working Voltage  : (Min)4.9 – (Max)5.1
  • Heating consumption : (Min)0.5mW – (Max)800mW
  • Load resistance: Adjustable
  • Heater resistance: 33Ω
  • Surface Sensing Resistance: (Min)3kΩ – (Max)30kΩ
  • Platform Supported: Arduino

Materials To Be Required:

  • Arduino Uno
  • Breadboard
  • MQ-2 Gas sensor module
  • Jumper Wires

Connection with Arduino:


Pin————————————-Wiring to Arduino Uno

A0————————————-Analog pins

D0————————————-Digital pins