Go Down

### Topic: MQ-131 sensor question. (Read 967 times)previous topic - next topic

#### BayBayMan

##### Jan 10, 2017, 06:21 pm
I am conducting a study to detect whether or not emissions come out of an electric vehicle using the Arduino and a gas sensor. I have the MQ-131 gas sensor connected, as well as an LCD to output the values when not connected to a laptop. The MQ-131 should be detecting NOx, CL2 and O3, according to the datasheet. I have left the sensor on for several hours trying to burn it in, but not the recommended 24 hours.

As of right now, the code for the sensor is just outputting the analogRead(), which isn't in PPM or PPB yet. I believe the output I am seeing is the resistance, which has values ranging from 0 to 1023. Anyways, whenever I try testing the sensor by exposing it to some ozone producing equipment, the value decreases, instead of increasing. That confuses me so much, and I was wondering if anyone could shed light on why the values would go down. What I am assuming, is that the resistance(0-1023) should go up if it senses any gases that it was made to detect. Am I right in assuming that?

I am thinking once I have that understanding, I am going to try calibrating the MQ-131 as much as I can, since the MQ-131 isn't exactly the greatest tool for accurately detecting specific gases and the densities. For now I just need to get the values to increase in what I assume is the presence of NOx or O3.

Thanks for the help!

#### pylon

#1
##### Jan 10, 2017, 06:29 pm
Please post a wiring diagram of how you wired the sensor. Usually the sensor is connected in series with a fixed resistor (see datasheet) to build a voltage divider. In this case if resistance of the sensor increases and you measure the voltage over the fixed resistor, the measured voltage will decrease. The Arduino can only measure voltages. To measure resistors you have to build a circuit (as the mentioned voltage divider) that converts the resistance to a voltage.

#2
##### Jan 10, 2017, 06:38 pm
Is there a tailpipe on your electric vehicle?  Where are you measuring emissions?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### BayBayMan

#3
##### Jan 10, 2017, 07:02 pm
Is there a tailpipe on your electric vehicle?  Where are you measuring emissions?
The vehicle has no tailpipe, from what I have seen in my inspection. That was the first thing I looked for, but I plan on measuring emissions all around and inside the vehicle. My group is in the process of creating a rod that can get the sensor under the hood components. Then we have plans of measuring the battery charging station, since that is where research points for emissions. As of right now, me and my group have tested air purifiers, which are suppose to ionize the air and produce ozone purposely. Then I had a brush motor drill running near the sensor, to see if anything happened to the values being outputted. Again, usually the values would decrease. I am also going to upload my circuit, and how I have this connected. Maybe that could be the problem.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### BayBayMan

#5
##### Jan 10, 2017, 08:00 pmLast Edit: Jan 10, 2017, 08:13 pm by BayBayMan
Thanks for the resource, CrossRoads! I appreciate it!
Please post a wiring diagram of how you wired the sensor. Usually the sensor is connected in series with a fixed resistor (see datasheet) to build a voltage divider. In this case if resistance of the sensor increases and you measure the voltage over the fixed resistor, the measured voltage will decrease. The Arduino can only measure voltages. To measure resistors you have to build a circuit (as the mentioned voltage divider) that converts the resistance to a voltage.
Attached is a rough Fritzing diagram of my circuit, and I had to add notes to signify what I'm using. The gas sensor is an MQ-131.

#### BayBayMan

#6
##### Jan 10, 2017, 08:25 pmLast Edit: Jan 10, 2017, 08:32 pm by BayBayMan
Here is an image of the Fritzing diagram.

Here is a link to the image, if you want to zoom in: http://imgur.com/eMGQ7sS
The reason I have a 6V power source connected only to the sensor, is because the sensor requires 6V to be heated enough to react. Then I have the LCD connected to the on board 5V Vcc.

#### pylon

#7
##### Jan 11, 2017, 02:13 pm
Please post a link to the breakout board you're using for the sensor. I guess it just implements the default circuit but a check is never wrong.

#### BayBayMan

#8
##### Jan 11, 2017, 06:27 pm
This is the sensor I got, which came with its own breakout board: https://www.amazon.com/Sensitivity-Detection-Testing-Sensor-Module/dp/B01FJC12XW/ref=sr_1_5?ie=UTF8&qid=1484154483&sr=8-5&keywords=mq+131

I got the sensor to increase in voltage when exposed to heat and ozone when I isolated it inside a Styrofoam box with an air purifier. It increased very slowly, though, but increased nevertheless.

