Issue with PMS9103M driver #15637
Unanswered
divergentti
asked this question in
ESP32
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been trying to get the asynchronous driver I previously made for the PMS7003 particle sensor to work with the PMS9103M, but for some strange reason, I usually only get zero values, or just the number of particles, but never the PM values (ATM) needed for calculating the air quality index.
In the past, these types of problems have been related to UART issues, but I believe the UART is correctly set up in my code. The corresponding initialization works for another UART with the MH-Z19B CO2 sensor, and it functions correctly. I tried adding commands to force the sensor into active mode and other unnecessary things. Has anyone made a working driver for the PMS9103M that I could test?
The driver I have build: https://github.com/divergentti/Micropython-for-ESP32/blob/main/esp32-oled-mhz19b-pms9103m-bme680/drivers/PMS9103M_AS.py
Whole program here, everything else but PMS readings works https://github.com/divergentti/Micropython-for-ESP32/tree/main/esp32-oled-mhz19b-pms9103m-bme680
Debug screen:
RAM free 80736 alloc 68128
1 ---------WIFI------------- 1
WiFi Connected True, hotspot: hidden, signal strength: -54
IP-address: 192.168.x.x
Runtime: 607
MQTT Connected: True, broker uptime: b'10901 seconds'
MQTT messages sent 30 seconds ago.
Memory free: 80288, allocated: 68576
2 -------SENSORDATA--------- 2
Temp: 34.0C, Rh: 31.4, GasR: 726279.8
CO2 is 631.0
PM1:0 (0) PM2.5:0 (0)
PM10: 0 (ATM: 0)
0 < 0.3 & 0 <0.5
0 < 1.0 & 0 < 2.5
0 < 5.0 & 0 < 10.0
3 ---------FAULTS------------- 3
Last error : None
Read errors: 0
PMS reader data b'B' (this is START_BYTE_1 = 0x42)
PMS reader data b'M' (this is START_BYTE_2 = 0x4d)
PMS reader data b'\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\xbe'
Beta Was this translation helpful? Give feedback.
All reactions