-
Notifications
You must be signed in to change notification settings - Fork 863
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
Add CO2 sensing with SCD4X #4601
base: master
Are you sure you want to change the base?
Conversation
Since this one has temperature and humidity in addition to co2, it looks like it spans our EnvironmentMetrics and AirQualityMetrics. Do you have a sense for how easy it would be to put the co2 in AirQualityMetrics and keep the temp/humidity in EnvironmentMetrics? |
I'll work on moving it over to AirQualityMetrics instead of EnvironmentMetrics - although I noticed that IAQ is also in EnvironmentMetrics, should that be moved as well? |
Hm yeah, I'm looking closer at AirQualityModule and it's going to be more involved than I'd hoped - AirQualityModule explicitly wants a Adafruit_PM2.5 sensor ( |
Thanks for the heads up! Will take a look in the next few days. |
Previously the module was designed around a single sensor. This patch brings it into line with the same design as EnvironmentTelemetry.
@Coloradohusky - I hacked together some things over at It compiles ... but I haven't got it further than that :) Do you think you'd be able to hack from there and test with your sensor? |
@Coloradohusky , have hacked this a bit more. In theory you might also get a screen on your UI with CO2 readings too. Can you test & improve? =D |
Was checking it out just now! Will keep testing 😄 |
OK, over to you -- I'll hold off making any more commits |
Haven't had much luck yet - it properly detects the sensor, but doesn't grab any measurements. Not sure what's preventing the measurements but will keep testing |
This PR adds support for CO2 sensing with the SCD40/SCD41 sensors. These sensors also support temperature and relative humidity.
Currently, it is using
startLowPowerPeriodicMeasurement
, which has an update interval of ~30 seconds. However, the datasheet mentions ameasure_single_shot
for lower power use, but says it is limited to SCD41 sensors only. Nonetheless, I tried it on my SCD40 sensor and it appeared to work fine.measure_single_shot
also includes a delay of 5 seconds for each use.Average Supply Current:
Other than that, the only differences between SCD40 and SCD41 are a wider CO2 interval and higher accuracy.
See SCD4x Low Power Operation and the Datasheet for more information.
Thanks