In this tutorial we will see how we can interface the MQ-6 Gas Sensor with Aries v3.0 Board.

MQ-6

MQ-6 gas sensor is a widely used sensor for detecting the concentration of LPG (liquefied petroleum gas) and butane in the air. It is commonly used in gas leak detection systems and gas leak alarms.  The module has 4 pins for interfacing of which two pins are VCC and ground, one pin is analog output and one pin is digital pin via a comparator (LM358). The analog output pin of the module is used for detecting concentration level of gas leakage and interfaced with the A0 analog input pin of the Arduino board. The sensor measures the concentration of leaked gas in ppm.

Specifications:

  • Operating Voltage is +5V
  • Can be used to detect LPG or Butane gas
  • Analog output voltage: 0V to 5V
  • Digital Output Voltage: 0V or 5V (TTL Logic)
  • Preheat duration 20 seconds
  • Can be used as a Digital or analog sensor
  • The Sensitivity of Digital pin can be varied using the potentiometer

Working

Monitoring Gas Concentration – Once the reference value is set, the program code on Arduino keeps track of the analog value read from the MQ6 sensor. The device is programmed to read current sensor reading as analog value and is compared with the user defined reference value in an infinite loop. To use this Sensor Module, you have power the device with 5V supply and the Power LED will start to glow. You should give it some time for its pre heating period before start reading the output. While measuring the gas present, the Output LED will glow in a specific concentration of the gas.

Prerequisites

Components Required

  • ARIES v3.0 Board
  • USB type C to USB type A cable
  • MQ-6 Gas sensor
  • Jumper Wires

Note: All of the following boards can be used for this project

Connection Diagram

MQ-6 Gas Sensor      Aries Board
VCC      5V
GND       GND
A0       A0 using 2.7K & 4.7K  Resistor 
Connection pins of MQ-6 Gas Sensor Module & ARIES v2.0 Board

Note: A voltage divider is required between MQ3 sensor output and Analog pin of Aries board, for accurate measurements. Connect a 2.7K resistor to A0 pin of MQ3 sensor. Connect one end of the 4.7K resistor in series to the 2.7K resistor, and the other end to the GND. Take the output from the junction of 2.7K and 4.7K resistors.

Libraries

Arduino libraries are an extension of the standard Arduino API and consists of thousands of libraries, both official and contributed by the community. Libraries simplifies the use of complex codes. Every version of Arduino IDE has a library manager for installing Arduino software libraries. The libraries required for this projects are

  • MQUnifiedsensor

To install the libraries required for this project.

Go to Tools -> Manage Libraries -> and search for MQUnifiedsensor

Click on Install

Procedure:

Open and set up the Arduino IDE as described in Getting Started with ARIES v3.0.

  • Make sure you have selected ARIES v3 Board from Tools -> Board -> VEGA Processor: ARIES Boards -> ARIES v3
  • Select Programmer as VEGA XMODEM from Tools -> Programmer -> VEGA XMODEM
  • Also select appropriate port from Tools -> Port -> COM* (ARIES Board)

Open File -> Examples -> Examples for ARIES v3 -> ADC -> Open MQ6_Gas Sensor example

MQ-6 Example

Finally Compile and Upload the code 

Output

As we know the MQ-6 Gas sensor can detect gases like LPG, iso-butane, propane, smoke and alcohol. Similar to other MQ series gas sensor, this sensor also has a digital and analog output pin. Once the gas leakage is detected, the analog reading will increase and decrease if less toxic gases. Open serial monitor to observe the changes in the values.

Demonstration

By mydhily

Leave a Reply

Your email address will not be published. Required fields are marked *