Position: Index > Sensor Circuit >

LPG sensor using arduino

2016-04-21 03:37  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.
LPG sensor using arduino with alarm and cutoff.

A simple LPG sensor using arduino is shown in this article. This circuit indicates the amount of LPG in the air. The circuit  sounds an alarm and trips a relay  when the concentration is above a predetermined level. MQ2 is the gas sensor used in this project. MQ2 is an SnO2 based gas sensor which can sense gases like methane, propane, butane, alcohol, smoke, hydrogen etc. Since LPG primarily contains propane and butane, MQ2 sensor can be used for sensing LPG. The figure below shows the schematic and arrangement of an MQ2 gas sensor.mq2 gas sensor

MQ2 sensor senses the flammable gases by the increase in temperature when they are oxidized by the heating element. Consider the figure given above. If there is any flammable gas present in the sample , the oxidization of the same gas results in increased temperature and the resistance of the sensor resistor will drop. That means more current will flow through the load resistor and so the voltage across it will shoot up.

At normal conditions(no LPG in the air), the sensor resistor will be very high around 850K . So the voltage drop Vout across the load resistor will be around zero. When the sensor is fully exposed to LPG the sensor resistance drops to around 800 ohms and the voltage drop across the load resistance will be around 4.62 volts.  After conversion by the ADC, the digital equivalent of  4.62 volt will be 948 and it is stored in the variable “d” (refer the program ). Figure below shows a graph plotted from the observed parameters.

MQ2 gas sensor calibrationActually the graph may not be a straight line. But  here we have to assume it to be a straight line because it is not possible to simulate LPG concentrations other than 0% and 100% with our limited lab facilities. For accurate calibration of the sensor, we need some means to know the precise concentration of the gas in the given environment. Anyway what we have is somewhat enough for our purpose.

The concentration percentage for a given digital output of the ADC can be determined using the following equation. p=d/9.48 where d is the digital output of the ADC and p is the percentage. The equation is obtained by finding the equation of the above graph in the general form y=mx+c. Where m is the slope and c is the y intercept. The full circuit diagram of the LPG sensor using arduino is shown below.

Circuit diagram.

lpg gas sensor using arduinoOutput of the gas sensor is connected to the analog input pin A0 of the arduino. Digital pin 10 of the arduino is used for controlling the buzzer and digital pin 13 used for controlling the relay. The relay used here is a SPDT relay and so it can be used for switching ON or OFF the target device when there is a gas leak. Here the TRIP threshold is set to be 30%. You can set your threshold point in the program. While selecting the threshold point, temperature and humidity effects have to be also considered because MQ2 sensor has good dependence on both. Refer the datasheet of MQ2 gas sensor for more idea.  The complete program of the LPG sensor using arduino is shown below.

int mq2=A0;
int rel=13;
int buz=10;
int d;
float p;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()
void loop()
lcd.print("LPG SENSOR");

Notes. MQ2 sensor requires a 24 hour preheat for stable operation.  The heating coil of the MQ2consumes around150mA and so it is wise to power the coil from a separate source. 5V required at other parts of the circuit can be tapped from the arduino board. The arduino board can be powered through the 9V power supply jack.