Trying to rebuild my air quality sensors because this summer sucks :(
I can’t get my PMS5003 sensor to talk to my RPi using the Enviro+ board.
The error I get is as follows:
pi@raspberrypi:~ $ /bin/python /home/pi/enviroplus-python/examples/particulates.py
2023-07-10 17:39:49.493 INFO particulates.py - Print readings from the PMS5003 particulate sensor.
Press Ctrl+C to exit!
Traceback (most recent call last):
File "/home/pi/enviroplus-python/examples/particulates.py", line 24, in <module>
readings = pms5003.read()
File "/usr/local/lib/python3.9/dist-packages/pms5003/__init__.py", line 127, in read
raise SerialTimeoutError("PMS5003 Read Timeout: Failed to read start of frame byte")
pms5003.SerialTimeoutError: PMS5003 Read Timeout: Failed to read start of frame byte
I think I set all the serial settings up as needed and when I run check-install.py everything checks out.
pi@raspberrypi:~/enviroplus-python $ python3 check-install.py
Checking Enviro+ install, please wait...
System dependencies...
Retrieving cache...
Checking for python3 ✅
Checking for python3-spidev ✅
Checking for python3-cffi ✅
Checking for libportaudio2 ✅
Checking for python3-pil ✅
Checking for python3-smbus ✅
Checking for python3-pip ✅
Checking for python3-rpi.gpio ✅
Checking for python3-numpy ✅
Python dependencies...
Checking for bme280 ✅
Checking for pms5003 ✅
Checking for ltr559 ✅
Checking for ST7735 ✅
Checking for ads1015 ✅
Checking for fonts ✅
Checking for font_roboto ✅
Checking for astral ✅
Checking for pytz ✅
Checking for sounddevice ✅
Checking for paho.mqtt ✅
System config...
Checking for dtoverlay=pi3-miniuart-bt in /boot/config.txt: ✅
Checking for dtoverlay=adau7002-simple in /boot/config.txt: ✅
Checking for enable_uart=1 in /boot/config.txt: ✅
Checking for dtparam=spi=on in /boot/config.txt: ✅
Checking for dtparam=i2c_arm=on in /boot/config.txt: ✅
✅ Looks good from here!
Have you?
• Rebooted after installing
• Made sure to run examples with "python3"
• Checked for any errors when running "sudo ./install.sh"
The error seems to indicate a lack of connection, I’ve tried a few things like swapping the sensor out, waiting for it to run for a bit before running the code etc…the fan in the PMS5003 is running but not sending data.
The fact is that I had this running last year and wiped my pi (my bad), I seem to remember there was either a missing dependency or something to do with the pin_enable and pin_reset values but for the life of me I can’t figure out what.