Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Sampling interval #130

Closed
neja20 opened this issue Mar 18, 2021 · 11 comments
Closed

Sampling interval #130

neja20 opened this issue Mar 18, 2021 · 11 comments

Comments

@neja20
Copy link

neja20 commented Mar 18, 2021

Hi,

We would like to use the sensor in extremly low power environment. And we were wondering if it is possible to change the VocAlgorithm_SAMPLING_INTERVAL definition to something like 5 minutes and then call this algorithm in the specified interval or would it negatively impact the output values?

If not, is there any other way to run the sensor efficiently with 5min or longer intervals?

@MBjoern
Copy link
Contributor

MBjoern commented Mar 22, 2021

Hi neja20

SGP40/SVM40 in combination with VOC Index only supports continuous operating mode. For the VOC Algorithm to work it expects an updated value every second.

Best regards

@remyhx
Copy link

remyhx commented Nov 9, 2021

Hi,

We would like to use the sensor in extremly low power environment. And we were wondering if it is possible to change the VocAlgorithm_SAMPLING_INTERVAL definition to something like 5 minutes and then call this algorithm in the specified interval or would it negatively impact the output values?

If not, is there any other way to run the sensor efficiently with 5min or longer intervals?

It is possible. I use the SGP40 (next to BME688) per minute, in an ESP32 deep sleep environment (ULP update in between per minute, not per second) and a big run every 5 minutes for other sensors. I am still working on the ULP, but i measured the same index measuring per second or per minute (same devices, same room, interval only difference).

Key is to change the interval in the header file: VocAlgorithm_SAMPLING_INTERVAL (60.)

But there is a big but. In my experience it is critical to let the device learn for around two hours in a stable environment. Keep the VOC levels those two hours very stable, be cautious with opening doors and windows while in this period. After this period the results were very satisfying, of course keep in mind you loose some agility / quick responses. But the index dynamics and values are 95% similar.

I tried modifying SRAW_STD_INITIAL and TAU_INITIAL_MEAN, without success. It's a pity Sensirion is a little bit cloudy about the vocindex settings, but on the other hand.. they are more transparent than Bosch with their precompiled library.

@MBjoern
Copy link
Contributor

MBjoern commented Nov 10, 2021

Hi @remyhx and @neja20

Thank you for your input. It is indeed possible to change the sampling interval expected by the algorithm. But we as sensirion don't support the high efforts required to perform this task and get a reasonable and qualifiable index output.

But if anyone would like to take that challenge and adapt the algorithm to support different sampling intervals and take the effort to learn the difference in the resulting signal dynamics, feel free to do so. That's why we provide the algorithm open source, enabling others to take the standard as starting point and invest all their energy in innovating things.

It's very nice to see people invest their time using our sensors, so thank you for that.

We will be publishing an updated version of the Gas Index Algorithm within the next month, and will also provide documentation on the algorithm tuning parameters. It is also planned to provide a tool, to get people to experience the influence of the tuning parameters in a more intuitive way. So stay tuned. I'm excited what you'll think of that.

And thanks for the compliment ;)

@sromion
Copy link

sromion commented Apr 21, 2022

Any news about this functionality ? 😎

@psachs
Copy link
Member

psachs commented Apr 21, 2022

The gas index algorithm is publicly available in those two repository:

C and Python:
https://github.com/Sensirion/gas-index-algorithm

Arduino:
https://github.com/Sensirion/arduino-gas-index-algorithm

Please check the header files for the documentation of the algorithm parameters, e.g.
https://github.com/Sensirion/gas-index-algorithm/blob/master/sensirion_gas_index_algorithm/sensirion_gas_index_algorithm.h

@dingoxx
Copy link

dingoxx commented May 18, 2022

MBjoern commented on Nov 10, 2021 :-
We will be publishing an updated version of the Gas Index Algorithm within the next month, and will also provide documentation on the algorithm tuning parameters. It is also planned to provide a tool, to get people to experience the influence of the tuning parameters in a more intuitive way

Any update on this functionality ?

Thank You
Paul

@remyhx
Copy link

remyhx commented May 18, 2022 via email

@psachs
Copy link
Member

psachs commented May 18, 2022

We updated the algorithms to allow changing of sampling interval through an API. The sampling interval has to be set on initialization.

Check the low power duty cycle example for e.g. raspberry pi on how to use the interface

https://github.com/Sensirion/gas-index-algorithm/blob/81a7819fc56ce8e0dcf7e998ab05941e42b2758b/examples/raspberry-pi/low_power_example.c#L59

@dingoxx
Copy link

dingoxx commented May 18, 2022

Hi Psachs

Thank you fo your update
Any dates on the promised documentation on the algorithm tuning parameters and the tool that was mentioned earlier ?

We have a planed shipment of 14K Q1 2023 and need to have as much info as possible

KR
Paul

@psachs
Copy link
Member

psachs commented May 18, 2022

Hi @dingoxx

For a description of the tuning parameters have a look at the header file or the technical documentation of the SVM4x.
This is our reference module with a SGP40/SG41 and SHT40 and uses the same algorithm as published here.

Visit the product page for more information:
https://sensirion.com/products/catalog/SEK-SVM4x/

or use this direct download link
https://sensirion.com/media/documents/FBD0A26B/61EA8BFA/Sensirion_Gas_Sensors_SEK-SVM4x_Technical_Description.pdf

If you are interested in the reference design, you can find all information on Github:
https://github.com/Sensirion/svm40-hardware
https://github.com/Sensirion/svm41-hardware

The tool you are looking for is most probably our sensor evaluation software called ControlCenter
https://sensirion.com/products/sensor-evaluation/control-center/

This will also install our DataViewer tool, that allows you to plot data recorded with ControlCenter and apply algorithm parameters.
However this only works if you use our evaluation kit, so I am not sure if this solution fits your need.

Please let me know if you need any help or if you have more information on what kind of tool you are looking for.

Best regards,
Pascal

@giorgi877
Copy link

Hi,

As a matter of a fact SGP40 consumption is 34-105 uA in the idle, thats not reasonable current in sleep for most ULP applications.. what if i cut power instead of heater off?

Thanks in advance

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants