Skip to content

Commit

Permalink
Enable pre-heat for PMSx003 sensors
Browse files Browse the repository at this point in the history
The PMSA003 sensor takes approximately 10 seconds to warm up, with
InconsistentObservation and WrongMessageFormat exceptions raised for
earlier samples. From experimentation, 10 seconds is almost exactly
the warm up time, but the datasheet actually recommends 30s [^1]:

    Stable data should be got at least 30 seconds after the sensor wakeup from the sleep mode because of the fan’s performance.

However, it makes sense to set this number based on what happens in
practice; we can always increase if others observe worse behaviour.

[^1]: https://cdn.shopify.com/s/files/1/0176/3274/files/PMSA003_datasheet.pdf?v=1619703
  • Loading branch information
benthorner committed Dec 6, 2022
1 parent 90e904d commit eb7154d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pms/sensors/plantower/pmsx003.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

ALIASES = ("PMS1003", "G1", "PMS5003", "G5", "PMS7003", "G7", "PMSA003", "G10")

PREHEAT = 10 # 10 seconds

commands = base.Commands(
passive_read=base.Cmd(b"\x42\x4D\xE2\x00\x00\x01\x71", b"\x42\x4D\x00\x1c", 32),
Expand Down

0 comments on commit eb7154d

Please sign in to comment.