RAK7204 Gas Resistance - what should the values tell me

Since a few days I am using a RAK7204 and now I ask myself the question what exactly the values of “gasResistance” mean to me. I didn´t found any information that makes clear statements about what value stands for good, medium or bad air.

BOSCH’s statements on the BME680 environmental sensor indicate that there is an IAQ index that must be calculated. This calculation is usually done directly on the circuit board on which the sensor is used. Since the RAK7204 does not provide an IAQ value, this calculation does not seem to happen.

Therefore my question, can I calculate the IAQ based on the sensor data myself and how, or is there a table for the values of the “gasResistor” from which I can extract the air quality.

Attached is a table I have found about the IAQ values.

Thank you and Best Regards

HI @misko . You can use the GAS resistance with the formulas from BOSCH. Here is their statement for this sensor

The BME680 sensors has 4 outputs: Temperature, relative humidity, abolute pressure, and gas resistance.

Each of the 4 outputs requires a compensation using calibration parameters stored in the register map. Bosch Sensortec provides a the BME680 Sensor API in source code to make this compensation.

IAQ, on the other hand, is not the output of the BME680 itself, but the output of a separate product called the B osch S ensortec E nvironmental C luster software (BSEC). This software provides a specific configuration for the BME680 sensor which has been tuned for sensing I ndoor A ir Q uality (IAQ). This piece of software is provided as pre-compiled binary on Bosch Sensortec’s website and is free to use with the BME680 sensor.

!! Make sure to check that your processor architecture and compiler is supported. !!

Due to the complex nature of the IAQ algorithm, it requires a significant amount of RAM and ROM, and uses floating point calculation. 8-bit and 16-bit platforms are not recommended.

Dear @velev, as I understand the BOSCH statement, the additional BSEC software only works when the BME680 is directly connected to the board with the running BSEC software.
But this is not possible with the RAK7204. So, what was the idea to install the BME680 on the RAK7204 without the BSEC software. What is a “gas resistance” value supposed to tell me?
BOSCH doesn´t provide any formulas, so I´m not able to calculate the IAQ after I have received the sensor values.

If such a sensor is installed in a device, the device manufacturer should be able to tell the user what he can do with it. Otherwise it is only a device which can measure temperature, humidity and air pressure. But I don’t need a BME680 sensor for this.

The RAK7204 is a LoRaWAN™ node that serves as an environmental monitoring station. The high-precision sensors, can measure changes in temperature, humidity, gas pressure and provide an indoor air quality index.

1 Like

I’m also after the same thing and would like to see the AQI as a field.

I came across this Arduino code for the sensor which also explains how the AQI is calculated and from what I can see in the code is not that complex, which I should think could be integrated within the firmware easily

If you want Bosch’s IAQ values, use the Bosch supplied libraries server side by taking the raw values and calling the bsec_do_steps function on a Raspberry Pi or similar.

I personally just use the various sensors values to track changes, for instance if the gas resistance changes dramatically, I raise an alarm, as that means something significant has changed. I do this because if you want to get all scientific, you need to do things like warm the heater for 30 minutes each time you take a measurement and, the hardest bit, calibrate it and you need to re-calibrate if the gas sensor is exposed to a high level of VOC’s.

The RAK7204 is very useful to act as a canary in a coal mine as a LoRa node but if you want to exercise the BME680 to the maximum, you’ll need a much bigger battery.

Unfortunately, you can’t.

The Bosch supplied libraries do not merely analyze data, but actually command the detailed operation of the sensor.

So at least formally, the library must be in two way communication with the embedded device physically hosting the sensor. Timely two way communication. They do support such communication over more traditional channels, but it’s not really compatible with LoRaWAN.

  • They won’t tell you when the operations the library requests against the chip will change, so you can’t do it yourself, cache in advance, etc.

  • The won’t tell you what happens if the communication is missed or ends up not timely.

In essence, Bosch won’t tell you how to actually use their sensor. They’ll only suggest that you bidirectionally connect it to their highly secret magic.

Opps, yes, looking harder I can see that the function call takes functions as parameters for IO. Looks like I may get a good drubbing on at least one project - at worst I can see if I can put an emulation / playback layer in, or see if I can upgrade the MCU …

Hey folks, did any of you get to a point where you were able to convert the resistance into something useful?

I’m using the 7205 as a “standard” GPS tracker, but adding the IAQ/VOC levels would be an added bonus

Whilst I’m currently looking at using the Bosch library with a RAK4260, I came to the conclusion that the linked library above provides a reasonable approximation of Bosch’s output.

In an attempt to save my bacon on a project where I thought I could replay the values in to the library, I haven’t finished the detail on how much the Bosch library actually relies on real-time commanding for infrequent sampling.

Thanks, I’ll take a look at the Arduino library and see what I can get from it

I don’t understand why (and unfortunately I fell for it) RAK sells the 7205 in an IP67 box but all the sensors are inside, closed.
What is the point of reading temperature / humidity / AQI data with something that is welded on the board in a waterproof microenvironment?
Did anyone try to “expose” the BME680 outside? Holes / ventilation grids?

1 Like

The device is described as

The aforementioned makes the board suitable for rapid application development

I for one don’t need air quality coupled to a GPS, but it provides a nice playground to experiment / demo. Sometimes I use it in the box, sometimes it’s out the box, sometimes I put a shim in the lid to leave it open a crack.

I’m not sure how you could ‘fall for it’ - the info is all upfront - what do you actually want to use it for, in the context of development - as I generally find no one ends up implementing a solar powered GPS air quality module …

@velev @nmcc
Hi all,
I have also a RAK7204, and has the same problem. I do not know what exactly the values of “gasResistance” should mean to me, or how I can convert this value to IAQ or another index which has clear statements about what value stands for good, medium or bad air.
I read this topic’s posts, but I could not know what I can do for that.

I need to visualize “gasResistance” data or a calculated index from that, which I can determine high, good and low air quality status for that.
Thank you in advance if someone advise me in this regard.

Hello @James , welcome to the forum.

The algorithm to calculate the gas resistance of the BME680 into IAQ is a closed source library from Bosch called BSEC

Maybe this discussion helps to calculate IAQ without the Bosch library: Home-Assistant BME680.
And here is some (Arduino) code BME680-Example

The sensor is usually a metal-oxide layer with a heater (to clean it), often as a nano-particle layer to keep the marketing people happy.

You run the heater, read stuff and after some interesting calculations can come up with a resistance.

If it went up, there will be oxidising gases present interacting with the layer - ozone or nitrogen dioxide for instance. If it goes down, then there will be reducing gases around - carbon monoxide or VOC’s - volatile organic compounds - methane, ethanol, etc. If it stays the same then the air is either clean or all hell has broken loose in the measurement area but you can’t tell which. :frowning_face:

IAQ is partly marketing :cow2: output but is a good relative measurement driven by the closed source library made up by secret scientists in a bunker buried deep under the Antarctic. It requires a device that is always on as the library will perform a sensor reading when it (or the aliens remote controlling it from the dark side of the moon) deems necessary.

For the rest of us, you setup a test rig, drink lots of vodka and eat lots of sprouts and wait to see what happens to the resistance (expecting it to go down). But seriously, it’s like a canary in a coal mine for detecting gases - if you see a big change in reading (Tweety-Pie is lying on the bottom of the cage) then there is something nasty in the air.