MQ-8 Hydrogen 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.

air

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.

deption

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.

INDUCTION

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.

Hydrogen gas (H2), at room temperature and under standard pressure conditions, is tasteless, odorless, and colorless.

Hydrogen can also be a potential danger to human beings. Hydrogen can be a spark for fires when mixed with air.

For this reason, either for its beneficial and its potentially detrimental effects, hydrogen is something that can be very important to monitor and measure.

power-trim

MQ-8 Pin out diagram:

If you look at the comparator circuit given above Aout or Analog output is taken before the signal goes to LM393 the comparator and is connected to A0 ADC (Analog to Digital Converter) of Arduino.

MQ-8 Hydrogen Gas Sensor Interfacing with Arduino:

This sensor has 4 pins of which VCC and GND of the sensor are connected to 5volt DC and ground of Arduino board. Digital OUT of the Sensor is connected to any Digital Pin 7 of Arduino which will trigger Pin 9 connected to relay to open the door. Analog OUT of the Sensor may be connected to any Analog Pin of Arduino A0 to A5 then but we shall connect to Pin A0. The output of ADC (Analog to Digital converter may be displayed on LCD or OLED).

There are two LEDs and one buzzer connected of which Green LED will light when Arduino is switched on to indicate Power on. This is connected to Pin 2 of Arduino. Red LED and buzzer will switch on Digital out Pin 7 goes High. Red LED and buzzer are connected to Pin 3 and Pin 4 of Arduino.

MQ-8 Hydrogen Gas Sensor Interfacing with Node MCU:

This sensor has 4 pins of which VCC and GND of the sensor are connected to 3.3volt DC and ground of Node MCU board. Digital OUT of the Sensor is connected to any Digital Pin GPIO7 of Node MCU which will trigger Pin GPIO9 connected to relay to open the door. Analog OUT of the Sensor may be connected to any Analog Pin of Node MCU ADC0. The output of ADC (Analog to Digital converter may be displayed on LCD or OLED).

There are two LEDs and one buzzer connected of which Green LED will light when Arduino is switched on to indicate Power on. This is connected to Pin GPIO2 of Node MCU. Red LED and buzzer will switch on Digital out Pin 7 goes High. Red LED and buzzer are connected to Pin GPIO3 and Pin GPIO4 of Node MCU.

MQ-8 Hydrogen Gas Sensor Interfacing with ESP32:

This sensor has 4 pins of which VCC and GND of the sensor are connected to 3.3volt DC and ground of ESP32 board. Digital OUT of the Sensor is connected to any Digital Pin GPIO7 of ESP32 which will trigger Pin GPIO9 connected to relay to open the door. Analog OUT of the Sensor may be connected to any Analog Pin of Arduino ADC0 The output of ADC (Analog to Digital converter may be displayed on LCD or OLED).

There are two LEDs and one buzzer connected of which Green LED will light when Arduino is switched on to indicate Power on. This is connected to Pin GPIO2 of Arduino. Red LED and buzzer will switch on Digital out Pin GPIO7 goes High. Red LED and buzzer are connected to Pin GPIO3 and Pin GPIO4 of ESP32.