What I am wondering now from asking questions in one of the other threads, is that I think I'm gonna need more power to get both the LCD and MQ-131 sensor working at the same time. It's also pretty hard to detect ozone gas since it's so short lived. I did manage to get a good reading yesterday from a diesel trucks exhaust pipe. It was such a short spike, that it started stabilizing after about 2 seconds. I was also a certain distance from the pipe when I got that spike.

#### pylon

#9
##### Jan 13, 2017, 07:02 pm
Quote
This is the sensor I got, which came with its own breakout board: https://www.amazon.com/Sensitivity-Detection-Testing-Sensor-Module/dp/B01FJC12XW/ref=sr_1_5?ie=UTF8&qid=1484154483&sr=8-5&keywords=mq+131
Unfortunately a cheap Chinese board without any substantial documentation. I guess the potentiometer is the resistor building the voltage divider so you can adjust the reading on the Arduino with it. The chip on the board is probably needed to control the LED. I don't buy boards without documentation, a schematic is a must.

Quote
What I am wondering now from asking questions in one of the other threads, is that I think I'm gonna need more power to get both the LCD and MQ-131 sensor working at the same time.
The sensor draws about 250mA, so the 500mA should be enough if the display isn't using too much.

You should power the Arduino with more than 6V to let it produce a stable 5V to make measurements. At the moment it probably takes the 5V from USB for everything. Power with 9V and the Arduino should have enough power.

Quote
I did manage to get a good reading yesterday from a diesel trucks exhaust pipe. It was such a short spike, that it started stabilizing after about 2 seconds. I was also a certain distance from the pipe when I got that spike.
You may damage the sensor if you heat it too much. The operating temperature is -25 - 40°C, a diesel exhaust is usually much hotter. And the reading is very temperature sensitive so keep the temperature as stable as possible or use the diagram in the datasheet to calculate the error out (you need a temperature sensor for that).

#### chris18404

#10
##### Apr 22, 2017, 01:31 pm
Unfortunately a cheap Chinese board without any substantial documentation. I guess the potentiometer is the resistor building the voltage divider so you can adjust the reading on the Arduino with it. The chip on the board is probably needed to control the LED. I don't buy boards without documentation, a schematic is a must.

The sensor draws about 250mA, so the 500mA should be enough if the display isn't using too much.

You should power the Arduino with more than 6V to let it produce a stable 5V to make measurements. At the moment it probably takes the 5V from USB for everything. Power with 9V and the Arduino should have enough power.

You may damage the sensor if you heat it too much. The operating temperature is -25 - 40°C, a diesel exhaust is usually much hotter. And the reading is very temperature sensitive so keep the temperature as stable as possible or use the diagram in the datasheet to calculate the error out (you need a temperature sensor for that).
This is the sensor I got, which came with its own breakout board: https://www.amazon.com/Sensitivity-Detection-Testing-Sensor-Module/dp/B01FJC12XW/ref=sr_1_5?ie=UTF8&qid=1484154483&sr=8-5&keywords=mq+131

I got the sensor to increase in voltage when exposed to heat and ozone when I isolated it inside a Styrofoam box with an air purifier. It increased very slowly, though, but increased nevertheless.

What I am wondering now from asking questions in one of the other threads, is that I think I'm gonna need more power to get both the LCD and MQ-131 sensor working at the same time. It's also pretty hard to detect ozone gas since it's so short lived. I did manage to get a good reading yesterday from a diesel trucks exhaust pipe. It was such a short spike, that it started stabilizing after about 2 seconds. I was also a certain distance from the pipe when I got that spike.
Have you found a solution?

#### hiten_

#11
##### Oct 19, 2017, 12:56 pm
As of right now, the code for the sensor is just outputting the analogRead(), which isn't in PPM or PPB yet. I believe the output I am seeing is the resistance, which has values ranging from 0 to 1023. Anyways, whenever I try testing the sensor by exposing it to some ozone producing equipment, the value decreases, instead of increasing. That confuses me so much, and I was wondering if anyone could shed light on why the values would go down. What I am assuming, is that the resistance(0-1023) should go up if it senses any gases that it was made to detect. Am I right in assuming that?

The Analog Signal should tell you the voltage drop, not the resistance value. And the 0 to 1023 value for  the analog must also be converted to volts actually, depending on how much voltage you are using for the sensor.

Go Up