-
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
CCS811 & Deep Sleep #45
Comments
Hi, if the sensor is set to 1s or 60s interval time and not being switched off during ESP deep sleep I do not see why the overall sensor behavior should be different from a sensor which is read more frequently. The other sensor has the same history and is well run-in? CCS811 has a faster baseline correction during the very first days of operation which might cause some delta between the two sensor outputs. It is important not to power off CCS811 or switching to sensor sleep mode without using the baseline save and restore features. MOX sensors are power hungry but long power-off times will result in reduced sensor performance. |
The sensor on the left is running at 15min deep sleep interval with the 60sec mode and the one on the right is running 15min deep sleep interval with 1sec mode. The right sensor seems to be about right and but the left is all over the place. As far as I know, the baseline is updating automatically but maybe I should try saving and setting it before and after deep sleep? Alternatively, I'm going to try waking up the device more frequently to just read the sensor and see if that helps? |
Hi Lloyd, That is a nice looking board you have there! I guess ESP with e-ink? Did you make it yourself or is this a standard product. Just to check, the left and right board both have a CCS811, both have the same firmware version (which one?), both have about the same purchase date and the same operation time. And both have been powered on at the same time and have been side-by-side during continuously since they were powered on. And you did not do any baseline restore. The difference is that the left runs the CCS811 in 60s mode and the right runs the CCS811 in 1s mode. In both boards, the CCS811 is always powered and running, it is only the ESP that sleeps 15 min. |
The ESP32 and the E-Ink are part of the TTGO T5 2.3V package, which I'm using mostly to debug while not attached to Serial ports. The round shield underneath is what I've designed. Its mostly a sensor matrix with a few LED's and breakout pins for testings. The CCS811 is on the shield and wired exactly the same as the Sparkfun CCS811 breakout unit. Both Units were started at the same time, with similar battery systems using the same code except for the CCS811 Mode. Everything has been bought in the last month so should all be up to date with firmware and specks. Have been running these now for about three days and still getting a bit of discrepancy when they take readings. But until I've gotten a nanometer and can see how much power each mode is drawing I'm just going to have to deal with having them all on one mode for now and dealing with it later. Additionally, I'm working on the legal bits and pieces to release the shield as an Open Source Hardware module with the library and schematics I've done. For those looking for a bit of an all-rounder indoor sensor (light, UV, heat, temp, pressure, eCo2, VOC). When I'm sorted, I'll send you the details if you're interested :) |
Hi Lloyd, I have a similar but way more simplified setup and I was testing the TTGO T8 (ESP32) and the WEMOS D1 mini (ESP8266) next to each other to test the battery life (2900mAh samsung battery) with the CCS811 with integrated HDC1080 temperature and humidity sensor. I'm interested in the results of your test on the 1sec / 60sec intervals. Mine are on the 60sec intervals. I have two questions about this:
@maarten: thanx a lot for the library and the extended explanations. |
Could you explain in more detail the power cycle. It sounds like the ESP is sleeping for 15min and awake for 1sec. This seems to consume 0.4mA. But what is the CCS811 doing? Is it always running in 60sec mode? This means that once in a while (is that 1 sec per 60 sec??) the heater is on using ~40mA. Yes, if the wake pin is defined it should go to sleep. Can you measure this? |
Thank you for the quick response. And I hoped the sensor was put to sleep when connected to the wake pin. DEEP_SLEEP_TIME = 15 setup cycle
initializeSensors code
running the sensors:
|
Each time the ESP comes out of deep sleep, it executes |
First I check the wake-up reason. If it is different from awakening from deep sleep, I do the setup, otherwise I don't do the setup. simplified code: Preferably the CCS811 goes to sleep (or low power mode - 0) for 15 minutes. wakes up when the WEMOS is awake, and reads one time CO2 and TVOC and goes to low power mode again. |
Sorry; missed the `if``. Other question; is this correct?
The |
The |
You will not get errors; just the internal algorithm uses wrong t/h values. Assuming Now back to power ;-) |
yep, you got it right. I'm sending the wrong data. But the power is indeed the main issue.. |
@lloydrichards: did you find a solution for the increasing values yet? With the basic sketch I have normal CO2 values varying from 410-550 ppm, both with version 1.0.1 as with version 2.0.1 (yes I flashed the sensors firmware successfully - for the record - WEMOS D1 mini ESP8266 with the CCS811 HDC1080 sensor - thanks Maarten) but in deep sleep values are increasing way beyond healthy levels.. |
Greetings,
So I've been doing some experimenting with using the CCS811 with a deep sleep functionality and have been getting some odd results. Perhaps someone also has some experience and can help me out. So the code looks something like this:
While this works and I get readings every 15 min and they even seem to be quite accurate for the first hour or two. The problem is that after that first hour the VOC steadily increases resulting in an increased eCO2. I have several CCS811 sensors so I've compared the deep sleep version with one that runs in the loop and there is odd behaviour going on while it's asleep.
I have several theories, including that while the sensor is not being read it slowly builds VOC in the sensor resulting in increased readings, but I have no way to verify this. If anyone has any ideas, it would be much appreciated!
The text was updated successfully, but these errors were encountered: