Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20220519085532-1.png||_mstalt="431171" height="429" width="366"]]
3
4
5
6
7
8 **Table of Contents:**
9
10 {{toc/}}
11
12
13
14
15
16
17 = 1. Introduction =
18
19 == 1.1 What is SW3L LoRaWAN Flow Sensor ==
20
21
22 (((
23 The Dragino SW3L is a (% style="color:#037691" %)**LoRaWAN Flow Sensor**(%%). It detects water flow volume and uplink to IoT server via LoRaWAN network. User can use this to** (% style="color:#037691" %)monitor the water usage for buildings.(%%)**
24 )))
25
26 (((
27 SW3L is powered by (% style="color:#037691" %)**8500mAh Li-SOCI2 battery**(%%), It is designed for long term use up to 10 years. (Actually Battery life depends on the use environment, update period.)
28 )))
29
30 (((
31 The SW3L will send water flow volume every 20 minutes. It can also (% style="color:#037691" %)**detect the water flow status**(%%) and (% style="color:#037691" %)**send Alarm**(%%), to avoid the waste for water usage such as broken toilet case.
32 )))
33
34 (((
35 SW3L is designed for both indoor and outdoor use. It has a weatherproof enclosure and industrial level battery to work in low to high temperatures.
36 )))
37
38 (((
39 Each SW3L is pre-load with a set of unique keys for LoRaWAN registration, register these keys to LoRaWAN server and it will auto connect after power on
40 )))
41
42 (((
43 *Battery life depends on how often to send data, please see battery analyzer.
44 )))
45
46
47 == 1.2 Features ==
48
49
50 * LoRaWAN v1.0.3 Class A protocol.
51 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864
52 * Upload water flow volume
53 * Monitor water waste
54 * 8500mAh industrial battery(none-rechargeable)
55 * AT Commands to change parameters
56 * Uplink on periodically and open/close event
57 * Datalog feature
58 * Remote configure parameters via LoRa Downlink
59 * Firmware upgradable via program port
60 * Wall Mountable
61 * Outdoor Use
62
63
64 == 1.3 Installation ==
65
66
67 Each SW3L package is shipped with a flow sensor. Install the flow sensor into water pipe with correct flow direction to start monitoring.
68
69
70 == 1.4 Storage & Operation Temperature ==
71
72
73 -40°C to +85°C
74
75
76 == 1.5 Applications ==
77
78
79 * Flow Sensor application
80 * Water Control
81 * Toilet Flow Sensor
82 * Monitor Waste water
83
84
85 == 1.6 Flow Sensor Spec ==
86
87
88 (((
89 (% border="1.5" cellspacing="2" style="background-color:#ffffcc; color:green; width:510px" %)
90 |=(% style="width: 80px;" %)**Model**|=(% style="width: 80px;" %)**Probe**|=(% style="width: 80px;" %)**Diameter**|=(% style="width: 80px;" %)**Range**|=(% style="width: 80px;" %)**Max Pressure**|=(% style="width: 110px;" %)**Measure**
91 |(% style="width:88px" %)SW3L-004|(% style="width:75px" %)DW-004|(% style="width:107px" %)G1/2" /DN15|(% style="width:101px" %)1~~30L/min|(% style="width:116px" %)≤ 2.0Mpa|(% style="width:124px" %)450 pulse = 1 L
92 |(% style="width:88px" %)SW3L-006|(% style="width:75px" %)DW-006|(% style="width:107px" %)G3/4" /DN20|(% style="width:101px" %)1~~60L/min|(% style="width:116px" %)≤ 1.2Mpa|(% style="width:124px" %)390 pulse = 1 L
93 |(% style="width:88px" %)SW3L-010|(% style="width:75px" %)DW-010|(% style="width:107px" %)G 1" /DN25|(% style="width:101px" %)2~~100L/min|(% style="width:116px" %)≤ 2.0Mpa|(% style="width:124px" %)64 pulse = 1 L
94
95
96 )))
97
98
99 == 1.7 Mechanical ==
100
101
102 [[image:1652922789057-479.png||_mstalt="299312"]]
103
104 [[image:1652922797548-885.png||_mstalt="300391"]]
105
106
107
108 **DW-004 Flow Sensor: diameter: G1/2” / DN15.  450 pulse = 1 L**
109
110 [[image:image-20220519091350-1.png||_mstalt="429611" height="385" width="722"]]
111
112
113
114 **006: DW-006 Flow Sensor: diameter: G3/4” / DN20.  390 pulse = 1 L**
115
116 [[image:image-20220519091423-2.png||_mstalt="5391646" height="258" width="723"]]
117
118
119
120 **010: DW-010 Flow Sensor: diameter: G 1” / DN25. 64 pulse = 1 L**
121
122 [[image:image-20220519091423-3.png||_mstalt="5391971" height="448" width="724"]]
123
124
125 == 1.8 Pin Definitions and Switch ==
126
127
128 [[image:1652923899427-927.png||_mstalt="299377" height="372" width="723"]]
129
130
131 === 1.8.1 Pin Definition ===
132
133
134 SW3L is pre-configured to connect to two external wires. The other pins are not used. If user wants to know more about other pins, please refer to the user manual of LSN50v2 at:
135
136 [[https:~~/~~/www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0>>https://www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0]]
137
138 (% style="color:red" %)**Add PA11 digital input and PA12 digital input(Since firmware v1.2.0)**
139
140
141 === 1.8.2 Jumper JP2(Power ON/OFF) ===
142
143
144 Power on Device when putting this jumper.
145
146
147 === 1.8.3 BOOT MODE / SW1 ===
148
149
150 (((
151 1) ISP: upgrade mode, device won't have any signal in this mode. but ready for upgrade firmware. LED won't work. Firmware won't run. 
152 2) Flash: work mode, the device starts to work and send out console output for further debug
153 )))
154
155
156 === 1.8.4 Reset Button ===
157
158
159 Press to reboot the device.
160
161
162 === 1.8.5 LED ===
163
164
165 It will flash:
166 1)   Boot the device in flash mode
167 2)   Send an uplink packe
168
169
170 = 2. Operation Mode =
171
172 == 2.1 How it works? ==
173
174
175 Each SW3L is shipped with a worldwide unique set of OTAA keys. To use SW3L in a LoRaWAN network, user needs to input the OTAA keys in the LoRaWAN network server. So SW3L can join the LoRaWAN network and start to transmit sensor data.
176
177
178 == 2.2 Example to use for LoRaWAN network ==
179
180
181 This section shows an example of how to join the TTN V3 LoRaWAN IoT server. Usages with other LoRaWAN IoT servers are similar.
182
183
184 [[image:1652944563101-603.png||_mstalt="292279" height="321" width="729"]]
185
186
187 * In this use case, the SW3L is connected into water line to measure water flow and send the status to the LoRaWAN server. The SW3L will uplink different types of messages to the LoRaWAN server. See [[Uplink payload>>||anchor="H2.3UplinkPayload"]] for detail.
188
189 (((
190 Assume the DLOS8 is already set to connect to the [[TTN V3 network >>url:https://eu1.cloud.thethings.network]]. We need to add the SW3L device in TTN V3:
191
192
193 )))
194
195 (((
196 (% style="color:blue" %)**Step 1**(%%): Create a device in TTN V3 with the OTAA keys from SW3L.
197 )))
198
199 (((
200 Each SW3L is shipped with a sticker with the default device EUI as below:
201 )))
202
203 [[image:image-20230426085254-1.png]]
204
205
206 Users can enter these keys in the LoRaWAN Server portal. Below is the TTN V3 screenshot:
207
208 Add APP EUI in the application.
209
210
211
212 [[image:image-20220519151704-1.png||_mstalt="429715"]]
213
214
215 [[image:image-20220519151704-2.png||_mstalt="430079" height="322" width="717"]]
216
217
218 [[image:image-20220519151704-3.png||_mstalt="430443"]]
219
220
221 [[image:image-20220519151704-4.png||_mstalt="430807"]]
222
223 Add APP KEY and DEV EUI
224
225
226
227 (% style="color:blue" %)**Step 2**(%%): Power on SW3L
228
229 [[image:image-20220519094347-1.png||_mstalt="432549" height="430" width="725"]]
230
231
232 (((
233 Put the jumper to power on SW3L and it will auto-join to the TTN V3 network. After join success, it will start to upload sensor data to TTN V3 and the user can see it in the panel.
234 )))
235
236 [[image:1652924675638-547.png||_mstalt="298363" height="254" width="732"]]
237
238
239 == 2.3 Uplink Payload ==
240
241
242 (((
243 Uplink payloads have two types:
244 )))
245
246 * (((
247 Open/Close Status: Use FPORT=2
248 )))
249 * (((
250 Other control commands: Use other FPORT fields.
251 )))
252
253 (((
254 The application server should parse the correct value based on FPORT settings.
255
256
257 )))
258
259 === 2.3.1 Device Status, FPORT~=5 ===
260
261
262 (((
263 (((
264 Include device configure status. Once SW3L Joined the network, it will uplink this message to the server. After that, SW3L will uplink Device Status every 12 hours.
265 )))
266 )))
267
268 (((
269 (((
270 Users can also use the downlink command(0x26 01) to ask SW3L to resend this uplink. This uplink payload also includes the DeviceTimeReq to get time.
271
272 [[image:image-20220609174312-1.png||_mstalt="429572"]]
273 )))
274 )))
275
276
277 Example parse in TTNv3
278
279 [[image:1652925144491-755.png||_mstalt="296296" height="139" width="732"]]
280
281 * (% style="color:#037691" %)**Sensor Model**(%%): For SW3L, this value is 0x11
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 * CN470: value 0x0B ~~ 0x0C
320 * Other Bands: Always 0x00
321
322
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 Configuration, FPORT~=4 ===
335
336
337 SW3L will only send this command after getting the downlink command (0x26 02) from the server.
338
339 [[image:image-20220609174446-2.png||_mstalt="432575"]]
340
341
342 * (% style="color:#037691" %)**TDC: (default: 0x0004B0)**
343
344 Uplink interval for the total pulse count, default value is 0x0004B0 which is 1200 seconds = 20 minutes.
345
346
347 * (% style="color:#037691" %)**STOP Duration & Alarm Timer**
348
349 Shows the configure value of [[Alarm for continuously water flow>>||anchor="H3.4Alarmforcontinuouslywaterflow"]]
350
351 [[image:image-20220519095747-2.png||_mstalt="434460" height="113" width="723"]]
352
353
354 === 2.3.3 Water Flow Value, Uplink FPORT~=2 ===
355
356
357 (((
358 SW3L will send this uplink **after** Device Status once join the LoRaWAN network successfully. And SW3L will:
359 )))
360
361 (((
362 periodically send this uplink every 20 minutes, this interval [[can be changed>>||anchor="H3.1SetTransmitIntervalTime"]].
363 )))
364
365 (((
366 Uplink Payload totals 11 bytes.
367 )))
368
369 (% border="1" cellspacing="4" style="background-color:#ffffcc; color:green; width:510px" %)
370 |=(% colspan="6" style="width: 510px;" %)**Water Flow Value,  FPORT=2**
371 |(% style="width:60px" %)**Size(bytes)**|(% style="width:130px" %)**1**|(% style="width:130px" %)**4**|(% style="width:30px" %)**1**|(% style="width:50px" %)**1**|(% style="width:80px" %)**4**
372 |(% style="width:110px" %)**Value**|(% style="width:81px" %)Calculate Flag & [[Alarm>>||anchor="H3.4Alarmforcontinuouslywaterflow"]]|(% style="width:95px" %)(((
373 Total pulse Or Last Pulse
374 )))|(% style="width:55px" %)MOD|(% style="width:115px" %)Reserve(0x01)|(% style="width:129px" %)[[Unix TimeStamp>>||anchor="H2.4.1UnixTimeStamp"]]
375
376 (% border="1" cellspacing="4" style="background-color:#ffffcc; color:green; width:470px" %)
377 |=(% colspan="4" style="width: 470px;" %)**Status & Alarm field**
378 |(% style="width:60px" %)**Size(bit)**|(% style="width:80px" %)**6**|(% style="width:310px" %)**1**|(% style="width:20px" %)**1**
379 |(% style="width:88px" %)**Value**|(% style="width:117px" %)Calculate Flag|(% style="width:221px" %)Alarm: 0: No Alarm; 1: Alarm|(% style="width:64px" %)N/A
380
381 [[image:image-20220519095946-3.png||_mstalt="435110" height="284" width="736"]]
382
383
384 * (((
385 (% style="color:#037691" %)**Calculate Flag**
386 )))
387
388 (((
389 The calculate flag is a user defined field, IoT server can use this flag to handle different meters with different pulse factors. For example, if there are 100 Flow Sensors, meters 1 ~~50 are 1 liter/pulse and meters 51 ~~ 100 has 1.5 liter/pulse.
390 )))
391
392 (((
393 **Example: in the default payload:**
394 )))
395
396 * (((
397 calculate flag=0: for SW3L-004 Flow Sensor: 450 pulse = 1 L
398 )))
399 * (((
400 calculate flag=1: for SW3L-006 Flow Sensor: 390 pulse = 1 L
401 )))
402 * (((
403 calculate flag=2: for SW3L-010 Flow Sensor: 64 pulse = 1 L
404 )))
405
406 (((
407 Default value: 0. 
408 )))
409
410 (((
411 Range (6 bits): (b)000000 ~~ (b) 111111
412
413 If user use with a meter for example is 0.02L/pulse. To proper decode the correct value in server,
414
415 1) User can set the Calculate Flag of this sensor to 3.
416
417 2) In server side, when a sensor data arrive, the decoder will check the value of Calculate Flag, It the value is 3, the total volume = 0.02 x Pulse Count.
418 )))
419
420 (((
421 (% style="color:red" %)**NOTE: User need to set Calculate Flag to proper value before use Flow Sensor. Downlink or AT Command see: **(%%)Refer: [[Set Calculate Flag>>||anchor="H3.6Setthecalculateflag"]]
422
423
424 )))
425
426 * (((
427 (% style="color:#037691" %)**Alarm**
428 )))
429
430 (((
431 See [[Alarm Base on Timeout>>||anchor="H3.4Alarmforcontinuouslywaterflow"]]
432 )))
433
434 [[image:image-20220519095946-4.png||_mstalt="435474" height="65" width="724"]]
435
436
437 * (((
438 (% style="color:#037691" %)**Total pulse**
439 )))
440
441 (((
442 Total pulse/counting since factory
443 )))
444
445 (((
446 Range (4 Bytes) : 0x00000000~~ 0xFFFFFFFF .
447
448
449 )))
450
451 * (((
452 (% style="color:#037691" %)**Last Pulse**
453 )))
454
455 (((
456 Total pulse since last FPORT=2 uplink. (Default 20 minutes)
457 )))
458
459 (((
460 Range (4 Bytes) : 0x00000000~~ 0xFFFFFFFF .
461
462
463 )))
464
465 * (((
466 (% style="color:#037691" %)**MOD: Default =0**
467 )))
468
469 (((
470 MOD=0 ~-~-> Uplink Total Pulse since factory
471 )))
472
473 (((
474 MOD=1 ~-~-> Uplink total pulse since last FPORT=2 uplink.
475
476
477 )))
478
479 * (((
480 (% style="color:#037691" %)**Water Flow Value**
481
482
483
484 )))
485
486 (((
487 Total Water Flow Volume = (Calculate Flag) x (Total Pulse)=9597/450=21.3L
488
489
490 )))
491
492 [[image:image-20220519095946-5.png||_mstalt="435838" height="50" width="727"]]
493
494
495
496 (((
497 Total Water Flow for TDC timer = (Calculate Flag) x (Last Pulse)=79/450=0.2L
498
499
500 )))
501
502 [[image:image-20220519095946-6.png||_mstalt="436202" height="43" width="733"]] ** **
503
504
505 === 2.3.4 Historical Water Flow Status, FPORT~=3 ===
506
507
508 (((
509 SW3L stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.4DatalogFeature"]].
510 )))
511
512 (((
513 The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time water flow status.
514 )))
515
516 * (((
517 Each data entry is 11 bytes and has the same structure as [[real time water flow status>>||anchor="H2.3.3A0WaterFlowValue2CUplinkFPORT3D2"]], to save airtime and battery, SW3L will send max bytes according to the current DR and Frequency bands.
518 )))
519
520 (((
521 For example, in the US915 band, the max payload for different DR is:
522 )))
523
524 (((
525 **a) DR0:** max is 11 bytes so one entry of data
526 )))
527
528 (((
529 **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
530 )))
531
532 (((
533 **c) DR2:** total payload includes 11 entries of data
534 )))
535
536 (((
537 **d) DR3:** total payload includes 22 entries of data.
538 )))
539
540 (((
541 If SW3L doesn't have any data in the polling time. It will uplink 11 bytes of 0
542
543
544 )))
545
546 (((
547 (% style="color:#037691" %)**Downlink:**
548 )))
549
550 (((
551 0x31 62 46 B1 F0 62 46 B3 94 07
552 )))
553
554 [[image:1652926690850-712.png||_mstalt="295178" height="115" width="726"]]
555
556
557 (((
558 (% style="color:#037691" %)**Uplink:**
559 )))
560
561 (((
562 00 00 01 00 00 00 00 62 46 B2 26 00 00 01 00 00 00 00 62 46 B2 5D 00 00 01 00 00 00 00 62 46 B2 99 00 00 01 00 00 00 00 62 46 B2 D5 00 00 01 00 00 01 15 62 46 B3 11 00 00 01 00 00 01 1F 62 46 B3 7E
563
564
565 )))
566
567 (((
568 (% style="color:#037691" %)**Parsed Value:**
569 )))
570
571 (((
572 [Alarm, Calculate Flag, MOD, Total pulse or Last Pulse,** **Water Flow Value, TIME]
573 )))
574
575 (((
576
577 )))
578
579 (((
580 [FALSE,0,0,0,0.0,2022-04-01 08:04:54],
581 )))
582
583 (((
584 [FALSE,0,0,0,0.0,2022-04-01 08:05:49],
585 )))
586
587 (((
588 [FALSE,0,0,0,0.0,2022-04-01 08:06:49],
589 )))
590
591 (((
592 [FALSE,0,0,0,0.0,2022-04-01 08:07:49],
593 )))
594
595 (((
596 [FALSE,0,0,277,0.6,2022-04-01 08:08:49],
597 )))
598
599 (((
600 [FALSE,0,0,287,0.6,2022-04-01 08:10:38],
601
602
603 )))
604
605 [[image:1652926777796-267.png||_mstalt="300183" height="279" width="724"]]
606
607
608 == 2.4 Datalog Feature ==
609
610
611 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.
612
613
614 === 2.4.1 Unix TimeStamp ===
615
616
617 SW3L uses Unix TimeStamp format based on
618
619 [[image:1652926852443-847.png||_mstalt="297427" height="112" width="724"]]
620
621 Users can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
622
623 Below is the converter example
624
625 [[image:1652926913271-611.png||_mstalt="293605" height="421" width="720"]]
626
627
628 === 2.4.2 Set Device Time ===
629
630
631 (% style="color:#4f81bd" %)**Through LoRaWAN MAC Command**
632
633 (((
634 Once SW3L Joined the LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to SW3L. If SW3L fails to get the time from the server, SW3L will use the internal time and wait for the next time request ~[[[via Device Status (FPORT=5)>>||anchor="H2.3.1DeviceStatus2CFPORT3D5"]]].
635
636
637 )))
638
639 (((
640 (% 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.**
641
642
643 )))
644
645 === 2.4.3 Poll sensor value ===
646
647
648 Users can poll sensor values based on timestamps. Below is the downlink command.
649
650 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:458.989px" %)
651 |=(% colspan="4" style="width: 456px;" %)**Downlink Command to poll Open/Close status (0x31)**
652 |(% style="width:62px" %)**1byte**|(% style="width:137px" %)**4bytes**|(% style="width:136px" %)**4bytes**|(% style="width:120px" %)**1byte**
653 |(% style="width:62px" %)31|(% style="width:137px" %)Timestamp start|(% style="width:136px" %)Timestamp end|(% style="width:120px" %)Uplink Interval
654
655 (((
656 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.
657 )))
658
659 (((
660 For example, downlink command[[image:image-20220519152849-5.png||_mstalt="434772"]]
661 )))
662
663 (((
664 Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00's data
665 )))
666
667 (((
668 Uplink Internal =5s,means CPL01 will send one packet every 5s. range 5~~255s.
669
670
671 )))
672
673 === 2.4.4 Decoder in TTN V3 ===
674
675
676 [[image:1652927365661-475.png||_mstalt="297089" height="359" width="723"]]
677
678 Please check the decoder from this link:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
679
680
681 == 2.5 Show data on Datacake ==
682
683
684 (((
685 Datacake IoT platform provides a human-friendly interface to show the sensor data, once we have sensor data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:
686 )))
687
688 (((
689 (% style="color:blue" %)**Step 1**(%%): Link TTNv3 to Datacake [[https:~~/~~/docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti>>url:https://docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti]]
690 )))
691
692 (((
693 (% style="color:blue" %)**Step 2**(%%): Configure SW3L in Datacake  ​​​​
694
695
696 )))
697
698 [[image:image-20220519103234-7.png||_mstalt="430482" height="562" width="492"]]
699
700
701 [[image:image-20220519103234-8.png||_mstalt="430846" height="550" width="549"]]
702
703
704 [[image:image-20220519103234-9.png||_mstalt="431210" height="493" width="666"]]
705
706
707 [[image:image-20220519103234-10.png||_mstalt="451217" height="234" width="724"]]
708
709
710 [[image:image-20220519103234-11.png||_mstalt="451594" height="386" width="727"]]
711
712
713 [[image:image-20220519103234-12.png||_mstalt="451971" height="262" width="728"]]
714
715
716 [[image:image-20220519103234-13.png||_mstalt="452348" height="216" width="727"]]
717
718
719 [[image:image-20220519103234-14.png||_mstalt="452725" height="464" width="722"]]
720
721
722 [[image:image-20220519103234-15.png||_mstalt="453102" height="488" width="725"]]
723
724
725 [[image:image-20220519103234-16.png||_mstalt="453479" height="407" width="722"]]
726
727
728 = 3. Configure SW3L via AT Command or LoRaWAN Downlink =
729
730
731 Use can configure SW3L via AT Command or LoRaWAN Downlink.
732
733 * AT Command Connection: See [[FAQ>>||anchor="H5.FAQ"]].
734 * LoRaWAN Downlink instruction for different platforms: [[IoT LoRaWAN Server>>doc:Main.WebHome]]
735
736 There are two kinds of commands to configure SW3L, they are:
737
738
739 * (% style="color:#4f81bd" %)**General Commands**.
740
741 These commands are to configure:
742
743 * General system settings like uplink interval.
744 * LoRaWAN protocol & radio related command.
745
746 They are the same for all Dragino Devices which support DLWS-005 LoRaWAN Stack(Note~*~*). These commands can be found on the wiki: [[End Device AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]]
747
748
749 * (% style="color:#4f81bd" %)**Commands special design for SW3L**
750
751 These commands are only valid for SW3L, as below:
752
753
754 == 3.1 Set Transmit Interval Time ==
755
756
757 Feature: Change LoRaWAN End Node Transmit Interval.
758
759
760 (% style="color:#4f81bd" %)**AT Command: AT+TDC**
761
762 [[image:image-20220609175355-3.png||_mstalt="432913"]]
763
764
765 (% style="color:#4f81bd" %)**Downlink Command: 0x01**
766
767 Format: Command Code (0x01) followed by 3 bytes time value.
768
769 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
770
771 * **Example 1**: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
772 * **Example 2**: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
773
774
775 == 3.2 Set Password ==
776
777
778 Feature: Set device password, max 9 digits
779
780
781 (% style="color:#4f81bd" %)**AT Command: AT+PWORD**
782
783
784 (% border="1" cellspacing="4" style="background-color:#ffffcc; color:green; width:427.989px" %)
785 |=(% style="width: 174px;" %)**Command Example**|=(% style="width: 136px;" %)**Function**|=(% style="width: 114px;" %)**Response**
786 |(% style="width:174px" %)AT+PWORD=?|(% style="width:136px" %)Show password|(% style="width:114px" %)(((
787 (((
788 123456
789 )))
790
791 (((
792 OK
793 )))
794 )))
795 |(% style="width:174px" %)AT+PWORD=999999|(% style="width:136px" %)Set password|(% style="width:114px" %)(((
796 OK
797 )))
798
799 (% style="color:#4f81bd" %)**Downlink Command:**
800
801 No downlink command for this feature.
802
803
804 == 3.3 Quit AT Command ==
805
806
807 (((
808 Feature: Quit AT Command mode, so user needs to input the password again before using AT Commands.
809
810
811 (% style="color:#4f81bd" %)**AT Command: AT+DISAT**
812 )))
813
814 (% border="1" cellspacing="4" style="background-color:#ffffcc; color:green; width:444.989px" %)
815 |=(% style="width: 156px;" %)**Command Example**|=(% style="width: 194px;" %)**Function**|=(% style="width: 91px;" %)**Response**
816 |(% style="width:156px" %)AT+DISAT|(% style="width:194px" %)Quit AT Commands mode|(% style="width:91px" %)OK
817
818 (% style="color:#4f81bd" %)**Downlink Command:**
819
820 No downlink command for this feature.
821
822
823 == 3.4 Alarm for continuously water flow ==
824
825
826 (((
827 This feature is to monitor and send Alarm for continuously water flow.
828 )))
829
830 (((
831 Example case is for Toilet water monitoring, if some one push toilet button, the toilet will have water flow. If the toilet button has broken and can't returned to original state, the water flow will keep for hours or days which cause huge waste for water.
832 )))
833
834 (((
835 To monitor this faulty and send alarm, there are two settings:
836 )))
837
838 * (((
839 (% style="color:#4f81bd" %)**Stop Duration: Unit: Second**
840 )))
841
842 (((
843 Default: 15s, If SW3L didn't see any water flow in 15s, SW3L will consider stop of water flow event.
844 )))
845
846 * (((
847 (% style="color:#4f81bd" %)**Alarm Timer: Units: Minute; Default 0 minutes (means Alarm disable)**
848 )))
849
850 (((
851
852
853 **Example:** 3 minutes, if SW3L detect a start of water flow event and didn't detect a stop event within Alarm timer, SW3L will send an Alarm to indicate a water flow abnormal alarm.
854 )))
855
856 (((
857 So for example, If we set stop duration=15s and Alarm Timer=3minutes. If the toilet water flow continuously for more than 3 minutes, Sensor will send an alarm (in Confirmed MODE) to platform.
858 )))
859
860 (((
861 (% style="color:red" %)**Note:** **After this alarm is send, sensor will consider a stop of water flow and count for another new event. So if water flow waste last for 1 hour, Sensor will keep sending alarm every 3 minutes.**
862
863
864 )))
865
866 (((
867 (% style="color:#4f81bd" %)**AT Command**(%%) to configure:
868 )))
869
870 * (((
871 AT+PTRIG=15,3  ~-~-> Set Stop duration: 15s, Alarm Timer: 3 minutes.
872 )))
873 * (((
874 AT+ PTRIG=15,0  ~-~-> Default Value, disable water waste Alarm.
875 )))
876
877 (((
878
879
880 (% style="color:#4f81bd" %)**Downlink Command**(%%) to configure: 
881 )))
882
883 (((
884 Command: **0xAA aa bb cc**
885 )))
886
887 (((
888 AA: Command Type Code
889 )))
890
891 (((
892 aa: Stop duration
893 )))
894
895 (((
896 bb cc: Alarm Timer
897 )))
898
899 (((
900 If user send 0xAA 0F 00 03: equal to AT+PTRIG=15,3
901 )))
902
903
904 == 3.5 Clear Flash Record ==
905
906
907 Feature: Clear flash storage for data log feature.
908
909
910 (% style="color:#4f81bd" %)**AT Command: AT+CLRDTA**
911
912 [[image:image-20220609175554-4.png||_mstalt="433563"]]
913
914
915 (% style="color:#4f81bd" %)**Downlink Command:**
916
917 * **Example**: 0xA301  ~/~/  Same as AT+CLRDTA
918
919
920 == 3.6 Set the calculate flag ==
921
922
923 Feature: Set the calculate flag
924
925
926 (% style="color:#4f81bd" %)**AT Command: AT+CALCFLAG**
927
928 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:461.989px" %)
929 |=(% style="width: 161px;" %)**Command Example**|=(% style="width: 202px;" %)**Function**|=(% style="width: 95px;" %)**Response**
930 |(% style="width:161px" %)AT+CALCFLAG =1|(% style="width:202px" %)Set the calculate flag to 1.|(% style="width:95px" %)OK
931 |(% style="width:161px" %)AT+CALCFLAG =2|(% style="width:202px" %)Set the calculate flag to 2.|(% style="width:95px" %)OK
932
933 (% style="color:#4f81bd" %)**Downlink Command:**
934
935 * **Example**: 0XA501  ~/~/  Same as AT+CALCFLAG =1
936
937
938 == 3.7 Set count number ==
939
940
941 Feature: Manually set the count number
942
943
944 (% style="color:#4f81bd" %)**AT Command: AT+SETCNT**
945
946 (% border="1" cellspacing="4" style="background-color:#ffffcc; color:green; width:480.989px" %)
947 |=(% style="width: 162px;" %)**Command Example**|=(% style="width: 222px;" %)**Function**|=(% style="width: 93px;" %)**Response**
948 |(% style="width:162px" %)AT+ SETCNT =0|(% style="width:222px" %)Set the count number to 0.|(% style="width:93px" %)OK
949 |(% style="width:162px" %)AT+ SETCNT =100|(% style="width:222px" %)Set the count number to 100.|(% style="width:93px" %)OK
950
951 (% style="color:#4f81bd" %)**Downlink Command:**
952
953 * **Example**: 0xA600000001  ~/~/  Same as AT+ SETCNT =1
954 * **Example**: 0xA600000064  ~/~/  Same as AT+ SETCNT =100
955
956
957 == 3.8 Set work mode ==
958
959
960 Feature: Manually set the work mode
961
962
963 (% style="color:#4f81bd" %)**AT Command: AT+MOD**
964
965 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:462.989px" %)
966 |=(% style="width: 162px;" %)**Command Example**|=(% style="width: 191px;" %)**Function**|=(% style="width: 106px;" %)**Response**
967 |(% style="width:162px" %)AT+MOD=0|(% style="width:191px" %)Set the work mode to 0.|(% style="width:106px" %)OK
968 |(% style="width:162px" %)AT+MOD =1|(% style="width:191px" %)Set the work mode to 1|(% style="width:106px" %)OK
969
970 (% style="color:#4f81bd" %)**Downlink Command:**
971
972 * **Example: **0x0A00  ~/~/  Same as AT+ MOD=0
973 * **Example:** 0x0A01  ~/~/  Same as AT+ MOD =1
974
975
976 = 4. Battery & Power Consumption =
977
978
979 SW3L uses ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
980
981 [[**Battery Info & Power Consumption Analyze**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
982
983
984 = 5. FAQ =
985
986 == 5.1 How to use AT Command to configure SW3 ==
987
988
989 SW3L UART connection photo
990
991 [[image:1652943554687-149.png||_mstalt="298155" height="354" width="724"]]
992
993
994 (((
995 In the PC, you need to set the serial baud rate to (% style="color:green" %)**9600**(%%) to access the serial console for LSN50. LSN50 will output system info once power on as below:
996 )))
997
998 [[image:1652943563580-704.png||_mstalt="295191" height="504" width="720"]]
999
1000
1001 == 5.2 How to upgrade the firmware? ==
1002
1003
1004 (((
1005 A new firmware might be available for:
1006 )))
1007
1008 * (((
1009 Support new features
1010 )))
1011 * (((
1012 For bug fix
1013 )))
1014 * (((
1015 Change LoRaWAN bands.
1016 )))
1017
1018 (((
1019 Instruction for how to upgrade: [[Firmware Upgrade Instruction>>doc:Main.Firmware Upgrade Instruction for STM32 base products.WebHome||anchor="H2.HardwareUpgradeMethodSupportList" _mstmutation="1"]]
1020
1021
1022 )))
1023
1024 (((
1025 Firmware location:  [[https:~~/~~/www.dropbox.com/sh/jktldt8q674i87l/AADqk1zoUEekCjDR_4ic2Tg0a?dl=0>>https://www.dropbox.com/sh/jktldt8q674i87l/AADqk1zoUEekCjDR_4ic2Tg0a?dl=0]]
1026 )))
1027
1028
1029 == 5.3 How to change the LoRa Frequency Bands/Region? ==
1030
1031
1032 Users can follow the introduction for how to upgrade images. When downloading the images, choose the required image file for download.
1033
1034
1035 == 5.4 Can I connect 3rd party flow sensor other than the default one? ==
1036
1037
1038 If a user wants to connect SW3L to a 3rd party flow sensor such as a [[DN50 flow sensor>>https://valvesdirect.net/product/flow-sensor-2-inch-15-400lpm/]], that is possible. A flow sensor with pulse output is needed.
1039
1040 (% style="background-color:yellow" %)**Below is the notice for the connection:**
1041
1042 ~1. Connect the 3rd party flow meter to the pulse input and GND of SW3L.
1043
1044 2. Make sure the pulse output voltage of 3rd party flow sensor is less than 5v.
1045
1046 3. It is not recommended to use SW3L to power the external flow meter, unless you are sure the external flow sensor is low power ( several uA). Otherwise the battery of SW3L will be running out soon.
1047
1048 4. After connection, user needs to set the [[Calculator Flag and change the payload>>||anchor="H2.3.3A0WaterFlowValue2CUplinkFPORT3D2"]] so to get the correct reading in the platform.
1049
1050
1051 [[image:image-20220614233814-2.png||_mstalt="429949" height="280" width="383"]]
1052
1053
1054 = 6. Order Info =
1055
1056
1057 (((
1058 Part Number: (% style="color:#4f81bd" %)**SW3L-XXX-YYY**
1059 )))
1060
1061 (((
1062 (% style="color:#4f81bd" %)**XXX**(%%): The default frequency band
1063 )))
1064
1065 * (((
1066 (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
1067 )))
1068 * (((
1069 (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
1070 )))
1071 * (((
1072 (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
1073 )))
1074 * (((
1075 (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
1076 )))
1077 * (((
1078 (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
1079 )))
1080 * (((
1081 (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
1082 )))
1083 * (((
1084 (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
1085 )))
1086 * (((
1087 (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
1088
1089
1090
1091 )))
1092
1093 (((
1094 (% style="color:#4f81bd" %)**YYY**(%%): Flow Sensor Model:
1095 )))
1096
1097 (((
1098 004: DW-004 Flow Sensor: diameter: G1/2” / DN15.  450 pulse = 1 L
1099 )))
1100
1101 (((
1102 006: DW-006 Flow Sensor: diameter: G3/4” / DN20. 390 pulse = 1 L
1103 )))
1104
1105 (((
1106 010: DW-010 Flow Sensor: diameter: G 1” / DN25. 64 pulse = 1 L
1107 )))
1108
1109 * (((
1110 calculate flag=0: for SW3L-004 Flow Sensor: 450 pulse = 1 L
1111 )))
1112 * (((
1113 calculate flag=1: for SW3L-006 Flow Sensor: 390 pulse = 1 L
1114 )))
1115 * (((
1116 calculate flag=2: for SW3L-010 Flow Sensor: 64  pulse = 1 L
1117
1118
1119
1120 )))
1121
1122 = 7. Packing Info =
1123
1124
1125 **Package Includes**:
1126
1127 * SW3L Water Flow Sensor x 1
1128
1129
1130 = 8. Support =
1131
1132
1133 * (((
1134 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.
1135 )))
1136 * (((
1137 Provide as much information as possible regarding your inquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[support@dragino.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]].
1138
1139
1140
1141
1142 )))
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0