Wiki source code of Water Quality Sensors

Version 15.1 by Karry Zhuang on 2024/07/18 16:14

Hide last authors
Edwin Chen 1.1 1 **Table of Contents:**
2
3 {{toc/}}
4
5
Edwin Chen 7.1 6 = 1. DR-ECK Water EC Probe =
7
8 == 1.1 Specification: ==
9
10 * **Power Input**: DC7~~30
11 * **Power Consumption** : < 0.5W
12 * **Interface**: RS485. 9600 Baud Rate
13 * **EC Range & Resolution:**
14 ** **ECK0.01** : 0.02 ~~ 20 μS/cm
15 ** **ECK0.1**: 0.2 ~~ 200.0 μS/cm
16 ** **ECK1.0** : 2 ~~ 2,000 μS/cm  Resolution: 1 μS/cm
17 ** **ECK10.0** : 20 ~~ 20,000 μS/cm  Resolution: 10 μS/cm
18 * **EC Accuracy**: ±1% FS
19 * **Temperature Measure Range**: -20 ~~ 60 °C
20 * **Temperature Accuracy: **±0.5 °C
21 * **IP Rated**: IP68
22 * **Max Pressure**: 0.6MPa
23
24 == 1.2 Application for Different Range ==
25
26 [[image:image-20240714173018-1.png]]
27
28
29 == 1.3 Wiring ==
30
31
32 == 1.4 Mechinical Drawing ==
33
34 [[image:image-20240714174241-2.png]]
35
36
37 == 1.5 Installation ==
38
39
40 == 1.6 Maintain ==
41
42
Edwin Chen 8.1 43 == 1.7 RS485 Commands ==
44
Karry Zhuang 12.1 45 === 1.7.1 Query data ===
Edwin Chen 8.1 46
Karry Zhuang 11.1 47 The address of the EC K10 sensor is 11
48
Karry Zhuang 10.1 49 The query data command is 11 03 00 00 00 02 C6 9B
50
Karry Zhuang 11.1 51 For example, the returned data is 11 03 04 (% style="color:red" %)**02 AE**(%%) 01 64 8B D0. 02 AE is converted to decimal 686,  K=10, EC: 6860uS/cm
Karry Zhuang 10.1 52
53
54 The address of the EC K1 sensor is 12
55
56 The query data command is 12 03 00 00 00 02 C6 A8
57
Karry Zhuang 11.1 58 For example, the returned data is 12 03 04 (% style="color:red" %)**02 AE**(%%) 01 64 B8 D0. 02 AE is converted to decimal 686,  K=1, EC: 686uS/cm.
Karry Zhuang 10.1 59
Karry Zhuang 11.1 60
Karry Zhuang 12.1 61 === 1.7.2 Calibration Method ===
62
63
Karry Zhuang 15.1 64 This device uses one-point calibration, and you need to prepare a known E standard solution. When mileage K=1, 1~~2000 uses 1413μS/cm standard solution, and when mileage K=10, 10~~20000 uses 12.88mS/cm standard solution.
Karry Zhuang 12.1 65
Karry Zhuang 15.1 66 The calibration steps are as follows:
67 (1) Place the electrode in distilled water and clean it. When mileage 1~~2000 uses 1413μS/cm standard solution, enter the following calibration command after the data is stable.
68
Karry Zhuang 14.1 69 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
70 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address high|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Quantity high|=(% style="width: 1px; background-color: rgb(79, 129, 189); color: white;" %)Quantity low|=(% style="width: 139.083px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Data|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 high
71 |(% style="width:99px" %)0X12|(% style="width:112px" %)0X10|(% style="width:135px" %)0X00|(% style="width:126px" %)0X26|(% style="width:85px" %)0X00|(% style="width:1px" %)0X02|(% style="width:1px" %)0X04|(% style="width:1px" %)(((
72 0X00
Karry Zhuang 12.1 73
Karry Zhuang 14.1 74 0X00
75
76 0X37
77
78 0X32
79 )))|(% style="width:1px" %)0XBD|(% style="width:1px" %)0XFC
80
Karry Zhuang 15.1 81 1413*10 gives 0X00003732
Karry Zhuang 14.1 82
Karry Zhuang 15.1 83 Return
84
Karry Zhuang 13.1 85 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
Karry Zhuang 14.1 86 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address high|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Quantity high|=(% style="width: 1px; background-color: rgb(79, 129, 189); color: white;" %)Quantity low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 high
87 |(% style="width:99px" %)0X12|(% style="width:112px" %)0X10|(% style="width:135px" %)0X00|(% style="width:126px" %)0X26|(% style="width:85px" %)0X00|(% style="width:1px" %)0X02|(% style="width:1px" %)0XA2|(% style="width:1px" %)0XA0
88
89
Karry Zhuang 15.1 90
Karry Zhuang 14.1 91 (2) Place the electrode in distilled water to clean it. Use 12.88mS/cm standard solution for the range of 10~~20000. After the data is stable, enter the following calibration command
92
93 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
Karry Zhuang 13.1 94 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address high|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Quantity high|=(% style="width: 1px; background-color: rgb(79, 129, 189); color: white;" %)Quantity low|=(% style="width: 139.083px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Data|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 high
Karry Zhuang 14.1 95 |(% style="width:99px" %)0X11|(% style="width:112px" %)0X10|(% style="width:135px" %)0X00|(% style="width:126px" %)0X26|(% style="width:85px" %)0X00|(% style="width:1px" %)0X02|(% style="width:1px" %)0X04|(% style="width:1px" %)(((
96 0X00
Karry Zhuang 12.1 97
Karry Zhuang 14.1 98 0X01
99
100 0XF7
101
102 0X20
103 )))|(% style="width:1px" %)0X33|(% style="width:1px" %)0X75
104
Karry Zhuang 15.1 105 12880*10 gives 0X01F720
106
Karry Zhuang 14.1 107 Return
108
109 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
110 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address high|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Quantity high|=(% style="width: 1px; background-color: rgb(79, 129, 189); color: white;" %)Quantity low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 high
111 |(% style="width:99px" %)0X11|(% style="width:112px" %)0X06|(% style="width:135px" %)0X00|(% style="width:126px" %)0X26|(% style="width:85px" %)0X00|(% style="width:1px" %)0X02|(% style="width:1px" %)0XEB|(% style="width:1px" %)0X50
112
113
114
115
116
Edwin Chen 8.1 117 = 2. DR-PH01 Water PH Sensor =
118
Edwin Chen 9.1 119 == 2.7 RS485 Commands ==
Edwin Chen 8.1 120
Edwin Chen 9.1 121
Karry Zhuang 11.1 122 The address of the pH  sensor is 10
Edwin Chen 9.1 123
Karry Zhuang 11.1 124 The query data command is 10 03 00 00 00 01 87 4B. After the query, 7 bytes will be returned.
Karry Zhuang 10.1 125
Karry Zhuang 11.1 126 For example, the returned data is 10 03 02 (% style="color:red" %)**02 AE**(%%) C4 9B.
127
128 02 AE is the pH value, which is converted into decimal to get 686, and then two decimal places are added to get the actual value. 02 AE means the current pH value is 6.86.
129
130
Edwin Chen 8.1 131 = 3. DR-ORP1 Water ORP Sensor =
132
Edwin Chen 9.1 133 == 3.7 RS485 Commands ==
Edwin Chen 8.1 134
Edwin Chen 9.1 135
Karry Zhuang 11.1 136 The address of the ORP sensor is 13
Edwin Chen 9.1 137
Karry Zhuang 11.1 138 The query data command is 13 03 00 00 00 01 87 78
Karry Zhuang 10.1 139
Karry Zhuang 11.1 140 For example, the returned data is 13 03 02 (% style="color:red" %)**02 AE**(%%) 80 9B.
Karry Zhuang 10.1 141
Karry Zhuang 11.1 142 02 AE is the ORP value, converted to decimal, the actual value is 686, 02 AE means the current ORP value is 686mV
143
144
Edwin Chen 8.1 145 = 4. DR-DO1 Dissolved Oxygen Sensor =
146
Edwin Chen 9.1 147 == 4.7 RS485 Commands ==
Edwin Chen 8.1 148
Karry Zhuang 11.1 149
Karry Zhuang 10.1 150 The address of the dissolved oxygen sensor is 14
Edwin Chen 9.1 151
Karry Zhuang 10.1 152 The query data command is 14 03 00 14 00 01 C6 CB
Edwin Chen 9.1 153
Karry Zhuang 11.1 154 After the query, 7 bytes will be returned. For example, the returned data is 14 03 02 (% style="color:red" %)**03 78**(%%) B5 55. 03 78 is the value of dissolved oxygen.
Karry Zhuang 10.1 155
156 Converted to decimal, it is 888. Add two decimal places to get the actual value. 03 78 means the current dissolved oxygen is 8.88mg/L
157
Karry Zhuang 11.1 158
Edwin Chen 8.1 159 = 5. DR-TS1 Water Turbidity Sensor =
160
Edwin Chen 9.1 161 == 5.7 RS485 Commands ==
162
Karry Zhuang 10.1 163
164 The address of the dissolved oxygen sensor is 15
165
Karry Zhuang 11.1 166 The query data command is 15 03 00 00 00 01 87 1E
Karry Zhuang 10.1 167
Karry Zhuang 11.1 168 For example, the returned data is 15 03 02 (% style="color:red" %)**02 9A**(%%) 09 4C
169
170 02 9A is the turbidity value, converted to decimal, it is 666, and then divided by 10, the actual value is 66.6, 02 9A means the current turbidity value is 66.6 NTU
171
Edwin Chen 7.1 172