Skip to content

Commit fc2fecc

Browse files
committed
Update documentation around calibration algorithms
1 parent 05c3c60 commit fc2fecc

File tree

3 files changed

+84
-2
lines changed

3 files changed

+84
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ ESPHome yaml files for AirGradient devices to maintain the research and accuracy
88

99
## [Configuration](/configuration.md)
1010

11+
## [Calibration](/calibration.md)
12+
1113
## Breaking Changes
1214

1315
* 5.0.0 is a major version upgrade as switching to esp-idf is not fully supported via OTA. Highly recommend doing one USB flash of 5.0.0 and later to the AirGradient ONE and OpenAir devices to reformat the storage to support esp-idf. Future updates can be done Over-The-Air without issue.
@@ -68,4 +70,5 @@ Many added features can be found in HomeAssistant by going to Settings>Devices a
6870

6971
More features are planned to be added to this repo
7072

71-
- [ ] PMS5003 model specific correction algorithms
73+
- [X] PMS5003 model specific correction algorithms
74+
- [ ] Deprecate Extended Life packages and use a substitution to allow for adjusting update_interval

calibration.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Calibration
2+
3+
Many of the official calibration algorithms from AirGradient are also implemented in this repository.
4+
https://www.airgradient.com/documentation/calibration-algorithms/
5+
6+
## EPA PM2.5 Calibration
7+
8+
This algorithm is applied by default to all PMS5003(t) sensors in this repository. If it is desired to not apply this and instead use raw values from the sensors, replace the package file with the one ending with `_uncorrected.yaml`
9+
10+
## Batch Specific PM2.5 Calibration
11+
12+
AirGradient detected that PMS5003 sensors after 2023-10-30 used a different manufacturer calibration that results in lower PM2.5 values under low concentrations. AirGradient has developed an algorithm and tested values to correct these values when they are less than 31 ug/m3
13+
14+
In this repo, 2 substitution values can be adjusted to apply the calibration. In the main YAML file for the device, add a substitutions item and the follow parameters if not already present.
15+
16+
```yaml
17+
substitutions:
18+
pm_2_5_scaling_factor: '1'
19+
pm_2_5_intercept: '0'
20+
```
21+
22+
Adjust the scaling factor and intercept specific to your requirements. The values from AirGradient can be found in the AirGradient Dashboard site under Hardware>Advanced Settings>PM 2.5
23+
24+
Under "Special formulas by specific batch" select a batch that matches the label on the sensor inside of your AirGradient, and take note of the `Scaling Factor` and `Offset` values to copy to the ESPHome YAML file.
25+
26+
Refer to the AirGradient page for the most current values, and they are planning on adding device specific formulas in the future
27+
https://app.airgradient.com/settings/hardware
28+
29+
| Batch ID | Scaling Factor | Offset |
30+
|---------------------|------------------|--------|
31+
| PMS5003_20231030 | 0.02838 | 0 |
32+
| PMS5003_20231218 | 0.03525 | 0 |
33+
| PMS5003_20240104 | 0.02896 | 0 |
34+
35+
https://www.airgradient.com/blog/update-on-pms5003-calibration/
36+
37+
## Temperature and Humidity Calibration for Open Air Outdoor monitors
38+
39+
The algorithm from AirGradient for the PMS5003T sensors used in the Open Air for both Temperature and Humidity are applied by default. If it is desired to not apply this and instead use raw values from the sensors, replace the package file with the one ending with `_uncorrected.yaml`

packages.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ binary_sensor:
6161
For devices that use the ESP32-C3 the CPU clock can be lowered from default 160
6262
MHz to 80 MHz to save power. The higher default clock is not needed for the
6363
calculations that even the AirGradient One by default has to do to interact
64-
with all the sernsors, display, LEDs and so on. If you suspect this causes
64+
with all the sensors, display, LEDs and so on. If you suspect this causes
6565
problems, look at the ESPHome log or enable the `diagnostic_esp32.yaml` package
6666
and look at "Loop Time".
6767

@@ -199,6 +199,14 @@ By default collects readings every second. Since this device has a limited lifes
199199
Collects readings every 2 minutes by default, but can be modified by adding an entry under substitutions, ensuring the value is surrounded by double quotes
200200
`pm_update_interval: "2min"`
201201
202+
Can also apply batch or device specific correction formulas. See [calibration.md](calibration.md) for more details.
203+
204+
```yaml
205+
substitutions:
206+
pm_2_5_scaling_factor: '1'
207+
pm_2_5_intercept: '0'
208+
```
209+
202210
## sensor_pms5003t_2_extended_life.yaml
203211
204212
Configures a second Plantower PMS5003T sensor when 2 are installed, such as the Open Air Model O-1PPT. Reports PM2.5, Temperature, and Humidity.
@@ -212,6 +220,14 @@ By default collects readings every second. Since this device has a limited lifes
212220
Collects readings every 2 minutes by default, but can be modified by adding an entry under substitutions, ensuring the value is surrounded by double quotes
213221
`pm_update_interval: "2min"`
214222

223+
Can also apply batch or device specific correction formulas. See [calibration.md](calibration.md) for more details.
224+
225+
```yaml
226+
substitutions:
227+
pm_2_5_scaling_factor: '1'
228+
pm_2_5_intercept: '0'
229+
```
230+
215231
## sensor_pms5003t_2.yaml
216232

217233
Configures a second Plantower PMS5003T sensor when 2 are installed, such as the Open Air Model O-1PPT. Reports PM 2.5, Temperature, and Humidity.
@@ -231,6 +247,14 @@ By default collects readings every second. Since this device has a limited lifes
231247
Collects readings every 2 minutes by default, but can be modified by adding an entry under substitutions, ensuring the value is surrounded by double quotes
232248
`pm_update_interval: "2min"`
233249
250+
Can also apply batch or device specific correction formulas. See [calibration.md](calibration.md) for more details.
251+
252+
```yaml
253+
substitutions:
254+
pm_2_5_scaling_factor: '1'
255+
pm_2_5_intercept: '0'
256+
```
257+
234258
## sensor_pms5003t_uncorrected.yaml
235259
236260
Configures a Plantower PMS5003T sensor. Reports PM 2.5, Temperature, and Humidity.
@@ -243,6 +267,14 @@ Configures a Plantower PMS5003T sensor. Reports PM 2.5, Temperature, and Humidi
243267
244268
Also applies a compensation algorithm from AirGradient to correct temperature and humidity readings when used inside of the Open Air enclosure
245269
270+
Can also apply batch or device specific correction formulas. See [calibration.md](calibration.md) for more details.
271+
272+
```yaml
273+
substitutions:
274+
pm_2_5_scaling_factor: '1'
275+
pm_2_5_intercept: '0'
276+
```
277+
246278
## sensor_pms5003_uncorrected.yaml
247279
248280
Configures a Plantower PMS5003 sensor using raw values from the sensor
@@ -259,6 +291,14 @@ https://www.airgradient.com/documentation/correction-algorithms/
259291
260292
Reports PM 2.5, PM 10, PM 1.0, PM 0.3, and Air Quality Index based on the current readings.
261293
294+
Can also apply batch or device specific correction formulas. See [calibration.md](calibration.md) for more details.
295+
296+
```yaml
297+
substitutions:
298+
pm_2_5_scaling_factor: '1'
299+
pm_2_5_intercept: '0'
300+
```
301+
262302
## sensor_s8.yaml
263303
264304
Configures a Senseair S8 sensor.

0 commit comments

Comments
 (0)