DIY weather station /w Enviro+ (MICS6814) - Converting Ohms to PPM

Hello Roscoe27,

thank you for sharing your Code for the conversion from Ohm to ppm in MICS6814. I tried your code on my no2_oxidising measurement in R (10^((log10(Messbox$my_oxidising_value/20000)-0.8129)). I am pretty sure that my Ohm measurements are reasonable but i got ppm-values that appeared way to high (up to 2.5 ppm no2). The same error occurs with NH3 and CO. I am not a professional in this field, but would be very happy if you could tell me whether you obtained reasonable values or whether you took into account temperature and humidity in later steps. Thank you very much for your effort. Best regards

I think the issue is that youā€™re applying the algorithm to the raw resistance, rather than Rs/R0 (as noted in my reply on Oct '20). R0 is the resistance in ā€œAirā€ and is used as your baseline. Rs is the resistance at the time of the required measurement. You can see more details of how I used the alorithm here

Thank you very much!!

Sorry Roscoe27 to bother you againā€¦ I studied your script and there is one step i am unsure about. To calculate comp_gas_rs (line 393) you use gas_temp_diff (= raw_temp - gas_calib_temp) (line 389) the latter defined as (line 2263): round(raw_temp,1). However, Iā€™m not sure if just using round(raw_temperature,1) is a meaningful way to define gas_temp_diff. Could you please advise me on how to define it correctly? Thank you in advance for your help!

gas_temp_diff is the difference between the temperature at the time of the gas sensorsā€™ calibration and the temperature at the time of the current gas reading. That difference is used to apply compensation to each of the gas readings in 393, 397 and 401. The same process is used to compensate for humidity and air pressure. Does that help?

Thank you very much. I have changed the formula accordingly. Unfortunately, I am still getting values that are too high. With a measurement range (my raw values) of about 7900 to 200500 ohms for NO2, I am still getting results of up to 4 ppm :frowning:

Greetings

As the owner of a new mics6814, and novice programmer, I looking for a python program that I can use to set up a reference resistance alarm for each of the three main resistance values. Does anyone, know of any one who has done this with the original GitHub gas.py example program for raspberry pi. Any guidance would greatly be appreciated.
Thanks
Tom