RobTillaart / AGS02MA

Arduino library for AGS02MA TVOC sensor
MIT License
14 stars 3 forks source link

After calibration, incorrect data #13

Closed shojkeee closed 2 years ago

shojkeee commented 2 years ago

After applying the kolibrovochny sketch. My sensor started showing values in ppm like this: 12002000020

shojkeee commented 2 years ago

image

shojkeee commented 2 years ago

image

RobTillaart commented 2 years ago

Assuming kolibrovochny = calibration ? you used - AGS02MA_calibrate.ino ?

Has been some time ago I used the sensor but I recall no problems with it when calibrating (I use Arduino UNO) Can you post the output of the calibration sketch?

The manual does not give information about failing calibration, only this:

image

What does uint8_t lastStatus() return?
it might be a communication error?

shojkeee commented 2 years ago

Assuming kolibrovochny = calibration ? you used - AGS02MA_calibrate.ino ?

Has been some time ago I used the sensor but I recall no problems with it when calibrating (I use Arduino UNO) Can you post the output of the calibration sketch?

The manual does not give information about failing calibration, only this:

image

What does uint8_t lastStatus() return? it might be a communication error?

No. There are no communication errors. When there is no connection, I have 0 ppb sent. Let's do the collibration again now. It will take 6 minutes and I will attach the output of the port monitor to you.

shojkeee commented 2 years ago

image

RobTillaart commented 2 years ago

Looks OK, every 15 seconds a timestamp the 1 indicates that the 5 bytes for zero calibration are written to the device. (no I2C error).

shojkeee commented 2 years ago

Looks OK, every 15 seconds a timestamp the 1 indicates that the 5 bytes for zero calibration are written to the device. (no I2C error).

Only. When I had the sensor on the window. He fell. But I can't believe that after that it began to show exorbitant values.

shojkeee commented 2 years ago

That's also why I'm thinking of collibration. Before the calibration, the sensor transmitted data to the home assistant for a day. And I compared the data with sgp30. And they differed of course. But both reacted to the tvoc change.

image

RobTillaart commented 2 years ago

Only. When I had the sensor on the window. He fell. But I can't believe that after that it began to show exorbitant values.

It might be possible but unlikely in my opinion. If you shake it gently do you

RobTillaart commented 2 years ago

That's also why I'm thinking of collibration. Before the calibration, the sensor transmitted data to the home assistant for a day. And I compared the data with sgp30. And they differed of course. But both reacted to the tvoc change.

image

Factor 10 difference is quite large. Is that difference constant?

