Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20231010090810-1.png||height="379" width="614"]]
5
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 SW3L-NB NB-IoT Flow Sensor ==
25
26
27 The Dragino SW3L-NB is a (% style="color:blue" %)**NB-IoT Flow Sensor**(%%). It detects water flow volume and uplink to IoT server via NB-IoT network. User can use this to (% style="color:blue" %)**monitor the water usage for buildings**.
28
29 The SW3L-NB will send water flow volume every 20 minutes. It can also detect the (% style="color:blue" %)**water flow status and send Alarm**(%%), to avoid the waste for water usage such as broken toilet case.
30
31 SW3L-NB is designed for both indoor and outdoor use. It has a weatherproof enclosure and industrial level battery to (% style="color:blue" %)**work in low to high temperatures**.
32
33 SW3L-NB supports different uplink methods including (% style="color:blue" %)**MQTT, MQTTs, UDP & TCP**(%%) for different application requirement, and support uplinks to various IoT Servers.
34
35 SW3L-NB (% style="color:blue" %)**supports BLE configure **(%%)and(% style="color:blue" %)** OTA update**(%%) which make user easy to use.
36
37 SW3L-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
38
39 SW3L-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
40
41 [[image:image-20231010091546-2.png||height="348" width="909"]]
42
43
44 == 1.2 ​Features ==
45
46
47 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
48 * Ultra-low power consumption
49 * Upload water flow volume
50 * Monitor water waste
51 * Multiply Sampling and one uplink
52 * Support Bluetooth v5.1 remote configure and update firmware
53 * Uplink on periodically
54 * Downlink to change configure
55 * 8500mAh Battery for long term use
56 * Nano SIM card slot for NB-IoT SIM
57 (% style="display:none" %) (%%)
58
59 == 1.3 Specification ==
60
61
62 (% style="color:blue" %)**Common DC Characteristics:**
63
64 * Supply Voltage: 2.5v ~~ 3.6v
65 * Operating Temperature: -40 ~~ 85°C
66
67 (% style="color:blue" %)**NB-IoT Spec:**
68
69 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
70
71 (% style="color:#037691" %)**Support Bands:**
72
73 * B1 @H-FDD: 2100MHz
74 * B2 @H-FDD: 1900MHz
75 * B3 @H-FDD: 1800MHz
76 * B4 @H-FDD: 2100MHz
77 * B5 @H-FDD: 860MHz
78 * B8 @H-FDD: 900MHz
79 * B12 @H-FDD: 720MHz
80 * B13 @H-FDD: 740MHz
81 * B17 @H-FDD: 730MHz
82 * B18 @H-FDD: 870MHz
83 * B19 @H-FDD: 870MHz
84 * B20 @H-FDD: 790MHz
85 * B25 @H-FDD: 1900MHz
86 * B28 @H-FDD: 750MHz
87 * B66 @H-FDD: 2000MHz
88 * B70 @H-FDD: 2000MHz
89 * B85 @H-FDD: 700MHz
90
91 (% style="color:blue" %)**Battery:**
92
93 * Li/SOCI2 un-chargeable battery
94 * Capacity: 8500mAh
95 * Self Discharge: <1% / Year @ 25°C
96 * Max continuously current: 130mA
97 * Max boost current: 2A, 1 second
98
99 (% style="color:blue" %)**Power Consumption**
100
101 * STOP Mode: 10uA @ 3.3v
102 * Max transmit power: 350mA@3.3v
103 (% style="display:none" %) (%%)
104
105 == 1.4 Flow Sensor Spec ==
106
107
108 (((
109 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:515px" %)
110 |=(% style="width: 103px; background-color:#4F81BD; color: white;" %)**Model**|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)**SW3L-004**|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)SW3L-006|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)SW3L-010|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)SW3L-020
111 |(% style="width:152px" %)**Probe #**|(% style="width:176px" %)DW-004|(% style="width:173px" %)DW-006|(% style="width:165px" %)DW-010|(% style="width:190px" %)DW-020
112 |(% style="width:152px" %)**Diameter**|(% style="width:176px" %)G1/2" / DN15|(% style="width:173px" %)G3/4" / DN20|(% style="width:165px" %)G1"  / DN25|(% style="width:190px" %)G2" / DN50
113 |(% style="width:152px" %)**Working Range**|(% style="width:176px" %)1~~30L/min|(% style="width:173px" %)1~~60L/min|(% style="width:165px" %)2~~100L/min|(% style="width:190px" %)10~~300L/min
114 |(% style="width:152px" %)**Measure**|(% style="width:176px" %)450 pulse = 1 L|(% style="width:173px" %)390 pulse = 1 L|(% style="width:165px" %)64 pulse = 1 L|(% style="width:190px" %)12 pulse = 1 L
115 |(% style="width:152px" %)**Accurancy**|(% style="width:176px" %)±5%|(% style="width:173px" %)±5%|(% style="width:165px" %)±5%|(% style="width:190px" %)±5%
116 |(% style="width:152px" %)**Power Consumption**|(% style="width:176px" %)1uA, 3.6v (Sensor Only)|(% style="width:173px" %)1uA, 3.6v (Sensor Only)|(% style="width:165px" %)1uA, 3.6v (Sensor Only)|(% style="width:190px" %)1uA, 3.6v (Sensor Only)
117 |(% style="width:152px" %)**Max Pressure**|(% style="width:176px" %)≤ 1.75Mpa|(% style="width:173px" %)≤ 1.75Mpa |(% style="width:165px" %)≤ 1.75Mpa|(% style="width:190px" %)≤ 1.75Mpa
118 |(% style="width:152px" %)**Temperature range**|(% style="width:176px" %)<80°C|(% style="width:173px" %)<80°C|(% style="width:165px" %)<80°C|(% style="width:190px" %)<80°C
119 |(% style="width:152px" %)**Humidity Range**|(% style="width:176px" %)35%~~90%RH (no frost)|(% style="width:173px" %)35%~~90%RH (no frost)|(% style="width:165px" %)35%~~90%RH (no frost)|(% style="width:190px" %)35%~~90%RH (no frost)
120 )))
121
122
123 == 1.5 Applications ==
124
125
126 * Flow Sensor application
127 * Water Control
128 * Toilet Flow Sensor
129 * Monitor Waste water
130 (% style="display:none" %) (%%)
131
132 == 1.6 Sleep mode and working mode ==
133
134
135 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.
136
137 (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as NB-IoT Sensor to Join NB-IoT 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.
138
139
140 == 1.7 Button & LEDs ==
141
142
143 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
144
145 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
146 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width:225px;background-color:#4F81BD;color:white" %)**Action**
147 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
148 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
149 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
150 )))
151 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
152 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to attach NB-IoT network.
153 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
154 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device attach NB-IoT network or not.
155 )))
156 |(% style="width:167px" %)Fast press ACT 5 times.|(% style="width:117px" %)Deactivate Device|(% style="width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means device is in Deep Sleep Mode.
157
158 (% style="color:red" %)**Note: When the device is executing a program, the buttons may become invalid. It is best to press the buttons after the device has completed the program execution.**
159
160
161 == 1.8 BLE connection ==
162
163
164 SW3L-NB support BLE remote configure and firmware update.
165
166 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:
167
168 * Press button to send an uplink
169 * Press button to active device.
170 * Device Power on or reset.
171
172 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
173
174
175 == 1.9 Pin Definitions , Switch & SIM Direction ==
176
177
178 [[image:image-20230819104805-5.png]]
179
180
181 === 1.9.1 Jumper JP2 ===
182
183
184 Power on Device when put this jumper.
185
186
187 === 1.9.2 BOOT MODE / SW1 ===
188
189
190 **1)** (% style="color:blue" %)**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.
191
192 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
193
194
195 === 1.9.3 Reset Button ===
196
197
198 Press to reboot the device.
199
200 (% style="display:none" %)
201
202
203 === 1.9.4 SIM Card Direction ===
204
205
206 See this link. [[How to insert SIM Card>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H2.AttachNetwork]].
207
208
209 == 1.10 Mechanical ==
210
211 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675143884058-338.png?rev=1.1||alt="1675143884058-338.png"]]
212
213 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675143899218-599.png?rev=1.1||alt="1675143899218-599.png"]]
214
215 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675143909447-639.png?rev=1.1||alt="1675143909447-639.png"]]
216
217 (% style="display:none" %) (%%)
218
219 **Probe Mechanical:**
220
221
222 (% style="color:blue" %)**004: DW-004 Flow Sensor: diameter: G1/2” / DN15.  450 pulse = 1 L**
223
224 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SW3L%20LoRaWAN%20Outdoor%20Flow%20Sensor/WebHome/image-20220519091350-1.png?width=722&height=385&rev=1.1||alt="image-20220519091350-1.png"]]
225
226
227 (% style="color:blue" %)**006: DW-006 Flow Sensor: diameter: G3/4” / DN20.  390 pulse = 1 L**
228
229 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SW3L%20LoRaWAN%20Outdoor%20Flow%20Sensor/WebHome/image-20220519091423-2.png?width=723&height=258&rev=1.1||alt="image-20220519091423-2.png"]]
230
231
232 (% style="color:blue" %)**010: DW-010 Flow Sensor: diameter: G 1” / DN25. 64 pulse = 1 L**
233
234 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SW3L%20LoRaWAN%20Outdoor%20Flow%20Sensor/WebHome/image-20220519091423-3.png?width=724&height=448&rev=1.1||alt="image-20220519091423-3.png"]]
235
236
237 (% style="color:blue" %)**020: DW-020 Flow Sensor: diameter: G 2”/ DN50.  12 pulse = 1 L**
238
239 [[image:image-20231205170947-1.png]]
240
241
242 = 2. Use SW3L-NB to communicate with IoT Server =
243
244 == 2.1 Send data to IoT server via NB-IoT network ==
245
246
247 The SW3L-NB is equipped with a NB-IoT module, the pre-loaded firmware in SW3L-NB will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module.  The NB-IoT network will forward this value to IoT server via the protocol defined by SW3L-NB.
248
249 Below shows the network structure:
250
251 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SW3L-NB_NB-IoT_Flow_Sensor_User_Manual/WebHome/image-20231010091546-2.png?width=909&height=348&rev=1.1||alt="image-20231010091546-2.png"]]
252
253
254 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1D**(%%) version of SW3L-NB.
255
256
257 (% style="color:blue" %)**GE Version**(%%): This version doesn't include SIM card or point to any IoT server. User needs to use AT Commands to configure below two steps to set SW3L-NB send data to IoT server.
258
259 * Install NB-IoT SIM card and configure APN. See instruction of [[Attach Network>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H2.AttachNetwork]].
260
261 * Set up sensor to point to IoT Server. See instruction of [[Configure to Connect Different Servers>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.Configuretoconnecttodifferentservers]]. 
262
263 Below shows result of different server as a glance.
264
265 (% border="1" cellspacing="4" style="width:515px" %)
266 |(% style="background-color:#4f81bd; color:white; width:100px" %)**Servers**|(% style="background-color:#4f81bd; color:white; width:300px" %)**Dash Board**|(% style="background-color:#4f81bd; color:white; width:115px" %)**Comments**
267 |(% style="width:127px" %)[[Node-Red>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.5A0Node-RedA028viaA0MQTT29]]|(% style="width:385px" %)(((
268 (% style="text-align:center" %)
269 [[image:image-20230819113244-8.png||height="183" width="367"]]
270 )))|(% style="width:170px" %)
271 |(% style="width:127px" %)[[DataCake>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.4Datacake]]|(% style="width:385px" %)(((
272 (% style="text-align:center" %)
273 [[image:image-20230819113244-9.png||height="119" width="367"]]
274 )))|(% style="width:170px" %)
275 |(% style="width:127px" %)[[Tago.IO>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.7A0Tago.ioA028viaA0MQTT29]]|(% style="width:385px" %) |(% style="width:170px" %)
276 |(% style="width:127px" %)[[General UDP>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.1GeneralA0UDPA0Connection]]|(% style="width:385px" %)Raw Payload. Need Developer to design Dash Board|(% style="width:170px" %)
277 |(% style="width:127px" %)[[General MQTT>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.2GeneralA0MQTTA0Connection]]|(% style="width:385px" %)Raw Payload. Need Developer to design Dash Board|(% style="width:170px" %)
278 |(% style="width:127px" %)[[ThingSpeak>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.3A0ThingSpeakA028viaA0MQTT29]]|(% style="width:385px" %)(((
279 (% style="text-align:center" %)
280 [[image:image-20230819113244-10.png||height="104" width="367"]]
281 )))|(% style="width:170px" %)
282 |(% style="width:127px" %)[[ThingsBoard>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.6A0ThingsBoard.CloudA028viaA0MQTT29]]|(% style="width:385px" %)(((
283 (% style="text-align:center" %)
284 [[image:image-20230819113244-11.png||height="141" width="367"]]
285 )))|(% style="width:170px" %)
286
287 (% style="color:blue" %)**1D Version**(%%): This version has 1NCE SIM card pre-installed and configure to send value to DataCake. User Just need to select the sensor type in DataCake and Activate SW3L-NB and user will be able to see data in DataCake. See here for [[DataCake Config Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.4Datacake]].
288
289
290 == 2.2 ​Payload Types ==
291
292
293 To meet different server requirement, SW3L-NB supports different payload type.
294
295 **Includes:**
296
297 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
298
299 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
300
301 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
302
303 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
304
305 User can specify the payload type when choose the connection protocol. Example:
306
307 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
308
309 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
310
311 (% style="color:#037691" %)**AT+PRO=3,0 ** (%%) ~/~/ Use MQTT Connection & Json Payload
312
313 (% style="color:#037691" %)**AT+PRO=3,1**  (%%) ~/~/ Use MQTT Connection & ThingSpeak
314
315 (% style="color:#037691" %)**AT+PRO=3,3 ** (%%) ~/~/ Use MQTT Connection & ThingsBoard
316
317 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
318
319 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TDP Connection & hex Payload
320
321 (% style="color:#037691" %)**AT+PRO=4,5**   (%%) ~/~/ Use TDP Connection & Json Payload
322
323
324 === 2.2.1 General Json Format(Type~=5) ===
325
326
327 This is the General Json Format. As below:
328
329 (% style="color:#4472c4" %)**{"IMEI":"866207058378443","Model":"SW3L-NB","alarm:":0,"pulse":0,"water_flow":0.00,"battery":3.556,"signal":24,"1":{0.14,2023/10/20 06:35:40},"2":{0.14,2023/10/20 06:20:40},"3":{0.14,2023/10/20 06:05:40},"4":{11359.75,2023/10/20 03:50:05},"5":{11359.75,2023/10/18 08:32:45},"6":{11068.47,2023/10/18 08:17:45},"7":{21845.51,2023/10/18 08:02:45},"8":{21845.51,2023/10/18 07:47:45}}**
330
331 [[image:image-20231020145016-2.png||height="873" width="1180"]]
332
333
334 (% style="color:red" %)**Notice, from above payload:**
335
336 * Alarm, Pulse, Water Flow , Battery & Signal are the value at uplink time.
337
338 * Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+NOUD=8 ** (%%)Command. Each entry includes (from left to right): Water Flow, Sampling time.
339 (% style="display:none" %) (%%)
340
341 === 2.2.2 HEX format Payload(Type~=0) ===
342
343
344 This is the HEX Format. As below:
345
346 (% style="color:#4472c4" %)**f866207058378443 1164 0de4 14 00 00 00 00 01c2 0000003d 65321751 004e004e 6531f8ed 004e004e 652f982d 004c004c 652f94a9 0096004f 652f9125 0096004f 652f8da1 0092004f 652f89ce 0092004f 652f864a 004d004d 652f8065**
347
348 [[image:image-20231023194515-1.png||height="189" width="1175"]](% style="display:none" %)
349
350
351 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
352
353 [[image:image-20231020140858-1.png]]
354
355
356 (% style="color:blue" %)**Version:**
357
358 These bytes include the hardware and software version.
359
360 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x11 for SW3L-NB
361
362 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x64=100, means firmware version 1.0.0
363
364
365 (% style="color:blue" %)**BAT (Battery Info):**
366
367 Ex1: 0x0dda = 3546mV
368
369
370 (% style="color:blue" %)**Signal Strength:**
371
372 NB-IoT Network signal Strength.
373
374 **Ex1: 0x15 = 21**
375
376 **0**  -113dBm or less
377
378 **1**  -111dBm
379
380 **2...30** -109dBm... -53dBm
381
382 **31**   -51dBm or greater
383
384 **99**    Not known or not detectable
385
386
387 (% style="color:blue" %)**PA4: Support digital level input below 3.3V**
388
389 (((
390 00 ~-~-> PA4 is at low level.
391 )))
392
393 (((
394 01 ~-~-> PA4 is at high level.
395
396
397 (% style="color:blue" %)**PB15: Support digital level input below 3.3V**
398
399 (((
400 00 ~-~-> PB15 is at low level.
401 )))
402
403 (((
404 01 ~-~-> PB15 is at high level.
405
406
407 (((
408 (% style="color:blue" %)**Alarm:**
409 )))
410
411 (((
412 00~-~->Normal uplink.
413
414 01~-~->Water flow abnormal alarm.
415
416
417 (% style="color:blue" %)**Mod:**
418
419 (((
420 MOD=0 ~-~-> Uplink Total Pulse since factory
421 )))
422
423 (((
424 MOD=1 ~-~-> Uplink total pulse since last uplink.
425
426
427 )))
428
429 (% style="color:blue" %)**Calculate_flag:**
430 )))
431 )))
432 )))
433
434 (((
435 The calculate flag is a user defined field, total pulse divided by this mark is the converted water flow rate.
436 )))
437
438 (((
439 (% style="color:#037691" %)**Example:in the default payload:**
440 )))
441
442 * (((
443 calculate flag=450: for SW3L-004 Flow Sensor: 450 pulse = 1 L
444 )))
445 * (((
446 calculate flag=390: for SW3L-006 Flow Sensor: 390 pulse = 1 L
447 )))
448 * (((
449 calculate flag=64: for SW3L-010 Flow Sensor: 64 pulse = 1 L
450 )))
451
452 (((
453 Default value: 450. 
454 )))
455
456 (((
457
458 )))
459
460 (((
461 (% style="color:blue" %)**Total_pulse**
462 )))
463
464 (((
465 The total pulse generated by the flow of water passing through the water meter.
466 )))
467
468 (((
469
470 )))
471
472 (% style="color:blue" %)**Timestamp:   **
473
474 Unit Timestamp Example: 650abc40(H) = 1695202368(D)
475
476 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]]) to get the time.
477
478
479 === 2.2.3 ThingsBoard Payload(Type~=3) ===
480
481
482 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
483
484 (% style="color:#4472c4" %)** {"IMEI": "866207058378443","Model": "SW3L-NB","alarm:": 0, "pulse": 198,"water_flow": 0.44,"battery": 3.551, "signal": 22}**
485
486 [[image:image-20231020145908-3.png||height="595" width="1182"]]
487
488
489 === 2.2.4 ThingSpeak Payload(Type~=1) ===
490
491
492 This payload meets ThingSpeak platform requirement. It includes only five fields. Form 1~~5 are:
493
494 Distance, Battery & Signal. This payload type only valid for ThingsSpeak Platform
495
496 As below:
497
498 (% style="color:#4472c4" %)**field1=Total_pulse value&field2=Water_sum value&filed3=Alarm value&filed4=Battery value&field5=Singal value**
499
500 [[image:image-20231025164530-1.png||height="765" width="815"]]
501
502
503 == 2.3 Test Uplink and Change Update Interval ==
504
505
506 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%) & AT+NOUD=8
507
508 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
509
510 (% style="color:#037691" %)**AT+TDC=600 ** (%%) ~/~/ Set Update Interval to 600s
511
512 User can also push the button for more than 1 seconds to activate an uplink.
513
514
515 == 2.4 Multi-Samplings and One uplink ==
516
517
518 (% style="color:red" %)**Note:** **When SW3L-NB is reset and AT+MOD=0, the total pulse will be read from the latest recorded data as the initial value**.
519
520
521 To save battery life, SW3L-NB will sample Water Flow data every 15 minutes and send one uplink every 2 hours. So each uplink it will include 8 stored data + 1 real-time data. They are defined by:
522
523 * (% style="color:#037691" %)**AT+TR=900**   (%%) ~/~/ The unit is seconds, and the default is to record data once every 900 seconds (15 minutes, the minimum can be set to 180 seconds)
524
525 * (% style="color:#037691" %)**AT+NOUD=8**     (%%)~/~/  The device uploads 8 sets of recorded data by default. Up to 32 sets of record data can be uploaded.
526
527 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
528
529 [[image:1692424376354-959.png]]
530
531
532 == 2.5 Alarm for continuously water flow ==
533
534
535 (((
536 This feature is to monitor and send Alarm for continuously water flow.
537 )))
538
539 (((
540 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.
541 )))
542
543 (((
544 To monitor this faulty and send alarm, there are two settings:
545 )))
546
547 * (((
548 (% style="color:blue" %)**Stop Duration: Unit: Second**
549 )))
550
551 (((
552 Default: 15s, If SW3L-NB didn't see any water flow in 15s, SW3L-NB will consider stop of water flow event.
553
554
555 )))
556
557 * (((
558 (% style="color:blue" %)**Alarm Timer: Units: Minute; Default 0 minutes (means Alarm disable)**
559 )))
560
561 (((
562 **Example:** 10 minutes, if SW3L-NB detect a start of water flow event and didn't detect a stop event within Alarm timer, SW3L-NB will send an Alarm to indicate a water flow abnormal alarm.
563 )))
564
565 (((
566 So for example, If we set stop duration=15s and Alarm Timer=10minutes. If the toilet water flow continuously for more than 10 minutes, Sensor will send an alarm to platform.
567 )))
568
569 (((
570 (% 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 10 minutes.**
571
572
573 )))
574
575 (((
576 (% style="color:blue" %)**AT Command to configure:**
577 )))
578
579 * (((
580 AT+PTRIG=15,10  ~-~-> Set Stop duration: 15s, Alarm Timer: 10 minutes.
581 )))
582
583 * (((
584 AT+ PTRIG=0,0  ~-~-> Default Value, disable water waste Alarm.
585 )))(% style="display:none" %) (%%)
586
587 == 2.6 Set Power Output Duration ==
588
589
590 Control the output duration 5V . Before each sampling, device will
591
592 ~1. first enable the power output to external sensor,
593
594 2. keep it on as per duration, read sensor value and construct uplink payload
595
596 3. final, close the power output.
597
598 (% style="color:blue" %)**AT Command: AT+5VT**
599
600 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:461px" %)
601 |=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Command **Example|=(% style="width: 193px;background-color:#4F81BD;color:white" %)Function|=(% style="width: 110px;background-color:#4F81BD;color:white" %)Response
602 |(% style="width:172px" %)AT+5VT=?|(% style="width:210px" %)Show 5V open time.|(% style="width:130px" %)0
603 OK
604 |(% style="width:172px" %)AT+5VT=0|(% style="width:210px" %)Normally closed 5V power supply.|(% style="width:130px" %)OK
605 default setting
606 |(% style="width:172px" %)AT+5VT=1000|(% style="width:210px" %)Close after a delay of 1000 milliseconds.|(% style="width:130px" %)(((
607
608
609 OK
610 )))
611
612 (% style="display:none" %) (%%)
613
614 == 2.7 Set the calculate flag ==
615
616
617 Feature: Set the calculate flag
618
619 (% style="color:blue" %)**AT Command: AT+CALCFLAG**
620
621 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:461px" %)
622 |=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 193px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 110px;background-color:#4F81BD;color:white" %)**Response**
623 |(% style="width:172px" %)AT+CALCFLAG =450|(% style="width:210px" %)Set the calculate flag to 450.|(% style="width:130px" %)OK
624 |(% style="width:172px" %)AT+CALCFLAG =390|(% style="width:210px" %)Set the calculate flag to 390.|(% style="width:130px" %)OK
625 |(% style="width:172px" %)AT+CALCFLAG =64|(% style="width:210px" %)Set the calculate flag to 64.|(% style="width:130px" %)OK
626 |(% style="width:172px" %)AT+CALCFLAG =12|(% style="width:210px" %)Set the calculate flag to 12.|(% style="width:130px" %)OK
627
628 (% style="display:none" %) (%%)
629
630 == 2.8 Set count number ==
631
632
633 Feature: This setting can clear the pulse count to 0 or set it to a custom value.
634
635 (% style="color:blue" %)**AT Command: AT+SETCNT**
636
637 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:479px" %)
638 |=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 223px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 96px;background-color:#4F81BD;color:white" %)**Response**
639 |(% style="width:160px" %)AT+ SETCNT =0|(% style="width:221px" %)Clear the count value to 0.|(% style="width:95px" %)OK
640 |(% style="width:160px" %)AT+ SETCNT =100|(% style="width:221px" %)Set the count number to 100.|(% style="width:95px" %)OK
641
642 (% style="display:none" %) (%%)
643
644
645 == 2.9 Clock logging (Since firmware version v1.0.4) ==
646
647
648 Sometimes when we deploy lots of end nodes in field. We want all sensors sample data at the same time, and upload these data together for analyze. In such case, we can use clock loging feature.
649
650 We can use this command to set the start time of data recording and the time interval to meet the requirements of the specific collection time of data.
651
652 * (% style="color:blue" %)**AT Command: AT+CLOCKLOG=a,b,c,d**
653
654 (% style="color:blue" %)**a:**(%%)** 0:** Disable Clock logging.  ** 1: **Enable Clock Logging
655
656 (% style="color:blue" %)**b: **(%%)Specify First sampling start second: range **(0 ~~ 3599, 65535)   ** ~/~/ (% style="color:red" %)**Note:**(%%)** **If parameter b is set to 65535, the log period starts after the node accesses the network and sends packets.
657
658 (% style="color:blue" %)**c:**(%%)** **Specify the sampling interval: range **(0 ~~ 255 minutes)**
659
660 (% style="color:blue" %)**d: **(%%)How many entries should be uplink on every TDC **(max 32)**
661
662 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20240408084118-1.png?rev=1.1||alt="image-20240408084118-1.png"]]
663
664 **Example:**
665
666 **AT+CLOCKLOG=1,65535,1,5**
667
668 After the node sends the first packet, data is recorded to the memory at intervals of 1 minute. For each TDC uplink, the uplink load will include: battery information + the last 5 memory records (payload + timestamp).
669
670 [[image:image-20240422145554-3.png||height="489" width="997"]]
671
672 (% style="color:red" %)**Note: Users need to synchronize the server time before configuring this command. If the server time is not synchronized before this command is configured, the command takes effect only after the node is reset.**
673
674
675 == 2.10 Example Query saved historical records ==
676
677
678 * (% style="color:blue" %)**AT Command: AT+CDP**
679
680 This command can be used to search the saved history, recording up to 32 groups of data, each group of historical data contains a maximum of 100 bytes.
681
682 [[image:image-20240422145238-1.png||height="683" width="887"]]
683
684
685 == 2.11 Uplink log query ==
686
687
688 * (% style="color:blue" %)**AT Command: AT+GETLOG**
689
690 This command can be used to query upstream logs of data packets.
691
692 [[image:image-20240422145327-2.png||height="668" width="878"]]
693
694
695 = 3. Configure SW3L-NB =
696
697 == 3.1 Configure Methods ==
698
699
700 SW3L-NB supports below configure method:
701
702 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
703
704 * AT Command via UART Connection : See [[UART Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]].
705
706 (% style="display:none" %) (%%)
707
708 == 3.2 AT Commands Set ==
709
710
711 AT+<CMD>?        : Help on <CMD>
712
713 AT+<CMD>         : Run <CMD>
714
715 AT+<CMD>=<value> : Set the value
716
717 AT+<CMD>=?       : Get the value
718
719
720 (% style="color:blue" %)**General Commands**      
721
722 AT                    : Attention       
723
724 AT?  : Short Help     
725
726 ATZ  : MCU Reset    
727
728 AT+TDC  : Application Data Transmission Interval
729
730 AT+CFG  : Print all configurations
731
732 AT+MODEL  :Get module information
733
734 AT+SLEEP  :Get or set the sleep status
735
736 AT+DEUI  : Get or set the Device ID
737
738 AT+APN : Get or set the APN
739
740 AT+5VT           : Set extend the time of 5V power  
741
742 AT+PTRIG  :  Get or Set Alarm for continuously water flow
743
744 AT+MOD  :  Get or Set the work mode of device
745
746 AT+CALCFLAG  : Get or Set the calculate flag
747
748 AT+SETCNT  : Get or set the count at present
749
750 AT+PRO          : Choose agreement
751
752 AT+RXDL  : Extend the sending and receiving time
753
754 AT+TR : Get or set data record time
755
756 AT+CDP     : Read or Clear cached data
757
758 AT+NOUD  : Get or Set the number of data to be uploaded
759
760 AT+DNSCFG  : Get or Set DNS Server
761
762 AT+CSQTIME : Get or Set the time to join the network
763
764 AT+DNSTIMER : Get or Set the NDS timer
765
766 AT+TLSMOD : Get or Set the TLS mode
767
768 AT+GETSENSORVALUE   : Returns the current sensor measurement
769
770 AT+SERVADDR :  Server Address
771
772
773 (% style="color:blue" %)**MQTT Management**
774
775 AT+CLIENT               : Get or Set MQTT client
776
777 AT+UNAME              : Get or Set MQTT Username
778
779 AT+PWD                  : Get or Set MQTT password
780
781 AT+PUBTOPIC  : Get or Set MQTT publish topic
782
783 AT+SUBTOPIC  : Get or Set MQTT subscription topic
784
785
786 (% style="color:blue" %)**Information**          
787
788 AT+FDR  : Factory Data Reset
789
790 AT+PWORD  : Serial Access Password
791
792 AT+LDATA  : Get the last upload data
793
794 AT+CDP  : Read or Clear cached data
795
796
797 = 4. Battery & Power Consumption =
798
799
800 SW3L-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
801
802 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
803
804
805 = 5. Firmware update =
806
807
808 User can change device firmware to::
809
810 * Update with new features.
811
812 * Fix bugs.
813
814 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://https://www.dropbox.com/sh/g99v0fxcltn9r1y/AACdqAOi-KoZEvuMJ9iMphdFa/SW3L-LB/Firmware?dl=0&subfolder_nav_tracking=1]]**
815
816 Methods to Update Firmware:
817
818 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
819
820 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
821
822 (% style="display:none" %) (%%)
823
824 = 6. FAQ =
825
826 == 6.1 How can I access t BC660K-GL AT Commands? ==
827
828
829 User can access to BC660K-GL directly and send AT Commands.
830
831 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
832
833
834 == 6.2 How to configure the device through the MQTT subscription function? ==
835
836
837 Subscription content: {AT COMMAND}
838
839 (% style="color:#037691" %)**Example:**
840
841 Setting AT+5VT=500 through Node-RED requires MQTT to send the content {AT+5VT=500}.
842
843 [[image:http://8.211.40.43/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20231025162946-2.png?rev=1.1||alt="image-20231025162946-2.png"]]
844
845 The serial port displays:
846
847 [[image:http://8.211.40.43/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20231025162958-3.png?rev=1.1||alt="image-20231025162958-3.png"]]
848
849
850 = 7. Order Info =
851
852
853 Part Number: (% style="color:blue" %)**SW3L-NB-XX-YY**
854
855 (% style="color:red" %)**XX**(%%):
856
857 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
858
859 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
860
861 (% style="color:#037691" %)**1NCE SIM Card NB-IoT network coverage**(%%): Austria, Belgium, Bulgaria, Croatia, Czech Republic, Denmark, Finland, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Latvia, Malta, Netherlands, Norway, Puerto Rico, Russia, Slovak , Republic, Slovenia, Spain, Sweden, Switzerland, Taiwan, USA, US Virgin Islands
862
863 (((
864 (% style="color:blue" %)**YY**(%%): Flow Sensor Model:
865 )))
866
867 (((
868 * **004:** DW-004 Flow Sensor: diameter: G1/2”/ DN15.  450 pulse = 1 L
869 )))
870
871 (((
872 * **006:** DW-006 Flow Sensor: diameter: G3/4”/ DN20. 390 pulse = 1 L
873 )))
874
875 (((
876 * **010:** DW-010 Flow Sensor: diameter: G1”/ DN25. 64 pulse = 1 L
877 )))
878
879 (((
880 * **020:** DW-020 Flow Sensor: diameter: G2”/ DN50.  12 pulse = 1 L
881 )))
882
883 (% style="display:none" %) (%%)
884
885 = 8. ​Packing Info =
886
887
888 (% style="color:#037691" %)**Package Includes**:
889
890 * SW3L-NB NB-IoT Flow sensor x 1
891
892 * External antenna x 1
893
894 (% style="color:#037691" %)**Dimension and weight**:
895
896 * Device Size: 13.0 x 5 x 4.5 cm
897
898 * Device Weight: 150g
899
900 * Package Size / pcs : 14.0 x 8x 5 cm
901
902 * Weight / pcs : 180g
903
904 (% style="display:none" %) (%%)
905
906 = 9. Support =
907
908
909 * 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.
910
911 * Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[Support@dragino.cc>>mailto:Support@dragino.cc]].
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0