Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20240105101400-2.png]]
3
4
5
6
7
8
9
10 **Table of Contents :**
11
12 {{toc/}}
13
14
15
16
17
18
19 = 1. Introduction =
20
21 == 1.1 What is LoRaWAN Soil pH Sensor ==
22
23
24 The Dragino SPH01-LB/LS is a (% style="color:blue" %)**LoRaWAN Soil pH Sensor**(%%) for IoT of Agriculture. It is designed to measure the soil PH and soil temperature, so to send to the platform to analyze the soil acid or alkali level. The probe is IP68 waterproof.
25
26 SPH01-LB/LS probe is made by Solid AgCl reference electrode and Pure metal pH sensitive electrode. It can detect(% style="color:blue" %) **soil's pH **(%%)with high accuracy and stable value. The SPH01-LB/LS probe can be buried into soil for long time use.
27
28 The LoRa wireless technology used in SPH01-LB/LS allows device to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
29
30 SPH01-LB/LS (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
31
32 SPH01-LB/LS is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery **(%%)or (% style="color:blue" %)**solar powered + li-on battery**(%%) it is designed for long term use up to 5 years.
33
34 Each SPH01-LB/LS is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on.
35
36
37 [[image:image-20230530180339-1.png||height="408" width="806"]]
38
39
40 == 1.2 ​Features ==
41
42
43 * LoRaWAN 1.0.3 Class A
44 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
45 * Ultra-low power consumption
46 * Monitor soil pH with temperature compensation.
47 * Monitor soil temperature
48 * Monitor Battery Level
49 * Support pH calibration by end user
50 * Support Bluetooth v5.1 and LoRaWAN remote configure
51 * Support wireless OTA update firmware
52 * IP66 Waterproof Enclosure
53 * IP68 rate for the Sensor Probe
54 * AT Commands to change parameters
55 * Downlink to change configure
56 * 8500mAh Li/SOCl2 Battery (SPH01-LB)
57 * Solar panel + 3000mAh Li-on battery (SPH01-LS)
58
59 == 1.3 Specification ==
60
61
62 (% style="color:blue" %)**Common DC Characteristics:**
63
64 * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v
65 * Operating Temperature: -40 ~~ 85°C
66
67 (% style="color:blue" %)**Soil pH:**
68
69 * Range: 3 ~~ 10 pH
70 * Resolution: 0.01 pH
71 * Accuracy: ±2% under (0~~50 ℃, Accuracy will poor under 0 due to frozen)
72 * Temperature Compensation Range: 0 ~~ 50℃
73 * IP68 Protection
74 * Length: 3.5 meters
75
76 (% style="color:blue" %)**Soil Temperature:**
77
78 * Range -40℃~85℃
79 * Resolution: 0.1℃
80 * Accuracy: <±0.5℃(-10℃~40℃),<±0.8℃ (others)
81 * IP68 Protection
82 * Length: 3.5 meters
83
84 (% style="color:blue" %)**LoRa Spec:**
85
86 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
87 * Max +22 dBm constant RF output vs.
88 * RX sensitivity: down to -139 dBm.
89 * Excellent blocking immunity
90
91 (% style="color:blue" %)**Battery:**
92
93 * Li/SOCI2 un-chargeable battery
94 * Capacity: 8500mAh
95 * Self-Discharge: <1% / Year @ 25°C
96 * Max continuously current: 130mA
97 * Max boost current: 2A, 1 second
98
99 (% style="color:blue" %)**Power Consumption**
100
101 * Sleep Mode: 5uA @ 3.3v
102 * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
103
104 == 1.4 Applications ==
105
106
107 * Smart Agriculture
108
109 == 1.5 Sleep mode and working mode ==
110
111
112 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life.
113
114 (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode.
115
116
117 == 1.6 Button & LEDs ==
118
119
120 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-LB_Waterproof_RS485UART_to_LoRaWAN_Converter/WebHome/image-20240103160425-4.png?rev=1.1||alt="image-20240103160425-4.png" height="451" width="633"]]
121
122 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
123 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 225px;background-color:#4F81BD;color:white" %)**Action**
124 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
125 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
126 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
127 )))
128 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
129 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network.
130 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
131 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network.
132 )))
133 |(% style="width:167px" %)Fast press ACT 5 times.|(% style="width:117px" %)Deactivate Device|(% style="width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means device is in Deep Sleep Mode.
134
135 == 1.7 BLE connection ==
136
137
138 SPH01-LB/LS support BLE remote configure.
139
140
141 BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:
142
143 * Press button to send an uplink
144 * Press button to active device.
145 * Device Power on or reset.
146
147 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
148
149
150 == 1.8 Mechanical ==
151
152 === 1.8.1 for LB version(% style="display:none" %) (%%) ===
153
154 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143884058-338.png]]
155
156
157 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143899218-599.png]]
158
159
160 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143909447-639.png]]
161
162
163 === 1.8.2 for LS version ===
164
165
166 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20231231203439-3.png?width=886&height=385&rev=1.1||alt="image-20231231203439-3.png"]]
167
168
169 = 2. Configure SPH01-LB/LS to connect to LoRaWAN network =
170
171 == 2.1 How it works ==
172
173
174 The SPH01-LB/LS is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class A**(%%) mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the SPH01-LB/LS. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
175
176 (% style="display:none" %) (%%)
177
178 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
179
180
181 Following is an example for how to join the [[TTN v3 LoRaWAN Network>>url:https://console.cloud.thethings.network/]]. Below is the network structure; we use the [[LPS8v2>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/228-lps8v2.html]] as a LoRaWAN gateway in this example.
182
183 [[image:image-20230530180406-2.png||height="408" width="806"]]
184
185 The LPS8v2 is already set to connected to [[TTN network >>url:https://console.cloud.thethings.network/]], so what we need to now is configure the TTN server.
186
187 (% style="display:none" %)
188
189
190 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from SPH01-LB/LS.
191
192 Each SPH01-LB/LS is shipped with a sticker with the default device EUI as below:
193
194 [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]]
195
196
197 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
198
199
200 (% style="color:blue" %)**Register the device**
201
202 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/1654935135620-998.png?rev=1.1||alt="1654935135620-998.png"]]
203
204
205 (% style="color:blue" %)**Add APP EUI and DEV EUI**
206
207 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-4.png?width=753&height=551&rev=1.1||alt="图片-20220611161308-4.png"]]
208
209
210 (% style="color:blue" %)**Add APP EUI in the application**
211
212
213 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-5.png?width=742&height=601&rev=1.1||alt="图片-20220611161308-5.png"]]
214
215
216 (% style="color:blue" %)**Add APP KEY**
217
218 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-6.png?width=744&height=485&rev=1.1||alt="图片-20220611161308-6.png"]]
219
220
221 (% style="color:blue" %)**Step 2:**(%%) Activate on SPH01-LB/LS
222
223
224 Press the button for 5 seconds to activate the SPH01-LB/LS.
225
226 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:blue" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
227
228 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
229
230
231 == 2.3 ​Uplink Payload ==
232
233
234 (((
235 SPH01-LB/LS will uplink payload via LoRaWAN with below payload format: 
236 )))
237
238 (((
239 Uplink payload includes in total 11 bytes.
240 )))
241
242 (((
243 Normal uplink payload:
244 )))
245
246 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:470px" %)
247 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
248 **Size(bytes)**
249 )))|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 70px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 70px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**1**
250 |(% style="width:62.5px" %)Value|(% style="width:62.5px" %)[[BAT>>||anchor="H2.3.1BatteryInfo"]]|(% style="width:62.5px" %)(((
251 [[Temperature (Optional)>>||anchor="H2.3.2DS18B20Temperaturesensor"]]
252 )))|[[Soil pH>>||anchor="H2.3.3SoilpH"]]|[[Soil Temperature>>||anchor="H2.3.4SoilTemperature"]]|(((
253 [[Digital Interrupt (Optional)>>||anchor="H2.3.5InterruptPin"]]
254 )))|Reserve|(((
255 [[Message Type>>||anchor="H2.3.6MessageType"]]
256 )))
257
258 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSPH01-LoRaWAN%20Soil%20pH%20Sensor%20User%20Manual/WebHome/1654592721645-318.png?rev=1.1||alt="1654592721645-318.png"]]
259
260
261 === 2.3.1 Battery Info ===
262
263
264 Check the battery voltage for SPH01-LB/LS.
265
266 Ex1: 0x0B45 = 2885mV
267
268 Ex2: 0x0B49 = 2889mV
269
270
271 === 2.3.2 DS18B20 Temperature sensor ===
272
273
274 This is optional, user can connect external DS18B20 sensor to the +3.3v, 1-wire and GND pin . and this field will report temperature.
275
276
277 **Example**:
278
279 If payload is: 0105H:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
280
281 If payload is: FF3FH :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
282
283
284 === 2.3.3 Soil pH ===
285
286
287 Range: 0 ~~ 14 pH
288
289 **Example:**
290
291 (% style="color:#037691" %)** 0x02B7(H) = 695(D) = 6.95pH**
292
293
294 === 2.3.4 Soil Temperature ===
295
296
297 Get Soil Temperature 
298
299
300 **Example**:
301
302 If payload is: **0105H**:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
303
304 If payload is: **FF3FH** :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
305
306
307 === 2.3.5 Interrupt Pin ===
308
309
310 This data field shows if this packet is generated by interrupt or not. [[Click here>>||anchor="H3.3.2SetInterruptMode"]] for the hardware and software set up.
311
312
313 **Example:**
314
315 0x00: Normal uplink packet.
316
317 0x01: Interrupt Uplink Packet.
318
319
320 === 2.3.6 Message Type ===
321
322
323 (((
324 For a normal uplink payload, the message type is always 0x01.
325 )))
326
327 (((
328 Valid Message Type:
329 )))
330
331 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:496px" %)
332 |=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Message Type Code**|=(% style="width: 163px;background-color:#4F81BD;color:white" %)**Description**|=(% style="width: 173px;background-color:#4F81BD;color:white" %)**Payload**
333 |(% style="width:160px" %)0x01|(% style="width:163px" %)Normal Uplink|(% style="width:173px" %)[[Normal Uplink Payload>>||anchor="H2.3200BUplinkPayload"]]
334 |(% style="width:160px" %)0x02|(% style="width:163px" %)Reply configures info|(% style="width:173px" %)[[Configure Info Payload>>||anchor="H3.4GetFirmwareVersionInfo"]]
335 |(% style="width:160px" %)0x03|(% style="width:163px" %)Reply Calibration Info|(% style="width:173px" %)[[Calibration Payload>>||anchor="H2.7Calibration"]]
336
337 === 2.3.7 Decode payload in The Things Network ===
338
339
340 While using TTN network, you can add the payload format to decode the payload.
341
342 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSPH01-LoRaWAN%20Soil%20pH%20Sensor%20User%20Manual/WebHome/1654592762713-715.png?rev=1.1||alt="1654592762713-715.png"]]
343
344 (((
345 The payload decoder function for TTN is here:
346 )))
347
348 In the page (% style="color:#037691" %)**Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder**(%%) to add the decoder from: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
349
350
351 == 2.4 Uplink Interval ==
352
353
354 The SPH01-LB/LS by default uplink the sensor data every 20 minutes. User can change this interval by AT Command or LoRaWAN Downlink Command. See this link: [[Change Uplink Interval>>doc:Main.End Device AT Commands and Downlink Command.WebHome||anchor="H4.1ChangeUplinkInterval"]]
355
356
357 == 2.5 Datalog Feature ==
358
359
360 Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, SPH01-LB/LS will store the reading for future retrieving purposes.
361
362
363 === 2.5.1 Ways to get datalog via LoRaWAN ===
364
365
366 Set PNACKMD=1, SPH01-LB/LS will wait for ACK for every uplink, when there is no LoRaWAN network, SPH01-LB/LS will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery.
367
368 * (((
369 a) SPH01-LB/LS will do an ACK check for data records sending to make sure every data arrive server.
370 )))
371 * (((
372 b) SPH01-LB/LS will send data in **CONFIRMED Mode** when PNACKMD=1, but SPH01-LB/LS won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if SPH01-LB/LS gets a ACK, SPH01-LB/LS will consider there is a network connection and resend all NONE-ACK messages.
373 )))
374
375 === 2.5.2 Unix TimeStamp ===
376
377
378 SPH01-LB/LS uses Unix TimeStamp format based on
379
380 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-11.png?width=627&height=97&rev=1.1||alt="图片-20220523001219-11.png" height="97" width="627"]]
381
382 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
383
384 Below is the converter example
385
386 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-12.png?width=720&height=298&rev=1.1||alt="图片-20220523001219-12.png" height="298" width="720"]]
387
388
389 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
390
391
392 === 2.5.3 Set Device Time ===
393
394
395 User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command.
396
397 Once SPH01-LB/LS Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to SPH01-LB/LS. If SPH01-LB/LS fails to get the time from the server, SPH01-LB/LS will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days).
398
399 (% style="color:red" %)**Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 v3 and loriot support but TTN V3 v2 doesn't support. If server doesn't support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN V3 v2 if SYNCMOD=1.**
400
401
402 === 2.5.4 Datalog Uplink payload (FPORT~=3) ===
403
404
405 The Datalog uplinks will use below payload format.
406
407 **Retrieval data payload:**
408
409 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
410 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)**Size(bytes)**|=(% style="width:30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 120px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 90px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 120px;background-color:#4F81BD;color:white" %)**4**
411 |(% style="width:95px" %)Value|(% style="width:220px" %)PH|(((
412 Temperature
413 )))|DS18B20_Temperature|Level of PA8|Unix Time Stamp
414
415 (% style="color:blue" %)**Poll Message Flag**(%%): 1: This message is a poll message reply.
416
417 * Poll Message Flag is set to 1.
418
419 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
420
421 For example, in US915 band, the max payload for different DR is:
422
423 (% style="color:blue" %)**a) DR0:**(%%) max is 11 bytes so one entry of data
424
425 (% style="color:blue" %)**b) DR1:**(%%) max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
426
427 (% style="color:blue" %)**c) DR2:**(%%) total payload includes 11 entries of data
428
429 (% style="color:blue" %)**d) DR3: **(%%)total payload includes 22 entries of data.
430
431 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
432
433
434 **Example:**
435
436 If SPH01-LB/LS has below data inside Flash:
437
438 [[image:image-20230606170132-1.png]]
439
440 If user sends below downlink command: 31646D84E1646D856C05
441
442 Where : Start time: 646D84E1 = time 23/5/24 03:30:41
443
444 Stop time: 646D856C= time 23/5/24 03:33:00
445
446
447 === 2.5.5 Poll sensor value ===
448
449
450 Users can poll sensor values based on timestamps. Below is the downlink command.
451
452 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:425.818px" %)
453 |(% colspan="4" style="background-color:#4f81bd; color:white; width:423px" %)**Downlink Command to poll Open/Close status (0x31)**
454 |(% style="width:58px" %)**1byte**|(% style="width:127px" %)**4bytes**|(% style="width:124px" %)**4bytes**|(% style="width:114px" %)**1byte**
455 |(% style="width:58px" %)31|(% style="width:127px" %)Timestamp start|(% style="width:124px" %)Timestamp end|(% style="width:114px" %)Uplink Interval
456
457 (((
458 Timestamp start and Timestamp end-use Unix TimeStamp format as mentioned above. Devices will reply with all data logs during this period, using the uplink interval.
459 )))
460
461 (((
462 For example, downlink command [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/image-20220518162852-1.png?rev=1.1||alt="image-20220518162852-1.png"]]
463 )))
464
465 (((
466 Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00's data
467 )))
468
469 (((
470 Uplink Internal =5s,means SPH01-LB/LS will send one packet every 5s. range 5~~255s.
471 )))
472
473
474 == 2.6 Installation and Maintain ==
475
476 === 2.6.1 Before measurement ===
477
478
479 (((
480 If the SPH01-LB/LS has more than 7 days not use or just clean the pH probe. User should put the probe inside pure water for more than 24 hours for activation. If no put in water, user need to put inside soil for more than 24 hours to ensure the measurement accuracy. 
481 )))
482
483
484 === 2.6.2 Measurement ===
485
486
487 (((
488 (% style="color:blue" %)**Measurement the soil surface:**
489 )))
490
491 (((
492 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSPH01-LoRaWAN%20Soil%20pH%20Sensor%20User%20Manual/WebHome/1654592946732-634.png?rev=1.1||alt="1654592946732-634.png"]]
493 )))
494
495 (((
496 Choose the proper measuring position. Split the surface soil according to the measured deep.
497 )))
498
499 (((
500 Put pure water, or rainwater to make the soil of measurement point to moist mud. Remove rocks or hard things.
501 )))
502
503 (((
504 Slowly insert the probe to the measure point. Don't use large force which will break the probe. Make sure not shake when inserting.
505 )))
506
507 (((
508 Put soil over the probe after insert. And start to measure.
509 )))
510
511
512 (((
513 (% style="color:blue" %)**Measurement inside soil:**
514 )))
515
516 (((
517 Dig a hole with diameter > 20CM.
518 )))
519
520 (((
521 Insert the probe inside, method like measure the surface.
522 )))
523
524
525 === 2.6.3 Maintain Probe ===
526
527
528 (((
529 ~1. pH probe electrode is fragile and no strong. User must avoid strong force or hitting it.
530 )))
531
532 (((
533 2. After long time use (3~~ 6  months). The probe electrode needs to be clean; user can use high grade sandpaper to polish it or put in 5% hydrochloric acid for several minutes. After the metal probe looks like new, user can use pure water to wash it.
534 )))
535
536 (((
537 3. Probe reference electrode is also no strong, need to avoid strong force or hitting.
538 )))
539
540 (((
541 4. User should keep reference electrode wet while not use.
542 )))
543
544 (((
545 5. Avoid the probes to touch oily matter. Which will cause issue in accuracy.
546 )))
547
548 (((
549 6. The probe is IP68 can be put in water.
550
551
552 )))
553
554 == 2.7 Calibration ==
555
556
557 (% style="color:blue" %)**Step1 :**(%%)** Clean probe**
558
559 user can use high grade sandpaper to polish it or put in 5% hydrochloric acid for several minutes. After the metal probe looks new, users can clean it to remove hydrochloric acid or other liquids from the surface.
560
561 (% style="color:blue" %)**Step2 :**(%%)** Immerse the sensor in ph buffer solution to make the sensor values stable**
562
563 (((
564 User can do calibration for the probe. It is limited to use below pH buffer solution to calibrate: 4.00, 6.86, 9.18. When calibration, user need to clean the electrode and put the probe in the pH buffer solution to wait the value stable ( a new clean electrode might need max 24 hours to be stable).
565
566 (% style="color:red" %)**Note:Only one ph buffer with one of the ph values needs to be calibrated during calibration. Wait for the sensor measurement value to be stable, it does not need to be the same as the ph marked by the ph buffer**
567
568
569 (% style="color:blue" %)**Step3 :**(%%)** The numerically stable sensors were calibrated using commands**
570 )))
571
572 (((
573 User can use below command to calibrate.
574
575 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %)
576 |(% style="background-color:#4f81bd; color:white; width:120px" %)**pH buffer solution**|(% style="background-color:#4f81bd; color:white; width:150px" %)**AT Command to calibrate**|(% style="background-color:#4f81bd; color:white; width:150px" %)**Downlink Command**|(% style="background-color:#4f81bd; color:white; width:100px" %)**Read Cal Value**
577 |(% style="width:149px" %)4.00|(% style="width:197px" %)AT+PHCAL=4|(% style="width:206px" %)(((
578 0x13 04
579 Reply with Calibrate payload
580 )))|(% style="width:136px" %)(((
581 AT+PHCAL=?
582 Example 41,61,91
583 )))
584 |(% style="width:149px" %)6.86|(% style="width:197px" %)AT+PHCAL=6|(% style="width:206px" %)(((
585 0x13 06
586 Reply with Calibrate payload
587 )))|(% style="width:136px" %)AT+PHCAL=?
588 |(% style="width:149px" %)9.18|(% style="width:197px" %)AT+PHCAL=9|(% style="width:206px" %)(((
589 0x13 09
590 Reply with Calibrate payload
591 )))|(% style="width:136px" %)AT+PHCAL=?
592 |(% style="width:149px" %)Factory Default|(% style="width:197px" %)AT+PHCAL=15|(% style="width:206px" %)(((
593 0x13 15
594 Reply with Calibrate payload
595 )))|(% style="width:136px" %)(((
596 AT+PHCAL=?
597 Example 151
598 )))
599 )))
600
601 To use the AT COMMAND, refer to this link:
602
603 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
604
605 * AT Command via UART Connection : See [[UART Connection>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]].
606
607 To use Downlink, take TTN as an example, please refer to this link:
608
609 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>url:http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
610
611 When the command is successfully used, the node sends a uplink.
612 This is the payload for uplink
613
614 (% style="color:#037691" %)**Calibration Payload**
615
616 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
617 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
618 **Size(bytes)**
619 )))|=(% style="width: 100px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 100px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 100px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**7**|=(% style="width: 90px;background-color:#4F81BD;color:white" %)**1**
620 |Value|(((
621 PH4 Calibrate value
622 )))|PH6.86 Calibrate value|(((
623 PH9.18 Calibrate value
624 )))|Reserve|(((
625 [[Message Type>>||anchor="H2.3.6MessageType"]]
626 Always 0x03
627 )))
628
629 User can also send 0x14 downlink command to poll the current calibration payload.
630
631 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:480px" %)
632 |=(% style="width: 183px; background-color:#4F81BD;color:white" %)**Downlink Control Type**|=(% style="width: 55px; background-color:#4F81BD;color:white" %)FPort|=(% style="width: 93px; background-color:#4F81BD;color:white" %)**Type Code**|=(% style="width: 146px; background-color:#4F81BD;color:white" %)**Downlink payload size(bytes)**
633 |(% style="width:183px" %)Get Calibration Version Info|(% style="width:55px" %)Any|(% style="width:93px" %)14|(% style="width:146px" %)2
634
635 * Reply to the confirmation package: 14 01
636
637 * Reply to non-confirmed packet: 14 00
638
639 (% style="color:blue" %)**Step4:**(%%)**After the calibration is completed, its measurement results in this ph buffer solution should be consistent with the numerical value of the command used in the calibration.**
640
641 Examples:
642 After using the command AT+PH=9 in 9.18ph buffer
643 The readout returned by the sensor in 9.18ph buffer should be pH=9
644
645
646 == 2.8 Frequency Plans ==
647
648
649 The SPH01-LB/LS uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country.
650
651 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
652
653
654 = 3. Configure SPH01-LB/LS =
655
656 == 3.1 Configure Methods ==
657
658
659 SPH01-LB/LS supports below configure method:
660
661 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
662
663 * AT Command via UART Connection : See [[UART Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]].
664
665 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
666
667 == 3.2 General Commands ==
668
669
670 These commands are to configure:
671
672 * General system settings like: uplink interval.
673
674 * LoRaWAN protocol & radio related command.
675
676 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
677
678 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/]]
679
680
681 == 3.3 Commands special design for SPH01-LB/LS ==
682
683
684 These commands only valid for SPH01-LB/LS, as below:
685
686
687 === 3.3.1 Set Transmit Interval Time ===
688
689
690 (((
691 Feature: Change LoRaWAN End Node Transmit Interval.
692 )))
693
694 (((
695 (% style="color:blue" %)**AT Command: AT+TDC**
696 )))
697
698 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
699 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 137px;background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
700 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
701 30000
702 OK
703 the interval is 30000ms = 30s
704 )))
705 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
706 OK
707 Set transmit interval to 60000ms = 60 seconds
708 )))
709
710 (((
711 (% style="color:blue" %)**Downlink Command: 0x01**
712 )))
713
714 (((
715 Format: Command Code (0x01) followed by 3 bytes time value.
716 )))
717
718 (((
719 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
720 )))
721
722 * (((
723 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
724 )))
725
726 * (((
727 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds
728
729
730
731 )))
732
733 === 3.3.2 Set Interrupt Mode ===
734
735
736 Feature, Set Interrupt mode for GPIO_EXTI of pin.
737
738 When AT+INTMOD=0 is set, GPIO_EXTI is used as a digital input port.
739
740 (% style="color:blue" %)**AT Command: AT+INTMOD**
741
742 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
743 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response**
744 |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)(((
745 0
746 OK
747 the mode is 0 =Disable Interrupt
748 )))
749 |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)(((
750 Set Transmit Interval
751 0. (Disable Interrupt),
752 ~1. (Trigger by rising and falling edge)
753 2. (Trigger by falling edge)
754 3. (Trigger by rising edge)
755 )))|(% style="width:157px" %)OK
756
757 (% style="color:blue" %)**Downlink Command: 0x06**
758
759 Format: Command Code (0x06) followed by 3 bytes.
760
761 This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.
762
763 * Example 1: Downlink Payload: 06000000  ~/~/  Turn off interrupt mode
764
765 * Example 2: Downlink Payload: 06000003  ~/~/  Set the interrupt mode to rising edge trigger
766
767 === 3.3.3 Calibrate Sensor ===
768
769
770 Detail See [[Calibration Guide>>||anchor="H2.7Calibration"]] for the user of 0x13 and 0x14 downlink commands
771
772
773 === 3.3.4 Get Firmware Version Info ===
774
775
776 Feature: use downlink to get firmware version.
777
778 (% style="color:#037691" %)**Downlink Command: 0x26**
779
780 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
781 |(% style="background-color:#4f81bd; color:white; width:193px" %)**Downlink Control Type**|(% style="background-color:#4f81bd; color:white; width:57px" %)**FPort**|(% style="background-color:#4f81bd; color:white; width:91px" %)**Type Code**|(% style="background-color:#4f81bd; color:white; width:159px" %)**Downlink payload size(bytes)**
782 |(% style="width:193px" %)Get Firmware Version Info|(% style="width:57px" %)Any|(% style="width:91px" %)26|(% style="width:149px" %)2
783
784 * Reply to the confirmation package: 26 01
785
786 * Reply to non-confirmed packet: 26 00
787
788 Device will send an uplink after got this downlink command. With below payload:
789
790 Configures info payload:
791
792 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:470px" %)
793 |(% style="background-color:#4f81bd; color:white; width:70px" %)**Size(bytes)**|(% style="background-color:#4f81bd; color:white; width:70px" %)**1**|(% style="background-color:#4f81bd; color:white; width:100px" %)**2**|(% style="background-color:#4f81bd; color:white; width:100px" %)**1**|(% style="background-color:#4f81bd; color:white; width:70px" %)**1**|(% style="background-color:#4f81bd; color:white; width:60px" %)**2**
794 |Value|Sensor Model|Firmware Version|Frequency Band|Sub-band|BAT
795
796 (% style="color:#037691" %)**Software Type**(%%): Always 0x2C for SPH01-LB/LS
797
798 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
799
800 (% style="color:#037691" %)**Frequency Band**:
801
802 0x01: EU868
803
804 0x02: US915
805
806 0x03: IN865
807
808 0x04: AU915
809
810 0x05: KZ865
811
812 0x06: RU864
813
814 0x07: AS923
815
816 0x08: AS923-1
817
818 0x09: AS923-2
819
820 0x0a: AS923-3
821
822 0x0b: CN470
823
824 0x0c: EU433
825
826 0x0d: KR920
827
828 0x0e: MA869
829
830
831 (% style="color:#037691" %)**Sub-Band**(%%):
832
833 AU915 and US915: value 0x00 ~~ 0x08
834
835 CN470: value 0x0B ~~ 0x0C
836
837 Other Bands: Always 0x00
838
839
840 (% style="color:#037691" %)**Battery Info**:
841
842 Check the battery voltage.
843
844 Ex1: 0x0B45 = 2885mV
845
846 Ex2: 0x0B49 = 2889mV
847
848
849 = 4. Battery & Power Consumption =
850
851
852 SPH01-LB use ER26500 + SPC1520 battery pack and SPH01-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace.
853
854 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
855
856
857 = 5. OTA Firmware update =
858
859
860 (% class="wikigeneratedid" %)
861 User can change firmware SPH01-LB/LS to:
862
863 * Change Frequency band/ region.
864
865 * Update with new features.
866
867 * Fix bugs.
868
869 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/p1tiy43naiyy75u/AACzHWEGlYNeHDjMe2bkxotUa?dl=0]]**
870
871 Methods to Update Firmware:
872
873 * (Recommanded way) OTA firmware update via wireless:   [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]
874
875 * Update through UART TTL interface. **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**.
876
877 = 6. FAQ =
878
879 == 6.1  AT Commands input doesn't work ==
880
881
882 In the case if user can see the console output but can't type input to the device. Please check if you already include the (% style="color:green" %)**ENTER**(%%) while sending out the command. Some serial tool doesn't send (% style="color:green" %)**ENTER**(%%) while press the send key, user need to add ENTER in their string.
883
884
885 = 7. Order Info =
886
887
888 **Part Number: (% style="color:blue" %)SPH01-LB-XX(%%) or (% style="color:blue" %)SPH01-LS-XX(%%)**
889
890 (% style="color:red" %)**XX**(%%): The default frequency band
891
892 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
893
894 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
895
896 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
897
898 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
899
900 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
901
902 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
903
904 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
905
906 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
907
908 = 8. ​Packing Info =
909
910
911 (% style="color:#037691" %)**Package Includes**:
912
913 * SPH01-LB or SPH01-LS LoRaWAN Soil Ph Sensor x 1
914
915 (% style="color:#037691" %)**Dimension and weight**:
916
917 * Device Size: cm
918
919 * Device Weight: g
920
921 * Package Size / pcs : cm
922
923 * Weight / pcs : g
924
925 = 9. Support =
926
927
928 * Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule.
929
930 * Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[Support@dragino.cc>>mailto:Support@dragino.cc]].
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0