Do you power the sensor with 3V3 or with 5V? (5V is more stable as 3V3 is the minimum for the sensor

shojkeee commented 2 years ago

No.  No damage.  I disassembled the case.  But I thought that the dust could get into a small hole.  Washed it in alcohol and left to dry. I'll check it out in 6 hours and report back.  Also, if possible, check your calibrate.19.04.2022, 12:58, "Rob Tillaart" @.***>:

Only. When I had the sensor on the window. He fell. But I can't believe that after that it began to show exorbitant values.

It might be possible but unlikely in my opinion. If you shake it gently do you

hear loose parts on the inside see (big) changes in the readings (any yes would indicate hardware problems, a no is no proof of absence of damage.)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

shojkeee commented 2 years ago

That's also why I'm thinking of collibration. Before the calibration, the sensor transmitted data to the home assistant for a day. And I compared the data with sgp30. And they differed of course. But both reacted to the tvoc change. image

Factor 10 difference is quite large. Is that difference constant?

Do you power the sensor with 3V3 or with 5V? (5V is more stable as 3V3 is the minimum for the sensor

I washed the sensor, dried it. It didn't give any results. I used esp32. I decided to try it on arduino Uno. I recolibrated, other values began to be shown. They are also not faithful

image

RobTillaart commented 2 years ago

The calibration command in the library is exact according to the datasheet. It could have triggered some other bug in the sensor.

just a thought: Can you check if the UNO gives other values than the ESP? if so it might point toward problems with power supply.

shojkeee commented 2 years ago

The calibration command in the library is exact according to the datasheet. It could have triggered some other bug in the sensor.

just a thought: Can you check if the UNO gives other values than the ESP? if so it might point toward problems with power supply.

Yes. The values are different. ESP32 has:99999 And uno has: 34343 image

image

RobTillaart commented 2 years ago

Q: did you read the other issue - https://github.com/RobTillaart/AGS02MA/issues/11
It is closed, but it shows that there are at least two versions of the sensor V17 and V18.

Can you check which version you have (I have only V17).

shojkeee commented 2 years ago

yes. The version is really 118((((. And what should I do now?

image

RobTillaart commented 2 years ago

The calibration command in the library is exact according to the datasheet. It could have triggered some other bug in the sensor. just a thought: Can you check if the UNO gives other values than the ESP? if so it might point toward problems with power supply.

Yes. The values are different. ESP32 has:99999 And uno has: 34343

So there are two important observations:

  1. The sensor gives different data depending on the board that is requesting data. (could be power issue)
  2. The values reported are too constant, I would expect small but detectable noise (+-1) on the signal.
shojkeee commented 2 years ago

The calibration command in the library is exact according to the datasheet. It could have triggered some other bug in the sensor. just a thought: Can you check if the UNO gives other values than the ESP? if so it might point toward problems with power supply.

Yes. The values are different. ESP32 has:99999 And uno has: 34343

So there are two important observations:

  1. The sensor gives different data depending on the board that is requesting data. (could be power issue)
  2. The values reported are too constant, I would expect small but detectable noise (+-1) on the signal.

Could it be that due to the fact that the version of the sensor is different, the calibration has overwritten everything and now it is faulty? and do I need to program it somehow?

RobTillaart commented 2 years ago

yes. The version is really 118((((. And what should I do now?

My experience with version 18 is limited to what is mentioned in issue #11 Lets ask Beanow who also has a v 18.

@Beanow Question: did you run calibration on your sensor? if so, did you encounter problems like above?

RobTillaart commented 2 years ago

Could it be that due to the fact that the version of the sensor is different, the calibration has overwritten everything and now it is faulty? and do I need to program it somehow?

In theory that could be the case, however calibration is a process the sensor does internally. In this process the sensor makes a lot of measurements until these stabilizes (that is why it takes time to calibrate). The calibration command itself is typical a command that stores the found (stabile) values in internal EEPROM for later use. When the sensor is making new measurements it can refer to that zero point, to calculate the right value. The zero level is typical used as an offset for a raw measurement.

I have two slightly different datasheets of the sensor and both have the same command for the calibration. None is mentioning that there are differences between versions. In fact we tries to contact the manufacturer of the sensor (in issue #11 ) and got no new information about V 18.

You might check chapter 8 of the datasheet which mentions several pages of possible problems with the sensor. They are pretty sensitive to almost anything.

I do not know if there is a way to manually provide calibration data. There are registers in the sensor that are not documented and these might include calibration values (seems logical). No info on this.

shojkeee commented 2 years ago

Could it be that due to the fact that the version of the sensor is different, the calibration has overwritten everything and now it is faulty? and do I need to program it somehow?

In theory that could be the case, however calibration is a process the sensor does internally. In this process the sensor makes a lot of measurements until these stabilizes (that is why it takes time to calibrate). The calibration command itself is typical a command that stores the found (stabile) values in internal EEPROM for later use. When the sensor is making new measurements it can refer to that zero point, to calculate the right value. The zero level is typical used as an offset for a raw measurement.

I have two slightly different datasheets of the sensor and both have the same command for the calibration. None is mentioning that there are differences between versions. In fact we tries to contact the manufacturer of the sensor (in issue #11 ) and got no new information about V 18.

You might check chapter 8 of the datasheet which mentions several pages of possible problems with the sensor. They are pretty sensitive to almost anything.

I do not know if there is a way to manually provide calibration data. There are registers in the sensor that are not documented and these might include calibration values (seems logical). No info on this.

The sensor worked exactly out of the box. As soon as I started the calibration, the values became the same and constant and very high.Yes, he fell at me. But I disassembled it, there's nothing to break from the impact.

Beanow commented 2 years ago

After my previous experience with the device, and having no different sensor types or controlled environment to compare, I didn't touch the calibration function. But I can test it later.

Voltage

Some things I can say up front, I've had no noticeable issues running on the ESP32's 3.3v, or seen different values for 5v. I'm even sharing the 3.3v, ground and I2C wires with a BME sensor (board I have requires 3.3v, hence using that).

Too constant

Like @RobTillaart mentioned,

  1. The values reported are too constant, I would expect small but detectable noise (+-1) on the signal.

I agree, even for bad quality readings I normally see fluctuations all the time.

Here's what I got in the past 24h of 1s interval raw data from one. This is indoors and it roughly corresponds to outside air quality and ventilation, but don't have means to determine accuracy properly.

image

About alcohol

Washed it in alcohol and left to dry.

Keep in mind that the sensor responds to alcohol fumes. Since the datasheet suggests 5 minutes of "fresh air". However they define fresh (Cleanroom levels of controlled environment fresh? Outside urban air fresh?). I wouldn't try calibrating when the alcohol might still spike the readings.

Here's the chart when I hold the sensor directly above an open bottle of 99,9% isopropyl alcohol. Peak nearly 34k PPB. 10 minutes later still not back to the stable reading from before.

image

Warmup period

One reason I can think of why you might have had this 10x reading, is warmup period.

In my experience, when the sensor has been powered off for some time (a few days or more). It can take very very long for values to come down to normal. It can sometimes take multiple hours of leaving the sensor running before the reading stabilizes.

For something like calibration, I would suggest you leave the sensor powered on and polling values for something like 10h or more, and then calibrate. I think the datasheet's 5 minutes is extremely optimistic.

Because your values are so extreme, suspicious and constant (99,999 / 34,343). Maybe the internal readings it got were just bad due to warmup issues that the chip is running into some type of integer overflow problems.

shojkeee commented 2 years ago

@Beanow It's already late. The sensor now shows nonsense all the time and the maximum values ((( But I agree with you, the values I had all night were gradually getting lower and lower.

Yes. If it is not difficult, try to calibrate. But keep in mind! you can also break the sensor(

Beanow commented 2 years ago

But I agree with you, the values I had all night were gradually getting lower and lower.

That looks like the warmup period. When I first connected the sensor it would go from absurdly high like 30k, down fairly quick to <1000 PPB. But going down to something like ~15 PPB on a good (urban) air quality day, would take many hours. Basically in a logarithmic shape. The closer it got to realistic values, the longer it took to warm up.

But keep in mind! you can also break the sensor.

Yeah. I'm fine with that. To be honest I don't trust this sensor at all. The v18 version is basically undocumented because there's no new datasheet to match the new version, the ug/m3 functionality doesn't work. The status flags don't work. I couldn't get a response from the manufacturer. Their HTTP-only website lists the old datasheet...

It's another reason why I don't care too much about the calibration, I only trust it to produce relative values. For example "how much does the value change compared to itself an hour ago, if I open the windows".

shojkeee commented 2 years ago

@Beanow I wanted to compare it with sgp30. That's why I decided to calibrate it. Now I don't know what to do(((

Beanow commented 2 years ago

Well you said it's late there. For now, I would upload the PPB example sketch and let it warm up overnight and try again tomorrow :smile: If you're lucky the problem was only bad values from warmup and calibrating again later may give better results.

shojkeee commented 2 years ago

@Beanow OK. I'll put it on overnight. and then I'll try to calibrate.

RobTillaart commented 2 years ago

@Beanow Thanks for your comments, appreciated.

Beanow commented 2 years ago

For some idea of what I meant with the slow warmup. Here's me replacing a warmed up sensor, for a different one that I haven't powered on in over a month.

Before switching, the warmed up sensor read about 22-24 PPB.

'Cold' sensor started from >80k, dropping very quickly in the first hour of warmup. Going down to about 150 PPB. image

Second hour, from 150-ish to 95-ish PPB. Going down much slower, but 95 PPB is still nowhere near 22-24 PPB. image

Clearly 2 hours wasn't enough time to warm up this sensor after being powered down longer. I'll show the stable point when it gets there.

shojkeee commented 2 years ago

@Beanow It's a shame that I messed up my sensor ((((

RobTillaart commented 2 years ago

I will add a warning to the readme with a link to this thread. For now it is the only action I can do as there is no documentation and minimal experience with the v18 version.

shojkeee commented 2 years ago

@Beanow The sensor stood for another day. There is no difference. I also checked the voltage on the chip. I really don't know what it should be, but it is) so I think everything is fine there. According to this, if you had done the calibration. Then it would put an end to it and we would know for sure that it was him. Then I'll go order a new sensor((. Please check the calibration.

RobTillaart commented 2 years ago

I am going to add the following rewrite in the readme.md

Version 118 problems

The library can request the version with getSensorVersion(). My devices all report version 117 and this version is used to develop / test this library. There are devices reported with version 118 which behave differently.

ugM3 not supported

See - https://github.com/RobTillaart/AGS02MA/issues/11

The version 118 seems only to support the PPB and not the ugM3 mode. It is unclear if this is an incident, bug or a structural change in the firmware.

If you encounter similar problems with setting the mode (any version), please let me know. That will help indicating if this is a "structural change" or incident.

Calibrate problem?

See - https://github.com/RobTillaart/AGS02MA/issues/13

In this issue a problem is reported with a version 118 sensor. The problem exposed itself after running the calibration sketch (command) and after a fall. It cannot be determined if the calibration or the fall or something else caused the malfunction. As it is a single occurrence that cannot be reproduced (having no 118 sensor myself) Additional calibration runs did not fix the problem.

Advice: be aware of the risk of calibrating a version 118.

Any experiences with calibration (any version) are welcome to investigate the root cause here.

Please report your experiences.

If you have a AGS20MA device, version 117 or 118 or other, please let me know your experiences with the sensor and this (or other) library.

RobTillaart commented 2 years ago

Created a PR https://github.com/RobTillaart/AGS02MA/pull/14


update PR is ready for merge, I'll wait another day or two if new insights come up.

RobTillaart commented 2 years ago

Google gave no clues, one reference to another library here - https://forum.arduino.cc/t/ags02ma-air-quality-sensor/894906 Seems to have less functionality.

shojkeee commented 2 years ago

I tried it yesterday. It doesn't show anything with my sensor there at all. And there is no way to calibrate.

RobTillaart commented 2 years ago

I tried it yesterday. It doesn't show anything with my sensor there at all. And there is no way to calibrate.

Ok, so far the manufacturer's library. Could not locate an updated version of it either. I noticed that it reads multiple times when reading data. When time permits I try to understand the diffs.

RobTillaart commented 2 years ago

Just a side note: - https://www.sciencedirect.com/science/article/abs/pii/S0045790622002233 Apparently the sensor is used in serious applications too.

shojkeee commented 2 years ago

I ordered it on Aliexpress and somewhere there it was written that it is used in some equipment.

Beanow commented 2 years ago

Just a side note: - https://www.sciencedirect.com/science/article/abs/pii/S0045790622002233 Apparently the sensor is used in serious applications too.

Wouldn't call this a "serious application". The research paper is about: can we detect a thing with machine learning and TVOC data? And the researchers are associated with two collages in India. It's not uncommon for such research papers to have little budget for equipment, possibly paid for and built by students, and use hobby-grade prototype boards. Because the premise was: can we use AI this way? The sensor can be just be barely good enough to have trends show up in the data an AI can pick out.

I ordered it on Aliexpress and somewhere there it was written that it is used in some equipment.

With the Aliexpress retailer that I got them from, it had 2 reviews along the line of: "5/5 shipped fast, haven't tried it yet". I posted a negative review mentioning the v118 problems, and they relisted to product to censor the review. The blatantly abused the loopholes of the platform. Aaaanyway....

Warmup

I swapped the sensors at around 19:30 yesterday. And the first time the data had a realistic-looking upward trend, was spot on between 7:00 and 7:30. So I would say this warmup round took ~12hours.

image

The first steep drop is outside this chart, because it chances the Y-axis scale too much to see later data. Also yes, it's around 55-60 PPB here. But given "meh" air quality today and a closed window, this looks within expected range to me.

Calibration

According to this, if you had done the calibration. Then it would put an end to it and we would know for sure that it was him. Then I'll go order a new sensor

Like you said, if mine also goes nuts when trying to calibrate, I think we can call the v118 just generally bad. I'll test that next, making sure the sensor has warmed up before and giving the datasheet one more good read.

shojkeee commented 2 years ago

@Beanow I'm waiting very much for calibration)))

Beanow commented 2 years ago

So I made sure to do a clean setup. ESP-WROOM-32, 3.3v power for AGS. Running example sketch, but commented out warmup stage. https://github.com/RobTillaart/AGS02MA/blob/6a0fa376a1f9127beb287f41264f1955f2c927a9/examples/AGS02MA_PPB/AGS02MA_PPB.ino

image

Put the sensors I recently warmed up in those and monitor them both for comparison. Turned my ventilation up to the max for "fresh air". And waiting for them to both be warmed up enough. Still some big differences atm. The one with the screen is at 17-20 PPB atm. And the simple one at 58-60 PPB.

image

Just for good measure, I tried to compare 3.3v and 5v (both from the ESPs pins).

TL;DR seems to be about 5-6 PPB higher on 5v. ``` PPB: 58 0 0 3.3v PPB: 58 0 0 | PPB: 58 0 0 | PPB: 58 0 0 V PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 57 0 0 PPB: 58 0 0 PPB: 58 0 FFFFFFF4 [No power] PPB: 58 0 FFFFFFF4 [No power] PPB: 113 0 0 5v PPB: 107 0 0 | PPB: 102 0 0 | PPB: 65 0 0 V PPB: 65 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 63 0 0 PPB: 64 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 63 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 63 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 64 0 0 PPB: 65 0 0 PPB: 65 0 0 PPB: 65 0 0 PPB: 65 0 FFFFFFF4 [No power] PPB: 108 0 0 3.3v PPB: 102 0 0 | PPB: 63 0 0 | PPB: 63 0 0 V PPB: 62 0 0 PPB: 62 0 0 PPB: 62 0 0 PPB: 62 0 0 PPB: 62 0 0 PPB: 61 0 0 PPB: 61 0 0 PPB: 61 0 0 PPB: 60 0 0 PPB: 60 0 0 PPB: 60 0 0 PPB: 60 0 0 PPB: 60 0 0 PPB: 60 0 0 PPB: 59 0 0 PPB: 59 0 0 PPB: 59 0 0 PPB: 59 0 0 PPB: 59 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 58 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 PPB: 57 0 0 ```
Beanow commented 2 years ago

Ok, both sensors look warmed up to me. And the effect of max ventilation seems to also have stabilized too. There's a big difference though. The full setup has settled on ~11 PPB. And the simple setup ~53 PPB. I'll swap them, just to be sure it's not a problem with the code/setup.

Update: nope, it's definitely the sensor. Once swapped they settled again on ~11 PPB and ~57 PPB. So one sensor just consistently reads 42-46 PPB higher than the other.

Note, the ~11 PPB one I've used 24/7 for about a month. The ~57 PPB one, I only warmed up since yesterday after not being used for over a month. It could still be a warmup difference.

Beanow commented 2 years ago

Alright, so it's again settled on ~10 PPB and ~56 PPB. I've modified the calibration sketch a little bit, to show version, set mode explicitly and monitor values while waiting.

//
//    FILE: AGS02MA_calibrate.ino
//  AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: test application
//    DATE: 2021-08-12
//     URL: https://github.com/RobTillaart/AGS02MA
//

#include "AGS02MA.h"

uint32_t start, stop;

AGS02MA AGS(26);

void setup()
{
  Serial.begin(115200);
  Serial.println(__FILE__);

  Serial.print("AGS02MA_LIB_VERSION: ");
  Serial.println(AGS02MA_LIB_VERSION);
  Serial.println();

  Wire.begin();

  bool b = AGS.begin();
  Serial.print("BEGIN:\t");
  Serial.println(b);

  Serial.print("VERSION:\t");
  Serial.println(AGS.getSensorVersion());

  b = AGS.setPPBMode();
  uint8_t m = AGS.getMode();
  Serial.print("MODE:\t");
  Serial.print(b);
  Serial.print("\t");
  Serial.println(m);

  Serial.println("Place the device outside in open air for 6 minutes");
  Serial.println("Take a drink and relax ;)");
  Serial.println();

  start = millis();
  while(millis() - start < 360000UL)
  {
    delay(3000);
    Serial.print("[PRE ]\t");
    readOut();
  }

  // returns 1 if successful written
  b = AGS.zeroCalibration();
  Serial.print("CALIB:\t");
  Serial.println(b);

  Serial.println("Calibration done");
}

void loop()
{
  delay(3000);
  Serial.print("[POST]\t");
  readOut();
}

void readOut()
{
  uint32_t value = AGS.readPPB();
  Serial.print("PPB:\t");
  Serial.print(value);
  Serial.print("\t");
  Serial.print(AGS.lastStatus(), HEX);
  Serial.print("\t");
  Serial.print(AGS.lastError(), HEX);
  Serial.println();
}

Starting with:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1324
ho 0 tail 12 room 4
load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0
/home/beanow/Arduino/AGS02MA_calibrate_mod/AGS02MA_calibrate_mod.ino
AGS02MA_LIB_VERSION: 0.1.4

[    12][W][Wire.cpp:204] begin(): Bus already started in Master Mode.
BEGIN:  1
VERSION:    118
MODE:   1   0
Place the device outside in open air for 6 minutes
Take a drink and relax ;)

[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0

So now I grab a drink! :coffee: :+1: (As you can tell, I'm going to try zero calibrate the ~56 PPB one.)

Beanow commented 2 years ago

Aaaaaand RIP :headstone:

[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    56  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
[PRE ]  PPB:    55  0   0
CALIB:  1
Calibration done
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
Beanow commented 2 years ago

I tried to get the sensor to react at all, post calibration, by holding it close to the 99.9% IPA bottle again. But it did not change from the 99879 value at all.

I tried to power-cycle the chip, just by taking it out and putting back into the breadboard, and it's new favourite number became 99999. Again with no response to holding it next to alcohol.

[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   FFFFFFF4
[POST]  PPB:    99879   0   FFFFFFF4
[POST]  PPB:    99879   0   FFFFFFF4
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
[POST]  PPB:    99999   0   0
Beanow commented 2 years ago

@RobTillaart the datasheet mentions zero calibration data doesn't get persisted and is lost on power off. Does your v117 actually lose it's zero calibration when power-cycled?

image

shojkeee commented 2 years ago

I tried to get the sensor to react at all, post calibration, by holding it close to the 99.9% IPA bottle again. But it did not change from the 99879 value at all.

I tried to power-cycle the chip, just by taking it out and putting back into the breadboard, and it's new favourite number became 99999. Again with no response to holding it next to alcohol.

[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   0
[POST]    PPB:    99879   0   FFFFFFF4
[POST]    PPB:    99879   0   FFFFFFF4
[POST]    PPB:    99879   0   FFFFFFF4
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0
[POST]    PPB:    99999   0   0

I also noticed two values like you have 999999 and 99879. And when it shows 99879. I touch the sensor with my hand, start twirling it and it becomes 999999.

Beanow commented 2 years ago

999999 PPB is the maximum listed in the datasheet. I think the internal values just overflow and get limited to 999999.

image

Also, no matter what I do now (longer power-off, switch to 5v and back, move and touch it, wiggle the pins in the breadboard, etc.) I only see 999999 now. After the first power-cycle that 99879 is nowhere to be found.

Beanow commented 2 years ago

Ah, I managed to reproduce it. Starting the calibration sketch again. Not very useful though.

[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
[PRE ]  PPB:    99999   0   0
CALIB:  1
Calibration done
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0
[POST]  PPB:    99879   0   0