You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The variable _VOLT_RESOLUTION in the equation below should be 5V, not _VOLT_RESOLUTION, which is 3.3volts in case of esp32.
_RS_Calc = ((_VOLT_RESOLUTION*_RL)/_sensor_volt)-_RL; //Get value of RS in a gas
I think there is an error in the library source code (https://github.com/miguel5612/MQSensorsLib/blob/master/src/MQUnifiedsensor.cpp):
The variable _VOLT_RESOLUTION in the equation below should be 5V, not _VOLT_RESOLUTION, which is 3.3volts in case of esp32.
_RS_Calc = ((_VOLT_RESOLUTION*_RL)/_sensor_volt)-_RL; //Get value of RS in a gas
The above equation (line 148) is supposed to be the implementation of this equation in this link (https://www.jaycon.com/understanding-a-gas-sensor/).
RS = [(VC x RL) / VRL] – RL
The variables are in figure 6 of the link above.
Specifically Vcc=5V is the vcc to drive the heater of the sensor. It can't be 3.3volts, which is too low to drive the heater.
The correct formula should be:
_RS_Calc = ((_VCC*_RL)/_sensor_volt)-_RL;
where VCC = 5volts.
The text was updated successfully, but these errors were encountered: