Wiki source code of Water Quality Sensors

Version 23.1 by Karry Zhuang on 2024/07/18 19:02

Show last authors
1 **Table of Contents:**
2
3 {{toc/}}
4
5
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 **Electrode installation form**
41
42 A:Side wall installation
43
44 B:Top flange installation
45
46 C:Pipeline bend installation
47
48 D:Pipeline bend installation
49
50 E:Flow-through installation
51
52 F:Submerged installation
53
54 [[image:image-20240718190121-1.png||height="350" width="520"]]
55
56 **Several common installation methods of electrodes**
57
58 When installing the sensor on site, you should strictly follow the correct installation method shown in the following picture. Incorrect installation method will cause data deviation.
59
60 A. Several common incorrect installation methods
61
62 [[image:image-20240718190204-2.png||height="262" width="487"]]
63
64 Error cause: The electrode joint is too long, the extension part is too short, the sensor is easy to form a dead cavity, resulting in measurement error.
65
66 [[image:image-20240718190221-3.png||height="292" width="500"]]
67
68 Error cause: Measurement error or instability may occur due to water flow not being able to fill the pipe or air accumulation at high altitudes.
69
70 B. Correct installation method
71
72 [[image:image-20240718190249-4.png||height="287" width="515"]]
73
74
75 == 1.6 Maintain ==
76
77
78 * The equipment itself generally does not require daily maintenance. When an obvious fault occurs, please do not open it and repair it yourself. Contact us as soon as possible!
79 * There is an appropriate amount of soaking solution in the protective bottle at the front end of the electrode. The electrode head is soaked in it to keep the glass bulb and the liquid junction activated. When measuring, loosen the bottle cap, pull out the electrode, and rinse it with pure water before use.
80 * Preparation of electrode soaking solution: Take a packet of PH4.00 buffer, dissolve it in 250 ml of pure water, and soak it in 3M potassium chloride solution. The preparation is as follows: Take 25 grams of analytical pure potassium chloride and dissolve it in 100 ml of pure water.
81 * The glass bulb at the front end of the electrode cannot come into contact with hard objects. Any damage and scratches will make the electrode ineffective.
82 * Before measurement, the bubbles in the electrode glass bulb should be shaken off, otherwise it will affect the measurement. When measuring, the electrode should be stirred in the measured solution and then placed still to accelerate the response.
83 * The electrode should be cleaned with deionized water before and after measurement to ensure accuracy.
84 * After long-term use, the pH electrode will become passivated, which is characterized by a decrease in sensitivity gradient, slow response, and inaccurate readings. At this time, the bulb at the bottom of the electrode can be soaked in 0.1M dilute hydrochloric acid for 24 hours (0.1M dilute hydrochloric acid preparation: 9 ml of hydrochloric acid is diluted to 1000 ml with distilled water), and then soaked in 3.3M potassium chloride solution for 24 hours. If the pH electrode is seriously passivated and soaking in 0.1M hydrochloric acid has no effect, the pH electrode bulb can be soaked in 4% HF (hydrofluoric acid) for 3-5 seconds, washed with pure water, and then soaked in 3.3M potassium chloride solution for 24 hours to restore its performance.
85 * Glass bulb contamination or liquid junction blockage can also cause electrode passivation. At this time, it should be cleaned with an appropriate solution according to the nature of the contaminant.
86 * (((
87 The equipment should be calibrated before each use. For long-term use, it is recommended to calibrate once every 3 months. The calibration frequency should be adjusted appropriately according to different application conditions (degree of dirt in the application, deposition of chemical substances, etc.). After aging, the electrodes should be replaced in time.
88 )))
89
90 == 1.7 RS485 Commands ==
91
92
93 RS485 signal (K1 default address 0x12; K10 default address 0x11):
94 Standard Modbus-RTU protocol, baud rate: 9600; check bit: none; data bit: 8; stop bit: 1
95
96
97 === 1.7.1 Query address ===
98
99 send
100
101 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
102 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)Original 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
103 |(% style="width:99px" %)0XFE |(% style="width:112px" %)0X03|(% style="width:135px" %)0X00|(% style="width:126px" %)0X50|(% style="width:85px" %)0X00|(% style="width:1px" %)0X00|(% style="width:1px" %)0X51|(% style="width:1px" %)0XD4
104
105 If you forget the original address of the sensor, you can use the broadcast address 0XFE instead. When using 0XFE, the host can only connect to one slave, which can be used as a method of address query.
106
107
108 response
109
110 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:561.333px" %)
111 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)New address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 106px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 93px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 104px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high
112 |(% style="width:99px" %)0X1|(% style="width:112px" %)0X3|(% style="width:106px" %)0X00|(% style="width:93px" %)0X20|(% style="width:104px" %)0XF0
113
114 === 1.7.2 Change address ===
115
116 For example: Change the address of the sensor with address 1 to 2, master → slave
117
118 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
119 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)Original 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
120 |(% style="width:99px" %)0X01|(% style="width:112px" %)0X06|(% style="width:135px" %)0X00|(% style="width:126px" %)0X50|(% style="width:85px" %)0X00|(% style="width:1px" %)0X02|(% style="width:1px" %)0X08|(% style="width:1px" %)0X1A
121
122 If the sensor receives correctly, the data is returned along the original path.
123 Note: If you forget the original address of the sensor, you can use the broadcast address 0XFE instead. When using 0XFE, the host can only connect to one slave, and the return address is still the original address, which can be used as a method of address query.
124
125
126 === 1.7.3 Modify intercept ===
127
128
129 send
130
131 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
132 |=(% 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
133 |(% style="width:99px" %)0X01|(% style="width:112px" %)0X06|(% style="width:135px" %)0X00|(% style="width:126px" %)0X23|(% style="width:85px" %)0X00|(% style="width:1px" %)0X01|(% style="width:1px" %)0XFA|(% style="width:1px" %)(((
134 0X97
135 )))
136
137 Change the intercept of the sensor with address 1 to 10 (default 0), which is 0X000A in the command.
138
139 response
140
141 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
142 |=(% 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
143 |(% style="width:99px" %)0X01|(% style="width:112px" %)0X06|(% style="width:135px" %)(((
144 0X02
145 )))|(% style="width:126px" %)0X00|(% style="width:85px" %)0X00|(% style="width:1px" %)0X0A|(% style="width:1px" %)0X0A|(% style="width:1px" %)(((
146 0XE5
147 )))
148
149 === 1.7.4 Query data ===
150
151 The address of the EC K10 sensor is 11
152
153 The query data command is 11 03 00 00 00 02 C6 9B
154
155 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
156
157
158 The address of the EC K1 sensor is 12
159
160 The query data command is 12 03 00 00 00 02 C6 A8
161
162 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
163
164
165 === 1.7.5 Calibration Method ===
166
167
168 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.
169
170 The calibration steps are as follows:
171 (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.
172
173 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
174 |=(% 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
175 |(% 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" %)(((
176 0X00
177
178 0X00
179
180 0X37
181
182 0X32
183 )))|(% style="width:1px" %)0XBD|(% style="width:1px" %)0XFC
184
185 1413*10 gives 0X00003732
186
187 response
188
189 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
190 |=(% 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
191 |(% 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
192
193 (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
194
195 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
196 |=(% 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
197 |(% 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" %)(((
198 0X00
199
200 0X01
201
202 0XF7
203
204 0X20
205 )))|(% style="width:1px" %)0X33|(% style="width:1px" %)0X75
206
207 12880*10 gives 0X01F720
208
209 response
210
211 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
212 |=(% 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
213 |(% 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
214
215 = 2. DR-PH01 Water PH Sensor =
216
217 == 2.7 RS485 Commands ==
218
219
220 The address of the pH  sensor is 10
221
222 The query data command is 10 03 00 00 00 01 87 4B. After the query, 7 bytes will be returned.
223
224 For example, the returned data is 10 03 02 (% style="color:red" %)**02 AE**(%%) C4 9B.
225
226 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.
227
228
229 = 3. DR-ORP1 Water ORP Sensor =
230
231 == 3.7 RS485 Commands ==
232
233
234 The address of the ORP sensor is 13
235
236 The query data command is 13 03 00 00 00 01 87 78
237
238 For example, the returned data is 13 03 02 (% style="color:red" %)**02 AE**(%%) 80 9B.
239
240 02 AE is the ORP value, converted to decimal, the actual value is 686, 02 AE means the current ORP value is 686mV
241
242
243 = 4. DR-DO1 Dissolved Oxygen Sensor =
244
245 == 4.7 RS485 Commands ==
246
247
248 The address of the dissolved oxygen sensor is 14
249
250 The query data command is 14 03 00 14 00 01 C6 CB
251
252 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.
253
254 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
255
256
257 = 5. DR-TS1 Water Turbidity Sensor =
258
259 == 5.7 RS485 Commands ==
260
261
262 The address of the dissolved oxygen sensor is 15
263
264 The query data command is 15 03 00 00 00 01 87 1E
265
266 For example, the returned data is 15 03 02 (% style="color:red" %)**02 9A**(%%) 09 4C
267
268 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