5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10

EASY plug Ultimate Starter Learning Kit Project 18: Is there gas leakage?

Posted by Fiona Su on

This project we will test the gas sensor. You can use analog reading to read the data from this sensor.
Component Required
  • EASY plug control board*1
  • EASY plug Analog Gas Sensor *1
  • EASY plug OLED module*1
  • RJ11 cable*2
  • USB cable*1

Component Introduction

This analog gas sensor - MQ2 is used in gas leakage detecting equipment in consumer electronics and industrial markets.
This sensor is suitable for detecting LPG, I-butane, propane, methane, alcohol, Hydrogen and smoke. It has high sensitivity and quick response.
In addition, the sensitivity can be adjusted by the potentiometer.

  • Interface: Easy plug
  • Power supply: 5V
  • Interface type: Digital and Analog
  • Wide detecting scope
  • Simple drive circuit
  • Stable and long lifespan
  • Quick response and High sensitivity

Connect It Up
Connect the EASY Plug analog gas sensor to control board using an RJ11 cable.


Upload the Code


What You Should See


Done uploading the test code, open the serial monitor and set the baud rate to 9600, you should be able to see the analog value.



Adding OLED Display
If you want to display the gas analog value more convenient, you can add OLED screen.

Hookup Guide


Test Code


What You Should See
Upload success, you should be able to see the analog value is showed on the OLED screen.


All Tutorials

Buy >> EASY plug Ultimate Starter Learning Kit 


Leave a comment

Please note, comments must be approved before they are published