Page 4 of 4

Re: PMS5003 air quality sensor library

Posted: Tue Mar 23, 2021 7:55 pm
by kevinkk525
We solved this on github: https://github.com/kevinkk525/pms5003_m ... n/issues/4
Apparently the adafruit sensor he bought didn't respond well to the passive mode but works fine in active mode. Since I bought mine from Aliexpress, I can't comment/test any further.

Re: PMS5003 air quality sensor library

Posted: Fri May 14, 2021 2:30 pm
by rockyrobin
Thank you to everyone posting in this thread. It has been very helpful.

I am having a problem with this sensor putting it to sleep using the SET pin to turn the sensor off.
Has anyone managed to get this to work with an ESP32 Devkit DOIT?

I have been using the following code but cannot get the sensor to sleep when toggling the pin on/off:

Code: Select all

from machine import Pin

p0 = Pin(14, Pin.OUT)

while 1:
	p0(0)
	time.sleep(5)
	p0(1)
	time.sleep(5)

Re: PMS5003 air quality sensor library

Posted: Sun May 16, 2021 8:55 am
by rockyrobin
(UPDATE) - Changed to pin 23 as previous pin I discovered is input only!

Re: PMS5003 air quality sensor library

Posted: Sun May 16, 2021 9:57 am
by kevinkk525
Glad you found the problem!