Not getting consistent results with MQ gas sensors

Goodevening...I am currently doing a project which involves MQ gas sensors. I have searched but have not found the answer that I was looking for. Has anybody know how to obtain consistent result with this sensor. When I use serial monitor to observe the behavior of the sensor, it keeps on fluctuating without getting any consistent values. Thanks in advance...

There are many (7+) MQ sensors so which ones are you using for your project?
Have you checked the datasheet(s) for details e.g. about calibration?
Can you post a link to the datasheet(s)?

what is the accuracy and precision you are looking for?

When you use it indoors, and nothing special is happening, the values should be stable.
Can you show us the values you have ? and perhaps attach a photo of your setup ? and maybe the sketch ?

Hi. Thanks for the response.

I am using the following MQ sensors for the project

The project does not intend to quantify or measure the amount of concentration of the certain chemical in the air, rather I would want to detect through the MQ sensor the existence of those chemical in the air (even just an evident difference in the readings for the clean air & the air with the chemical). Now, I am testing the MQ sensors one at a time, but as I use the serial monitor, the values always fluctuate
[Sample Output] - MQ 3 Sensor
975
933
1023
973
972
0
0
0
0
274
0
0
0
0
0
0
0

I did not draw the source from the arduino +5V terminal, rather I use L7805 5V voltage regulator and use the schematic diagram Voltage regulation with our friend the 7805 | Jumptuck. But I used 3.3uF capacitance on both input and output

As of now, my concern is, to get an almost stable reading from every MQ sensors and I am doing this project indoors, thus there are no smoke, combustible gas, or any other chemicals that the MQ sensors would detect.

Thanks

[Sketch]

int mq_pin_test = A0;

void setup()
{
Serial.begin(9600);
while(!Serial){;}
}
void loop()
{
Serial.println(analogRead(mq_pin_test));
delay(1000)
}

That is too much fluctuation, way too much.
How did you wire it, I think something is wrong in the wiring. It is almost as if you read a pin that is not connected to anything.
Do you use a load resistor ? Do you use the ‘bare’ sensor or a module ?

Can you add two 100nF next to the 3.3uF at the input and output of the 7805. The 7805 can generate noise or small oscillations when used with normal electrolytic capacitors.

Thanks for the response

I used the bare sensor and mounted it on the sensor socket, then I attached it to the breadboard. I'll recheck the wiring and add the capacitance, thanks

I got it, the problem is with the L7805, I tried isolating MQ-3 sensor and connected it to +5V and GND terminal of Arduino, and it worked fine....

Thanks

Hi...I need help once again...

I am troubleshooting my MQ sensor, why is it when I directly connect both VH (heater voltage) and VC (circuit voltage - pin A) to 5V terminal of arduino, I am getting fine and steady result from the MQ sensor. However when I connect both VH and VC to L7805 (5V), I am getting fluctuations from the MQ sensor.

Connection (L7805)
pin 1 - DC adaptor (9V)
pin 2 - GND
pin 3 - output (to VC and VH of MQ sensor)
I connected 3.3uF capacitance on both input and output (and tried varying the capacitance values but the same thing happens).

Thanks for the response...

Ok I got it now. Thanks

what was the problem?

Hi sorry for the very late reply. The problem was, the ground of the board containing the MQ gas sensor and the Arduino are not connected. Thanks

Hi everyone I am having the same problem with a MQ-5, im hooking it up to a NodeMCU and I am getting random values all over the serial monitor. Ive checked everthing, connections, sensitivity, spec sheet, etc...still same problem... see analog readings:

07:06.059 -> Sensor value = 30
13:07:07.090 -> Sensor value = 530
13:07:08.100 -> Sensor value = 7
13:07:09.114 -> Sensor value = 1024
13:07:10.141 -> Sensor value = 0
13:07:11.153 -> Sensor value = 541
13:07:12.177 -> Sensor value = 7
13:07:13.183 -> Sensor value = 1024
13:07:14.216 -> Sensor value = 0
13:07:15.256 -> Sensor value = 567
13:07:16.247 -> Sensor value = 5
13:07:17.271 -> Sensor value = 1024
13:07:18.298 -> Sensor value = 410
13:07:19.313 -> Sensor value = 630
13:07:20.335 -> Sensor value = 0
13:07:21.358 -> Sensor value = 1024
13:07:22.404 -> Sensor value = 0
13:07:23.431 -> Sensor value = 349
13:07:24.431 -> Sensor value = 13

The sensor is indeed detecting the gas because when I put gas on it, the second LED on the sensor lights up, so the problem is getting the proper reading.

Looks like a floating input.

Check the continuity of all your connections. Don't forget to connect all the grounds.

Did you note the solution above regarding ground? Make sure everything shares a common ground.

Ron