I have done all this, and read it thru the code example which is from the wiring example
int sensorValue;
void setup()
{
Serial.begin(9600); // sets the serial port to 9600
}
void loop()
{
sensorValue = analogRead(0); // read analog input pin 0
Serial.println(sensorValue, DEC); // prints the value read
delay(100); // wait 100ms for next reading
}
Now I do get data, but the data I get drifts constantly, so I don't know if its legit, and the graph given by the datasheet does not really correspond to calibrating the sensor, as I need ppm or ppb.
Has anybody worked with this sensor, that can help me out with my issues? I have searched online everywhere, and there seems to be many people with the same problem but no solution. I have followed the instruction from Arduino Playground - MQGasSensors about burn in time and turn-on time.
The heater needs 6V, not 5V as in the example (the example is for an other sensor).
So you really have to use 6V. These sensors are cheap and do fluctuate, so using 5V makes it even worse.
Do you actually get a reading from the sensor, or did you use the wrong input and is your input floating ?
The preheat time is 24 hours. Did you already had it on at 6V for 24 hours ?
I don't like the example of that webpage. I would suggest to use it as in the datasheet. So connect both 'A' together, and connect both 'B' together. Use a resistor and measure the voltage over the resistor with the Arduino.
After 24 hours at 6V, and if it is on for a few minutes, and if there are no drafts... are your readings still drifting ?
I just read the datasheet, and using 100k...200k load resistor could case noise. Normally an analog signal for the Arduino should have 10k or less impedance. You could add a RC filter.
The sensor is also very sensitive, any air movement near the sensor might already have influence.
How is it drifting? Is the value that the Arduino prints always going down ? If that is the case, you need more burn-in / preheat time and longer time to wait before it becomes stable.
This is an interesting article about the ozone in the air: The Ozone We Breathe
Its drifting from high, about 700 ~ 400 on the ADC. I tried mapping the function to the datasheet, but I believe that is flawed because it is in log scale.
Thanks for the article, that actually corrected some misconceptions of ozone I had
Hi
I am shiva
i want know about the preheat for the mq131 sensor.
I was preheat the sensor for 5 hrs after that i stop.
How much time can i preheat?
thanks you