After uploading the code: low_concentration_value/ any other code from the examples of the git library. In the serial monitor. I am getting higher values than expected.
I have not done anything wrong from connection part and the code.
But this issue of getting higher values is occuring.
The below is the data received in Serial monitor:
Can anyone tell me where I am going wrong??
Thank you in advance, for your help.
I have never used it, but I'm curious... On Github I read a warning:
Sensor MQ131 requires minimum 48h preheat time before giving consistent results (also called "burn-in" time)
Are you sure you did that 48h preheat time?
Assuming you have connected everything like the connection diagram shown on Github and the device has not been damaged, what about the fact you're using a 3.3V ESP instead of a 5V Arduino?
When dealing with any new component, it's a good idea to read and understand its datasheet, about both voltage and required current.
In this case I read the internal heater might require at least up to 900 mW, or up to 150 mA so you can't use 5V output from ESP or any Arduino! Trying to do so could severely damage your MCU.
You must use an external 5V source, connecting just GND in common with the ESP (and obviously the digital output too).
I think you need to make sure how to use that sensor, depending on the specific sensor version also (see the vendor specs pages).
Somebody already pointed out the pre-heat issue. I believe it is true. You need to pre heat the sensor before first use. For pinout, datasheet, characteristic curves and other details, you can check here:
Unfortunately the MQ series of sensors is unstable, and they cannot be accurately calibrated. Furthermore, they all respond to several different gases, and if the output reading changes, you need some other sensor to determine which gas caused the change.
At best these sensors can be used to signal that something in the air had changed, and only then with long "burn in" times of 48 to 72 hours.
For some ideas on how several of them can be useful when used as a collection, have a look at this interesting article: Electronic nose | Michael Madsen