Skip to content
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

sgp30: add the now-obsolete SGP30 air quality sensor #619

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Nov 17, 2023

Tested with a rp2040.

TODO: add the ability to set the absolute humidity for more accurate sensor details. The formula for that is rather complex, so I've left this as a future addition.


I've combined this sensor with the SCD40 CO₂ sensor to create a simple air quality monitor at home.

Tested with a rp2040.

TODO: add the ability to set the absolute humidity for more accurate
sensor details. The formula for that is rather complex, so I've left
this as a future addition.
@conejoninja
Copy link
Member

Thanks, I was using a SGP30 for a project of mine that got delayed, never got the SGP30 working properly as the values weren't what I expected and it stopped working at random times (probably a power issue I fixed later, but never got the time to check it).

Why use two different CO_2 sensors?

@aykevl
Copy link
Member Author

aykevl commented Nov 18, 2023

Thanks, I was using a SGP30 for a project of mine that got delayed, never got the SGP30 working properly as the values weren't what I expected and it stopped working at random times (probably a power issue I fixed later, but never got the time to check it).

It stopped working for me too, for some reason. I haven't figured out the details yet, except it manages to bring down the attached Raspberry Pi too (so probably a power issue of some sort, maybe even a short?).
Note that the first ~15 seconds you will get stub results, not the actual measurements. Perhaps that was the issue?

Why use two different CO_2 sensors?

The SGP30 is not a CO₂ sensor. It is a VOC sensor - even though marketing seems to suggest otherwise (and companies are probably only too happy to let this confusion remain). Instead of CO₂, it measures various other gases and makes a CO₂ estimate based on that, that is in practice highly inaccurate.

Historically, real CO₂ sensors have been somewhat expensive but nowadays a SGP40 can be bought at around €15 so it's not that expensive anymore. And it can be quite accurate after it's been calibrated to outside air.

@deadprogram
Copy link
Member

Thanks for the addition @aykevl and to @conejoninja for review. Now merging.

@deadprogram deadprogram merged commit 92050d9 into dev Dec 1, 2023
1 check passed
@deadprogram
Copy link
Member

Thanks for the addition @aykevl and to @conejoninja for review. Now merging.

@deadprogram deadprogram deleted the sgp30 branch December 1, 2023 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants