GithubHelp home page GithubHelp logo

Derivation of R0 about arduino-mq131-driver HOT 11 CLOSED

ostaquet avatar ostaquet commented on September 26, 2024
Derivation of R0

from arduino-mq131-driver.

Comments (11)

raphael-bmec-co avatar raphael-bmec-co commented on September 26, 2024

I have a follow up question to this. I have been in contact with the sensor manufacturer. They have said that the response curves vary from sensor to sensor for the high-concentration and that curves would need to be gathered for each sensor. Have you by any chance tested multiple sensors? Do you have any idea by what amount the curves vary between sensors?

from arduino-mq131-driver.

ferreiradiego avatar ferreiradiego commented on September 26, 2024

How to obtain the value of R0.

@ostaquet, could you provide or elaborate a process to obtain R0 (the resistance in fresh air)?

The procedure we are doing is as follow:

  1. Putting the MQ131 in a closed container with synthetic air (20% oxygen and nitrogen 80%) to simulate clean air.
  2. Meanwhile the sensor is in clean air the calibrate() function is working to see how the resistence is changing during the calibration and heating time.
  3. After the 48h the sensor is heated and then we can get the value of R0.

Do you think this procedure is correct or similar to what you are doing?

We are learning how the sensor work, if anyone have a procedure to provide, we appreciate it.

from arduino-mq131-driver.

toze3 avatar toze3 commented on September 26, 2024

This is an important question, because I don't think at all, that the R0 of the High/low sensing ozone of 235/1917 ohm, and them use a RL of 10kohm (High) and 1Mohm (LOW), simple don´t make sense. I calculated the R0 and the LOW sensor should have around 250Kohm and the HIGH version around 2.500 ohm.

I think there is one more in the market, by ETC (and can be found on sainsmart module) that is planned to work between 10-2000 ppb, and i found that the R0 should be around 12.000 ohms.

I now have a Aeroqual sensor and will try to figure out the curve, just waiting for the ESP or arduino to arrive to compare all readings at the same time.

from arduino-mq131-driver.

ostaquet avatar ostaquet commented on September 26, 2024

A lot of questions here :-O
I should consider adding a full explanation on how the sensor is working :-)

First, it is important to understand how the sensor is working.

The sensor MQ131 is a semiconductor gas sensor. It means that the resistance of the sensor evolves depending on the quantity of O3 particles that are measured in the air. In order to measure those ozone particles, the heater burns the air and the sensor detects gases by a chemical reaction when the gas comes in direct contact with the sensor.

In a very simplified way, you burn the air and see the remaining of the burning to measure the quantity of gas. The heating time depends on your sensor, that's why it is part of the calibration process.

The burn-in time of 48h is important because it burns all remaining particles from the factory process. The remaining particles of the factory process will obviously influence your measures and the burn-in time will stabilize the chemical reaction on the sensor.

In a simplified way, the burn-in time cleanup your sensor before using it ;-)

After the burn-in time, you are able to measure the resistance of the sensor. This resistance evolves depending on the chemical reaction. In order to measure it, we use a load resistance in a setup of a voltage divider.

The Rs (resistance of the sensor) and the RL (load resistance) in the circuit are the voltage divider. The concept of a voltage divider is by putting two resistors is series. The VRL measured on the Arduino analog pin is the final voltage coming from the voltage divider (usually called Vout). We also know the Vin (5V).

With a quick calculation (described in issue #20), we arrive at Rs = ((5V / Vout) - 1) * RL

We are now able to measure the resistance of the sensor. 👍 The value of RL is not critical as far as you are using a significantly high resistance (10KOhms, 1MOhms...) to be sure that the Vout is influenced significantly by the Rs.

When all this said, we are coming at the core question of how to measure R0.

There are 2 parameters set during the calibration process: the R0 and the heating time.

Regarding the R0, it is quite simple... R0 is just the name of the Rs in the clean air. ;-)
The heating time is the time required by heating the sensor to have a stable measure. It is again related to the chemical nature of the sensor. When the heater is on, there are chemical reactions of the gases burning on the sensor which makes noise to measure the O3 concentration. So we have to wait a bit before having a stable measure.

Those parameters are different for each sensor coming out of the factory because of the chemical nature of the sensor. That's why it is critical to make the calibration process.

The calibration process has to be performed when the burn-in time is done (to avoid the influence of the residue from the factory process) in clean fresh air.

If you want to have a very precise measure, you should use synthetic air coming from bottles (oxygen, azote or a mix), but if you are living in a country where the air quality is quite OK, just put the sensor outside on a Sunday morning. Look at the official air quality measures in your area to be sure there is no high O3 concentration when you're doing your calibration.

When you have your calibration done, you can finally measure the concentration of O3.

The sampling process consists of reading the resistance of the sensor after the heating time defined during the calibration to be sure that we have a stable measure.

Again, the sensor resistance (Rs) is related to your sensor and that's why the final concentration is based on a ratio between the R0 and Rs (as you can read in the data sheets). As R0 and Rs have been sampled on the same sensor, the chemical variability disappears and the ratio can be used with a formula to find our ppm/ppb concentration (see sensitivity curves in Excel)

from arduino-mq131-driver.

ostaquet avatar ostaquet commented on September 26, 2024

@chazbevo To activate the debugging, you have to pass the stream on which you want to see the debug as parameter in the begin() function.

Example to output on Serial:

MQ131.begin(2,A0, HIGH_CONCENTRATION, 1000000, (Stream *)&Serial)

from arduino-mq131-driver.

raphael-bmec-co avatar raphael-bmec-co commented on September 26, 2024

@ostaquet do you have an opinion on my comment that the manufacturer has said the sensitivity curves will be different for each sensor?

from arduino-mq131-driver.

ostaquet avatar ostaquet commented on September 26, 2024

@raphael-bmec-co The sensitivity curves are different per sensor due to the chemical reaction. That's why the concentration is measured by comparaison between clean fresh air and ozone air with the ratio of Rs/R0.

from arduino-mq131-driver.

raphael-bmec-co avatar raphael-bmec-co commented on September 26, 2024

The implication from the manufacturer is that this curve of Rs/R0 varies across sensors:

"
Dear Sir,
The curve in the manual is from one sensor, but every one is different.
"

This is for the high range sensor. They have specifically said it should not be used for measurements without generating curves for each sensor. Have you gathered any data to the contrary or observed some sort of repeatability?

from arduino-mq131-driver.

ostaquet avatar ostaquet commented on September 26, 2024

@raphael-bmec-co I didn't make tests with multiples sensors. However, the equation designed from the curves of the data sheet gives pretty close results to the results coming from the irCELine in Belgium. irCELine is the official monitoring entity from the government in Belgium. I guess they use calibrated sensors :-)

from arduino-mq131-driver.

raphael-bmec-co avatar raphael-bmec-co commented on September 26, 2024

@ostaquet, thank you for the feedback. The low concentration sensor is quite repeatable - I am assuming this is what you are working with as you are measuring atmospheric Ozone levels? I am referring to the high concentration sensor 10-1000 ppm. I have the sensor in hand now so I will do some testing in due course and provide some feedback.

Thank you.

from arduino-mq131-driver.

ostaquet avatar ostaquet commented on September 26, 2024

@raphael-bmec-co Indeed, I’m talking about the low concentration sensor. I have both but I didn’t compare the results of the high concentration sensor with another data source.

from arduino-mq131-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.