How To Use Gas Sensor With Arduino

 

How To Use Gas Sensor With Arduino
How To Use Gas Sensor With Arduino







Gas Sensor Arduino - mq135 gas sensor arduino wiring and coding on circuityep.

Arduino can be easily interfaced with the MQ135 gas/smoke sensor.The sensor can detect the presence of LPG, smoke, carbonmonoxide etc.It can be employed in houses for detecting fire,as fire releases carbonmonoxide which can be detected by this module. 

Components Required

> MQ2 gas sensor

> Arduino uno

> Buzzer

MQ135 Gas/Smoke Sensor Module

MQ2 Gas/Smoke Sensor Module




MQ2 Gas/Smoke Sensor Pinout Diagram
Mq135 gas sensor







This is the MQ135 sensor module which works on 5 volt DC.The sensor gives the result once its get heated.We must wait for some seconds sothat the sensor will heat up and output the corresponding values.The waiting time is prewritten in arduino code.


MQ135 Gas Sensor Pinout

The breakout board comes with LM393 comparator ic which is well visible on board.This ic is responsible for precise value to output.

How to use MQ135 sensor


The sensor module breakout board has two leds.One led will glow always.This led indicates that the module is working properly.


The second led is the output led which will turn on when the module detects gas or smoke.It is also refered as sensitivity led.The potentiometer present on the breakout board is responsible for the led to glow.The sensitivity led may or maynot glow until we turn the potentiometer to clockwise or counter clockwise direction.


Hold the sensor near smoke or gas and keep turning the potentiometer until we reach a position where the led starts glowing.The clockwise turning of potentiometer will increase the sensitivity and counter clockwise results in decreasing the sensitivity.The comparator ic checks the signal and the value is fed to the output led to glow.The breakout board consists of two outputs.

* A0 - Analog output voltage,which gives proportional output analog voltage to the outside world.This voltage can be used along with the microcontroller.


* D0 - Digital output voltage,which directly outputs the signal as high or low(1 or 0).This signal level is very useful as this signals can be directly drive loads and no microcontroller or ic is required.


How to connect MQ135 sensor to arduino

The breakout board has four pins

Vcc - which is connected at 5v labelled on arduino.


Gnd - which is connected to gnd labelled on arduino.


D0 - which is digital output pin


A0 - which is analog output pin

Only three wires or connection is required for interfacing MQ135 sensor with arduino.Vcc,gnd and any one of the outputs(D0/A0).Here in this project we are going to use the A0 pin, sothat we can easily get the values that MQ2135 sensor is generating

The arduino program is written sothat the value is printed at the serial monitor.Accoarding to the values the sensitivity can be calibrated.

The output is given to a buzzer which makes alarm sound when the respective value is reached.


Applications


* Used for detecting fire in home,office


* gas/smoke sensing used in industries


Advantages


* Low cost.


* Can be used as both smoke and gas sensing application.


* It can directly drive relay only a transistor is required


* The analog values can be seen along with a microcontroller.


* It uses current less than an ampere.


Final Project


MQ2 Gas Sensor Arduino Project
MQ2 Gas Sensor ArduinProject







Previous Post Next Post