Comments (23)
Hi Maarten how are you ?
I flashed the CJMCU-911 it was fine, but now the sensor only works when i use your library.
When i try to upload your sketch ccs811basic to my heltec v2 i get the following error:
ccs811basic:12:15: error: 'D3' was not declared in this scope
CCS811 ccs811(D3); // nWAKE on D3
Could you give me some help ?
Thanks
from ccs811.
Hi, D3 is the name of a constant. This name is apparently not defined for you. It should be defined, because it identifies a pin of the esp8266. My guess is that you are using the Arduino environment, but that you selected the wrong board. Go to Tools, then Board, then select your board (wemos d1?). Then it should compile.
from ccs811.
Hi man, thanks for your reply.
You're right I am using the Arduino environment.
I used my Wemos D1 to flash the sensor, but now I am trying to use it on my other board that is a Heltec WiFi LoRa 32 (V2), I have selected the right board under Arduino IDE but the error persists ( I hooked up the wires following as the wire-ccs811only.jpg ).
Do the device address change when we flash it ? I found out that i can use Sparkfun library again but only when i change the address from 0x5B to 0x5A. The Adafruit library used to work but it's not working anymore even when i change the device address in it. It starts showing: ERROR.
Thanks man
from ccs811.
So, you switched hardware to WiFi LoRa 32 (V2).
And you say you configured the arduino (Tools>Boards) to use this board.
Perfect.
However, the WiFi LoRa 32 (V2) is an ESP32 based board.
And the ESP does not have a D3 pin.
So, where the ESP8266 board has a definition for D3, the ESP32 board does not have it.
So you get a compiler error (ccs811basic:12:15: error: "D3" was not declared in this scope
).
There are two solutions.
- The lazy one, use
CCS811 ccs811(-1); // always wake
The driver will never put the CCS811 to sleep, so it does not need a wire to the wake-up pin.
But you do need to connect nWAKE of the CCS811 to GND to keep it awoken. - The energy saving one.
Pick a GPIO pin on the ESP to use for wakeup, say GPIO23.
Put a wire from the ESP G23 to nWAKE of CCS811, and replace the C source line with
CCS811 ccs811(23); // nWAKE on GPIO23
from ccs811.
By the way, I'm not aware that the firmware update changes the default I2C address.
Did you maybe treat the CCS811 ADDR pin differently on the two boards?
from ccs811.
Hi man, both solutions worked like a charm, I was able to upload the sketch to the heltec board.
The serial monitor starts with:
setup: Starting CCS811 basic demo
setup: ccs811 lib version: 10
setup: hardware version: 12
setup: bootloader version: 1000
setup: application version: 2000
CCS811: waiting for (new) data
CCS811: waiting for (new) data
CCS811: waiting for (new) data
CCS811: waiting for (new) data
CCS811: eco2=400 ppm etvoc=0 ppb
CCS811: errstat=899=--vhXmrwF--AD-iE
CCS811: errstat=899=--vhXmrwF--AD-iE
CCS811: errstat=899=--vhXmrwF--AD-iE
I only can get readings when the CO2 is above 400ppm under that I get errstat
Thanks for your time helping me
from ccs811.
Hmm. Does not look good.
The E at the end tells there is an error. The first 8 chars then detail which error. In your case that is X which means CCS811_ERRSTAT_MAX_RESISTANCE.
Looking at the datasheet it says "The sensor resistance measurement has reached or exceeded the maximum
range". I guess this means your sensor gives a value that is our of spec, which might indicate a broken sensor...
from ccs811.
OK, I'll buy another one.
Thanks for you help man !
from ccs811.
Hi M.
flashed my CCS-811 on my CJMCU-8128 with Arduino ESP32 without problems.
thx
Stefan
from ccs811.
Thaks Stefan, I have added you to the success table!
from ccs811.
I came here because i have the exact same issue as msbjx, using other libraries (I tried at least 4 others) my sensor gives readouts of 3 times 0, then stuck on 400 continuously. It used to work the first time i attached it, now not at all.
I did breathe out directly onto the sensor to check it's upper limits when it did work and exceeded co2 of 7800 something, maybe this damaged my sensor?
Anyway, here's my serial output
setup: Starting CCS811 basic demo
setup: ccs811 lib version: 10
setup: hardware version: 12
setup: bootloader version: 1000
setup: application version: 2000
CCS811: waiting for (new) data
CCS811: errstat=1091=--vHxmrwF--Ad-iE
CCS811: errstat=1091=--vHxmrwF--Ad-iE
CCS811: errstat=1891=--vHXmrwF--Ad-iE
CCS811: errstat=1899=--vHXmrwF--AD-iE
CCS811: errstat=1899=--vHXmrwF--AD-iE
I did my reflashing using an M5StickC (orange esp32 based dev board) and it seems to have worked fine, as the application version is now 2000, maybe interesting for your success list! However this doesn't solve a broken sensor, if this is the case of course.
And a final note, the address of 0x5A is the default address for some boards(purple cjmcu-811), the other user wrote that them using adafruit library required changing i2C to the one their sensor used, not your library changing it.
from ccs811.
Hi, the uppercase H indicates a heater error. So indeed maybe your sensor is broken.
I do not believe that breathing on it can break it. Maybe temporary strange readouts, but not permanent damage.
Also note that internally, the chip is a physical transducer (heater plus mox layer) plus a microcontroller. So upgrading firmware will work als long as the micro is ok. In your case, the H indicates the heater in the transducer might be broken.
By the way, i did not understand your remark about the i2c address.
Good luck.
from ccs811.
Msbjx5's comment on 29th of June mentions his i2c address being on 0x5A. I wanted to confirm that reflashing does not change the address since I own the exact same chip as he does, which ships with an i2c address of 0x5A instead of 0x5B. Thus his statement regarding that to use the adafruit library he had to change the address in code is not something that's caused by an update.
Thanks for the reply! Now that you mention, another library did also tell me there was a heater error. When I receive my next chip I'll immediately reflash using this library and try to be more careful with it.
from ccs811.
The i2c address is determined by the internal micro. So indeed, in theory a firmware update could change the i2c address. However, I strongly believe this will never happen. The datasheet specifies that the chip can have two addresses, and you select which one with the ADDR pin. It would be very unwise to change that spec point.
Which of the two i2c addresses is used depends on the ADDR pin. That pin is tied to Vcc or GND by the board you purchase.
So in practice the board determines the i2c address.
from ccs811.
Hi, Bradshaw here in Buzzards Bay, Massachusetts.
is there a listing of the firmware 2000 so that I may read the error numbers, letters, etc
I tried reset, reloading the source (on esp8266 with and without pull-up.
It ran great until I gave the pair of CCS811 and wemos d1 esp8266 a day of idle.
---------------- Great work, just another little speed bump between here and perfection! tnx
18:38:45.797 -> setup: [email protected] STEM Fresh And Dirty Air Detective Agency
18:38:45.905 -> setup: Starting CCS811 basic demo
18:38:45.905 -> setup: ccs811 lib version: 10
18:38:46.001 -> in begin
18:38:46.001 -> wake_up
18:38:47.853 -> setup: hardware version: 12
18:38:47.886 -> setup: bootloader version: 1000
18:38:47.985 -> setup: application version: 2000
18:38:51.834 -> CCS811: waiting for (new) data
18:39:01.856 -> CCS811: waiting for (new) data
18:39:11.842 -> CCS811: waiting for (new) data
18:39:21.857 -> CCS811: errstat=891=--vhXmrwF--Ad-iE
18:39:31.848 -> CCS811: errstat=899=--vhXmrwF--AD-iE
and I got an 891 AND 899 differing in the upper and lower case d.
an error or firmware list would be an amazing addition. thank you
from ccs811.
Hi, as it happens, I have appended a section "Error flags overview" to the home page https://github.com/maarten-pennings/CCS811.
The bad news is that you have E flagged, which means error. Then the upper flags tell you which. You have X: "CCS811_ERRSTAT_MAX_RESISTANCE The sensor resistance measurement has reached or exceeded the maximum range". That is a hardware fault...
from ccs811.
out of interest, being a tinkerer, I have the sensors on breadboards in a plastic shoebox, I placed a 4 oz glass and half filled it with seltzer water. it appears both sensors work if there is >400 (greater than something??) CO2 level in there.
so this is lesss broken than it looks. if the firmware is available. I would be happy to look and maybe make a nice change, I have multiple decades of fun firmware working on my many bugs. It would be neat to see the implementation. I would happily NDA with anyone. I want to base a product for STEM students 8th graders in the US. So that's what's "in it for me"
THanks Bradshaw
I have been working in iOt (last 8 years) and gas chromatography since college. SO I am very interested in doing a lab grade calibrations that a student could do with baking soda, measured, and vinegar measured, in a standard hardware store $2 5 gallon (20L) closed bucket.
So it is NOT failed, it is just sick. maybe a virus of some kind in the firmware (ha ha)
from ccs811.
iw there a way to "return to factory defaults' maybe reset the baseline?
I have another. couple of sensors, I will read the base registers and see it I can trick the ones I have back into normal operation.
from ccs811.
I let it run about another day of errors then did the seltzer water test, and it pops right into operation. this "feels" like a calibration problem to me.
I have been building calibration routines for VOC's and specific identifiable organics and inorganic for quite a while. (the seltzer water is cranberry lime polar seltzer water, with a nice flavor/smell which accounts for the tvoc. I have a local chrootagraphy lab where I worked recently, so I can calibrate the TVOC with isobutylene and make a correction curve as well.
this would be neat to add to the SW, or the firmware.
Bradshaw
from ccs811.
If you subject the sensor to a single gas, it is "easy" to calibrate. In real life, the "air" is always a mixture, unknow of what types of gasses, unknown in what ratios, and each of them with a different excitation curve (which might depend on eg temperature). On top of them, some gasses, like CO2 (!), do not even excite the sensor.
from ccs811.
is there a way to "return to factory defaults' maybe reset the baseline?
There is no "go to factory defaults", since there is no persistent storage.
The baseline is in RAM, so each time you power cycle, the chip is in "factory defaults".
That is, by the way, why there is a get/set baseline (relying on the persistent storage of the host).
The above is a bit of a lie: there is persistent storage in the CCS811.
It records the operation hours during burn-in. To the best of my knowledge this can not be "factory reset".
Which makes sense, because once the MoX layer is "baked" it is "baked".
from ccs811.
thanks for the persistence of only the burnin time (hence the 2001 firmware.
do these hardware errors strongly suggest that I RMA return merchandise authorization swap them out with Adafruit?
They only have a few days use on them. I wanted them to run for a couple of years.
from ccs811.
Interesting question. Maybe you can ask adafruit...
from ccs811.
Related Issues (20)
- Esp32 Deepsleep confusion HOT 1
- Problem with CCS811 version HOT 1
- CCS811 firmware demoted to version 1.1.0 HOT 3
- Seek help from CCS811
- begin() required before flash() ? HOT 2
- Self over-heating
- Having a simple questions about the CCS811 function when it comes to modes HOT 5
- [Question] Modes, Burn-In - Several Questions HOT 3
- ESP32 ERRO I2C HOT 2
- IC2 Error with nodemcu HOT 2
- LilyGo T5 V2.3 and cjmcu-8128. Unable to flash ccs811 HOT 3
- Sensor faulty or soldering issue? HOT 2
- Issues in CCS811 sensor reading HOT 2
- version checking functions have wrong comment, I think HOT 2
- Readings drift higher over time. HOT 3
- CCS811 Baseline Issues HOT 8
- My CCS811 from CJMCU does not works after flashing comleted. HOT 2
- Can it really be used for co2 monitoring? HOT 2
- C811 baseline HOT 2
- Firmware version not detected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ccs811.