Showing posts with label gas sensor. Show all posts
Showing posts with label gas sensor. Show all posts

Monday, August 01, 2016

Breath analyzer with OLED and MQ3 gas sensor


Hi, guy today we are going to make a breath analyzer which detects alcohol vapour. so, first you need to show how does the sensor work so, the sensor work with a chemical reaction with what it will tell you the readings. so, lets begin!!




Step 1: What You Need?

1 x USB Type-B Cable 
1 x OLED or LCD
1 x MQ-3 Gas Sensor 
Optional
Cable Cover
Arduino Compatible UNO Ultimate Starter Kit / Learning Kit
USB To Power Jack Cable



Don't have components? Don't worry. Just click the component's name. 



Step 2: Make A Shield For Arduino



1.The OLED ---VCC wire will go to 3.3v of the Arduino. GND will go to GND. SCL to A5. SDA to A4.

2.The MQ-3 gas sensor --- VCC to 5v. Gnd to Gnd. AD to A0.




Step 3: Upload The Code 

  
When you upload the code if it say warning up so then wait 15 mins if it give the reading it is working well. if check the code or your connections.

Arduino UNO R3 easy gas sensor LCD MQ-3 MQ-3 Gas sensor oled project

Monday, July 25, 2016

How to detect concentration of gas by using MQ2 sensor

Understanding MQ-2 Gas Sensor

MQ-2 Gas sensor is used to detect the gas level around the area. This sensor able to use as home or factory gas leak monitoring, suitable for gas, butane, propane, methane, alcohol, hydrogen, smoke and other monitoring devices.


Specification:

  • Size: 35mm x 22mm x 23mm (length x width x height)
  • Main chip: LM393, ZYMQ-2 gas sensors
  • Working voltage: DC 5 V
  • Characteristics:
  • With a signal output instruction.
  • Dual signal output (analog output, and high/low digital output)
  • 0 ~ 4.2V analog output voltage, the higher the concentration the higher the voltage.
  • Better sensitivity for gas, natural gas, city gas.
  • With a long service life and reliable stability.
  • Rapid response and recovery characteristics. 







Step 1: What You Need?

1 x Arduino UNO R3
1 x M-2 Gas Sensor


Don't have components? Don't worry. Just click the component's name. 


Step 2: Build Your Circuit.





LCD pins

-Pins D7 , D6 , D5 , D4 connect to Arduino digital pins 2,3,4,5 respectively.

-Pins A and K connect to 5V and GROUND respectively

-Pins VSS and VDD connect to Ground and 5V respectively.



LED

-Use as a LED indicator for the calibration process of the MQ2 gas sensor.

-Connect to digital pin 13 of Arduino Uno



MQ2 Gas Sensor

-Analog output connect to the A0 of Arduino

Potentiometer

-Center pin connect to the V0 of LCD display

-Other two pins just connect to 5V and GROUND respectively


(Note: All of pins above is configured regarding the circuit figure above. You can configure the connection yourself regarding your favourite.)

Step 3: Upload The Code.





As you can see in the graph above , it shows several gases.

The values are plotted on a semilog paper, as you can see the values indicate 100......1000.....10000 ppm.

These values when plotted on a normal graph would represent a curve like an exponential one.



Formula In the Coding


pow(10,( ((log(rs_ro_ratio)-pcurve[1])/pcurve[2]) + pcurve[0]))



Based on the graph MQ2, the derivation of ppm formula will be:

Y - y1 = m( X - x1)

X= (y-y1)/m + x1

X= (Rs/Ro-y1)/m + x1

log X =(log (Rs/Ro) - y1)/m +x1

X =10^( (log (Rs/Ro) - y1)/m +x1)

*Note: X = ppm on the graph


Y= Rs/Ro

***The derivation formula are same and can be used for other types of MQ gas sensor.


Arduino UNO R3 easy gas sensor LCD LED m-2 M-2 Gas Sensor project sensor

 

  • Copyright © Arduino Tutorial ™ is a registered trademark.
    Designed by Templateism. Hosted on Blogger Templates.