PIC16F84A Gas Detector using GH-312 sensor

GH312Sensor

Introduction

This is a gas detecting circuit capable of sensing many different types of gases. 

The sensor used is the GH-312 and from the datasheet it is capable of sensing gases like smoke, liquefied gas, butane and propane, Methane, alcohol,hydrogen, etc.

Schematic

GasDetectorSch

Parts List

R1                   1K resistor
R2                   1K resistor
P1                    100K potentiometer
C1                   10uF cap
C2                   100nF cap
C3                   100nF cap
C4                   15pF cap
C5                   15pF cap
Xtal                 8Mhz crystal
Led1                3mm red led
Piezo               Piezo
LCD                8X2 LCD
IC1                  16F84A microcontroller
VR1                7805 regulator
GH-312           Gas Sensor

Testing

The first tests were made with the circuit mounted on a breadboard.   After initialization the circuit will enter a normal state where it detects no gas. The display shows “Sensing…No Gas !”.

Idle

To test the sensor I used my portable gas soldering iron with the gas coming out pointed to the sensor.

The sensor is able to detect the gas and the microcontroller will trigger a flashing led warning and sound.

The sound is produced by a small piezo and the display show the message “Found Gas”.  

Testing

When the air is clean again and the sensor does not sense any gas, the circuit will return to it’s normal state turning off both led and piezo sound.

Photos

Initializing

Circuit is Initializing

Conclusion

It’s a pretty cheap and easy to assemble circuit.

Does not require too many parts and the microcontroller is very easy to find ( the famous 16F84A from microchip ).

Since it’s used a small lcd ( 8×2 ) this project can be portable.

Also this sensor senses several types of gas and it’s pretty stable.

Source code

The code is provided in hex format: GASDEMO.hex, We are sorry the source code isn’t available.

PCB

Comments

  • Ain Najihah

    can i have the coding..please email me the code as soon as possible..coz this is my final project..thnks you..

    3 years ago
  • Electronics Lab

    The source code for this project isn’t available. You can download the .hex file from above.

    3 years ago
  • Ain Najihah

    could you help me the source code for this project..how can i contact you??

    3 years ago
    • Electronics Lab

      Please contact the author above.

      3 years ago
  • Electronics Lab

    Link to .hex file above is fixed.

    3 years ago
  • ebraheem reda

    i want the code for this pic to make this project

    3 years ago
  • bamdade soha

    Hello
    How can MQ -216 scale sensor instead of sensor GH-312 use?
    Thank

    3 years ago
  • Philip

    where is the program?

    1 year ago
    • admin

      The source code isn’t available from the author. Only .hex file is available.

      1 year ago
  • i make this project but it is not working … i use mq2 for the gas sensor .. how can i fix this? because it is my final project?

    1 year ago
    • admin

      This will work only with GH-312 gas sensor.

      1 year ago

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

RELATED PROJECTS

By continuing to use the site, you agree to the use of cookies. more info

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close