Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20230327104036-1.png||height="595" width="501"]]
3
4
5
6 **Table of Contents :**
7
8 {{toc/}}
9
10
11
12
13
14
15 = 1. Introduction =
16
17 == 1.1 What is LoRaWAN Analog Sensor ==
18
19
20 (((
21 The Dragino PS-LB-NA is a (% style="color:blue" %)**LoRaWAN Analog Sensor**(%%) for Internet of Things solution. PS-LB-NA has 5v and 12v output , 4~~20mA, 0~~30v input interface to power and get value from Analog Sensor. PS-LB-NA will convert the Analog Value to LoRaWAN wireless data and send to IoT platform via LoRaWAN gateway.
22 )))
23
24 (((
25 The LoRa wireless technology used in PS-LB-NA 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.
26 )))
27
28 (((
29 PS-LB-NA (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
30 )))
31
32 (((
33 PS-LB-NA is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long term use up to 5 years.
34 )))
35
36 (((
37 Each PS-LB-NA 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.
38 )))
39
40 [[image:image-20230401154854-1.png||height="426" width="876"]]
41
42
43 == 1.2 ​Features ==
44
45
46 * LoRaWAN 1.0.3 Class A
47 * Ultra-low power consumption
48 * 1 x 0~~20mA input , 1 x 0~~30v input
49 * 5v and 12v output to power external sensor
50 * Monitor Battery Level
51 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
52 * Support Bluetooth v5.1 and LoRaWAN remote configure
53 * Support wireless OTA update firmware
54 * Uplink on periodically
55 * Downlink to change configure
56 * 8500mAh Battery for long term use
57
58 == 1.3 Specification ==
59
60
61 (% style="color:#037691" %)**Micro Controller:**
62
63 * MCU: 48Mhz ARM
64 * Flash: 256KB
65 * RAM: 64KB
66
67 (% style="color:#037691" %)**Common DC Characteristics:**
68
69 * Supply Voltage: 2.5v ~~ 3.6v
70 * Operating Temperature: -40 ~~ 85°C
71
72 (% style="color:#037691" %)**LoRa Spec:**
73
74 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
75 * Max +22 dBm constant RF output vs.
76 * RX sensitivity: down to -139 dBm.
77 * Excellent blocking immunity
78
79 (% style="color:#037691" %)**Current Input (DC) Measuring :**
80
81 * Range: 0 ~~ 20mA
82 * Accuracy: 0.02mA
83 * Resolution: 0.001mA
84
85 (% style="color:#037691" %)**Voltage Input Measuring:**
86
87 * Range: 0 ~~ 30v
88 * Accuracy: 0.02v
89 * Resolution: 0.001v
90
91 (% style="color:#037691" %)**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:#037691" %)**Power Consumption**
100
101 * Sleep Mode: 5uA @ 3.3v
102 * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
103
104 == 1.4 Supported Extenal Sensors ==
105
106
107 (% class="wikigeneratedid" id="H1.6.1ThreadInstallationType" %)
108 PS-LB-NA can be used to power and connect to traditional industrial sensors and convert the sensor output signal to LoRaWAN signal. Below are some examples field as reference:
109
110 * (% style="color:#037691" %)**Pressure Sensor**(%%): level sensors, level probes and pressure transmitters.
111 * (% style="color:#037691" %)**Flow**(%%): flow of gases, liquids, or sludges.
112 * (% style="color:#037691" %)**Level**(%%):
113 * (% style="color:#037691" %)**Temperature/ Humidity**(%%): temperature probes, such as RTD temperature probes, thermocouples.
114 * (% style="color:#037691" %)**Liquid analysis**(%%): pH values, redox potential, electrolytic conductivity, ammonia, dissolved oxygen, turbidity, chlorine, and much more
115
116 (% style="color:blue" %)**Key point for external sensor:**
117
118 * Can be powered by 5v or 12v. Require Current < 1A.
119 * Sensor has output within range: 4~~20mA or 0~~30v.
120 * Sensor will be power off and power on after deployment. and After power on, it can provide valid output within several seconds.
121
122 == 1.5 Sleep mode and working mode ==
123
124
125 (% 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.
126
127 (% 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.
128
129
130 == 1.6 Button & LEDs ==
131
132
133 [[image:1675071855856-879.png]]
134
135 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
136 |=(% 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**
137 |(% 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" %)(((
138 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
139 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
140 )))
141 |(% 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" %)(((
142 (% 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.
143 (% style="background-color:#f2f2f2; color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
144 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.
145 )))
146 |(% 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-NA is in Deep Sleep Mode.
147
148 == 1.7 Pin Mapping ==
149
150
151 [[image:1675072568006-274.png]]
152
153
154 * (% style="color:blue" %)**+3v3_OUT**(%%): Controllable 3.3v output, Actually voltage level same as Battery, 2.6v ~~ 3.6v
155
156 * (% style="color:blue" %)**+5v_OUT**(%%): Controllable 5.0v output
157
158 * (% style="color:blue" %)**GND**(%%): GND
159
160 * (% style="color:blue" %)**INT**(%%): Interrupt Pin
161
162 * (% style="color:blue" %)**IN1 & IN2**(%%): Digital IN1 and Digital IN2
163
164 * (% style="color:blue" %)**IDC_IN**(%%): 4~~20mA current input pin
165
166 * (% style="color:blue" %)**VDC_IN**(%%): 0~~30v sensor voltage input pin
167
168 * (% style="color:blue" %)**SDI-12_DATA**(%%): No used
169
170 * (% style="color:blue" %)**+12v_OUT**(%%): Controllable 12v output
171
172 * (% style="color:blue" %)**GND**(%%): GND
173
174 == 1.8 BLE connection ==
175
176
177 PS-LB-NA support BLE remote configure.
178
179
180 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:
181
182 * Press button to send an uplink
183 * Press button to active device.
184 * Device Power on or reset.
185
186 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
187
188
189 == 1.9 Mechanical ==
190
191
192 [[image:1675143884058-338.png]]
193
194
195 [[image:1675143899218-599.png]]
196
197
198 [[image:1675143909447-639.png]]
199
200
201 = 2. Configure PS-LB-NA to connect to LoRaWAN network =
202
203 == 2.1 How it works ==
204
205
206 The PS-LB-NA 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-NA. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
207
208
209 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
210
211
212 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.
213
214
215 [[image:image-20230401155446-2.png]]
216
217
218 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.
219
220
221 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from PS-LB-NA.
222
223 Each PS-LB-NA is shipped with a sticker with the default device EUI as below:
224
225 [[image:image-20230426083226-1.png]]
226
227
228
229 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
230
231
232 (% style="color:blue" %)**Register the device**
233
234 [[image:1675144099263-405.png]]
235
236
237 (% style="color:blue" %)**Add APP EUI and DEV EUI**
238
239 [[image:1675144117571-832.png]]
240
241
242 (% style="color:blue" %)**Add APP EUI in the application**
243
244
245 [[image:1675144143021-195.png]]
246
247
248 (% style="color:blue" %)**Add APP KEY**
249
250 [[image:1675144157838-392.png]]
251
252 (% style="color:blue" %)**Step 2:**(%%) Activate on PS-LB-NA
253
254
255 Press the button for 5 seconds to activate the PS-LB-NA.
256
257 (% 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.
258
259 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
260
261
262 == 2.3 ​Uplink Payload ==
263
264 === 2.3.1 Device Status, FPORT~=5 ===
265
266
267 Include device configure status. Once PS-LB-NA Joined the network, it will uplink this message to the server.
268
269 Users can also use the downlink command(0x26 01) to ask PS-LB-NA to resend this uplink.
270
271 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
272 |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)**
273 |(% 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**
274 |(% 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
275
276 Example parse in TTNv3
277
278 [[image:1675144504430-490.png]]
279
280
281 (% style="color:#037691" %)**Sensor Model**(%%): For PS-LB-NA, this value is 0x16
282
283 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
284
285 (% style="color:#037691" %)**Frequency Band**:
286
287 0x01: EU868
288
289 0x02: US915
290
291 0x03: IN865
292
293 0x04: AU915
294
295 0x05: KZ865
296
297 0x06: RU864
298
299 0x07: AS923
300
301 0x08: AS923-1
302
303 0x09: AS923-2
304
305 0x0a: AS923-3
306
307 0x0b: CN470
308
309 0x0c: EU433
310
311 0x0d: KR920
312
313 0x0e: MA869
314
315
316 (% style="color:#037691" %)**Sub-Band**:
317
318 AU915 and US915:value 0x00 ~~ 0x08
319
320 CN470: value 0x0B ~~ 0x0C
321
322 Other Bands: Always 0x00
323
324
325 (% style="color:#037691" %)**Battery Info**:
326
327 Check the battery voltage.
328
329 Ex1: 0x0B45 = 2885mV
330
331 Ex2: 0x0B49 = 2889mV
332
333
334 === 2.3.2 Sensor value, FPORT~=2 ===
335
336
337 Uplink payload includes in total 9 bytes.
338
339 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
340 |(% style="background-color:#4f81bd; color:white; width:97px" %)(((
341 **Size(bytes)**
342 )))|(% 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**
343 |(% style="background-color:#f2f2f2; width:97px" %)Value|(% style="background-color:#f2f2f2; width:48px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="background-color:#f2f2f2; width:71px" %)[[Probe Model>>||anchor="H2.3.4ProbeModel"]]|(% style="background-color:#f2f2f2; width:98px" %)[[0 ~~~~ 20mA value>>||anchor="H2.3.507E20mAvalue28IDC_IN29"]]|(% style="background-color:#f2f2f2; width:73px" %)[[0 ~~~~ 30v value>>||anchor="H2.3.607E30Vvalue28pinVDC_IN29"]]|(% style="background-color:#f2f2f2; width:122px" %)[[IN1 &IN2 Interrupt  flag>>||anchor="H2.3.7IN126IN226INTpin"]]
344
345 [[image:1675144608950-310.png]]
346
347
348 === 2.3.3 Battery Info ===
349
350
351 Check the battery voltage for PS-LB-NA.
352
353 Ex1: 0x0B45 = 2885mV
354
355 Ex2: 0x0B49 = 2889mV
356
357
358 === 2.3.4 Probe Model ===
359
360
361 PS-LB-NA might connect to different kind of probes, 4~~20mA represent the full scale of the measuring range. So a 12mA output means different meaning for different probe. 
362
363
364 **For example.**
365
366 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
367 |(% style="background-color:#4f81bd; color:white; width:150px" %)**Probe Type**|(% style="background-color:#4f81bd; color:white; width:150px" %)**4~~20mA scale for this probe**|(% style="background-color:#4f81bd; color:white; width:200px" %)**Example: 12mA actually meaning for this probe**
368 |(% style="background-color:#f2f2f2; width:206px" %)PH Combination Electrodes|(% style="background-color:#f2f2f2; width:222px" %)0 ~~ 14 pH|(% style="background-color:#f2f2f2; width:356px" %)PH Value: 7
369 |(% style="background-color:#f2f2f2; width:206px" %)Water Pressure Sensor|(% style="background-color:#f2f2f2; width:222px" %)0~~5 meters|(% style="background-color:#f2f2f2; width:356px" %)2.5 meters pure water
370 |(% style="background-color:#f2f2f2; width:206px" %)Pressure transmitter probe|(% style="background-color:#f2f2f2; width:222px" %)0~~1MPa|(% style="background-color:#f2f2f2; width:356px" %)0.5MPa air / gas or water pressure
371
372 User can set different probe model for above probes. So IoT server is able to se identical how it should parse the 4~~20mA or 0~~30v sensor value and get the correct value.
373
374
375 === 2.3.5 0~~20mA value (IDC_IN) ===
376
377
378 (% style="color:#037691" %)**Payload Example**:
379
380 27AE(H) = 10158 (D)/1000 = 10.158mA.
381
382
383 [[image:image-20230821150704-1.png||height="180" width="609"]]
384
385 **Connect to a 2 wire 4~~20mA sensor.**
386
387 [[image:image-20230225154759-1.png||height="408" width="741"]]
388
389
390 === 2.3.6 0~~30V value ( pin VDC_IN) ===
391
392
393 Measure the voltage value. The range is 0 to 30V.
394
395 (% style="color:#037691" %)**Example**:
396
397 138E(H) = 5006(D)/1000= 5.006V
398
399
400 === 2.3.7 IN1&IN2&INT pin ===
401
402
403 IN1 and IN2 are used as digital input pins.
404
405 (% style="color:#037691" %)**Example**:
406
407 09 (H): (0x09&0x08)>>3=1    IN1 pin is high level.
408
409 09 (H): (0x09&0x04)>>2=0    IN2 pin is low level.
410
411
412 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.
413
414 (% style="color:#037691" %)**Example:**
415
416 09 (H): (0x09&0x02)>>1=1    The level of the interrupt pin.
417
418 09 (H): 0x09&0x01=1              0x00: Normal uplink packet.
419
420 0x01: Interrupt Uplink Packet.
421
422
423 === 2.3.8 Sensor value, FPORT~=7 ===
424
425
426 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:504px" %)
427 |(% style="background-color:#4f81bd; color:white; width:94px" %)(((
428 **Size(bytes)**
429 )))|(% style="background-color:#4f81bd; color:white; width:43px" %)**2**|(% style="background-color:#4f81bd; color:white; width:367px" %)**n**
430 |(% style="background-color:#f2f2f2; width:94px" %)Value|(% style="background-color:#f2f2f2; width:43px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="background-color:#f2f2f2; width:367px" %)(((
431 Voltage value, each 2 bytes is a set of voltage values.
432 )))
433
434 [[image:image-20230220171300-1.png||height="207" width="863"]]
435
436 Multiple sets of data collected are displayed in this form:
437
438 [voltage value1], [voltage value2], [voltage value3],…[voltage value n/2]
439
440
441 === 2.3.9 ​Decode payload in The Things Network ===
442
443
444 While using TTN network, you can add the payload format to decode the payload.
445
446
447 [[image:1675144839454-913.png]]
448
449
450 PS-LB-NA TTN Payload Decoder: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>url:https://github.com/dragino/dragino-end-node-decoder]]
451
452
453 == 2.4 Uplink Interval ==
454
455
456 The PS-LB-NA 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);"]]
457
458
459 == 2.5 Show Data in DataCake IoT Server ==
460
461
462 [[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:
463
464
465 (% style="color:blue" %)**Step 1: **(%%)Be sure that your device is programmed and properly connected to the network at this time.
466
467 (% 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:
468
469
470 [[image:1675144951092-237.png]]
471
472
473 [[image:1675144960452-126.png]]
474
475
476 (% style="color:blue" %)**Step 3:**(%%) Create an account or log in Datacake.
477
478 (% style="color:blue" %)**Step 4:** (%%)Create PS-LB-NA product.
479
480 [[image:1675145004465-869.png]]
481
482
483 [[image:1675145018212-853.png]]
484
485
486 [[image:1675145029119-717.png]]
487
488
489 (% style="color:blue" %)**Step 5: **(%%)add payload decode
490
491 [[image:1675145051360-659.png]]
492
493
494 [[image:1675145060812-420.png]]
495
496
497 After added, the sensor data arrive TTN, it will also arrive and show in Datacake.
498
499
500 [[image:1675145081239-376.png]]
501
502
503 == 2.6 Frequency Plans ==
504
505
506 The PS-LB-NA 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.
507
508 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
509
510
511 = 3. Configure PS-LB-NA =
512
513 == 3.1 Configure Methods: ==
514
515
516 PS-LB-NA supports below configure method:
517
518 * AT Command via Bluetooth Connection (**Recommand Way**): [[BLE Configure Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
519 * AT Command via UART Connection : See [[FAQ>>||anchor="H6.FAQ"]].
520 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>url:http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
521
522 == 3.2 General Commands ==
523
524
525 These commands are to configure:
526
527 * General system settings like: uplink interval.
528 * LoRaWAN protocol & radio related command.
529
530 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
531
532 [[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/]]
533
534
535 == 3.3 Commands special design for PS-LB-NA ==
536
537
538 These commands only valid for PS-LB-NA, as below:
539
540
541 === 3.3.1 Set Transmit Interval Time ===
542
543
544 Feature: Change LoRaWAN End Node Transmit Interval.
545
546 (% style="color:blue" %)**AT Command: AT+TDC**
547
548 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
549 |=(% 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**
550 |(% style="background-color:#f2f2f2; width:157px" %)AT+TDC=?|(% style="background-color:#f2f2f2; width:166px" %)Show current transmit Interval|(% style="background-color:#f2f2f2" %)(((
551 30000
552 OK
553 the interval is 30000ms = 30s
554 )))
555 |(% style="background-color:#f2f2f2; width:157px" %)AT+TDC=60000|(% style="background-color:#f2f2f2; width:166px" %)Set Transmit Interval|(% style="background-color:#f2f2f2" %)(((
556 OK
557 Set transmit interval to 60000ms = 60 seconds
558 )))
559
560 (% style="color:blue" %)**Downlink Command: 0x01**
561
562 Format: Command Code (0x01) followed by 3 bytes time value.
563
564 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
565
566 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
567 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
568
569 === 3.3.2 Set Interrupt Mode ===
570
571
572 Feature, Set Interrupt mode for GPIO_EXIT.
573
574 (% style="color:blue" %)**AT Command: AT+INTMOD**
575
576 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:507px" %)
577 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Response**
578 |(% style="background-color:#f2f2f2; width:154px" %)AT+INTMOD=?|(% style="background-color:#f2f2f2; width:196px" %)Show current interrupt mode|(% style="background-color:#f2f2f2; width:157px" %)(((
579 0
580 OK
581 the mode is 0 =Disable Interrupt
582 )))
583 |(% style="background-color:#f2f2f2; width:154px" %)AT+INTMOD=2|(% style="background-color:#f2f2f2; width:196px" %)(((
584 Set Transmit Interval
585 0. (Disable Interrupt),
586 ~1. (Trigger by rising and falling edge)
587 2. (Trigger by falling edge)
588 3. (Trigger by rising edge)
589 )))|(% style="background-color:#f2f2f2; width:157px" %)OK
590
591 (% style="color:blue" %)**Downlink Command: 0x06**
592
593 Format: Command Code (0x06) followed by 3 bytes.
594
595 This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.
596
597 * Example 1: Downlink Payload: 06000000  ~/~/  Turn off interrupt mode
598 * Example 2: Downlink Payload: 06000003  ~/~/  Set the interrupt mode to rising edge trigger
599
600 === 3.3.3 Set Power Output Duration ===
601
602
603 Control the output duration 3V3 , 5V or 12V. Before each sampling, device will
604
605 ~1. first enable the power output to external sensor,
606
607 2. keep it on as per duration, read sensor value and construct uplink payload
608
609 3. final, close the power output.
610
611
612 (% style="color:blue" %)**AT Command: AT+3V3T**
613
614 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:471px" %)
615 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 201px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 116px;background-color:#4F81BD;color:white" %)**Response**
616 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=?|(% style="background-color:#f2f2f2; width:201px" %)Show 3V3 open time.|(% style="background-color:#f2f2f2; width:116px" %)(((
617 0
618 OK
619 )))
620 |(% 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" %)(((
621 OK
622 default setting
623 )))
624 |(% 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" %)(((
625 OK
626 )))
627 |(% 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" %)(((
628 OK
629 )))
630
631 (% style="color:blue" %)**AT Command: AT+5VT**
632
633 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:465px" %)
634 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 114px;background-color:#4F81BD;color:white" %)**Response**
635 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=?|(% style="background-color:#f2f2f2; width:196px" %)Show 5V open time.|(% style="background-color:#f2f2f2; width:114px" %)(((
636 0
637 OK
638 )))
639 |(% 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" %)(((
640 OK
641 default setting
642 )))
643 |(% 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" %)(((
644 OK
645 )))
646 |(% 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" %)(((
647 OK
648 )))
649
650 (% style="color:blue" %)**AT Command: AT+12VT**
651
652 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:438px" %)
653 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 199px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 83px;background-color:#4F81BD;color:white" %)**Response**
654 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=?|(% style="background-color:#f2f2f2; width:199px" %)Show 12V open time.|(% style="background-color:#f2f2f2; width:83px" %)(((
655 0
656 OK
657 )))
658 |(% 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
659 |(% 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" %)(((
660 OK
661 )))
662
663 (% style="color:blue" %)**Downlink Command: 0x07**
664
665 Format: Command Code (0x07) followed by 3 bytes.
666
667 The first byte is which power, the second and third bytes are the time to turn on.
668
669 * Example 1: Downlink Payload: 070101F4  **~-~-->**  AT+3V3T=500
670 * Example 2: Downlink Payload: 0701FFFF   **~-~-->**  AT+3V3T=65535
671 * Example 3: Downlink Payload: 070203E8  **~-~-->**  AT+5VT=1000
672 * Example 4: Downlink Payload: 07020000  **~-~-->**  AT+5VT=0
673 * Example 5: Downlink Payload: 070301F4  **~-~-->**  AT+12VT=500
674 * Example 6: Downlink Payload: 07030000  **~-~-->**  AT+12VT=0
675
676 === 3.3.4 Set the Probe Model ===
677
678
679 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.
680
681 (% style="color:blue" %)**AT Command: AT** **+PROBE**
682
683 AT+PROBE=aabb
684
685 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.
686
687 When aa=01, it is the pressure mode, which converts the current into a pressure value;
688
689 bb represents which type of pressure sensor it is.
690
691 (A->01,B->02,C->03,D->04,E->05,F->06,G->07,H->08,I->09,J->0A,K->0B,L->0C)
692
693 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
694 |(% 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**
695 |(% 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
696 OK
697 |(% 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
698 |(% style="background-color:#f2f2f2; width:154px" %)(((
699 AT +PROBE =000A
700
701
702 )))|(% style="background-color:#f2f2f2; width:269px" %)Set water depth sensor mode, 10m type.|(% style="background-color:#f2f2f2" %)OK
703 |(% 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
704 |(% style="background-color:#f2f2f2; width:154px" %)AT +PROBE =0000|(% style="background-color:#f2f2f2; width:269px" %)Initial state, no settings.|(% style="background-color:#f2f2f2" %)OK
705
706 (% style="color:blue" %)**Downlink Command: 0x08**
707
708 Format: Command Code (0x08) followed by 2 bytes.
709
710 * Example 1: Downlink Payload: 080003  **~-~-->**  AT+PROBE=0003
711 * Example 2: Downlink Payload: 080101  **~-~-->**  AT+PROBE=0101
712
713 === 3.3.5 Multiple VDC collections in one uplink ===
714
715
716 Added AT+STDC command to collect the voltage of **VDC_INPUT** multiple times and upload it at one time.
717
718 (% style="color:blue" %)**AT Command: AT** **+STDC**
719
720 AT+STDC=aa,bb,bb
721
722 (% style="color:#037691" %)**aa:**(%%)
723 **0:** means disable this function and use TDC to send packets.
724 **1:** means enable this function, use the method of multiple acquisitions to send packets.
725 (% style="color:#037691" %)**bb:**(%%) Each collection interval (s), the value is 1~~65535
726 (% style="color:#037691" %)**cc:**(%%)** **the number of collection times, the value is 1~~120
727
728 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
729 |(% 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**
730 |(% 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
731 OK
732 |(% 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" %)(((
733 Attention:Take effect after ATZ
734
735 OK
736 )))
737 |(% style="background-color:#f2f2f2; width:160px" %)AT+STDC=0, 0,0|(% style="background-color:#f2f2f2; width:215px" %)(((
738 Use the TDC interval to send packets.(default)
739
740
741 )))|(% style="background-color:#f2f2f2" %)(((
742 Attention:Take effect after ATZ
743
744 OK
745 )))
746
747 (% style="color:blue" %)**Downlink Command: 0xAE**
748
749 Format: Command Code (0x08) followed by 5 bytes.
750
751 * Example 1: Downlink Payload: AE 01 02 58 12** ~-~-->**  AT+STDC=1,600,18
752
753 = 4. Battery & Power Consumption =
754
755
756 PS-LB-NA uses ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
757
758 [[**Battery Info & Power Consumption Analyze**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
759
760
761 = 5. OTA firmware update =
762
763
764 User can change firmware S31x-LB to:
765
766 * Change Frequency band/ region.
767 * Update with new features.
768 * Fix bugs.
769
770 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/gf1glloczbzz19h/AABbuYI4WY6VdAmpXo6o1V2Ka?dl=0]]**
771
772 Methods to Update Firmware:
773
774 * (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/]]
775 * 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]]**.
776
777 = 6. FAQ =
778
779 == 6.1 How to use PS-LB-Ix with liquid other than water? ==
780
781
782 Calculated according to the ratio of the density of the measured liquid to the density of water, and add their ratio in the decoding
783 Example: Use gasoline with a density of 0.70g/cm^3
784 Adding to this part of the decoding divides it by 0.7 and puts a parenthesis around the equation
785
786 [[image:image-20230724153033-1.png]]
787
788 **Change:**
789
790 if(decode.Probe_mod===0x00)
791 {
792 if(decode.IDC_intput_mA<=4.0)
793 decode.Water_deep_cm= 0;
794 else
795 decode.Water_deep_cm= parseFloat(~(% style="color:red" %)**(**((decode.IDC_intput_mA-4.0)*(bytes[3]*100/16)(% style="color:red" %)**/0.7)**(%%)).toFixed(3));
796 }
797
798
799 = 7. Order Info =
800
801
802 Part Number: (% style="color:blue" %)**PS-LB-NA-XX-YY**
803
804 (% style="color:red" %)**XX**(%%): The default frequency band
805
806 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
807
808 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
809
810 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
811
812 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
813
814 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
815
816 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
817
818 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
819
820 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
821
822 (% style="color:#037691" %)**YY:**(%%) The grand connector hole size
823
824 * (% style="color:#037691" %)**M12**(%%): M12 hole
825
826 * (% style="color:#037691" %)**M16**(%%): M16 hole
827
828 * (% style="color:#037691" %)**M20**(%%): M20 hole
829
830 = 8. ​Packing Info =
831
832
833 (% style="color:#037691" %)**Package Includes**:
834
835 * PS-LB-NA LoRaWAN Analog Sensor
836
837 (% style="color:#037691" %)**Dimension and weight**:
838
839 * Device Size: cm
840
841 * Device Weight: g
842
843 * Package Size / pcs : cm
844
845 * Weight / pcs : g
846
847 = 9. Support =
848
849
850 * 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.
851
852 * 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.com>>url:http://../../../../../../D:%5C%E5%B8%82%E5%9C%BA%E8%B5%84%E6%96%99%5C%E8%AF%B4%E6%98%8E%E4%B9%A6%5CLoRa%5CLT%E7%B3%BB%E5%88%97%5Csupport@dragino.com]]
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0