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

Implement Correction Formula for PM2.5 on Display #182

Open
airgradienthq opened this issue Jun 16, 2024 · 0 comments
Open

Implement Correction Formula for PM2.5 on Display #182

airgradienthq opened this issue Jun 16, 2024 · 0 comments

Comments

@airgradienthq
Copy link
Owner

airgradienthq commented Jun 16, 2024

The PM2.5 value measured by the device can be improved with a formula.

Important: Data send to server should not change because we will use that formula also on our server. So below formula should ONLY affect the PM 2.5 value on the display. It should not be send to the AirGradient server. Only the raw data from PMS module send to AirGradient server.

However, the calculated PM2.5 value should be exposed in the Local Server API as "pm02Compensated". I adjusted the documentation already: https://github.com/airgradienthq/arduino/blob/master/docs/local-server.md

This way, integrations like ESPHome, Home Assistant etc can use it.

If display is switched to display US AQI. The corrected PM2.5 value should be used for the US AQI on the display.

This correction formula splits up the algorithms in bands. Also note that negative values could come out of the formula. In this case, it is recommended to set them as 0.

AGraw <30:

PM2.5 = [0.524 x AGraw] – [0.0862 x RH] + 5.75

30≤ AGraw <50:

PM2.5 = [0.786 x (AGraw/20 - 3/2) + 0.524 x (1 -(AGraw/20 - 3/2))] x AGraw – [0.0862 x RH] + 5.75

50 ≤ AGraw <210:

PM2.5 = [0.786 x AGraw] – [0.0862 x RH] + 5.75

210 ≤ AGraw <260:

PM2.5 = [0.69 x (AGraw/50 – 21/5) + 0.786 x (1 - (AGraw/50 – 21/5))] x AGraw – [0.0862 x RH x (1 - (AGraw/50 – 21/5))] + [2.966 x (AGraw/50 –21/5)] + [5.75 x (1 - (AGraw/50 – 21/5))] + [8.84 x (10-4) x AGraw2x (AGraw/50 – 21/5)]

260 ≤ AGraw:

PM2.5 = 2.966 + [0.69 x AGraw] + [8.84 x 10-4 x AGraw2]

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

No branches or pull requests

1 participant