-
Notifications
You must be signed in to change notification settings - Fork 19
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
Change parameters and override those defined in MQ131.h #17
Comments
The To define the load resistance (RL)The initialization of the driver is done with the function
In the example calibrate_and_read.ino:
The RL value set in the initialisation of the driver overrides the default value set in the To use the correct temperature and humidityIn order to increase the accuracy of the concentration values, it is important to inform the driver about the temperature and the humidity level. Those values can be set with the Per example:
Those environmental values override the default values set in the To set the base resistance R0 with calibrationThe R0 mentioned in the The R0 is given by the driver after the calibration process. The calibration process can be triggered by the function Warning: Before running the calibration process, don't forget to pre-heat the sensor for 48 hours. By running the example calibrate_and_read.ino, the output on the Serial will be something like this:
This is how to get the R0 value. The R0 value can be set by using the function |
Thank you for the prompt response. From what I read:
So, I can change the default value to 11 ohms or use the setR0() function?
Is this the correct syntax and placement of the code to set the variables? Thanks again! |
Your R0 value is low compared to mine because you’re using a low RL. According to your first comment, you’re using a load resistance of 110Ohms. The datasheet recommends a load resistance of 1MOhms. My experience shows also good results with 10KOhms. I suggest you read carefully the source code in order to avoid issues 😉 As you can see, all values are initialized in the You can indeed change the R0 value through the |
This comment has been minimized.
This comment has been minimized.
After testing alot this circuit and finding some problems with the very high impedance of the sensor (low concentration) I'm getting R0 of 250kohms, and this is very near the ones in the datasheet. Please check Figure 5 you can see the output voltage at zero ppb is around 4V and he uses a RL of 1Mohm, so by the ohm law and thinking as a voltage divider the resistance R0 of the sensor should be RL / (RL + Rs) -> Rs=R0=250Kohm. Also from the same Figure for the concentration of 200 ppb you have a Vrl of 2.5V this means Rs=RL, and by this you have Rs/R0=4 for 200ppb. Now to confirm this calculation just check Figure 3 and see Rs/R0 is equal to 4 in 200ppb. I do believe there are differences between sensors, but it's hard to believe there is a diference in a factor of 100 or more. This R0 is more or less I got from the LOW capacity from winsen. note: for the high concentration the only difference should be the R0 used and the unit output |
Can I modify the default values in the #define statements? Default RL to the resistor value I have chosen? I have a MQ131 module and there's a 110 ohm resistor on the board for RL.
I plan on having a temp/humidity sensor in a vessel. Can I take those readings and place them in the default values of the #define statements?
Where did you get the default Base Resistance R0 for the high concentration sensor of 235.0?
Thanks,
The text was updated successfully, but these errors were encountered: