Comments (8)
Are you using the lua module to read the PMS7003?
I do not recognize the output format.
I wrote this proyect long time ago, before we had Arduino for the esp8266,
and I only tested it on the PMS3003 sensor. Since then I wrote PMserial, a generic Arduino library
for the PMSx003 sensors. Maybe you should try that instead of this old/stale modules.
The messages from the PMS7003 are longer than the messages from the PMS3003 (32 bytes vs 24 bytes). Therefore you need the right sensor type on the module configuration
You can find the message description here.
The PM1, PM2.5 and PM10 parts of the message are on ug/m3 and the particle count in number/100cc,
see here.
Where are you located? Those values are way too high for Europe, unless you're measuring next to an open fire place or on a kitchen next to a frying pan.
If you are getting high fluctuation on the values, it could be that you are missing the beginning of the message.
from aqmon.
Hi Alvaro,
I am using my own python code with Raspberry Pi for getting values from PMS7003.
I am based in India and this readings are from my bedroom at room temperature.
Ill send my code can you please run and check if i am doing it correct?
Thankyou in advance.
from aqmon.
Can I see the full output of your script?
In the meantime, it looks like your checksum calculation is wrong:
# Calculate the payload checksum (not including the payload checksum bytes)
inputChecksum = 0x42 + 0x4d
for x in range(0, 27):
inputChecksum = inputChecksum + data[x]
Here, range(0, 27)
will only give you the first 27 indexes ([0, 1, ..., 26]
).
You need the first 28 indexes, as the last 2 are the checksum.
Instead you can write the checksum calculation as:
# Calculate the payload checksum (not including the payload checksum bytes)
inputChecksum = 0x42 + 0x4d + sum(data[:-2])
BTW, if you do not want to create a full repository for your script,
you can create a gist.
That would make easy to comment on the particular lines...
from aqmon.
Hi Alvaro,
Below is the output of my script :
PMS7003 Sensor Data:
PM1.0 = 104 ug/m3
PM2.5 = 163 ug/m3
PM10 = 176 ug/m3
PM1 Atmospheric concentration = 69 ug/m3
PM2.5 Atmospheric concentration = 108 ug/m3
PM10 Atmospheric concentration = 117 ug/m3
Count: 0.3um = 18084 per 0.1l
Count: 0.5um = 5227 per 0.1l
Count: 1.0um = 1020 per 0.1l
Count: 2.5um = 90 per 0.1l
Count: 5.0um = 20 per 0.1l
Count: 10um = 6 per 0.1l
Version = 151
Error Code = 0
Frame length = 28
Let me know if i am still wrong in calculation.
And sorry i am in little rush so not creating gist as of now.
Need to get this sensor up and running for my project.
Thank you.
from aqmon.
The output looks right. Remeber to use the "Atmospheric concentration" version of the PM values.
from aqmon.
Hi Alvaro,
Can you please try this code out and check your output as well because i am confused right now after you said that i have did wrong calculations.
Please let me know.
Thank you.
from aqmon.
I wont test and debug your code. This is not stack overflow, it is the issue tracker for a project that you are not using.
What I said is that the checksum calculation looks wrong. The checksum will tell you if you revived the message correctly or not. You can decide yourself if my assessment about your checksum calculation correct or not. For example, if every message you read and decode triggers a checkum warning, it is quite likely your checksum code is wrong.
from aqmon.
No problem.
Thank you for all your help.
from aqmon.
Related Issues (9)
- Bug in humidity compensation code for BME280 HOT 4
- Error calling bme280 HOT 5
- Help with PMS3003.lua module HOT 44
- Wiki entries
- pms3003.lua on UART2 HOT 1
- Native pms module on nodemcu firmware HOT 1
- AQmon lite: bare bones example HOT 1
- PMS5003 i2c? HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aqmon.