-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Add SCD4X #7198
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
base: master
Are you sure you want to change the base?
feat: Add SCD4X #7198
Conversation
|
An additional comment: these type of sensors generally require a "control" interface to enable or disable features. This is mapped here - and could be a good outcome of the hackathon. |
|
@oscgonfer protobufs are merged and generated upstream now |
247768e to
84865cd
Compare
|
rebased onto #7202 - just to keep in mind that the sensirion library needs to be |
|
sensirion 1.1.0 was released - updated upstream. |
Merged |
|
Thanks for your effort! I can confirm it works with:
|
6237b2e to
3a1a07a
Compare
443a573 to
ec57c62
Compare
|
|
Co-authored-by: Hannes Fuchs <hannes.fuchs+git@0xef.de>
* Adds VOC measurements and state * Still not working on VOC Index persistence * Should it stay in continuous mode?
* Adds initial timer for SEN55 to not sleep if VOCstate is not stable (1h) * Adds conditions for stability and sensor state
* Adds a new RHT/Gas only mode, with 3600s stabilization time * Fixes the VOCState buffer mismatch * Fixes SEN50/54/55 model mistake
Gotta work through a number of merge conflicts, but otherwise optimistic on moving this one forward :-) |
|
(To avoid duplicating work) I'm aiming to work on this during the next couple of days as well @thebentern I'm doing this in parallel to the other SEN5X series, there some conflicts on sleep mode that I have almost sorted out. |
|
Hi folks, this PR and #7245 will need meshtastic/protobufs#750 |
* Improve reClockI2C conditions for different variants * Add sleep, wakeUp, pendingForReady, hasSleep functions to PM sensors to save battery * Add SEN5X
* Fixes difference between idle and sleep * In LowPower, sleep is disabled * Requires testing for I2C clock comms for commands
89168b8 to
c6c97f1
Compare
|
@paulwalko @thebentern I added changes and tested locally. It all works, but requires meshtastic/protobufs#750 There's a couple of pending to-dos, specially on the admin commands part and the I2C clock adaptation. I'd appreciate some help with admin commands checks, if possible, or some guidance on how to set it up to test them in a fast way. |
|
Is the reclock logic needed for nrf52 architectures? When building I got the "scd41 can't be used at this clock speed, with a screen" warning, which was fixed with the following changes to exclude non esp32 architectures: All of my nodes with SCD41 sensors are nrf52 based. |
Hi, maybe the logic is not right in In particular, the SCD4X needs a I2C clock speed of max 400kHz, which is not compatible with the screen. So... we need a way to know whether or not a screen is present for those cores that can't Do your NRFs have screens? |
|
Thanks for the explanation. I should've mentioned, my devices do not have a screen. I did see that the SCD4x has a max of 400 Mhz, but didn't realize the screen switches up to 700 Mhz which explains a lot. My nodes are the nrf52 diy variant, but for the vast majority of other nodes with known configurations I imagine the logic should work. One more issue I encountered, the serialization of the air_quality_metrics in |
I think that in your particular case, compiling with
I'll fix that one! Totally missed that! Thank you! |
This PR adds support for the SCD4X CO2 sensors by sensirion.
It builds upon on the great work by @Coloradohusky, @hafu and @fifieldt in #4601 and https://github.com/hafu/meshtastic-firmware/tree/add-scd30 (although it doesn't add SCD30 support).
This PR tries to sync that work with the current state
masterbranch, and it's rebased on top of #7190, which is an attempt to decoupleAirQualityTelemetryfromPMSA0003Isensor (I have just ordered one sensor to test). I also started using the new Sensirion library for this sensor, which has a new release (and a very annoying change in the library name import).This also goes along with meshtastic/protobufs#719 to support having real temperature and the sensor temperature separately. Testing it, you can see some differences between two sensors that are right next to each other (SHT31 and the one inside the SCD4X).
There are some comments that I point in the code directly below. I also tried to make it work with the screen, but I don't think my system allows for testing it ATM.
🤝 Attestations