iotempire / iotempower

IoTempower is a framework and environment for making the Internet of Things (IoT) accessible for everyone
MIT License
24 stars 20 forks source link

SCD4X CO2 Sensor Driver & Docs #98

Closed mbz4 closed 4 months ago

mbz4 commented 5 months ago

Extend support to include the Sensirion SCD40 compact photoacoustic NDIR CO2 sensor.

Tasks:

Bare sensor module: Image

Module in use for this driver development and in local stock: Image

Resources:

mbz4 commented 5 months ago

Update: ended up testing daisy chained with SGP30, SHT30, ENS160 (not sure my unit works) and AHT2X sensors together on the same board and same platformio project, felt convenient as the SCD4x official i2c library has a few calibration and offset features so it made sense to merge the project; this way the script has simultaneous access to all the measurement feeds for easier printouts and testing different libraries

Image

mbz4 commented 5 months ago

Need to extend IoTempower basic wrapper support first, making it possible to configure a simple (calibrated) measurement cycle. Afterwards document the basic features and finally focus on exposing advanced features. In the delivered stage, the sensor should be fully configurable through setup.cpp and reconfigurable through MQTT/sensor_topic....

mbz4 commented 5 months ago

Tried available libraries for async measurement support but the sensor is not robust (plug/unplug test - measurements differ too much, unreliable). Digging deeper into sensirion scd4x library...

mbz4 commented 4 months ago

There be whales here! 🥇

Image

ulno commented 4 months ago

Maybe link the bias ribbit finding here? Maybe it could be solved with an IoTempower filter? What about an initial PR to encourage more testers?

mbz4 commented 4 months ago

Maybe link the bias ribbit finding here?

GMAC2024-_Ribbit_NetworkPoster-_White_BG_48_x_36_in.pdf

Maybe it could be solved with an IoTempower filter?

ribbit in the poster don't really state it as a linear steady state bias error... so do we just need to the add the difference to each measurement to offset the error from reference sensor (vaisala)? ... i think we need to test this over a variety of temp, humidity ranges + CO2 concentration levels to really show the behaviour; but the datasheet does show deviations in specific ranges for the scd4x: https://sensirion.com/media/documents/48C4B7FB/64C134E7/Sensirion_SCD4x_Datasheet.pdf

What about an initial PR to encourage more testers?

Can do, but will have to then regress the updated landing page architecture diagram. Will prepare draft for ENS160 first then start the PR (and new issue for that sensor).

mbz4 commented 4 months ago

PR: https://github.com/iotempire/iotempower/pull/118