-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VOC calculation #3
Comments
That looks indeed promising. Did you change the BME680 driver or did you just called the gas value method? And what were the sample rates for the two BME680 series? |
I used your driver with sleepmode (see pull request). I let the sensors stabilize for a few minutes (measure every 0.5 seconds for one minute, then a couple of minutes every 10 seconds), after which I started the measurement. Every 10 seconds, I measure the temperature, relative humidity (and calculate the absolute humidity using a seperate function) and resistance, and display those 4 on a small OLED display. After a single measurement in Forced mode, I set the device to sleepmode using the new function. (And then after 10 seconds it performs one measurement in Forced mode etc...) Note that I optimized the curve fit for this specific run, so it may not be as accurate outside the house in 10C for example.. will see about that later :) |
The PR looks fine and is a useful addition. So you were sampling every 10 seconds for the better fit, and how often for the worse fit? |
Both fits were based on the same data, but the first is done using two logarithms working on the difference between current and previous values and some constants in order to find the best fit, while the second one is a straight forward calculation based on only current values. |
In the second attempt both sensor series went flat zero, even if started in the same range. The VMW200 may have needed more time to recover. Is there an underflow situation? |
That could be very much possible. My graph not going below zero was me limiting the minimum value to zero. So it might be that Extech in their calculations did just the same and it takes much longer for the sensor to recover than for the BME680 in my current calculation method! |
I just started looking at the VOC calculations again. I am now using the Pimoroni driver, which allows settings the heater target temperature and duration. And this sure is going to be a catastrophe: the measured resistance is HEAVILY influenced by both parameters (temp / duration). And there's a third independent variable at play: polling frequency. Measuring every 50 seconds vs every 60 seconds also noticably alters the measured values. Even worse: for all three parameters, there is no clear relation visible to my eyes (e.g. linear). It will already be hard to try and unify my 60 LoPy4 nodes' sensors... (yep same person as the Pycom forum ;)) |
This gas sensor thing is still on my list. I plan to set up first a method for
It is clear, that: |
Regarding a), the sensor does that automatically: it defaults to a heating temperature of 320C for a duration of 150ms. The temperature range can be set from 200-400 and duration from 1-4095 milliseconds manually (up to 10 profiles can be stored and selected in the sensor's memory). |
Hi Robert,
I would like to see VOC calculation added to the these drivers. I would like to use this issue to discuss calibration and calculation.
Yesterday, the Extech VFM200 arrived, so I gave it a shot this afternoon to try and see if I could find a way to calculate the VOC contents of the air using the BME680 resistance measurement.
See the figure below. Here, the blue line as indicated is as measured by the VFM200 sensor.
The orange line (method 1) is my best shot at using relative changes in values, which should be the way to get the VOC. This is because the resistance measurements are heavily influenced by polling frequency mostly. Note that this method requires knowledge of previous values which could be a problem on some microcontrollers using deepsleep. Problem here is that the starting point has been manually entered by myself because there are no previous values.
The green line (method 2) is a direct calculation of the VOC based on the current measured values which is much simpler but sketchy and as said not to be trusted.
Measurement method: 30 minutes total, polled every 10 seconds.
Minutes 0-14: inside room behind window
Minutes 14-22: open window
Minutes 22-30: in enclosure with active (and somewhat ventilated) 3D-printer
Please let me know your thoughts and I will try to follow this up with additional measurements with other polling frequencies or other environments for longer duration. Will need a better way to get the values without manually working my way through each frame of a timelapse.
EDIT Another note: both sensors are completely passive, no active ventilation.
The text was updated successfully, but these errors were encountered: