Gas sensor

26 August 2024 2 minutes

In this article, we will look at a device that will measure the levels of gases such as LPG, smoke, propane, hydrogen, methane and carbon monoxide.It is important to note that the MQ 2 sensor does not provide information about the type of gas. Just a general idea of ​​the general presence of gases or gas combinations. The Arduino will transmit this information to the computer. If desired, you can add a display or sound alarm.

Required components:

Connection diagram

MQ-2

  • VCC → 5V Arduino pin
  • GND → GND Arduino pin 
  • A0 → A5 Arduino pin 

Firmware

**If you do not have the Arduino IDE installed, I advise you to watch the video tutorial, which shows how to install and configure it. At this link you will find information on how to install the driver on the Arduino board.**

Download the firmware from this link and upload it to the Arduino according to the instructions above.

Importantly!

In order for the sensor to provide correct readings, it must be warmed up once for 24-48 hours before use, and then for 20 minutes before each power-on.

Principle of operation

When the SnO2 semiconductor layer is heated, oxygen is adsorbed on its surface. In clean air, electrons from tin dioxide are attracted to oxygen molecules, creating an electron-depleted layer and increasing resistance. This prevents current from flowing.

But if there are reducing gases in the air, they interact with oxygen, reducing the surface density of adsorbed oxygen. This lowers the potential barrier and electrons are released into the tin dioxide, allowing current to flow through the sensor.

Disclaimer. This article is created for informational purposes only. All advice and instructions are provided for educational purposes and we are not responsible for any possible consequences related to the implementation of this project. Always use safety precautions when working with electronic components.

If you have any problems, you can contact us at [email protected].

Found an error?
If you find an error, take a screenshot and send it to the bot.