Hello all…
I am working on MQ135 Gas sensor for CO2 PPM.
I refer Internet blogs, datasheet, internet codes and i apply in my coding.
I also got result in PPM in range of 420 to 450. is it true or not? What is CO2 PPM in Air?
Also it gives me reading in loop, it can not go beyond 450 PPM.
I used this equation
Rs=( ( 5.0 * RL ) - ( RL * Vout ) ) / Vout, where Vout is ADC value & RL=10
ratio=Rs/R0, where R0 = 76.63
ratio=ratio0.3611
CO2_PPM= (146.15(2.868-ratio)+10)
I'd say you need to adapt the calculation for Rs, since you are dealing with a different ADC which gives you a value of 4095 for 3.3V where I only see a 5 in your equation which would correspond to an impossible analog reading of 6204.5 (5.0V/3.3V * 4095 ).
With this in mind, you'd need to correct the equation by use of the Ohm's Law
But this would definetly not work
since the ADC value is not immediately in Volt but only (3.3V/4095).
With that in mind we could either calculate Vout = analogRead() * 3.3 / 4095.0 or we just "correct" the 5V to that same factor like this