pimoroni / pms5003-python

Python library for the PMS5003 particulate sensor
MIT License
51 stars 20 forks source link

sleep mode and wakeup ? #7

Closed nmaster2042 closed 1 year ago

nmaster2042 commented 4 years ago

How can be set the sleep mode and wake up using the library ?

Gadgetoid commented 4 years ago

At the moment you cannot, the enable pin is asserted high by the library and no external control is provided.

You could just use the RPi.GPIO library to take over this pin and set it low, but be mindful that you'll have to wait ~30seconds for stable readings.

nmaster2042 commented 4 years ago

Thanks, will get a try using RPi.GPIO lib.

I'm aware of the ~30 sec waiting when wake up the sensor, it's definitively not an issue for me.

It could be a good new feature to add sleep / wake up in a future release of the lib.

xenon149 commented 4 years ago

+1 on this. The laser in the PMS5003 has a limited lifespan about 8000 hours Meaning that keeping it switched on all time will lead to premature burnout. Which leads to needing to buy another sensor. Which leads to more greenhouse gases because of more sensors being manufactured. Which leads to more pollution being trapped in the atmosphere, which requires more sensors to be purchased to track this increase, which leads to....

Source: https://www.letscontrolit.com/wiki/index.php/PMSx003

Gadgetoid commented 4 years ago

I don't know where this Wiki found the 8000 hour figure, but it doesn't ring true.

The PMS5003 datasheet (https://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf) specifies a MTTF of >=3 years which is close to the 25k hours I would expect from a typical laser diode.

Yes, your case for running the sensor on some sort of duty cycle still stands- but that lifespan figure is incorrect.

tvass commented 3 years ago

Sorry to interfere in this conversation, but I'm looking for a detail around the sleep mode of the PMS5003. I implemented some code (which is supposed to switch the PMS5003 in a sleep mode) but if I come very close, I can still hear some noise from it (air intake/out-take).

Can someone confirm if in the sleep mode we should still hear the noise from it (maybe only the laser if off?) or is it supposed to be totally off ? Thanks !

kkoralsky commented 3 years ago

For me when I set enable pin off, I cant here any noise from ventilator