Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Programming a CR6 to measure a Plantower PMS5003 PM sensor


halo66 Dec 20, 2018 07:03 PM

Hi,

I am trying to measure a Plantower PMS5003 PM sensor using a CR6 datalogger. 

Plantower manual:

http://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf

I have configured the CR6 to communicate with the Plantower using the ComC1 port for serial communications using commsmode of 2 (LVTTL).  I can see some values come across in the Termial Emulator but they don't seem to mean too much and I do not see any values that would represent PM concentrations (see below):

CR6>W
1: ComRS232
2: ComME
3: Com310
4: ComSDC7
5: ComSDC8
6: Com320
7: ComSDC10
8: ComSDC11
9: ComC1
10: ComC3
11: ComU1
12: ComU3
13: ComU5
14: ComU7
15: ComU9
16: ComU11
17: ComUSB
19: TCP/IP
20: SDM-SIO4
21: Ethernet
26: USB network
27: IP Trace
25: Wifi
28: Wifi Diagnostics
29: IBus
32..47: SDM-SIO1
Select: 9
ASCII (Y)? Y
opening 9
hit ESC to exit, any other key to renew timeout
10:55:13.283 R BM.................v...........i
10:55:14.122 R BM.................v...........i
10:55:14.961 R BM.................v...........i
10:55:15.870 R BM.................~............
10:55:16.710 R BM.................~............
10:55:17.549 R BM.................~............
10:55:18.459 R BM..............................
10:55:19.298 R BM..............................
10:55:20.137 R BM..............................
10:55:21.046 R BM..............................
10:55:21.886 R BM..............................
10:55:22.725 R BM..............................
10:55:23.635 R BM.................v...........}
10:55:24.474 R BM.................v...........}
10:55:25.313 R BM.................v...........}
10:55:26.223 R BM.................~............
10:55:27.062 R BM.................~............
10:55:27.901 R BM.................~............
10:55:28.811 R BM.................z............
10:55:29.650 R BM.................z............
10:55:30.490 R BM.................z............
10:55:31.399 R BM.................t...........m
10:55:32.238 R BM.................t...........m
10:55:33.078 R BM.................t...........m

The SerialOpen is configured as:

SerialOpen (ComC1,9600,16,0,50,2)

I have tried using the SerialIn and SerialInRecord instructions but maybe I am not understanding the Plantower serial protocol that is shown in the manual. I am hoping to capture data from the Plantower's active mode protocol but it does also have a passive mode which I have not tried. 

Any help or advise would be aprreciated!

Thanks,

Dave


jtrauntvein Dec 20, 2018 08:36 PM

It looks like the sensor is returning binary data.  The logging capability will print out the "." when it encounters a non-ascii value.  It may still be possible to extract the data from the format being sent but you're going to need to have some knowledge about how the messages are encoded by the sensor.


halo66 Dec 21, 2018 10:04 PM

Great...thanks for the quick reply!


kmorley Jun 25, 2021 05:41 PM

@halo66 Did you ever come up with a good working program for this?

Log in or register to post/reply in the forum.