Wiki source code of Water Quality Sensors

Version 15.2 by Karry Zhuang on 2024/07/18 18:35

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 Do not power on while connect the cables. Double check the wiring before power on.
41
42 Installation Photo as reference:
43
44 **~ Submerged installation:**
45
46 The lead wire of the equipment passes through the waterproof pipe, and the 3/4 thread on the top of the equipment is connected to the 3/4 thread of the waterproof pipe with raw tape. Ensure that the top of the equipment and the equipment wire are not flooded.
47
48 [[image:image-20240715181933-4.png||height="281" width="258"]]
49
50 **~ Pipeline installation:**
51
52 Connect the equipment to the pipeline through the 3/4 thread.
53
54 [[image:image-20240715182122-6.png||height="291" width="408"]]
55
56 **Sampling:**
57
58 Take representative water samples according to sampling requirements. If it is inconvenient to take samples, you can also put the electrode into the solution to be tested and read the output data. After a period of time, take out the electrode and clean it.
59
60 **Measure the pH of the water sample:**
61
62 First rinse the electrode with distilled water, then rinse it with the water sample, then immerse the electrode in the sample, carefully shake the test cup or stir it to accelerate the electrode balance, let it stand, and record the pH value when the reading is stable.
63
64
65 == 1.6 Maintain ==
66
67
68 * 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!
69 * 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.
70 * 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.
71 * 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.
72 * 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.
73 * The electrode should be cleaned with deionized water before and after measurement to ensure accuracy.
74 * 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.
75 * 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.
76 * (((
77 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.
78 )))
79
80
81 == 1.7 RS485 Commands ==
82
83
84 RS485 signal (K1 default address 0x12; K10 default address 0x11):
85 Standard Modbus-RTU protocol, baud rate: 9600; check bit: none; data bit: 8; stop bit: 1
86
87
88 === 1.7.1 Query data ===
89
90 The address of the EC K10 sensor is 11
91
92 The query data command is 11 03 00 00 00 02 C6 9B
93
94 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
95
96
97 The address of the EC K1 sensor is 12
98
99 The query data command is 12 03 00 00 00 02 C6 A8
100
101 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.
102
103
104 === 1.7.2 Calibration Method ===
105
106
107 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.
108
109 The calibration steps are as follows:
110 (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.
111
112 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
113 |=(% 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
114 |(% 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" %)(((
115 0X00
116
117 0X00
118
119 0X37
120
121 0X32
122 )))|(% style="width:1px" %)0XBD|(% style="width:1px" %)0XFC
123
124 1413*10 gives 0X00003732
125
126 Return
127
128 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
129 |=(% 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
130 |(% 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
131
132
133 (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
134
135 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
136 |=(% 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
137 |(% 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" %)(((
138 0X00
139
140 0X01
141
142 0XF7
143
144 0X20
145 )))|(% style="width:1px" %)0X33|(% style="width:1px" %)0X75
146
147 12880*10 gives 0X01F720
148
149 Return
150
151 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
152 |=(% 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
153 |(% 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
154
155
156 === 1.7.3 Query address ===
157
158
159 send
160
161 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
162 |=(% 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
163 |(% 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
164
165 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.
166
167
168 return
169
170 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
171 |=(% 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
172 |(% style="width:99px" %)0X0XFE |(% 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
173
174
175
176
177
178
179
180
181
182
183
184 = 2. DR-PH01 Water PH Sensor =
185
186 == 2.7 RS485 Commands ==
187
188
189 The address of the pH  sensor is 10
190
191 The query data command is 10 03 00 00 00 01 87 4B. After the query, 7 bytes will be returned.
192
193 For example, the returned data is 10 03 02 (% style="color:red" %)**02 AE**(%%) C4 9B.
194
195 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.
196
197
198 = 3. DR-ORP1 Water ORP Sensor =
199
200 == 3.7 RS485 Commands ==
201
202
203 The address of the ORP sensor is 13
204
205 The query data command is 13 03 00 00 00 01 87 78
206
207 For example, the returned data is 13 03 02 (% style="color:red" %)**02 AE**(%%) 80 9B.
208
209 02 AE is the ORP value, converted to decimal, the actual value is 686, 02 AE means the current ORP value is 686mV
210
211
212 = 4. DR-DO1 Dissolved Oxygen Sensor =
213
214 == 4.7 RS485 Commands ==
215
216
217 The address of the dissolved oxygen sensor is 14
218
219 The query data command is 14 03 00 14 00 01 C6 CB
220
221 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.
222
223 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
224
225
226 = 5. DR-TS1 Water Turbidity Sensor =
227
228 == 5.7 RS485 Commands ==
229
230
231 The address of the dissolved oxygen sensor is 15
232
233 The query data command is 15 03 00 00 00 01 87 1E
234
235 For example, the returned data is 15 03 02 (% style="color:red" %)**02 9A**(%%) 09 4C
236
237 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
238
239