MQ-3 Alcohol 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.
This is a highly accurate sensor that is calibrated to detect the PPM of Alcohol present in the environment; however, to do so, you must first understand the sensitivity characteristics of the MQ-3 Sensor, which can be found in the MQ3 Sensor datasheet and look like the image below. Now let us look at the pin configuration of the sensor break board: 220 ohms current limiting resistor is used in the circuit.
MQ-3 Alcohol Gas Sensor Interfacing with Arduino:
VCC & GND pins of sensor are connected to 5volt DC and ground pin of Arduino. Digital OUT of the Sensor is connected to any Digital Pin of Arduino say Pin 7 which when activated shall trigger Pin 9 of Arduino for downstream action. Analog OUT of the Sensor may be connected to any Analog Pin of Arduino A0 to A5 say we connect to A0. The actual value may be displayed. Green LED connected to Pin 2 is used as a power on indicator. When the gas threshold is reached or exceeded by the sensor then the Dout will trigger the Arduino Digital input and that switches the Red LED connected to Pin 3 ON until the gas level comes below the threshold value. The buzzer connected to Pin 4 also sounds whenever the threshold is reached or exceeded.
MQ-3 Alcohol Gas Sensor Interfacing with Node MCU:
VCC & GND pins of sensor are connected to 3.3volt DC and ground pin of Node MCU. Digital OUT of the Sensor is connected to any Digital Pin of Node MCU say Pin GPIO7 which when activated shall trigger Pin GPIO9 of Node MCU for downstream action. Analog OUT of the Sensor may be connected to Analog Pin of Node MCU ADC0. The actual value may be displayed. Green LED connected to Pin GPIO2 is used as a power on indicator. When the gas threshold is reached or exceeded by the sensor then the Dout will trigger the Node MCU Digital input and that switches the Red LED connected to Pin GPIO3 ON until the gas level comes below the threshold value. The buzzer connected to Pin GPIO4 also sounds whenever the threshold is reached or exceeded.
MQ-3 Alcohol Gas Sensor Interfacing with ESP32:
VCC & GND pins of sensor are connected to 3.3volt DC and ground pin of ESP32. Digital OUT of the Sensor is connected to any Digital Pin of ESP32 say Pin GPIO7 which when activated shall trigger Pin GPIO9 of ESP32 for downstream action. Analog OUT of the Sensor may be connected to Analog Pin of ESP32 ADC0. The actual value may be displayed. Green LED connected to Pin GPIO2 is used as a power on indicator. When the gas threshold is reached or exceeded by the sensor then the Dout will trigger the ESP32 Digital input and that switches the Red LED connected to Pin GPIO3 ON until the gas level comes below the threshold value. The buzzer connected to Pin GPIO4 also sounds whenever the threshold is reached or exceeded.