MQ-7 CO Carbon Monoxide Gas Sensor Interfacing
with Arduino, Node MCU, ESP32
Working principle of Oxide based gas sensors: Tin oxide SnO2-based gas sensors have been widely used for detecting typical fault characteristic gases extracted from power transformer oil, namely, H2, CO, CO2, CH4, C2H2, C2H4, and C2H6, due to the remarkable advantages of high sensitivity, fast response, long-term stability, and so on.
Gas sensing layer: It is the main component in the sensor which can be used to sense the variation in the concentration of the gases and generate the change in electrical resistance. The gas sensing layer is basically a chemiresistor which changes its resistance value based on the concentration of particular gas in the environment. Here the sensing element is made up of a Tin Dioxide (SnO2) which is, in general, has excess electrons (donor element). So whenever toxic gases are being detected the resistance of the element changes and the current flows through it varies which represents the change in concentration of the gases.
Heater coil: The purpose of the heater coil is to burn-in the sensing element so that the sensitivity and efficiency of the sensing element increases. It is made of Nickel-Chromium which has a high melting point so that it can stay heated up without getting melted.
Electrode line: As the sensing element produces a very small current when the gas is detected it is more important to maintain the efficiency of carrying those small currents. So Platinum wires come into play where it helps in moving the electrons efficiently.
Electrode: It is a junction where the output of the sensing layer is connected to the Electrode line. So that the output current can flow to the required terminal. An electrode here is made of Gold (Au –Aurum) which is a very good conductor.
Tubular ceramic: In between the Heater coil and Gas sensing layer, the tubular ceramic exists which is made of Aluminum oxide (Al2O3). As it has high melting point, it helps in maintaining the burn-in (preheating) of the sensing layer which gives the high sensitivity for the sensing layer to get efficient output current.
Mesh over the sensing element: In order to protect the sensing elements and the setup, a metal mesh is used over it, which is also used to avoid/hold the dust particles entering into the mesh and prevent damaging the gas sensing layer from corrosive particles.
The MQ-7 Carbon Monoxide gas sensor. MQ name is from Metal Oxide Semiconductor (MOS) type Gas Sensor. It is also known as Chemiresistor since the detection is dependent on a change in the sensing material’s resistance when the Gas comes into contact with it.
Let us look at the Pin configuration of MQ-7 gas sensor:
MQ-7 CO Carbon Monoxide Gas Sensor Interfacing with Arduino:
VCC & GND Pins of MQ-4 Methane CNG Sensor is connected to 5 Volts DC and ground Pin of Arduino. Digital OUT is connected to Pin 7 of Arduino which when triggered Arduino will pull Pin 9 high for downstream action. Analog OUT is connected to A0 Analog port of Arduino A to D Converter. The output of which could be displayed on LCD or OLED. Then there are two LEDs and one Buzzer to be connected to Pin 2, Pin 3 and Pin 4. Green LED connected to Pin 2 will light up when Arduino is powered up. Red LED connected to Pin 3 and Buzzer connected to Pin 4 will be on when Pin 7 gets activated.
MQ-7 CO Carbon Monoxide Gas Sensor Interfacing with Node MCU:
VCC & GND Pins of MQ-4 Methane CNG Sensor is connected to 3.3 Volts DC and ground Pin of Node MCU. Digital OUT is connected to Pin GPIO7 of Node MCU which when triggered Node MCU will pull Pin GPIO9 high for downstream action. Analog OUT is connected to ADC0 Analog port of Node MCU A to D Converter. The output of which could be displayed on LCD or OLED. Then there are two LEDs and one Buzzer to be connected to Pin GPIO2, Pin GPIO3 and Pin GPIO4. Green LED connected to Pin GPIO2 will light up when Node MCU is powered up. Red LED connected to Pin GPIO3 and Buzzer connected to Pin GPIO4 will be on when Pin GPIO7 gets activated.
MQ-7 CO Carbon Monoxide Gas Sensor Interfacing with ESP32:
VCC & GND Pins of MQ-4 Methane CNG Sensor is connected to 3.3 Volts DC and ground Pin of ESP32. Digital OUT is connected to Pin GPIO7 of ESP32 which when triggered Node MCU will pull Pin GPIO9 high for downstream action. Analog OUT is connected to ADC0 Analog port of ESP32 A to D Converter. The output of which could be displayed on LCD or OLED. Then there are two LEDs and one Buzzer to be connected to Pin GPIO2, Pin GPIO3 and Pin GPIO4. Green LED connected to Pin GPIO2 will light up when ESP32 is powered up. Red LED connected to Pin GPIO3 and Buzzer connected to Pin GPIO4 will be on when Pin GPIO7 gets activated.