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

Add Sleep and Interval Read functionality to PMS5003 particle sensor to extend life #8097

Closed
gururise opened this issue Apr 8, 2020 · 3 comments
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@gururise
Copy link
Contributor

gururise commented Apr 8, 2020

Have you looked for this feature in other issues and in the docs?
Yes. There is the closed enhancement issue 3476 and PR #2841 added a similar functionality to the SDS0X1 Dust Sensor.

Is your feature request related to a problem? Please describe.

While reading of the PMS series of sensors (PMS3003/PMS5003/PMS7003) is supported, the sensor is set to ACTIVE (continuous) mode which leaves the laser on continuously and reduces the life of the sensor. The PMS sensors support a PASSIVE mode which allows for sleeping the sensor and waking it up before taking a reading to significantly prolong the life of the sensor.

Describe the solution you'd like

I would like an option to take readings either continuously (as is now the default) or at intervals of between 1-255 minutes. If the sensor is set to take reading at intervals, it will be put to sleep and woken up 30 seconds prior to the reading being taken (the warmup period), then the reading would be taken and the sensor put back to sleep until 30 seconds prior to the next reading. This solution would require hooking up the TX pin to the sensor to allow Tasmota to send commands (ie. sleep, wake, mode) to the sensor, unless the user decides to keep it in its default mode.

Describe alternatives you've considered

The alternative is to leave the sensor in its default ACTIVE mode which leaves the laser on continuously. The sensor works fine in this mode; however, its life is degraded. The laser is rated for 6,000 hours. (8,760 hours = 1 year). By sleeping the sensor and waking it up, the life of the device can be extended to many years.

Additional context

This blog post describes the degradation of the sensor after 6,000 hours. (Scroll down to "Further Improvements" section). Here is the datasheet/manual of the PMS5003.

This is my first time using Tasmota; however, because I NEED this functionality, I don't mind working in a PR for this.

(Please, remember to close the issue when the problem has been addressed)

@ascillato2 ascillato2 added duplicated Result - Duplicated Issue feature request (devs?) Action - awaiting response from developers labels Apr 8, 2020
@gururise
Copy link
Contributor Author

So I've been working on a PR for this and I'm having trouble introducing a new setting variable in settings.h to use as the interval value for minutes. Introducing a new variable seems to mess up existing settings, and I'm not familiar enough with the settings behavior of Tasmota to feel comfortable introducing a new variable.

However, if I reuse an existing variable (currently uint8_t novasds_startingoffset) , everything works as described above. I'm also thinking of changing the interval time from minutes to seconds instead, but that would require the use of a uint16_t instead.

Any suggestions? Are there any non-used variables that I can utilize for the interval read time, or would the best approach be to implement a new variable?

@ascillato2 ascillato2 added enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended and removed feature request (devs?) Action - awaiting response from developers duplicated Result - Duplicated Issue labels Apr 12, 2020
@bwims
Copy link

bwims commented May 11, 2022

Hi,

is this new functionality documented anywhere?

Thanks!

@bwims
Copy link

bwims commented May 11, 2022

Ah, never mind, It's in the PR!

thanks!

Repository owner locked as resolved and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

No branches or pull requests

3 participants