Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters to model temperature and humidity dependence #70

Open
pjcm97 opened this issue Oct 25, 2023 · 2 comments
Open

Parameters to model temperature and humidity dependence #70

pjcm97 opened this issue Oct 25, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@pjcm97
Copy link

pjcm97 commented Oct 25, 2023

Hello Miguel,

I have gone through the MQ-135-CorrectionFactorDHT11 document, and there are a few parameters that are not entirely clear to me.

I would like to use the correction factor for temperature and humidity for the MQ-4 sensor, which is designed for methane detection, and the MQ-8 sensor, which is used for hydrogen detection, as well as the MQ-135 sensor for CO2 detection. Could you please provide guidance on where I can obtain these correction factors for the MQ-4 and MQ-8 sensors?

Here are the parameters I'm particularly interested in:

#define` MQ135_DEFAULTPPM 399 // default ppm of CO2 for calibration
#define MQ135_DEFAULTRO 68550 // default Ro for MQ135_DEFAULTPPM ppm of CO2
#define MQ135_SCALINGFACTOR 116.6020682 // CO2 gas value
#define MQ135_EXPONENT -2.769034857 // CO2 gas value
#define MQ135_MAXRSRO 2.428 // for CO2
#define MQ135_MINRSRO 0.358 // for CO2

/// Parameters for calculating ppm of CO2 from sensor resistance
#define PARA 116.6020682
#define PARB 2.769034857

/// Parameters to model temperature and humidity dependence
#define CORA 0.00035
#define CORB 0.02718
#define CORC 1.39538
#define CORD 0.0018

I greatly appreciate your work!

Thank you so much!

@miguel5612 miguel5612 added enhancement New feature or request good first issue Good for newcomers labels Oct 27, 2023
@snico2
Copy link

snico2 commented Dec 28, 2023

I'm also interested in being able to apply the correction based on temperature and humidity.
I found this old article online
https://davidegironi.blogspot.com/2017/07/mq-gas-sensor-correlation-function.html
where the method is explained, but I didn't understand much (the code for AVR is attached to the article).

Looking at the code "MQ-135-CorrectionFactorDHT11.ino" it seems that it is not complete as the functions are not used
getCorrectedPPM
getCorrectedResistance
Why doesn't the correctionFactor also apply to R0?

It would be wonderful if the library could also include CorrectionFactor for other MQ sensors.

Congratulations go to Miguel for the excellent work done

@miguel5612
Copy link
Owner

Thank you for your interest in applying temperature and humidity correction factors to other MQ sensors. We agree that adding support for the MQ-4 and MQ-8 sensors would be a valuable enhancement to the library. If you're able to implement the correction factors for these sensors, we would greatly appreciate it if you could contribute a pull request. Your input would help expand the functionality of the library and benefit the community.

Thank you for your continued support, and we look forward to your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants