How to calibrate MQ 135 for CO2 PPM

eaquinte

New member
Hello

I have been watching some videos and reading information on how to calibrate the MQ135 to be able to measure CO2 in PPM. Currently I already have the formula to calculate it, which is: 5.1839*pow(Rs/R0, -0.348)

Where:
R0 = 82 //initial MQ135 reading, found from the average of 100 readings
Rs = 1000*((5-Voltage)/Voltage)
Voltaje = MQ135_ADC*(5/255) //255 is the maximum value of the variable and MQ135_ADC is the sensor reading


I have some problems, which are:

1. All the information that I have found is for arduino and, what I have seen, is when they use the MQ135, the initial measurements, you get hundreds or thousands, while when I do the ADC reading, I get an average of 87. Could someone tell me why this is? I did the datasheet, the thing about having the MQ connected for 24 hours, so I don't think it's something like that. If I do my calculation with that value, the amount of CO2 I get from the calculation (at least in a spreadsheet like Excel) is 0.5132, which is clearly a very low value for CO2 PPM.

2. I don't know how to calculate numbers with a decimal point and negative exponentiation, could you help me? I am using the PICAXE 20M2

Thanks in advance
 

hippy

Ex-Staff (retired)
All the information that I have found is for arduino and, what I have seen, is when they use the MQ135, the initial measurements, you get hundreds or thousands, while when I do the ADC reading, I get an average of 87. Could someone tell me why this is?
It could be that you are reading the ADC with READADC which will only return a 0-255 value. Reading with READADC10 will return a 0-1023 value.

Any actual average of readings will be in those ranges but scaling will make those larger if needed to match the values others are using.

I don't know how to calculate numbers with a decimal point and negative exponentiation, could you help me?
That can be tricky with a PICAXE which but it may be possible. The first thing to do is to ensure the raw data you are getting is as expected before trying to process that further.

I am not familiar with the MQ135 but I did find this article which seems to cover a number of things -


Probably the best way to proceed is to provide us a link which shows which MQ135 module you are using, a description of how it is wired to your 20M2, and show us the code you are currently using.
 
Top