Code Monkey home page Code Monkey logo

arduino-gas-index-algorithm's People

Contributors

leoniefierz avatar martgras avatar mbjoern avatar psachs avatar qfisch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-gas-index-algorithm's Issues

[Q] Low Power example doesn't allow setting NOx sample interval

When extending the Low Power example to use the SGP41 sensor, for NOxGasIndexAlgorithm there is no constructor available to set the sample interval. Shouldn't that constructor be added in the header file? (I've added in my local copy, just to have it consistent with the VOCGasIndexAlgorithm).
Or are there reasons that no interval, other than the default, should be used?

How to get VOC signal in PPM

Dear All,

somebody know how to extract from the raw signal the ppb values? at least for the VOC.

Best Regards

[QUESTION] Using the sensor at lower duty cycles

Hi!

Thanks for the library for this SPG40 Sensor.
We would like to ask about the low power modes and the limitations about the Gas Index Algorithm.

In particular, in the datasheet, it's specified that the SRAW_VOC measurements need to be fed into the Gas Index Algorithm every second. However, the low power table in your README indicates 10s.

Questions are:

. Is it possible to set an arbitrary interval for this data? In other words, can the Gas Index Algorithm be fed with data every 60s, or more?
. If a hard reset happens on the MCU performing this algorithm, the current values are lost. How is this handled? In our particular application, a hard reset takes place ever 24h on the main MCU. Does it makes sense to use the sensor in this type of application (low cost sensor device for AQ monitoring).

Thank you in advance

Documentation 'Engineering_Guidelines_SEN5x' conflicting with implementation

In Sensirion_Engineering_Guidelines_SEN5x.pdf a "Gain factor" is discussed as follows:

(fresh-air and VOC events) at the same time. Note: this parameter may interfere with the gating behavior. The
gating threshold is fixed at VOC Index = 230 and thus, any event reaching this threshold will be treated
according to the setting of the “Gating Max Duration Minutes” or, in case the VOC Index output is always
below 230, the learning of offset and gain will always be active even during long VOC events.

My interpretation of this is that it describes the concepts of a gain and a gate, and that the gate with its fixed value of 230 would determine whether or not a VOC reading would influence the learning.

Q1: in the code there is a define for GasIndexAlgorithm_INDEX_GAIN of 230, which is the only occurrence of 230 that I found. Shouldn't this be something like GasIndexAlgorithm_INDEX_GATING_THRESHOLD given the discussion of Gain Factor and gating?

Q2: GasIndexAlgorithm_INDEX_GAIN is used as a default value for params->mIndex_Gain, which is then used as a multiplier in the process function. This would make sense were it actually a gain, however as the value of 230 appears to relate to the gating level, is this correct, or is there an unintentional gain of 230 being applied if using the default values?

Q3: Is 230 a sensible default value for the gain.

Q4: Is gating actually implemented, and if so, where/how? The value of 230 from GasIndexAlgorithm_INDEX_GAIN appears only to be only used as mentioned above, and not as a comparison test.

I may have multiple misunderstandings, in which case apologies for that, however on the face of it there do appear to be some implementation issues here.

Sample period in examples will be (slightly) longer than 1 second

While delay(1000) should block for around 1 second, the example doesn't take into account the use of delay() elsewhere. It would be more accurate to note the time of the last sample in loop(), and trigger a new sample when more than 1000ms have elapsed; while examples should be kept simple, this, along with a comment for why it is preferable to blindly using delay(), could be educational for the reader who is unfamiliar with that approach. The advice in the readme to change the default period in the algorithm from 1 second is also ill advised because this could be overwritten in an update, and the code could usefully mention the constructor variant that takes a sample period. Arguably better still, only have a constructor that takes a sample period, though this would now break existing code.

Minor typos in example

In a few places in the main example, debug output says "learing" rather than "learning".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.