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

No fluctuation of VOC index #127

Closed
cagna-adrien opened this issue Jan 25, 2021 · 4 comments
Closed

No fluctuation of VOC index #127

cagna-adrien opened this issue Jan 25, 2021 · 4 comments

Comments

@cagna-adrien
Copy link

I am testing the VOC algorithm combine with SGP40 sensor and SHT3x for temperature and humidity.

Communication with the SGP40 works fine I get the raw value periodically (with temperature and humidity compensation).
The returned value are within 63800 and 64500 range.

When I give the raw value to the VOC algorithm, the VOC index gently ramps up at start up from 0 to 100 but remains at 100 for all the tests (even after two hours with the SGP40 raw value fluctuating).

Any idea?

@abrauchli
Copy link
Contributor

abrauchli commented Jan 25, 2021

Hi @cagna-adrien thanks for checking in. There's something off here, the raw values should be roughly in the 20-40k range in a "normal" environment. They should be low at the beginning and creep up during the first minute of the measurement. If those values are off, the VOC Index will naturally also be wrong. Let's work on fixing the raw measurement first. Are you using this driver (embedded-sgp for sgp40) and what's your measurement command sequence? Could it be that your SGP is damaged in any way or has been exposed to high voltages or currents?

@cagna-adrien
Copy link
Author

Hi @abrauchli, i had no clue what the range would be for the SGP40 raw signal in normal conditions (that's a good starting point to troubleshoot).

I dont't use the driver (embedded-sgp spg40), but a reimplementation of this driver using our specific I2C drivers but it roughly keeps the same function (probe, measure_raw, read_raw heater_off and test).

The test command returns 0xD400 which indicates everything is OK on the sensor (according to the datasheet).
I have done some test with temperature/humidity compensation with the temperature and humidity returned by SHT3x.
I have now set the temperature and humidity to the default value given in datasheet which had no effect on the raw signal returned (apart the raw signal is now always at the same value).
Here are some log of the I2C communication with the sensor :

PROBE
probing

SELF TEST COMMAND
self_test_cmd

READ SELF TEST RESULT
self_test_read

MEASURE RAW COMMAND
measure_raw_cmd

READ RAW SIGNAL
read_raw

Our test board is intended to be power supplied by a 3.6 V (which, I agree, is on the upper limit what the sensor is capable of in term of supply voltage). I don't thinks it is enough to damaged the sensor in some way.

PS: I just tested my code on an other board and i have the same behaviour.

Thanks in advance

@cagna-adrien
Copy link
Author

cagna-adrien commented Jan 29, 2021

To close the issue,

I finally get the value in the right range (20-40k). The problem was that i turned off the heater after each measurement which cause the sensor to enter idle mode (It seems that sending a raw measurement command while sensor is in IDLE mode returns an unusable sraw value. What i have implemented to solve the problem is to send a command first to quit IDLE mode and then sends the measurement command.

As a consequence, i have the following question : is there a minimum time to wait after heater is turned on to proceed to a measurement (and ensure to get a stabilized value of sraw signal)??

Our application is low power oriented and I would prefer not having the heater turned on all the time (as it is implemented in your SGP40 driver)..

@abrauchli
Copy link
Contributor

Hi @cagna-adrien thanks for the reply. I understand the requirements for low-power measurements, however the mox material needs to be periodically or permanently heated according to the preset profiles, manually turning off the heater will very likely cause out-of-spec measurements. As to how far off-spec those measurements will be depends on too many factors for a software engineer to answer.. you're welcome to experiment as to which times result in acceptable performance, but we obviously cannot provide additional support for that. I'll thus be closing the issue here.

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

2 participants