SuperHouse/AirQualitySensorD1Mini

Sensor does not respond to sleep request

Opened this issue · 1 comments

This might just be my sensor, but the fan remains on after the pms.sleep() instruction is issued.
As a workaround, I connected the hardware sleep pin of the sensor (pin3) to a spare IO pin on the D1, then pull this pin low when the sensor needs to sleep.
This stops the fan and I can see the current draw drop to a few milliamps until it is restarted.

I did check that the issued serial command was being sent by the D1 - it just seems to be ignored by the PMS5003?? I note that in the video we see the (very cool wifi) power supply drop the current output, but did the fan stop?
Great project BTW - I love it (wifie hates it as I have Openhab reminding her to turn on the kitchen extractor fan when cooking) :-)

The fan definitely turns off with my sensors when I issue the pms.sleep() instruction. My best guess is that we have different versions of the PMS5003. Last time I checked there were about 7 different versions, all physically identical but with slightly different firmware so the pins behave differently. For example, there's a version that uses the comms pins for I2C, and others that expose different modes or features. There's a lot of overlap between them which is really confusing. Maybe you have a version that requires hardware control of the fan, and doesn't respond to software control.