Hello there
I recently purchased a pms5003 particulate sensor I have it hooked up to an esp2866 with micropython (forgive my laziness, I don’t want to C++ today…)
First things first:
- The PMS5003 is connected to the only hardware UART
- I have disabled the REPL so that I can talk to the Sensor at 9600 baud without being interrupted
- I get 30 bytes of data, but not 32. This causes the checksum to fail
Sample sensor output
If I do a uart.read(32) I get the following output (converted to int and a list):
[66, 77, 0, 28, 0, 4, 0, 5, 0, 5, 0, 4, 0, 5, 0, 3, 126, 0, 226, 0, 23, 0, 2, 0, 0, 0, 0, 151, 0, 2, 66, 77]
You can see the header there at the start(66,77) but then where the checksum should be is another header.
The data seems to be ok:
Concentration Units (standard)
---------------------------------------
PM 1.0: 4 PM2.5: 5 PM10: 5
Concentration Units (environmental)
---------------------------------------
PM 1.0: 4 PM2.5: 5 PM10: 3
---------------------------------------
Particles > 0.3um / 0.1L air: 32256
Particles > 0.5um / 0.1L air: 57856
Particles > 1.0um / 0.1L air: 5888
Particles > 2.5um / 0.1L air: 512
Particles > 5.0um / 0.1L air: 0
Particles > 10 um / 0.1L air: 151
---------------------------------------
Do I have a duff sensor, have I put it into some mode that I’ve not understood? or is there something else wrong that I’m missing?