Arduino Forum

Using Arduino => General Electronics => Topic started by: Byork on Dec 08, 2018, 10:13 pm

Title: MQ2 Gas Sensor AnalogRead Issue
Post by: Byork on Dec 08, 2018, 10:13 pm
I am using one of these MQ2 gas sensors https://www.ebay.com/itm/1PCS-MQ-2-Gas-Sensor-Module-Smoke-Butane-Methane-Detection-Arduino/151927272309 (https://www.ebay.com/itm/1PCS-MQ-2-Gas-Sensor-Module-Smoke-Butane-Methane-Detection-Arduino/151927272309) with the ESP-12. I am reading the analog values via the ESP-12 ADC pin. As the ESP-12 ADC reads 0V-1V, I am using a voltage divider circuit accordingly. The MQ2 is powered via a buck converter, dropping 12v-5v. The same goes for ESP-12, but 12v-3.3v.

Every few weeks, I will apply some gas around the sensor to test and make sure it is working. The setup runs fine for months, then out of the blue the sensor stops responding to gas concentrations, and the analog value just stays the same, even under high concentrations of gas. Regarding the heating element, it  seems to be fine as it is still hot to touch.

This is the second time I have experienced this issue. Does anyone know why is this happening? Or are these sensors not built for longevity, especially due to the heat involved?
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: Paul_KD7HB on Dec 08, 2018, 11:39 pm
Perhaps the heater voltage is not in the required range of 5.0 volts +_0.2 volts. Are you monitoring it?

Paul
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: Byork on Dec 09, 2018, 12:46 am
Seems ok, I measured it to be 5.05V.
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: Paul_KD7HB on Dec 09, 2018, 01:07 am
Seems ok, I measured it to be 5.05V.
Ok, then are you leaving the system powered up and running continuously?

Paul
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: Byork on Dec 09, 2018, 06:05 am
That's right, it runs 24/7. A reading is taken every 30 seconds. The setup runs continuously for months, until the issue mentioned occurs.
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: jremington on Dec 09, 2018, 04:16 pm
Quote
the analog value just stays the same, even under high concentrations of gas.
How do you know the problem is the sensor, rather than the microcontroller/program?

I would suspect the latter first.
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: Paul_KD7HB on Dec 09, 2018, 05:07 pm
The Ebay seller has this information: " heat sensor is a normal phenomenon , because the internal heating wire , if hot is not normal ".

After looking at the actual sensor PDF, I would first suspect the seller's circuit board and the components on it. Have you ever found or drawn a schematic for the circuit board? What are the components on the board, other than the sensor?

Paul
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: Byork on Dec 09, 2018, 09:08 pm
I 'm suspecting it's a component on the module circuit board as well, because when I replace the entire sensor module, everything is fine again. These modules are cheap, so I really don't have much issue replacing them, just a little trouble involved because I solder them to my own PCB. I'm just wondering what's the cause of the frequent failure, and if others are experiencing it too. I also suspect the continuous heat could be a contributing factor, I would probably drill more holes in my enclosure. Nevertheless, appreciate the replies Paul.
Title: Re: MQ2 Gas Sensor AnalogRead Issue
Post by: Paul_KD7HB on Dec 09, 2018, 10:45 pm
Measure all the voltages at every component end and write them all down. Then what a board fails, do it again to see what is different.

Paul