SDS011 Laser Dust Sensor Control Protocol V1.3
SDS011 Laser Dust Sensor Control Protocol V1.3
2015.7.20
1
Nova Fitness Co., Ltd.
Catalog
1、Protocol Configuration ........................................................................................................ 3
2、Device ID Instruction ........................................................................................................... 3
3、Command ............................................................................................................................ 3
1) Set data reporting mode ............................................................................................... 3
2) Query data command ................................................................................................ 4
3) Set Device ID ................................................................................................................. 6
4) Set sleep and work ........................................................................................................ 7
5) Set working period ........................................................................................................ 8
6) Check firmware version............................................................................................... 10
2
Nova Fitness Co., Ltd.
1、Protocol Configuration
Serial Port: 5V TTL, 9600bps with 8 data bit, no parity, one stop bit
Data Packet(19bytes) :Head+Command ID+Data(15bytes)+checksum+Tail
Checksum: Low 8bit of the sum result of Data Bytes(not including packet head, tail and
Command ID).
2、Device ID Instruction
3、Command
The setting is still effective after power off 【Factory default is active reporting】
0 Head AA AA
1 Command ID B4 C5
2 Data byte 1 2 2
3 Data byte 2 0:query the current mode 0:query the current mode
1:set reporting mode 1:set reporting mode
4 Data byte 3 0:report active mode 0:report active mode
1:Report query mode 1:Report query mode
5 Data byte 4 0(reserved) 0(reserved)
3
Nova Fitness Co., Ltd.
18 Tail AB
Notes:
Report query mode:Sensor received query data command to report a measurement data.
Report active mode:Sensor automatically reports a measurement data in a work period.
Example:
PC sends command, query the current working mode:
AA B4 02 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 AB
Sensor with ID A160 response:
AA C5 02 00 00 00 A1 60 03 AB Show the sensor is in report active mode.
AA C5 02 00 01 00 A1 60 04 AB Show the sensor is in report query mode.
PC sends command, set the sensor with ID A160 to report query mode:
AA B4 02 01 01 00 00 00 00 00 00 00 00 00 00 A1 60 05 AB
Sensor with ID A160 response:
AA C5 02 01 01 00 A1 60 05 AB Show the sensor is set to report query mode.
Sensor received query data command to report a measurement data, recommended query
interval of not less than 3 seconds
Byte Direction PC->Sensor Sensor->PC
4
Nova Fitness Co., Ltd.
0 Head AA AA
1 Command ID B4 C0
18 Tail AB
Example:
1)Needs all sensor response:
Send command:
AA B4 04 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 02 AB
Sensor with ID A160 Reply:
AA C0 D4 04 3A 0A A1 60 1D AB
Show PM2.5 data is 04D4, convert it to a decimal 1236,then it show PM2.5 to 123.6μg/m3,PM10
5
Nova Fitness Co., Ltd.
3) Set Device ID
The setting is still effective after power off【Factory default has set a unique ID】
0 Head AA AA
1 Command ID B4 C5
2 Data byte 1 5 5
6
Nova Fitness Co., Ltd.
18 Tail AB
Example:
Send command, set the device ID from A160 to A001:
AA B4 05 00 00 00 00 00 00 00 00 00 00 A0 01 A1 60 A7 AB
Sensor with ID A160 response:
AA C5 05 00 00 00 A001A6 AB
The setting is not effective after power off【stay work state after power on】
Byte Direction PC->Sensor Sensor->PC
0 Head AA AA
1 Command ID B4 C5
2 Data byte 1 6 6
3 Data byte 2 0: query the current mode 0: query the current mode
1: set mode 1: set mode
7
Nova Fitness Co., Ltd.
18 Tail AB
Example:
⑴ Send command, set the sensor with ID A160 to sleep:
AA B4 06 01 00 00 00 00 00 00 00 00 00 00 00 A1 60 08 AB
Sensor with ID A160 response:
AA C5 06 01 00 00 A1 60 08 AB
⑵ Send command, set the sensor with ID A160 to work:
AA B4 06 01 01 00 00 00 00 00 00 00 00 00 00 A1 60 09 AB
Sensor with ID A160 response:
AA C5 06 01 01 00 A1 60 09 AB
⑶ Send command, query the working mode of the sensor with ID A160:
AA B4 06 00 00 00 00 00 00 00 00 00 00 00 00 A1 60 07 AB
Sensor with ID A160 response, show it is in working mode:
AA C5 06 00 01 00 A1 60 08 AB
Or reply:
AA C5 06 00 00 00 A1 60 07 AB show it is in working mode:
Notes: The data is stable when the sensor works after 30 seconds;
The fan and laser stop working in sleeping mode.
The setting is still effective after power off【factory default is continuous measurement】
The sensor works periodically and reports the latest data.
8
Nova Fitness Co., Ltd.
0 Head AA AA
1 Command ID B4 C5
2 Data byte 1 8 8
3 Data byte 2 0: query the current mode 0: query the current mode
1: set mode 1: set mode
18 Tail AB
Example:
⑴ Send command to set the working period of sensor with ID A160 to 1 minute:
AA B4 08 01 01 00 00 00 00 00 00 00 00 00 00 A1 60 0B AB
Sensor with ID A160 response:
AA C5 08 01 01 00 A1 60 0B AB Show the sensor will update data in 1 minute.
⑵ Send command to set the working period of sensor with ID A160 to 0,it will work
9
Nova Fitness Co., Ltd.
continuously:
AA B4 08 01 00 00 00 00 00 00 00 00 00 00 00 A1 60 0A AB
Sensor with ID A160 response:
AA C5 08 01 00 00 A1 60 0A AB
⑶ Send command to query the working period of the sensor with ID A160:
AA B4 08 00 00 00 00 00 00 00 00 00 00 00 00 A1 60 09 AB
Sensor with ID A160 response:
AA C5 08 00 02 00 A1 60 0B AB Show its working period is 2 minute; it will update
data every 2 minute.
0 Head AA AA
1 Command ID B4 C5
2 Data byte 1 7 7
10
Nova Fitness Co., Ltd.
18 Tail AB
Example:
Send command to get the firmware version of the sensor with ID A160:
AA B4 07 00 00 00 00 00 00 00 00 00 00 00 00 A1 60 08 AB
Sensor with ID A160 response:
AA C5 07 0F 07 0A A1 60 28 AB Show its firmware version is 0F070A(15-7-10).
www.inovafitness.com
TEL:0531—8286 8288
FAX:0531—8286 8198
11