Particle concentration calculus
Closed this issue · 5 comments
Hi,
Why do you not follow the particle concentration calculus proposed by the manufacturer in the datasheet ?
The manufacturer proposes to calculate the concentration from MSB and LSB as : MSB x 256+LSB/10 (page 8).
You do MSB x 256+LSB in your code: this gives an overestimated value for PM2.5 and PM10 and variations around MSB x 256 which are like noise.
MC
Please look at the code.
Lines 67 to 72: divide values by 10 if checksum is okay and serial packet is complete.
And the correct calculation formula provided by the manufacturer is (MSB x 256+LSB)/10
This way was chosen to save 4 bytes of memory. Saving the bytes read from the sensor in float variables needs 4 bytes, in integer values that needs 2 Bytes.
But the result is not the same... no ?
You divide the whole value "pm10_serial" by 10, which is equal to (MSBx256+LSB)/10, thus the results is not equal to (MSB*256+LSB/10)
Really??? Look at the code, then look at the sensor documentation (version 1.3)!!!
Its page 5:
PM2.5 value: PM2.5 (μg /m3) = ((PM2.5 High byte 256) + PM2.5 low byte)/10
PM10 value: PM10 (μg /m3) = ((PM10 high byte256) + PM10 low byte)/10
Look at the brackets. Its ((MSB*256)+LSB)/10.
Ah!!! Yes, you're right ;)
Sorry.