MiCS-6814 + Raspberry PI 3B+

Hey there!

I’m working in a project to monitoring air quality using a Air Quality 5 click from Mikroelectronika (it has an MiCS-6814 sensor) and a Raspberry Pi 3B+.

I have used the Pimoroni library for enviroplus (https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-enviro-plus) and now I’m reading some values for Oxidising, Reducing and NH3 based in the Gas.py example in the library.

I have some questions about it and I would greatly appreciate if you could help me with that:

The code of the Gas.py example has lines to get the resistance value for each gas as follow:

    ox = (ox * 56000) / (3.3 - ox)  
except ZeroDivisionError:
    ox = 0

and the same for other two gases. A question is that “56000” must be modified to get the right resistance values?

on the other hand, I’m reading the 3 resistance values (Ox, Red and NH3) and I’d like to convert that values to ppm for each gas but I can’t find the right expression to do it.

I’m confused if the resistance that I read in the example code is Rs, R0 or (Rs/R0) ratio.

I would highly appreciate if you can give me some information about it.

The project send data by MQTT to Ubidots bus it is working good.

Thank you so much,


Cristian Medina
Bogotá, Colombia.

This is an old unanswered question. gas.py does not (any more) contain that formula - it and other examples simply display Rs in kOhm.

The value measured is Rs. A problem is that we do not know R0, except that it varies hugely between sensors. And the relationship between Rs/R0 and ppm needs a log-log plot to make a straight line. But we can easily do a lot better that just displaying in kOhm

I just wanted to post links to:

Current related discussion

A previous discussion