LPG sensor using arduino
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 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.
Actually 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.
For more detail: LPG sensor using arduino
We recommend EasyEDA for electronic circuit design.
From Schematic Drawing to PCB Production, Just Need One Tool
Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test