Show last authors
1
2
3
4 (% style="text-align:center" %)
5 [[image:image-20240109154731-4.png||height="671" width="945"]]
6
7
8
9
10
11
12
13 **Table of Contents :**
14
15 {{toc/}}
16
17
18
19
20
21
22 = 1. Introduction =
23
24 == 1.1 What is LoRaWAN Pressure Sensor ==
25
26
27 (((
28 The Dragino PS-LB/LS series sensors are (% style="color:blue" %)**LoRaWAN Pressure Sensor**(%%) for Internet of Things solution. PS-LB/LS can measure Air, Water pressure and liquid level and upload the sensor data via wireless to LoRaWAN IoT server.
29 )))
30
31 (((
32 The PS-LB/LS series sensors include (% style="color:blue" %)**Thread Installation Type**(%%) and (% style="color:blue" %)**Immersion Type**(%%), it supports different pressure range which can be used for different measurement requirement.
33 )))
34
35 (((
36 The LoRa wireless technology used in PS-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.
37 )))
38
39 (((
40 PS-LB/LS supports BLE configure and wireless OTA update which make user easy to use.
41 )))
42
43 (((
44 PS-LB/LS is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery **(%%)or (% style="color:blue" %)**solar powered + Li-ion battery **(%%), it is designed for long term use up to 5 years.
45 )))
46
47 (((
48 Each PS-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.
49 )))
50
51 [[image:1675071321348-194.png]]
52
53
54 == 1.2 ​Features ==
55
56
57 * LoRaWAN 1.0.3 Class A
58 * Ultra-low power consumption
59 * Measure air / gas or water pressure
60 * Different pressure range available
61 * Thread Installation Type or Immersion Type
62 * Monitor Battery Level
63 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
64 * Support Bluetooth v5.1 and LoRaWAN remote configure
65 * Support wireless OTA update firmware
66 * Uplink on periodically
67 * Downlink to change configure
68 * Controllable 3.3v,5v and 12v output to power external sensor
69 * 8500mAh Li/SOCl2 Battery (PS-LB)
70 * Solar panel + 3000mAh Li-ion battery (PS-LS)
71
72 == 1.3 Specification ==
73
74
75 (% style="color:#037691" %)**Micro Controller:**
76
77 * MCU: 48Mhz ARM
78 * Flash: 256KB
79 * RAM: 64KB
80
81 (% style="color:#037691" %)**Common DC Characteristics:**
82
83 * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v
84 * Operating Temperature: -40 ~~ 85°C
85
86 (% style="color:#037691" %)**LoRa Spec:**
87
88 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz,Band 2 (LF): 410 ~~ 528 Mhz
89 * Max +22 dBm constant RF output vs.
90 * RX sensitivity: down to -139 dBm.
91 * Excellent blocking immunity
92
93 (% style="color:#037691" %)**Current Input Measuring :**
94
95 * Range: 0 ~~ 20mA
96 * Accuracy: 0.02mA
97 * Resolution: 0.001mA
98
99 (% style="color:#037691" %)**Voltage Input Measuring:**
100
101 * Range: 0 ~~ 30v
102 * Accuracy: 0.02v
103 * Resolution: 0.001v
104
105 (% style="color:#037691" %)**Battery:**
106
107 * Li/SOCI2 un-chargeable battery
108 * Capacity: 8500mAh
109 * Self-Discharge: <1% / Year @ 25°C
110 * Max continuously current: 130mA
111 * Max boost current: 2A, 1 second
112
113 (% style="color:#037691" %)**Power Consumption**
114
115 * Sleep Mode: 5uA @ 3.3v
116 * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
117
118 == 1.4 Probe Types ==
119
120 === 1.4.1 Thread Installation Type ===
121
122
123 [[image:1675071448299-229.png]]
124
125 * Hersman Pressure Transmitter
126 * Measuring Range: -0.1 ~~ 0 ~~ 60MPa, see order info.
127 * Accuracy: 0.2% F.S
128 * Long-Term Stability: 0.2% F.S ±0.05%
129 * Overload 200% F.S
130 * Zero Temperature Drift: 0.03% FS/℃(≤100Kpa), 0.02%FS/℃(>100Kpa)
131 * FS Temperature Drift: 0.003% FS/℃(≤100Kpa), 0.002%FS/℃(>100Kpa)
132 * Storage temperature: -30℃~~80℃
133 * Operating temperature: -20℃~~60℃
134 * Connector Type: Various Types, see order info
135
136 === 1.4.2 Immersion Type ===
137
138
139 [[image:image-20240109160445-5.png||height="221" width="166"]]
140
141 * Immersion Type, Probe IP Level: IP68
142 * Measuring Range: Measure range can be customized, up to 100m.
143 * Accuracy: 0.2% F.S
144 * Long-Term Stability: ±0.2% F.S / Year
145 * Storage temperature: -30°C~~80°C
146 * Operating temperature: 0°C~~50°C
147 * Material: 316 stainless steels
148
149 === 1.4.3 Wireless Differential Air Pressure Sensor ===
150
151 [[image:image-20240511174954-1.png]]
152
153 * Measuring Range: -100KPa~~0~~100KPa(Optional measuring range).
154 * Accuracy: 0.5% F.S, resolution is 0.05%.
155 * Overload: 300% F.S
156 * Zero temperature drift: ±0.03%F.S/°C
157 * Operating temperature: -20°C~~60°C
158 * Storage temperature:  -20°C~~60°C
159 * Compensation temperature: 0~~50°C
160
161 == 1.5 Application and Installation ==
162
163 === 1.5.1 Thread Installation Type ===
164
165
166 (% style="color:blue" %)**Application:**
167
168 * Hydraulic Pressure
169 * Petrochemical Industry
170 * Health and Medical
171 * Food & Beverage Processing
172 * Auto-controlling house
173 * Constant Pressure Water Supply
174 * Liquid Pressure measuring
175
176 Order the suitable thread size and install to measure the air / liquid pressure
177
178 [[image:1675071670469-145.png]]
179
180
181 === 1.5.2 Immersion Type ===
182
183
184 (% style="color:blue" %)**Application:**
185
186 Liquid & Water Pressure / Level detect.
187
188 [[image:1675071725288-579.png]]
189
190
191 Below is the wiring to for connect the probe to the device.
192
193 The Immersion Type Sensor has different variant which defined by Ixx. For example, this means two points:
194
195 * Cable Length: 10 Meters
196 * Water Detect Range: 0 ~~ 10 Meters.
197
198 [[image:1675071736646-450.png]]
199
200
201 [[image:1675071776102-240.png]]
202
203 Size of immersion type water depth sensor:
204
205 [[image:image-20250401102131-1.png||height="268" width="707"]]
206
207
208 === 1.5.3 Wireless Differential Air Pressure Sensor ===
209
210
211 (% style="color:blue" %)**Application:**
212
213 Indoor Air Control & Filter clogging Detect.
214
215 [[image:image-20240513100129-6.png]]
216
217 [[image:image-20240513100135-7.png]]
218
219
220 Below is the wiring to for connect the probe to the device.
221
222 [[image:image-20240513093957-1.png]]
223
224
225 Size of wind pressure transmitter:
226
227 [[image:image-20240513094047-2.png]]
228
229 Note: The above dimensions are measured by hand, and the numerical error of the shell is within ±0.2mm.
230
231
232 == 1.6 Sleep mode and working mode ==
233
234
235 (% 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.
236
237 (% 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.
238
239
240 == 1.7 Button & LEDs ==
241
242
243 [[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"]](% style="display:none" %)
244
245 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
246 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 226px;background-color:#4F81BD;color:white" %)**Action**
247 |(% style="background-color:#f2f2f2; width:167px" %)Pressing ACT between 1s < time < 3s|(% style="background-color:#f2f2f2; width:117px" %)Send an uplink|(% style="background-color:#f2f2f2; width:225px" %)(((
248 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
249 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
250 )))
251 |(% style="background-color:#f2f2f2; width:167px" %)Pressing ACT for more than 3s|(% style="background-color:#f2f2f2; width:117px" %)Active Device|(% style="background-color:#f2f2f2; width:225px" %)(((
252 (% style="background-color:#f2f2f2; 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.
253 (% style="background-color:#f2f2f2; color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
254 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.
255 )))
256 |(% style="background-color:#f2f2f2; width:167px" %)Fast press ACT 5 times.|(% style="background-color:#f2f2f2; width:117px" %)Deactivate Device|(% style="background-color:#f2f2f2; width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means PS-LB is in Deep Sleep Mode.
257
258 == 1.8 Pin Mapping ==
259
260
261 [[image:1675072568006-274.png]]
262
263
264 == 1.9 BLE connection ==
265
266
267 PS-LB/LS support BLE remote configure.
268
269
270 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:
271
272 * Press button to send an uplink
273 * Press button to active device.
274 * Device Power on or reset.
275
276 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
277
278
279 == 1.10 Mechanical ==
280
281 === 1.10.1 for LB version ===
282
283
284 [[image:image-20240109160800-6.png]]
285
286
287 === 1.10.2 for LS version ===
288
289
290 [[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"]]
291
292
293 = 2. Configure PS-LB/LS to connect to LoRaWAN network =
294
295 == 2.1 How it works ==
296
297
298 The PS-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 activate the PS-LB/LS. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
299
300
301 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
302
303
304 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.
305
306 [[image:1675144005218-297.png]]
307
308
309 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.
310
311
312 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from PS-LB/LS.
313
314 Each PS-LB/LS is shipped with a sticker with the default device EUI as below:
315
316 [[image:image-20230426085320-1.png||height="234" width="504"]]
317
318
319 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
320
321
322 (% style="color:blue" %)**Register the device**
323
324 [[image:1675144099263-405.png]]
325
326
327 (% style="color:blue" %)**Add APP EUI and DEV EUI**
328
329 [[image:1675144117571-832.png]]
330
331
332 (% style="color:blue" %)**Add APP EUI in the application**
333
334
335 [[image:1675144143021-195.png]]
336
337
338 (% style="color:blue" %)**Add APP KEY**
339
340 [[image:1675144157838-392.png]]
341
342 (% style="color:blue" %)**Step 2:**(%%) Activate on PS-LB/LS
343
344
345 Press the button for 5 seconds to activate the PS-LB/LS.
346
347 (% 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.
348
349 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
350
351
352 == 2.3 ​Uplink Payload ==
353
354 === 2.3.1 Device Status, FPORT~=5 ===
355
356
357 Include device configure status. Once PS-LB/LS Joined the network, it will uplink this message to the server.
358
359 Users can also use the downlink command(0x26 01) to ask PS-LB/LS to resend this uplink.
360
361 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
362 |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)**
363 |(% style="background-color:#f2f2f2; width:103px" %)**Size (bytes)**|(% style="background-color:#f2f2f2; width:72px" %)**1**|(% style="background-color:#f2f2f2" %)**2**|(% style="background-color:#f2f2f2; width:91px" %)**1**|(% style="background-color:#f2f2f2; width:86px" %)**1**|(% style="background-color:#f2f2f2; width:44px" %)**2**
364 |(% style="background-color:#f2f2f2; width:103px" %)**Value**|(% style="background-color:#f2f2f2; width:72px" %)Sensor Model|(% style="background-color:#f2f2f2" %)Firmware Version|(% style="background-color:#f2f2f2; width:91px" %)Frequency Band|(% style="background-color:#f2f2f2; width:86px" %)Sub-band|(% style="background-color:#f2f2f2; width:44px" %)BAT
365
366 Example parse in TTNv3
367
368 [[image:1675144504430-490.png]]
369
370
371 (% style="color:#037691" %)**Sensor Model**(%%): For PS-LB/LS, this value is 0x16
372
373 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
374
375 (% style="color:#037691" %)**Frequency Band**:
376
377 *0x01: EU868
378
379 *0x02: US915
380
381 *0x03: IN865
382
383 *0x04: AU915
384
385 *0x05: KZ865
386
387 *0x06: RU864
388
389 *0x07: AS923
390
391 *0x08: AS923-1
392
393 *0x09: AS923-2
394
395 *0x0a: AS923-3
396
397 *0x0b: CN470
398
399 *0x0c: EU433
400
401 *0x0d: KR920
402
403 *0x0e: MA869
404
405
406 (% style="color:#037691" %)**Sub-Band**:
407
408 AU915 and US915:value 0x00 ~~ 0x08
409
410 CN470: value 0x0B ~~ 0x0C
411
412 Other Bands: Always 0x00
413
414
415 (% style="color:#037691" %)**Battery Info**:
416
417 Check the battery voltage.
418
419 Ex1: 0x0B45 = 2885mV
420
421 Ex2: 0x0B49 = 2889mV
422
423
424 === 2.3.2 Sensor value, FPORT~=2 ===
425
426
427 Uplink payload includes in total 9 bytes.
428
429
430 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
431 |(% style="background-color:#4f81bd; color:white; width:97px" %)(((
432 **Size(bytes)**
433 )))|(% style="background-color:#4f81bd; color:white; width:48px" %)**2**|(% style="background-color:#4f81bd; color:white; width:71px" %)**2**|(% style="background-color:#4f81bd; color:white; width:98px" %)**2**|(% style="background-color:#4f81bd; color:white; width:73px" %)**2**|(% style="background-color:#4f81bd; color:white; width:122px" %)**1**
434 |(% style="width:97px" %)Value|(% style="width:48px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="width:71px" %)[[Probe Model>>||anchor="H2.3.4ProbeModel"]]|(% style="width:98px" %)[[0 ~~~~ 20mA value>>||anchor="H2.3.507E20mAvalue28IDC_IN29"]]|(% style="width:73px" %)[[0 ~~~~ 30v value>>||anchor="H2.3.607E30Vvalue28pinVDC_IN29"]]|(% style="width:122px" %)[[IN1 &IN2 Interrupt  flag>>||anchor="H2.3.7IN126IN226INTpin"]]
435
436 [[image:1675144608950-310.png]]
437
438
439 === 2.3.3 Battery Info ===
440
441
442 Check the battery voltage for PS-LB/LS.
443
444 Ex1: 0x0B45 = 2885mV
445
446 Ex2: 0x0B49 = 2889mV
447
448
449 === 2.3.4 Probe Model ===
450
451
452 PS-LB/LS has different kind of probe, 4~~20mA represent the full scale of the measuring range. So a 12mA output means different meaning for different probe. 
453
454
455 **For example.**
456
457 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
458 |(% style="background-color:#4f81bd; color:white" %)**Part Number**|(% style="background-color:#4f81bd; color:white" %)**Probe Used**|(% style="background-color:#4f81bd; color:white" %)**4~~20mA scale**|(% style="background-color:#4f81bd; color:white" %)**Example: 12mA meaning**
459 |(% style="background-color:#f2f2f2" %)PS-LB/LS-I3|(% style="background-color:#f2f2f2" %)immersion type with 3 meters cable|(% style="background-color:#f2f2f2" %)0~~3 meters|(% style="background-color:#f2f2f2" %)1.5 meters pure water
460 |(% style="background-color:#f2f2f2" %)PS-LB/LS-I5|(% style="background-color:#f2f2f2" %)immersion type with 5 meters cable|(% style="background-color:#f2f2f2" %)0~~5 meters|(% style="background-color:#f2f2f2" %)2.5 meters pure water
461 |(% style="background-color:#f2f2f2" %)PS-LB/LS-T20-B|(% style="background-color:#f2f2f2" %)T20 threaded probe|(% style="background-color:#f2f2f2" %)0~~1MPa|(% style="background-color:#f2f2f2" %)0.5MPa air / gas or water pressure
462
463 The probe model field provides the convenient for server to identical how it should parse the 4~~20mA sensor value and get the correct value.
464
465
466 === 2.3.5 0~~20mA value (IDC_IN) ===
467
468
469 The output value from **Pressure Probe**, use together with Probe Model to get the pressure value or water level.
470
471 (% style="color:#037691" %)**Example**:
472
473 27AE(H) = 10158 (D)/1000 = 10.158mA.
474
475
476 Instead of pressure probe, User can also connect a general 4~~20mA in this port to support different types of 4~~20mA sensors. below is the connection example:
477
478 [[image:image-20230225154759-1.png||height="408" width="741"]]
479
480
481 === 2.3.6 0~~30V value (pin VDC_IN) ===
482
483
484 Measure the voltage value. The range is 0 to 30V.
485
486 (% style="color:#037691" %)**Example**:
487
488 138E(H) = 5006(D)/1000= 5.006V
489
490
491 === 2.3.7 IN1&IN2&INT pin ===
492
493
494 IN1 and IN2 are used as digital input pins.
495
496 (% style="color:#037691" %)**Example**:
497
498 09 (H): (0x09&0x08)>>3=1    IN1 pin is high level.
499
500 09 (H): (0x09&0x04)>>2=0    IN2 pin is low level.
501
502
503 This data field shows if this packet is generated by (% style="color:blue" %)**Interrupt Pin** (%%)or not. [[Click here>>||anchor="H3.3.2SetInterruptMode"]] for the hardware and software set up. Note: The Internet Pin is a separate pin in the screw terminal.
504
505 (% style="color:#037691" %)**Example:**
506
507 09 (H): (0x09&0x02)>>1=1    The level of the interrupt pin.
508
509 09 (H): 0x09&0x01=1              0x00: Normal uplink packet.
510
511 0x01: Interrupt Uplink Packet.
512
513
514 === 2.3.8 Sensor value, FPORT~=7 ===
515
516
517 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
518 |(% style="background-color:#4f81bd; color:white; width:65px" %)(((
519 **Size(bytes)**
520 )))|(% style="background-color:#4f81bd; color:white; width:35px" %)**2**|(% style="background-color:#4f81bd; color:white; width:400px" %)**n**
521 |(% style="width:94px" %)Value|(% style="width:43px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="width:367px" %)(((
522 Voltage value, each 2 bytes is a set of voltage values.
523 )))
524
525 [[image:image-20230220171300-1.png||height="207" width="863"]]
526
527 Multiple sets of data collected are displayed in this form:
528
529 [voltage value1], [voltage value2], [voltage value3],…[voltage value n/2]
530
531
532 === 2.3.9 ​Decode payload in The Things Network ===
533
534
535 While using TTN network, you can add the payload format to decode the payload.
536
537 [[image:1675144839454-913.png]]
538
539
540 PS-LB/LS TTN Payload Decoder: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>url:https://github.com/dragino/dragino-end-node-decoder]]
541
542
543 == 2.4 Uplink Interval ==
544
545
546 The PS-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: [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.1ChangeUplinkInterval>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.1ChangeUplinkInterval||style="background-color: rgb(255, 255, 255);"]]
547
548
549 == 2.5 Show Data in DataCake IoT Server ==
550
551
552 [[DATACAKE>>url:https://datacake.co/]] provides a human friendly interface to show the sensor data, once we have data in TTN, we can use [[DATACAKE>>url:https://datacake.co/]] to connect to TTN and see the data in DATACAKE. Below are the steps:
553
554 (% style="color:blue" %)**Step 1: **(%%)Be sure that your device is programmed and properly connected to the network at this time.
555
556 (% style="color:blue" %)**Step 2:**(%%) To configure the Application to forward data to DATACAKE you will need to add integration. To add the DATACAKE integration, perform the following steps:
557
558 [[image:1675144951092-237.png]]
559
560
561 [[image:1675144960452-126.png]]
562
563
564 (% style="color:blue" %)**Step 3:**(%%) Create an account or log in Datacake.
565
566 (% style="color:blue" %)**Step 4:** (%%)Create PS-LB/LS product.
567
568 [[image:1675145004465-869.png]]
569
570
571 [[image:1675145018212-853.png]]
572
573
574 [[image:1675145029119-717.png]]
575
576
577 (% style="color:blue" %)**Step 5: **(%%)add payload decode
578
579 [[image:1675145051360-659.png]]
580
581
582 [[image:1675145060812-420.png]]
583
584
585 After added, the sensor data arrive TTN, it will also arrive and show in Datacake.
586
587 [[image:1675145081239-376.png]]
588
589
590 == 2.6 Datalog Feature (Since V1.1) ==
591
592
593 When a user wants to retrieve sensor value, he can send a poll command from the IoT platform to ask the sensor to send value in the required time slot.
594
595
596 === 2.6.1 Unix TimeStamp ===
597
598
599 PS-LB uses Unix TimeStamp format based on
600
601 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652861618065-927.png?width=705&height=109&rev=1.1||alt="1652861618065-927.png" height="109" width="705"]]
602
603 Users can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
604
605 Below is the converter example:
606
607 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652861637105-371.png?width=732&height=428&rev=1.1||alt="1652861637105-371.png"]]
608
609
610 === 2.6.2 Set Device Time ===
611
612
613 There are two ways to set the device's time:
614
615
616 (% style="color:blue" %)**1. Through LoRaWAN MAC Command (Default settings)**
617
618 Users need to set SYNCMOD=1 to enable sync time via the MAC command.
619
620 Once CPL01 Joined the LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to CPL01. If CPL01 fails to get the time from the server, CPL01 will use the internal time and wait for the next time request ~[[[via Device Status (FPORT=5)>>url:http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/#H2.3.1DeviceStatus2CFPORT3D5]]].
621
622 (% style="color:red" %)**Note: LoRaWAN Server needs to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature.**
623
624
625 (% style="color:blue" %)** 2. Manually Set Time**
626
627 Users need to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten by the time set by the server.
628
629
630 === 2.6.3 Poll sensor value ===
631
632 Users can poll sensor values based on timestamps. Below is the downlink command.
633
634 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
635 |=(% colspan="4" style="width: 160px; background-color:#4F81BD;color:white" %)**Downlink Command to poll Open/Close status (0x31)**
636 |(% style="background-color:#f2f2f2; width:67px" %)**1byte**|(% style="background-color:#f2f2f2; width:145px" %)**4bytes**|(% style="background-color:#f2f2f2; width:133px" %)**4bytes**|(% style="background-color:#f2f2f2; width:163px" %)**1byte**
637 |(% style="background-color:#f2f2f2; width:67px" %)31|(% style="background-color:#f2f2f2; width:145px" %)Timestamp start|(% style="background-color:#f2f2f2; width:133px" %)(((
638 Timestamp end
639 )))|(% style="background-color:#f2f2f2; width:163px" %)Uplink Interval
640
641 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.
642
643 For example, downlink command[[image:image-20250117104812-1.png]]
644
645 Is to check 2024/12/20 09:34:59 to 2024/12/20 14:34:59's data
646
647 Uplink Internal =5s,means PS-LB will send one packet every 5s. range 5~~255s.
648
649
650 === 2.6.4 Datalog Uplink payload (FPORT~=3) ===
651
652
653 The Datalog uplinks will use below payload format.
654
655 **Retrieval data payload:**
656
657 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
658 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
659 **Size(bytes)**
660 )))|=(% style="width: 40px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 55px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 83px; background-color: rgb(79, 129, 189); color: white;" %)**2**|=(% style="width: 201px; background-color: rgb(79, 129, 189); color: white;" %)**1**|=(% style="width: 86px; background-color: rgb(79, 129, 189); color: white;" %)**4**
661 |(% style="width:103px" %)Value|(% style="width:68px" %)(((
662 Probe
663
664 _mod
665 )))|(% style="width:104px" %)(((
666 VDC
667
668 _intput_V
669 )))|(% style="width:83px" %)(((
670 IDC
671
672 _intput_mA
673 )))|(% style="width:201px" %)(((
674 IN1_pin_level& IN2_pin_level& Exti_pin_level&Exti_status
675 )))|(% style="width:86px" %)Unix Time Stamp
676
677 **IN1_pin_level & IN2_pin_level & Exti_pin_level & Exti_status:**
678
679 [[image:image-20250117104847-4.png]]
680
681
682 **No ACK Message**:  1: This message means this payload is fromn Uplink Message which doesn't get ACK from the server before ( for **PNACKMD=1** feature)
683
684 **Poll Message Flag**: 1: This message is a poll message reply.
685
686 * Poll Message Flag is set to 1.
687
688 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
689
690 For example, in US915 band, the max payload for different DR is:
691
692 **a) DR0:** max is 11 bytes so one entry of data
693
694 **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
695
696 **c) DR2:** total payload includes 11 entries of data
697
698 **d) DR3: **total payload includes 22 entries of data.
699
700 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
701
702 **Example:**
703
704 If PS-LB-NA has below data inside Flash:
705
706 [[image:image-20250117104837-3.png]]
707
708
709 If user sends below downlink command: 316788D9BF6788DB6305
710
711 Where : Start time: 6788D9BF = time 25/1/16 10:04:47
712
713 Stop time: 6788DB63 = time 25/1/16 10:11:47
714
715
716 **PA-LB-NA will uplink this payload.**
717
718 [[image:image-20250117104827-2.png]]
719
720 (((
721 00001B620000406788D9BF  00000D130000406788D9FB  00000D120000406788DA37  00000D110000406788DA73  00000D100000406788DAAF  00000D100000406788DAEB  00000D0F0000406788DB27  00000D100000406788DB63
722 )))
723
724 (((
725 Where the first 11 bytes is for the first entry :
726 )))
727
728 (((
729 0000  0D10  0000  40  6788DB63
730 )))
731
732 (((
733 **Probe_mod **= 0x0000 = 0000
734 )))
735
736 (((
737 **VDC_intput_V **= 0x0D10/1000=3.344V
738
739 **IDC_intput_mA **= 0x0000/1000=0mA
740 )))
741
742 (((
743 **IN1_pin_level **= (0x40& 0x08)? "High":"Low" = 0(Low)
744
745 **IN2_pin_level = (**0x40& 0x04)? "High":"Low" = 0(Low)
746
747 **Exti_pin_level = (**0x40& 0x02)? "High":"Low" = 0(Low)
748
749 **Exti_status = (**0x40& 0x01)? "True":"False" = 0(False)
750 )))
751
752 (((
753 **Unix time** is 0x6788DB63 = 1737022307s = 2025/1/16 10:11:47
754 )))
755
756 **Its data format is:**
757
758 [Probe_mod, VDC_intput_V, IDC_intput_mA, IN1_pin_level**, **IN2_pin_level, Exti_pin_level, water_deep, Data_time],[Probe_mod, VDC_intput_V, IDC_intput_mA, IN1_pin_level**, **IN2_pin_level, Exti_pin_level, water_deep, Data_time],...
759
760 (% style="color:red" %)**Note: water_deep in the data needs to be converted using decoding to get it.**
761
762
763 === 2.6.5 Decoder in TTN V3 ===
764
765 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652862574387-195.png?width=722&height=359&rev=1.1||alt="1652862574387-195.png" height="359" width="722"]]
766
767 Please check the decoder from this link: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>url:https://github.com/dragino/dragino-end-node-decoder]]
768
769
770 == 2.7 Frequency Plans ==
771
772
773 The PS-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.
774
775 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/a>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
776
777
778 == 2.8 Report on Change Feature (Since firmware V1.2) ==
779
780 === 2.8.1 Uplink payload(Enable ROC) ===
781
782
783 Used to Monitor the IDC and VDC increments, and send ROC uplink when the IDC or VDC changes exceed.
784
785 With ROC enabled, the payload is as follows:
786
787 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
788 |(% style="background-color:#4f81bd; color:white; width:97px" %)(((
789 **Size(bytes)**
790 )))|(% style="background-color:#4f81bd; color:white; width:48px" %)**2**|(% style="background-color:#4f81bd; color:white; width:71px" %)**2**|(% style="background-color:#4f81bd; color:white; width:98px" %)**2**|(% style="background-color:#4f81bd; color:white; width:73px" %)**2**|(% style="background-color:#4f81bd; color:white; width:122px" %)**1**
791 |(% style="width:97px" %)Value|(% style="width:48px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="width:71px" %)[[Probe Model>>||anchor="H2.3.4ProbeModel"]]|(% style="width:98px" %)[[0 ~~~~ 20mA value>>||anchor="H2.3.507E20mAvalue28IDC_IN29"]]|(% style="width:73px" %)[[0 ~~~~ 30v value>>||anchor="H2.3.607E30Vvalue28pinVDC_IN29"]]|(% style="width:122px" %)(((
792 [[IN1 &IN2 Interrupt  flag>>||anchor="H2.3.7IN126IN226INTpin"]] & ROC_flag
793 )))
794
795 (% style="color:blue" %)**IN1 &IN2 , Interrupt  flag , ROC_flag:**
796
797 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:515px" %)
798 |(% style="background-color:#4f81bd; color:white; width:50px" %)**Size(bit)**|(% style="background-color:#4f81bd; color:white; width:60px" %)**bit7**|(% style="background-color:#4f81bd; color:white; width:62px" %)**bit6**|(% style="background-color:#4f81bd; color:white; width:62px" %)**bit5**|(% style="background-color:#4f81bd; color:white; width:65px" %)**bit4**|(% style="background-color:#4f81bd; color:white; width:56px" %)**bit3**|(% style="background-color:#4f81bd; color:white; width:55px" %)**bit2**|(% style="background-color:#4f81bd; color:white; width:55px" %)**bit1**|(% style="background-color:#4f81bd; color:white; width:50px" %)**bit0**
799 |(% style="width:75px" %)Value|(% style="width:89px" %)IDC_Roc_flagL|(% style="width:46.5834px" %)IDC_Roc_flagH|(% style="width:1px" %)VDC_Roc_flagL|(% style="width:89px" %)VDC_Roc_flagH|(% style="width:89px" %)IN1_pin_level|(% style="width:103px" %)IN2_pin_level|(% style="width:103px" %)Exti_pin_level|(% style="width:103px" %)Exti_status
800
801 * (% style="color:#037691" %)**IDC_Roc_flagL**
802
803 80 (H): (0x80&0x80)=80(H)=**1**000 0000(B)  bit7=1, "TRUE", This uplink is triggered when the decrease in the IDC compared to the last ROC refresh exceeds the set threshold.
804
805 60 (H): (0x60&0x80)=0  bit7=0, "FALSE", This uplink is not triggered when the decrease in the IDC compared to the last ROC refresh exceeds the set threshold.
806
807
808 * (% style="color:#037691" %)**IDC_Roc_flagH**
809
810 60 (H): (0x60&0x40)=60(H)=0**1**000 0000(B)  bit6=1, "TRUE", This uplink is triggered when the increase in the value of the IDC compared to the last ROC refresh exceeds the set threshold.
811
812 80 (H): (0x80&0x40)=0  bit6=0, "FALSE", This uplink is not triggered when the increase in the value of the IDC compared to the last ROC refresh exceeds the set threshold.
813
814
815 * (% style="color:#037691" %)**VDC_Roc_flagL**
816
817 20 (H): (0x20&0x20)=20(H)=00**1**0 0000(B)  bit5=1, "TRUE", This uplink is triggered when the decrease in the VDC compared to the last ROC refresh exceeds the set threshold.
818
819 90 (H): (0x90&0x20)=0  bit5=0, "FALSE", This uplink is not triggered when the decrease in the VDC compared to the last ROC refresh exceeds the set threshold.
820
821
822 * (% style="color:#037691" %)**VDC_Roc_flagH**
823
824 90 (H): (0x90&0x10)=10(H)=000**1** 0000(B)  bit4=1, "TRUE", This uplink is triggered when the increase in the value of the VDC compared to the last ROC refresh exceeds the set threshold.
825
826 20 (H): (0x20&0x10)=0  bit4=0, "FALSE", This uplink is not triggered when the increase in the value of the VDC compared to the last ROC refresh exceeds the set threshold.
827
828
829 * (% style="color:#037691" %)**IN1_pin_level & IN2_pin_level**
830
831 IN1 and IN2 are used as digital input pins.
832
833 80 (H): (0x80&0x08)=0  IN1 pin is low level.
834
835 80 (H): (0x09&0x04)=0    IN2 pin is low level.
836
837
838 * (% style="color:#037691" %)**Exti_pin_level &Exti_status**
839
840 This data field shows whether the packet is generated by an interrupt pin.
841
842 Note: The Internet pin of the old motherboard is a separate pin in the screw terminal, and the interrupt pin of the new motherboard(SIB V1.3) is the **GPIO_EXTI** pin.
843
844 **Exti_pin_level:**  80 (H): (0x80&0x02)=0  "low", The level of the interrupt pin.
845
846 **Exti_status: **80 (H): (0x80&0x01)=0  "False", Normal uplink packet.
847
848
849 === 2.8.2 Set the Report on Change ===
850
851
852 Feature: Get or Set the Report on Change.
853
854
855 ==== 2.8.2.1 Wave alarm mode ====
856
857 Feature: By setting the detection period and a change value, the IDC/VDC variable is monitored whether it exceeds the set change value. If this change value is exceeded, the ROC uplink is sent and the comparison value is flushed.
858
859 * (% style="color:#037691" %)**Change value: **(%%)The amount by which the next detection value increases/decreases relative to the previous detection value.
860 * (% style="color:#037691" %)**Comparison value:**(%%) A parameter to compare with the latest ROC test.
861
862 (% style="color:blue" %)**AT Command: AT+ROC**
863
864 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
865 |=(% style="width: 163px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 154px; background-color: rgb(79, 129, 189); color: white;" %)**Parameters**|=(% style="width: 197px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
866 |(% style="width:143px" %)AT+ROC=?|(% style="width:154px" %)Show current ROC setting|(% style="width:197px" %)(((
867 0,0,0,0(default)
868 OK
869 )))
870 |(% colspan="1" rowspan="4" style="width:143px" %)(((
871
872
873
874
875 AT+ROC=a,b,c,d
876 )))|(% style="width:154px" %)(((
877
878
879
880
881
882
883 **a**: Enable or disable the ROC
884 )))|(% style="width:197px" %)(((
885 **0:** off
886 **1:** Turn on the wave alarm mode, send the ROC uplink when the increment exceeds the set parameter and refresh the comparison value.
887
888 **2: **Turn on the wave alarm mode, send the ROC uplink when the increment exceeds the set parameter and refresh the comparison value. In addition, the comparison value is refreshed when the device sends packets ([[TDC>>||anchor="H3.3.1SetTransmitIntervalTime"]] or [[ACT>>||anchor="H1.7Button26LEDs"]]).
889 )))
890 |(% style="width:154px" %)**b**: Set the detection interval|(% style="width:197px" %)(((
891 Range:  0~~65535s
892 )))
893 |(% style="width:154px" %)**c**: Setting the IDC change value|(% style="width:197px" %)Unit: uA
894 |(% style="width:154px" %)**d**: Setting the VDC change value|(% style="width:197px" %)Unit: mV
895
896 **Example:**
897
898 * AT+ROC=0,0,0,0  ~/~/The ROC function is not used.
899 * AT+ROC=1,60,3000, 500  ~/~/ Check value every 60 seconds. lf there is change in IDC (>3mA) or VDC (>500mV), sends an ROC uplink, and the comparison value is refreshed.
900 * AT+ROC=1,60,3000,0  ~/~/ Check value every 60 seconds. lf there is change in IDC (>3mA), send an ROC uplink and the comparison value of IDC is refreshed. dd=0 Means doesn't monitor Voltage.
901 * AT+ROC=2,60,3000,0  ~/~/ Check value every 60 seconds. lf there is change in IDC (>3mA), send an ROC uplink and the comparison value of IDC is refreshed. dd=0 Means doesn't monitor Voltage. In addition, if the change in the IDC does not exceed 3mA, then the ROC uplink is not sent, and the comparison value is not refreshed by the ROC uplink packet. However, if the device TDC time arrives, or if the user manually sends packets, then the IDC comparison value is also refreshed.
902
903 (% style="color:blue" %)**Downlink Command: 0x09 aa bb cc dd**
904
905 Format: Function code (0x09) followed by 4 bytes.
906
907 (% style="color:blue" %)**aa: **(% style="color:#037691" %)**1 byte;**(%%) Set the wave alarm mode.
908
909 (% style="color:blue" %)**bb: **(% style="color:#037691" %)**2 bytes;**(%%) Set the detection interval. (second)
910
911 (% style="color:blue" %)**cc: **(% style="color:#037691" %)**2 bytes;**(%%) Setting the IDC change threshold. (uA)
912
913 (% style="color:blue" %)**dd: **(% style="color:#037691" %)**2 bytes;**(%%) Setting the VDC change threshold. (mV)
914
915 **Example:**
916
917 * Downlink Payload: **09 01 00 3C 0B B8 01 F4 ** ~/~/Equal to AT+ROC=1,60,3000, 500
918 * Downlink Payload: **09 01 00 3C 0B B8 00 00 ** ~/~/Equal to AT+ROC=1,60,3000,0
919 * Downlink Payload: **09 02 00 3C 0B B8 00 00 ** ~/~/Equal to AT+ROC=2,60,3000,0
920
921 (% style="color:blue" %)**Screenshot of parsing example in TTN:**
922
923 * AT+ROC=1,60,3000, 500.
924
925 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-LB-NA--LoRaWAN_Analog_Sensor_User_Manual/WebHome/image-20241019170902-1.png?width=1454&height=450&rev=1.1||alt="image-20241019170902-1.png"]]
926
927
928 ==== 2.8.2.2 Over-threshold alarm mode ====
929
930 Feature: Monitors whether the IDC/VDC exceeds the threshold by setting the detection period and threshold. Alarm if the threshold is exceeded.
931
932 (% style="color:blue" %)**AT Command: AT+ROC=3,a,b,c,d,e**
933
934 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
935 |=(% style="width: 163px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 160px; background-color: rgb(79, 129, 189); color: white;" %)**Parameters**|=(% style="width: 185px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
936 |(% style="width:143px" %)AT+ROC=?|(% style="width:160px" %)Show current ROC setting|(% style="width:185px" %)(((
937 0,0,0,0(default)
938 OK
939 )))
940 |(% colspan="1" rowspan="5" style="width:143px" %)(((
941
942
943
944
945 AT+ROC=(% style="color:blue" %)**3**(%%),a,b,c,d,e
946 )))|(% style="width:160px" %)(((
947 **a: **Set the detection interval
948 )))|(% style="width:185px" %)(((
949 Range:  0~~65535s
950 )))
951 |(% style="width:160px" %)**b**: Set the IDC alarm trigger condition|(% style="width:185px" %)(((
952 **0:** Less than the set IDC threshold, Alarm
953
954 **1:** Greater than the set IDC threshold, Alarm
955 )))
956 |(% style="width:160px" %)(((
957 **c**:  IDC alarm threshold
958 )))|(% style="width:185px" %)(((
959 Unit: uA
960 )))
961 |(% style="width:160px" %)**d**: Set the VDC alarm trigger condition|(% style="width:185px" %)(((
962 **0:** Less than the set VDC threshold, Alarm
963
964 **1:** Greater than the set VDC threshold, Alarm
965 )))
966 |(% style="width:160px" %)**e:** VDC alarm threshold|(% style="width:185px" %)Unit: mV
967
968 **Example:**
969
970 * AT+ROC=3,60,0,3000,0,5000  ~/~/The data is checked every 60 seconds. If the IDC is less than 3mA or the VDC is less than 5000mV, an alarm is generated.
971 * AT+ROC=3,180,1,3000,1,5000  ~/~/The data is checked every 180 seconds. If the IDC is greater than 3mA or the VDC is greater than 5000mV, an alarm is generated.
972 * AT+ROC=3,300,0,3000,1,5000  ~/~/The data is checked every 300 seconds. If the IDC is less than 3mA or the VDC is greater than 5000mV, an alarm is generated.
973
974 (% style="color:blue" %)**Downlink Command: 0x09 03 aa bb cc dd ee**
975
976 Format: Function code (0x09) followed by 03 and the remaining 5 bytes.
977
978 (% style="color:blue" %)**aa: **(% style="color:#037691" %)**2 bytes;**(%%) Set the detection interval.(second)
979
980 (% style="color:blue" %)**bb: **(% style="color:#037691" %)**1 byte; **(%%)Set the IDC alarm trigger condition.
981
982 (% style="color:blue" %)**cc: **(% style="color:#037691" %)**2 bytes;**(%%) IDC alarm threshold.(uA)
983
984
985 (% style="color:blue" %)**dd: **(% style="color:#037691" %)**1 byte;**(%%) Set the VDC alarm trigger condition.
986
987 (% style="color:blue" %)**ee: **(% style="color:#037691" %)**2 bytes; **(%%)VDC alarm threshold.(mV)
988
989 **Example:**
990
991 * Downlink Payload: **09 03 00 3C 00 0B B8 00 13 38** ~/~/Equal to AT+ROC=3,60,0,3000,0,5000
992 * Downlink Payload: **09 03 00 b4 01 0B B8 01 13 38**  ~/~/Equal to AT+ROC=3,60,1,3000,1,5000
993 * Downlink Payload: **09 03 01 2C 00 0B B8 01 13 38**  ~/~/Equal to AT+ROC=3,60,0,3000,1,5000
994
995 (% style="color:blue" %)**Screenshot of parsing example in TTN:**
996
997 * AT+ROC=3,60,0,3000,0,5000
998
999 [[image:image-20250116180030-2.png]]
1000
1001
1002 == 2.9 ​Firmware Change Log ==
1003
1004
1005 **Firmware download link:**
1006
1007 [[https:~~/~~/www.dropbox.com/sh/gf1glloczbzz19h/AABbuYI4WY6VdAmpXo6o1V2Ka?dl=0>>url:https://www.dropbox.com/sh/gf1glloczbzz19h/AABbuYI4WY6VdAmpXo6o1V2Ka?dl=0]]
1008
1009
1010 = 3. Configure PS-LB/LS =
1011
1012 == 3.1 Configure Methods ==
1013
1014
1015 PS-LB/LS supports below configure method:
1016
1017 * AT Command via Bluetooth Connection (**Recommand Way**): [[BLE Configure Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
1018 * AT Command via UART Connection : See [[FAQ>>||anchor="H6.FAQ"]].
1019 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>url:http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
1020
1021 == 3.2 General Commands ==
1022
1023
1024 These commands are to configure:
1025
1026 * General system settings like: uplink interval.
1027 * LoRaWAN protocol & radio related command.
1028
1029 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
1030
1031 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/]]
1032
1033
1034 == 3.3 Commands special design for PS-LB/LS ==
1035
1036
1037 These commands only valid for PS-LB/LS, as below:
1038
1039
1040 === 3.3.1 Set Transmit Interval Time ===
1041
1042
1043 Feature: Change LoRaWAN End Node Transmit Interval.
1044
1045 (% style="color:blue" %)**AT Command: AT+TDC**
1046
1047 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
1048 |=(% style="width: 160px; background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 160px; background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Response**
1049 |(% style="background-color:#f2f2f2; width:157px" %)AT+TDC=?|(% style="background-color:#f2f2f2; width:166px" %)Show current transmit Interval|(% style="background-color:#f2f2f2" %)(((
1050 30000
1051 OK
1052 the interval is 30000ms = 30s
1053 )))
1054 |(% style="background-color:#f2f2f2; width:157px" %)AT+TDC=60000|(% style="background-color:#f2f2f2; width:166px" %)Set Transmit Interval|(% style="background-color:#f2f2f2" %)(((
1055 OK
1056 Set transmit interval to 60000ms = 60 seconds
1057 )))
1058
1059 (% style="color:blue" %)**Downlink Command: 0x01**
1060
1061 Format: Command Code (0x01) followed by 3 bytes time value.
1062
1063 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
1064
1065 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
1066 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
1067
1068 === 3.3.2 Set Interrupt Mode ===
1069
1070
1071 Feature, Set Interrupt mode for GPIO_EXIT.
1072
1073 (% style="color:blue" %)**AT Command: AT+INTMOD**
1074
1075 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
1076 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Response**
1077 |(% style="background-color:#f2f2f2; width:154px" %)AT+INTMOD=?|(% style="background-color:#f2f2f2; width:196px" %)Show current interrupt mode|(% style="background-color:#f2f2f2; width:157px" %)(((
1078 0
1079 OK
1080 the mode is 0 =Disable Interrupt
1081 )))
1082 |(% style="background-color:#f2f2f2; width:154px" %)AT+INTMOD=2|(% style="background-color:#f2f2f2; width:196px" %)(((
1083 Set Transmit Interval
1084 0. (Disable Interrupt),
1085 ~1. (Trigger by rising and falling edge)
1086 2. (Trigger by falling edge)
1087 3. (Trigger by rising edge)
1088 )))|(% style="background-color:#f2f2f2; width:157px" %)OK
1089
1090 (% style="color:blue" %)**Downlink Command: 0x06**
1091
1092 Format: Command Code (0x06) followed by 3 bytes.
1093
1094 This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.
1095
1096 * Example 1: Downlink Payload: 06000000  ~/~/  Turn off interrupt mode
1097 * Example 2: Downlink Payload: 06000003  ~/~/  Set the interrupt mode to rising edge trigger
1098
1099 === 3.3.3 Set the output time ===
1100
1101
1102 Feature, Control the output 3V3 , 5V or 12V.
1103
1104 (% style="color:blue" %)**AT Command: AT+3V3T**
1105
1106 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:474px" %)
1107 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 201px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 119px;background-color:#4F81BD;color:white" %)**Response**
1108 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=?|(% style="background-color:#f2f2f2; width:201px" %)Show 3V3 open time.|(% style="background-color:#f2f2f2; width:116px" %)(((
1109 0
1110 OK
1111 )))
1112 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=0|(% style="background-color:#f2f2f2; width:201px" %)Normally open 3V3 power supply.|(% style="background-color:#f2f2f2; width:116px" %)(((
1113 OK
1114 default setting
1115 )))
1116 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=1000|(% style="background-color:#f2f2f2; width:201px" %)Close after a delay of 1000 milliseconds.|(% style="background-color:#f2f2f2; width:116px" %)(((
1117 OK
1118 )))
1119 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=65535|(% style="background-color:#f2f2f2; width:201px" %)Normally closed 3V3 power supply.|(% style="background-color:#f2f2f2; width:116px" %)(((
1120 OK
1121 )))
1122
1123 (% style="color:blue" %)**AT Command: AT+5VT**
1124
1125 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:470px" %)
1126 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 119px;background-color:#4F81BD;color:white" %)**Response**
1127 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=?|(% style="background-color:#f2f2f2; width:196px" %)Show 5V open time.|(% style="background-color:#f2f2f2; width:114px" %)(((
1128 0
1129 OK
1130 )))
1131 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=0|(% style="background-color:#f2f2f2; width:196px" %)Normally closed 5V power supply.|(% style="background-color:#f2f2f2; width:114px" %)(((
1132 OK
1133 default setting
1134 )))
1135 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=1000|(% style="background-color:#f2f2f2; width:196px" %)Close after a delay of 1000 milliseconds.|(% style="background-color:#f2f2f2; width:114px" %)(((
1136 OK
1137 )))
1138 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=65535|(% style="background-color:#f2f2f2; width:196px" %)Normally open 5V power supply.|(% style="background-color:#f2f2f2; width:114px" %)(((
1139 OK
1140 )))
1141
1142 (% style="color:blue" %)**AT Command: AT+12VT**
1143
1144 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:443px" %)
1145 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 199px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 88px;background-color:#4F81BD;color:white" %)**Response**
1146 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=?|(% style="background-color:#f2f2f2; width:199px" %)Show 12V open time.|(% style="background-color:#f2f2f2; width:83px" %)(((
1147 0
1148 OK
1149 )))
1150 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=0|(% style="background-color:#f2f2f2; width:199px" %)Normally closed 12V power supply.|(% style="background-color:#f2f2f2; width:83px" %)OK
1151 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=500|(% style="background-color:#f2f2f2; width:199px" %)Close after a delay of 500 milliseconds.|(% style="background-color:#f2f2f2; width:83px" %)(((
1152 OK
1153 )))
1154
1155 (% style="color:blue" %)**Downlink Command: 0x07**
1156
1157 Format: Command Code (0x07) followed by 3 bytes.
1158
1159 The first byte is which power, the second and third bytes are the time to turn on.
1160
1161 * Example 1: Downlink Payload: 070101F4  **~-~-->**  AT+3V3T=500
1162 * Example 2: Downlink Payload: 0701FFFF   **~-~-->**  AT+3V3T=65535
1163 * Example 3: Downlink Payload: 070203E8  **~-~-->**  AT+5VT=1000
1164 * Example 4: Downlink Payload: 07020000  **~-~-->**  AT+5VT=0
1165 * Example 5: Downlink Payload: 070301F4  **~-~-->**  AT+12VT=500
1166 * Example 6: Downlink Payload: 07030000  **~-~-->**  AT+12VT=0
1167
1168 (% style="color:red" %)**Note: Before v1.2, the maximum settable time of 3V3T, 5VT and 12VT is 65535 milliseconds. After v1.2, the maximum settable time of 3V3T, 5VT and 12VT is 180 seconds.**
1169
1170 (% style="color:red" %)**Therefore, the corresponding downlink command is increased by one byte to five bytes.**
1171
1172 **Example: **
1173
1174 * 120s=120000ms(D) =0x01D4C0(H), Downlink Payload: 07 **01** 01 D4 C0  **~-~-->**  AT+3V3T=120000
1175 * 100s=100000ms(D) =0x0186A0(H), Downlink Payload: 07 **02** 01 86 A0  **~-~-->**  AT+5VT=100000
1176 * 80s=80000ms(D) =0x013880(H), Downlink Payload: 07 **03** 01 38 80  **~-~-->**  AT+12VT=80000
1177
1178 === 3.3.4 Set the Probe Model ===
1179
1180
1181 Users need to configure this parameter according to the type of external probe. In this way, the server can decode according to this value, and convert the current value output by the sensor into water depth or pressure value.
1182
1183 (% style="color:blue" %)**AT Command: AT** **+PROBE**
1184
1185 AT+PROBE=aabb
1186
1187 When aa=00, it is the water depth mode, and the current is converted into the water depth value; bb is the probe at a depth of several meters.
1188
1189 When aa=01, it is the pressure mode, which converts the current into a pressure value;
1190
1191 bb represents which type of pressure sensor it is.
1192
1193 (A->01,B->02,C->03,D->04,E->05,F->06,G->07,H->08,I->09,J->0A,K->0B,L->0C)
1194
1195 When aa=02, it is the Differential Pressure Sensor , which converts the current into a pressure value;
1196
1197 bb represents which type of pressure sensor it is.
1198
1199 (0~~100Pa->01,0~~200Pa->02,0~~300Pa->03,0~~1KPa->04,0~~2KPa->05,0~~3KPa->06,0~~4KPa->07,0~~5KPa->08,0~~10KPa->09,-100~~ 100Pa->0A,-200~~ 200Pa->0B,-1~~ 1KPa->0C)
1200
1201 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
1202 |(% style="background-color:#4f81bd; color:white; width:154px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:269px" %)**Function**|(% style="background-color:#4f81bd; color:white" %)**Response**
1203 |(% style="background-color:#f2f2f2; width:154px" %)AT+PROBE=?|(% style="background-color:#f2f2f2; width:269px" %)Get or Set the probe model.|(% style="background-color:#f2f2f2" %)0
1204 OK
1205 |(% style="background-color:#f2f2f2; width:154px" %)AT+PROBE=0003|(% style="background-color:#f2f2f2; width:269px" %)Set water depth sensor mode, 3m type.|(% style="background-color:#f2f2f2" %)OK
1206 |(% style="background-color:#f2f2f2; width:154px" %)(((
1207 AT+PROBE=000A
1208 )))|(% style="background-color:#f2f2f2; width:269px" %)Set water depth sensor mode, 10m type.|(% style="background-color:#f2f2f2" %)OK
1209 |(% style="background-color:#f2f2f2; width:154px" %)AT+PROBE=0064|(% style="background-color:#f2f2f2; width:269px" %)Set water depth sensor mode, 100m type.|(% style="background-color:#f2f2f2" %)OK
1210 |(% style="background-color:#f2f2f2; width:154px" %)AT+PROBE=0101|(% style="background-color:#f2f2f2; width:269px" %)Set pressure transmitters mode, first type(A).|(% style="background-color:#f2f2f2" %)OK
1211 |(% style="background-color:#f2f2f2; width:154px" %)AT+PROBE=0000|(% style="background-color:#f2f2f2; width:269px" %)Initial state, no settings.|(% style="background-color:#f2f2f2" %)OK
1212
1213 (% style="color:blue" %)**Downlink Command: 0x08**
1214
1215 Format: Command Code (0x08) followed by 2 bytes.
1216
1217 * Example 1: Downlink Payload: 080003  **~-~-->**  AT+PROBE=0003
1218 * Example 2: Downlink Payload: 080101  **~-~-->**  AT+PROBE=0101
1219
1220 === 3.3.5 Multiple collections are one uplink (Since firmware V1.1) ===
1221
1222
1223 Added AT+STDC command to collect the voltage of VDC_INPUT/IDC_INPUT multiple times and upload it at one time.
1224
1225 (% style="color:blue" %)**AT Command: AT** **+STDC**
1226
1227 AT+STDC=aa,bb,bb
1228
1229 (% style="color:#037691" %)**aa:**(%%)
1230 **0:** means disable this function and use TDC to send packets.
1231 **1:** means that the function is enabled to send packets by collecting VDC data for multiple times.
1232 **2:** means that the function is enabled to send packets by collecting IDC data for multiple times.
1233 (% style="color:#037691" %)**bb:**(%%) Each collection interval (s), the value is 1~~65535
1234 (% style="color:#037691" %)**cc:**(%%)** **the number of collection times, the value is 1~~120
1235
1236 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
1237 |(% style="background-color:#4f81bd; color:white; width:160px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:215px" %)**Function**|(% style="background-color:#4f81bd; color:white" %)**Response**
1238 |(% style="background-color:#f2f2f2; width:160px" %)AT+STDC=?|(% style="background-color:#f2f2f2; width:215px" %)Get the mode of multiple acquisitions and one uplink.|(% style="background-color:#f2f2f2" %)1,10,18
1239 OK
1240 |(% style="background-color:#f2f2f2; width:160px" %)AT+STDC=1,10,18|(% style="background-color:#f2f2f2; width:215px" %)Set the mode of multiple acquisitions and one uplink, collect once every 10 seconds, and report after 18 times.|(% style="background-color:#f2f2f2" %)(((
1241 Attention:Take effect after ATZ
1242
1243 OK
1244 )))
1245 |(% style="background-color:#f2f2f2; width:160px" %)AT+STDC=0, 0,0|(% style="background-color:#f2f2f2; width:215px" %)(((
1246 Use the TDC interval to send packets.(default)
1247
1248
1249 )))|(% style="background-color:#f2f2f2" %)(((
1250 Attention:Take effect after ATZ
1251
1252 OK
1253 )))
1254
1255 (% style="color:blue" %)**Downlink Command: 0xAE**
1256
1257 Format: Command Code (0xAE) followed by 4 bytes.
1258
1259 * Example 1: Downlink Payload: AE 01 02 58 12** ~-~-->**  AT+STDC=1,600,18
1260
1261 = 4. Battery & Power Consumption =
1262
1263
1264 PS-LB use ER26500 + SPC1520 battery pack and PS-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace.
1265
1266 [[**Battery Info & Power Consumption Analyze**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1267
1268
1269 = 5. OTA firmware update =
1270
1271
1272 Please see this link for how to do OTA firmware update: [[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/]]
1273
1274
1275 = 6. FAQ =
1276
1277 == 6.1 How to use AT Command via UART to access device? ==
1278
1279
1280 See: [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]
1281
1282
1283 == 6.2 How to update firmware via UART port? ==
1284
1285
1286 See: [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]
1287
1288
1289 == 6.3 How to change the LoRa Frequency Bands/Region? ==
1290
1291
1292 You can follow the instructions for [[how to upgrade image>>doc:Main.Firmware Upgrade Instruction for STM32 base products.WebHome]].
1293 When downloading the images, choose the required image file for download. ​
1294
1295
1296 == 6.4 How to measure the depth of other liquids other than water? ==
1297
1298
1299 Test the current values at the depth of different liquids and convert them to a linear scale.
1300 Replace its ratio with the ratio of water to current in the decoder.
1301
1302 **Example:**
1303
1304 Measure the corresponding current of the sensor when the liquid depth is 2.04m and 0.51m.
1305
1306 **Calculate scale factor:**
1307 Use these two data to calculate the current and depth scaling factors:(7.888-5.035)/(2.04-0.51)=1.86470588235294
1308
1309 **Calculation formula:**
1310
1311 Use the calibration formula:(Current current - Minimum calibration current)/Scale factor + Minimum actual calibration height
1312
1313 **Actual calculations:**
1314
1315 Use this formula to calculate the value corresponding to the current at a depth of 1.5 meters: (6.918-5.035)/1.86470588235294+0.51=1.519810726
1316
1317 **Error:**
1318
1319 0.009810726
1320
1321
1322 [[image:image-20240329175044-1.png]]
1323
1324 = 7. Troubleshooting =
1325
1326 == 7.1 Water Depth Always shows 0 in payload ==
1327
1328
1329 If your device's IDC_intput_mA is normal, but your reading always shows 0, please refer to the following points:
1330
1331 ~1. Please set it to mod1
1332
1333 2. Please set the command [[AT+PROBE>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-LB%20--%20LoRaWAN%20Pressure%20Sensor/#H3.3.4SettheProbeModel]] according to the model of your sensor
1334
1335 3. Check the connection status of the sensor
1336
1337
1338 = 8. Order Info =
1339
1340
1341 (% style="display:none" %)
1342
1343 [[image:image-20241021093209-1.png]]
1344
1345 = 9. ​Packing Info =
1346
1347
1348 (% style="color:#037691" %)**Package Includes**:
1349
1350 * PS-LB or PS-LS LoRaWAN Pressure Sensor
1351
1352 (% style="color:#037691" %)**Dimension and weight**:
1353
1354 * Device Size: cm
1355 * Device Weight: g
1356 * Package Size / pcs : cm
1357 * Weight / pcs : g
1358
1359 = 10. Support =
1360
1361
1362 * 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.
1363
1364 * 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-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0