MQ2 Gas Sensor - Calucation of Rs

Hi,



Welcome to the forum. Basically RL is (Load Resistance) and it is used to compute air resistance. As in the code it is considering that sensor is placed in the clean atmosphere that’s why RL is considered to be 1.



Reference: float RS_air; // Get the value of RS via in a clear air

RS_air = (5.0-sensor_volt)/sensor_volt; // omit * RL



I hope it will help you.



Thank you.