chainspot.blogg.se

Arduino sensors tutorial mq2 tutorial
Arduino sensors tutorial mq2 tutorial













arduino sensors tutorial mq2 tutorial

Checks if it has reached the threshold value The lower the gas concentration, the lower the output voltage.Hence this inexpensive device can be used in office and industrial automation to inform about smoke if ever happened. MQ2 gas sensors are employed to effectively detect smoke, alcohol, LPG, carbon monoxide, etc in the environment. The greater the gas concentration, the greater the output voltage Because in this tutorial we are going to interface MQ2 Gas Smoke Sensor with Arduino UNO.To do this, use the circuit diagram below.

#Arduino sensors tutorial mq2 tutorial how to#

In other words, the relationship between voltage and gas concentration is the following: How to use MQ2 gas sensor with Arduino Step by step instructions Step 1. The sensor outputs a voltage that is proportional to the concentration of smoke/gas. The voltage that the sensor outputs changes accordingly to the smoke/gas level that exists in the atmosphere. The smoke sensor has a built-in potentiometer that allows you to adjust the sensor sensitivity according to how accurately you want to detect gas. The resistance of the sensor is different depending on the type of gas. I Selected A1 pin of the Arduino Uno.The MQ-2 smoke sensor is sensitive to smoke and to the following flammable gases: Gas leakage detector and Automatic Solenoid Valve shut down using Arduino and MQ-2 SensorĪrduino Gas leakage detection and SMS alertįirst of all, lets start by defining a pin for the A0 pin of the MQ2 Sensor. I have also used the same sensor in some advance level projects which are given below.

arduino sensors tutorial mq2 tutorial

The purpose of this program is to show you how you can read this sensor. This is a very basic program written for the SMOKE/GAS SENSOR MODULE MQ-2. One more thing that I want to share with you guys is that any program which is written for the Arduino can also run on Mega except some special cases which I will discuss in my future tutorials.

arduino sensors tutorial mq2 tutorial

The same connections can also be used with the Mega board. So that’s all about the Interfacing of the MQ-2 sensor with the Arduino. So connect the red wire with the Arduino’s 5V.Ĭonnect the Black wire with the Arduino’s Ground.įinally, connect the white wire with analog pin A1 of the Arduino Uno. Because this way I can make accurate decisions depending on the threshold value. I selected A0 for the Smoke or Gas detection as this way I get more control over the MQ2 Gas/Smoke sensor. Gas Sensor MQ2 Interfacing with Arduino Uno:Īs you can see I have already connected 3 jumper wires, red is connected with VCC of the sensor module, black is connected with the Ground of the sensor module and white is connected with the analog output(A0) of the sensor Module. MQ2 Gas/Smoke sensor is a very user-friendly Sensor and it can be easily interfaced with the Arduino Uno or Mega using Male to Female type Jumper wires. They are used in gas leakage detecting equipment in family and industry, are suitable for detecting of LPG, i-butane, propane, methane, alcohol, Hydrogen and smoke. VCC should be connected with 5 volts of Arduino or mega. GND pin of this module will be connected with GND of the Arduino or mega. The level can be adjusted using the variable resistor. I would appreciate your support in this way!Ī0 is the Analog output of the sensor and should be connected with the analog pin of the Arduino Uno or Mega.ĭ0 is the digital output in the form of 5v or Gnd. I may make a commission if you buy the components through these links. This module is provided with male header interface and can be easily interfaced with Arduino/Mega using male to female type jumper wires. The MQ-2 sensor is a versatile gas sensor capable of detecting a wide range of gases including alcohol, carbon monoxide, hydrogen, isobutene, liquefied petroleum gas, methane, propane, and smoke. This Gas Sensor mq2 Module features an MQ-2 sensor. This Sensor is most commonly used for the Smoke and Gas detection.

arduino sensors tutorial mq2 tutorial

MQ2 Sensor is one of the most commonly used Sensors throughout the world. Gas Sensor MQ2- In this Tutorial, you will learn how to use the Smoke/Gas sensor Mq2 with Arduino. Gas Sensor MQ2 Interfacing with Arduino Uno:.















Arduino sensors tutorial mq2 tutorial