-
Notifications
You must be signed in to change notification settings - Fork 47
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
Error code #17
Comments
As you can see in the .h file So, we have to split the hex value (899 or rather 0899) and the string (--vhXmrwF--AD-iE) What does this mean? Most part of STATUS is ok (see datasheet page 18 on ams.com/ccs811): The F tells that the firmware is in application mode (not bootmode) , the A means that the application image is valid (flashed correctly), D means there is new measurement data. But you also have an E - for Error. This should not happen. When you have an E/error, the ERROR register gives details. You have X (datasheet page 24) meaning "The sensor resistance measurement has reached or exceeded the maximum range". I'm not sure what does means, maybe your sensor is broken. Is your supply voltage correct? |
Supply voltage is correct. It is possible that my chip is bad. I ordered another for testing.
Also, I am testing the strong possibility of WiFi interference between the ESP32 and the sensor. I have placed a small tantalum cap on the power supply and shielded the backside of the board. I have reduced Tx power on the ESP32 to 50%. No errors so far. I started down this path when I discovered that the errors we are discussing disappeared when I removed WiFi.begin() from the sketch. I don’t know that anyone else with CCS811 issues has tried this.
Another possibility is that more power is available to the CCS811 when WIFI is off.
|
I am also seeing this issue with an AMS sensor (the one that comes with the USB evaluation kit). I have tried it with:
I have got readings of eCO2 = 400ppm and eTVOC = 0ppb, but that is only if I use your library and ignore the errors that are received when getting ALG_RESULT_DATA, and the values never move from 400,0. I get the 899 error as mentioned by @bill-orange, but the difference is I don't ever see any good readings. When I use the CCS811 with the USB evaluation kit in Windows the sensor operates normally. Thanks @maarten-pennings for your development of this library, it's the best one I've found which aligns with the programming and interfacing guide and reports the meanings of the errors back from the sensor! 👍 Going to attempt running with pull-up resistors on SDA, SCL later. |
@mjsqu Please try running the sensor in your application but with WiFi turned off. Let’s see what happens. Comment out WIFi.begin(); in my case, pull-ups did not matter. |
No change unfortunately, I never had WiFi.begin(); in my code. But I added WiFi.mode(WIFI_OFF); just to make sure and it still fails. Will be checking with another sensor once it arrives in the post. |
For test purposes you might try the SparkFun library while you are waiting.
…Sent from my iPhone
On May 27, 2019, at 12:32 PM, mjsqu ***@***.***> wrote:
No change unfortunately, I never had WiFi.begin(); in my code. But I added WiFi.mode(WIFI_OFF); just to make sure and it still fails. Will be checking with another sensor once it arrives in the post.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yep, I've tried that one and the Adafruit one! |
Hi, I am a newbie about ccs811
|
Hmm - max resistance could be a symptom of heater fault. |
I have same only error CCS811_ERRSTAT_MAX_RESISTANCE. I have two CCS811. Using the same code, one of them returns always (400,0). Even RAW data resistance value is 1023( 10 bit max value ). Did anyone solved this issue? Bill's solution didn't work for me. Only way I am getting different value is blowing air to device. It decreases baseline value. And I can read some meaningful value with really bad resolution. But error is still there. Note: Reading LSB first, makes baseline linear in my case. |
I have nearly same issue, I set up the circuit for arduino nano as indicated. In addition i am using logic level converter TXS0108E. When i started the arduino program, in serial terminal i see these. setup: Starting CCS811 basic demo if errstat is 0 why my is my code running. If I didn't get it wrong, it shouldn't be an error. I didn't edit the library or cs811basic code. |
How is you CC811 getting power? Perhaps it is not getting enough current when it is trying to read. |
Hi @pilakito, The level shifter makes sense. I assume you run the basic example, the output looks good. You get bootloader and application version, so nano and ccs are working, and the i2c communication too. So everything good However, after the startup, things go wrong. The library should return CCS811_ERRSTAT_OK, which is the OR of the flags: CCS811_ERRSTAT_DATA_READY, CCS811_ERRSTAT_APP_VALID, and CCS811_ERRSTAT_FW_MODE .
So, somehow, after getting versions, communication goes wrong. Do you use the wakeup pin? |
Hello @maarten-pennings I connected it to pin 13 with level shifter. I didn't connect directly. @bill-orange It connected to my computer. |
If you did not modify the library or examples, the begin() method also checks the status (eg see line 169 in cpp file) and it is not 0. So, I'm puzzled |
I am going to download library and i will try it again. |
I think i changed something wrongly and this happened. Thanks for support. setup: Starting CCS811 basic demo |
I connected ESP8266 and CCS811 module. I did the connection correctly and I get the below error. Help needed to get the data. Error Please suggest help |
This is very funny. When you have a normal working sensor, it should have either of these two
If there is an error (last e becomes E as in your case), then one of (vhxmrw) should be high indicating which error. From the datasheet (note the last line):
|
Hello Maarten, I was using your library to read sensor data with Arduino Uno - it worked wonderfully, without any issues. The sensor address 0x5A is visible on ESP32 with i2c scanner. What do you think could be the issue here? |
Hi, this sounds a bit puzzling. If you connect the nWake pin to ground the ccs811 is always wake so that should simply work. Second observation: the F-flag is low in errstat, which seems to suggest the ccs811 is running the bootloader, not the gas app. I'm confused that the A-flag is up though. Full output of the basic example would be good. Thirdly, you say the ccs811 was first connected and working with an UNO. This scares me, the UNO is a 5V device, and the ccs811 is destroyed by that voltage. Did you take and precautions? Success |
Thanks for your reply. With Arduino UNO (I power the CCS811 from the 3V3 pin and connect to SCL and SDA of Arduino), with nWake to ground from the beginning, I receive this output below, which seems just right (reacts to breathing on the sensor and also to petrol fumes in the air)
Now I disconnected all other I2C devices (I had a couple of other sensors hooked up) from the ESP 32 and it started working! So I am guessing this might have been some kind of conflict with other slaves. I reconnected all the slaves again as before and now all three work well... BTW, with the comment about destruction by the voltage - did you mean that the logic levels of 5V instead of 3.3V or the supply voltage? Cheers |
Hi, good to hear everything is working. If you look at Figure 6 in the ccs811 datasheet (Electrical Characteristics) we see that Supply Voltage (VDD) min is 1.8 and max is 3.3 V; those are the limits for supply. So good you hooked the supply of the CCS811 to the 3v3 pin. However that same table tells us that Logic High Input (nRESET, nWAKE, ADDR, SCL and SDA) min is VDD-0.5 and max is VDD. So the logic levels of I2C should also not exceed 3v3, and I'm afraid the Uno has logic levels of 5v0. In practice, ICs have ESD protection in the form of diodes from every I/O pin to the internal VDD rail. This means that a voltage on such a pin which is higher than VDD actually propagates to the VDD rail. I once had an IC with such low power requirements (ENS210 from same company) that it worked by only hooking up SCL and SDA (I forgot VDD): the pull ups on the I2C lines and the internal diodes supplied the power. So, maybe not hook up ccs811 to uno without a level shifter... Cheers |
Thank you for your valuable "insider's" comments. It seems I was lucky, or the module had some kind of foolproof protection against such cases, but the sensor seems to be working fine now, at least reacting to high concentration of organics. By the way, I was just curious how the sensor handles the case when no baseline is provided explicitly in the code? Does it just save the baseline after power-on (or reset) and then it stays as it is? I am wondering now about the proper solution for airborne VOC measurements for an external air quality sensor... I thought I could read the baseline everyday, say at 3 am when there is no traffic or (less) chimney fumes and write it once per 24 hr into the chip. Cheers! |
Roughly, the baseline is the cleanest air seen since power on (but "reset" every 24hr). So, if you switch the sensor on in a dirty environment it will give a wrong reading. That's why the advice is to record the baseline (if the sensor is running long enough!) and reuse that when switching on the sensor later. |
Did you try to use without The ESP32 has a proper I2C hw block, so I believe the call is not needed here. The ESP8266 software implementation is fixed in the mean time (after my complaints :-) so also there it is no longer needed. Could you check for the ESP32? |
I now commented out all the lines containing |
You might want to try my https://github.com/maarten-pennings/I2Cbus |
Thank you, Maarten, I might implement this to automatically clear the bus when the sensor is unresponsive again! |
I am getting this error code randomly between good readings. If it starts generating errors they keep coming. I am clock stretching on an ESP32 with a generic Chinese CS811 (ver. 2 firmware)
errstat=899=--vhXmrwF--AD-iE
How do I translate this? I can probably track this down on my own if I know what's going on. Interestingly, the first reading after setup is always good.
The text was updated successfully, but these errors were encountered: