I have this sensor MQ131 by sainsmart: https://www.amazon.co.uk/gp/product/B00NL8XIQG/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A3DRI1TTHCTDIG

All I can read is the analog value which does not reflect the gas concentration. Any Arduino code for that to read the ppm concentration? How long does the sensor needs to be preheated?

2 Answers 2


First you need t make it burn for 24hrs mini (48 advised). Just plug it and wait. Then for calibration you need a reference atmosphere free of NOx, CL2 and O3. In this reference atmosphere you should get an output value of 0.

I don't know this model you bought exactly, but most of these gas sensors mounted on a PCB have a mini eeprom so the output is the actual PPM concentration. Note that these sensors are not able to tell you how much of which gas is detected, but only a ppm concentration (you then have to guess which one is in the air). If you have several of these gas in the air, you will not be able to tell their concentration with such a sensor.

  • Can yuou suggest anyone that can give directly the ppm values instead of just struggling with the interfacing of this model I got from Amazon? @Vincent Aug 14, 2016 at 13:20
  • this model is giving the ppm after calibration, but the ppm of all these gases together. For example if you have 100ppm CL2 and 200ppm O3, you'll read 300ppm on your arduino. If you want a sensor which will give you the ppm of only one gas, it will cost you much much more. Aug 14, 2016 at 15:55

According to the picture, the sensor is a Winsen MQ131 low concentration (black bakelite version). You can have additional information on the sensor in the datasheet.

Your sensor is mounted on a PCB with some features like converting values (analog to digital), controlling the heater, maybe providing I2C bus... Without any additional information, it's difficult to give guidance on your module (the Amazon link doesn't mention any datasheet for the module).

In order to use your sensor, you can connect it directly on the sensor and pilot it by yourself. You can find some code on GitHub (for inspiration or fork).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.