Dragino SW3L User manual

SW3L LoRaWAN Outdoor Flow Sensor
last modified by Xiaoling
on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Table of Contents
1. Introduction .......................................................................................................................................................................... 4
1.1 What is SW3L LoRaWAN Flow Sensor ..................................................................................................................... 4
1.2 Features .......................................................................................................................................................................... 5
1.3 Installation ....................................................................................................................................................................... 5
1.4 Storage & Operation Temperature ............................................................................................................................. 5
1.5Applications .................................................................................................................................................................... 5
1.6 Flow Sensor Spec ......................................................................................................................................................... 5
1.7 Mechanical ..................................................................................................................................................................... 5
1.8Pin Definitions and Switch ............................................................................................................................................ 8
1.8.1 Pin Definition ............................................................................................................................................................ 8
1.8.2 Jumper JP2(Power ON/OFF) ................................................................................................................................ 8
1.8.3 BOOT MODE / SW1 ............................................................................................................................................... 8
1.8.4 Reset Button ............................................................................................................................................................ 8
1.8.5 LED ............................................................................................................................................................................ 8
2. Operation Mode .................................................................................................................................................................. 9
2.1 How it works? ................................................................................................................................................................ 9
2.2 Example to use for LoRaWAN network ...................................................................................................................... 9
2.3 Uplink Payload ............................................................................................................................................................. 14
2.3.1 Device Status, FPORT=5 .................................................................................................................................... 15
2.3.2 Sensor Configuration, FPORT=4 ........................................................................................................................ 16
2.3.3Water Flow Value, Uplink FPORT=2 .................................................................................................................. 16
2.3.4 Historical Water Flow Status, FPORT=3 ........................................................................................................... 18
2.4 Datalog Feature ........................................................................................................................................................... 19
2.4.1 Unix TimeStamp .................................................................................................................................................... 20
2.4.2 Set Device Time .................................................................................................................................................... 20
2.4.3 Poll sensor value ................................................................................................................................................... 21
2.4.4 Decoder in TTN V3 ............................................................................................................................................... 21
2.5 Show data on Datacake ............................................................................................................................................. 21
3. Configure SW3L via AT Command or LoRaWAN Downlink ...................................................................................... 28
3.1 Set Transmit Interval Time ........................................................................................................................................ 28
3.2 Set Password .............................................................................................................................................................. 29
3.3 Quit AT Command ...................................................................................................................................................... 29
3.4 Alarm for continuously water flow ............................................................................................................................. 29
3.5 Clear Flash Record ..................................................................................................................................................... 30
3.6 Set the calculate flag .................................................................................................................................................. 30
3.7 Set count number ........................................................................................................................................................ 31
3.8 Set work mode ............................................................................................................................................................ 31
4. Battery & how to replace ................................................................................................................................................ 31
4.1 Battery Info ................................................................................................................................................................... 31
4.1.1 Battery Note ........................................................................................................................................................... 32
4.2 Replace Battery ........................................................................................................................................................... 32
4.3 Battery Life Analyze .................................................................................................................................................... 33
5. FAQ .................................................................................................................................................................................... 33
5.1 How to use AT Command to configure SW3 .......................................................................................................... 33
5.2 How to upgrade the firmware? .................................................................................................................................. 34
5.3 How to change the LoRa Frequency Bands/Region? ............................................................................................ 34
5.4 Can I connect 3rd party flow sensor other than the default one? .......................................................................... 35
6. Order Info .......................................................................................................................................................................... 35
7. Packing Info ...................................................................................................................................................................... 36
8. Support .............................................................................................................................................................................. 36
Page 2 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Table of Contents:
•1. Introduction
•1.1 What is SW3L LoRaWAN Flow Sensor
•1.2 Features
•1.3 Installation
•1.4 Storage & Operation Temperature
•1.5Applications
•1.6 Flow Sensor Spec
•1.7 Mechanical
•1.8Pin Definitions and Switch
•1.8.1 Pin Definition
•1.8.2 Jumper JP2(Power ON/OFF)
•1.8.3 BOOT MODE / SW1
•1.8.4 Reset Button
•1.8.5 LED
Page 3 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
•2. Operation Mode
•2.1 How it works?
•2.2 Example to use for LoRaWAN network
•2.3 Uplink Payload
•2.3.1 Device Status, FPORT=5
•2.3.2 Sensor Configuration, FPORT=4
•2.3.3Water Flow Value, Uplink FPORT=2
•2.3.4 Historical Water Flow Status, FPORT=3
•2.4 Datalog Feature
•2.4.1 Unix TimeStamp
•2.4.2 Set Device Time
•2.4.3 Poll sensor value
•2.4.4 Decoder in TTN V3
•2.5 Show data on Datacake
•3. Configure SW3L via AT Command or LoRaWAN Downlink
•3.1 Set Transmit Interval Time
•3.2 Set Password
•3.3 Quit AT Command
•3.4 Alarm for continuously water flow
•3.5 Clear Flash Record
•3.6 Set the calculate flag
•3.7 Set count number
•3.8 Set work mode
•4. Battery & how to replace
•4.1 Battery Info
•4.1.1 Battery Note
•4.2 Replace Battery
•4.3 Battery Life Analyze
•5. FAQ
•5.1 How to use AT Command to configure SW3
•5.2 How to upgrade the firmware?
•5.3 How to change the LoRa Frequency Bands/Region?
•5.4 Can I connect 3rd party flow sensor other than the default one?
•6. Order Info
•7. Packing Info
•8. Support
1. Introduction
1.1 What is SW3L LoRaWAN Flow Sensor
The Dragino SW3L is a LoRaWAN Flow Sensor. It detects water flow volume and uplink to IoT server via
LoRaWAN network. User can use this to monitor the water usage for buildings.
SW3L is powered by 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.)
The SW3L will send water flow volume every 20 minutes. It can also detect the water flow status and send
Alarm, to avoid the waste for water usage such as broken toilet case.
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.
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
*Battery life depends on how often to send data, please see battery analyzer.
Page 4 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
1.2 Features
• LoRaWAN v1.0.3 Class A protocol.
• Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864
• Upload water flow volume
• Monitor water waste
• 8500mAh industrial battery(none-rechargeable)
• AT Commands to change parameters
• Uplink on periodically and open/close event
• Datalog feature
• Remote configure parameters via LoRa Downlink
• Firmware upgradable via program port
• Wall Mountable
• Outdoor Use
1.3 Installation
Each SW3L package is shipped with a flow sensor. Install the flow sensor into water pipe with correct flow direction
to start monitoring.
1.4 Storage & Operation Temperature
-40°C to +85°C
1.5Applications
• Flow Sensor application
• Water Control
• Toilet Flow Sensor
• Monitor Waste water
1.6 Flow Sensor Spec
SW3L-004: DW-004 Flow Sensor: diameter: G1/2” / DN15. 450 pulse = 1 L
SW3L-006: DW-006 Flow Sensor: diameter: G3/4” / DN20. 360 pulse = 1 L
SW3L-010: DW-010 Flow Sensor: diameter: G 1” / DN25. 60 pulse = 1 L
1.7 Mechanical
Page 5 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
DW-004 Flow Sensor: diameter: G1/2” / DN15. 450 pulse = 1 L
006: DW-006 Flow Sensor: diameter: G3/4” / DN20. 360 pulse = 1 L
Page 6 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
010: DW-010 Flow Sensor: diameter: G 1” / DN25. 60 pulse = 1 L
Page 7 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
1.8Pin Definitions and Switch
1.8.1 Pin Definition
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:
http://www.dragino.com/downloads/index.php?dir=LSN50-LoRaST/
1.8.2 Jumper JP2(Power ON/OFF)
Power on Device when putting this jumper.
1.8.3 BOOT MODE / SW1
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.
2) Flash: work mode, the device starts to work and send out console output for further debug
1.8.4 Reset Button
Press to reboot the device.
1.8.5 LED
It will flash:
1) Boot the device in flash mode
2) Send an uplink packe
Page 8 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
2. Operation Mode
2.1 How it works?
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.
2.2 Example to use for LoRaWAN network
This section shows an example of how to join the TTN V3 LoRaWAN IoT server. Usages with other LoRaWAN IoT
servers are similar.
• 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 for detail.
Assume the DLOS8 is already set to connect to the TTN V3 network. We need to add the SW3L device in TTN V3:
Step 1: Create a device in TTN V3 with the OTAA keys from SW3L.
Each SW3L is shipped with a sticker with the default device EUI as below:
Page 9 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Users can enter these keys in the LoRaWAN Server portal. Below is the TTN V3 screenshot:
Add APP EUI in the application.
Page 10 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Page 11 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Page 12 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Add APP KEY and DEV EUI
Step 2: Power on SW3L
Page 13 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
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.
2.3 Uplink Payload
Uplink payloads have two types:
• Open/Close Status: Use FPORT=2
• Other control commands: Use other FPORT fields.
Page 14 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
The application server should parse the correct value based on FPORT settings.
2.3.1 Device Status, FPORT=5
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.
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.
Example parse in TTNv3
•Sensor Model: For SW3L, this value is 0x11
•Firmware Version: 0x0100, Means: v1.0.0 version
•Frequency Band:
*0x01: EU868
*0x02: US915
*0x03: IN865
*0x04: AU915
*0x05: KZ865
*0x06: RU864
*0x07: AS923
*0x08: AS923-1
*0x09: AS923-2
*0x0a: AS923-3
*0x0b: CN470
*0x0c: EU433
*0x0d: KR920
*0x0e: MA869
Page 15 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
•Sub-Band:
• AU915 and US915:value 0x00 ~ 0x08
• CN470: value 0x0B ~ 0x0C
• Other Bands: Always 0x00
•Battery Info:
Check the battery voltage.
Ex1: 0x0B45 = 2885mV
Ex2: 0x0B49 = 2889mV
2.3.2 Sensor Configuration, FPORT=4
SW3L will only send this command after getting the downlink command (0x26 02) from the server.
•TDC: (default: 0x0004B0)
Uplink interval for the total pulse count, default value is 0x0004B0 which is 1200 seconds = 20 minutes.
•STOP Duration & Alarm Timer
Shows the configure value of Alarm for continuously water flow
2.3.3Water Flow Value, Uplink FPORT=2
SW3L will send this uplink after Device Status once join the LoRaWAN network successfully. And SW3L will:
periodically send this uplink every 20 minutes, this interval can be changed.
Uplink Payload totals 11 bytes.
Water Flow Value, FPORT=2
Size (bytes) 1 4 1 1 4
Value Calculate Flag &
Alarm
Total pulse Or Last
Pulse
MOD Reserve(0x01) Unix TimeStamp
Status & Alarm field
Page 16 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Size (bit) 6 1 1
Value Calculate Flag Alarm: 0: No Alarm; 1: Alarm N/A
•Calculate Flag
The calculate flag is a user define field, IoT server can use this filed to handle different meter with different pulse
factor. For example, if there are 100 Flow Sensors, meter 1 ~50 are 1 liter/pulse and meter 51 ~ 100 has 1.5 liter/
pulse.
Example: in the default payload:
• calculate flag=0: for SW3L-004 Flow Sensor: 450 pulse = 1 L
• calculate flag=1: for SW3L-006 Flow Sensor: 360 pulse = 1 L
• calculate flag=2: for SW3L-010 Flow Sensor: 60 pulse = 1 L
Default value: 0.
Range (6 bits): (b)000000 ~ (b) 111111
NOTE: User need to set Calculate Flag to proper value before use Flow Sensor. Downlink or AT
Command see:Refer: Set Calculate Flag
•Alarm
See Alarm Base on Timeout
•Total pulse
Total pulse/counting since factory
Range (4 Bytes) : 0x00000000~ 0xFFFFFFFF .
Page 17 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
•Last Pulse
Total pulse since last FPORT=2 uplink. (Default 20 minutes)
Range (4 Bytes) : 0x00000000~ 0xFFFFFFFF .
•MOD: Default =0
MOD=0 --> Uplink Total Pulse since factory
MOD=1 --> Uplink total pulse since last FPORT=2 uplink.
•Water Flow Value
Total Water Flow Volume = (Calculate Flag) x (Total Pulse)=9597/450=21.3L
Total Water Flow for TDC timer = (Calculate Flag) x (Last Pulse)=79/450=0.2L
2.3.4 Historical Water Flow Status, FPORT=3
SW3L stores sensor values and users can retrieve these history values via the downlink command.
The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time water
flow status.
• Each data entry is 11 bytes and has the same structure as real time water flow status, to save airtime and
battery, SW3L will send max bytes according to the current DR and Frequency bands.
For example, in the US915 band, the max payload for different DR is:
a) DR0: max is 11 bytes so one entry of data
b) DR1: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
c) DR2: total payload includes 11 entries of data
d) DR3: total payload includes 22 entries of data.
If SW3L doesn’t have any data in the polling time. It will uplink 11 bytes of 0
Downlink:
0x31 62 46 B1 F0 62 46 B3 94 07
Page 18 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
Uplink:
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
Parsed Value:
[Alarm, Calculate Flag, MOD, Total pulse or Last Pulse,Water Flow Value, TIME]
[FALSE,0,0,0,0.0,2022-04-01 08:04:54],
[FALSE,0,0,0,0.0,2022-04-01 08:05:49],
[FALSE,0,0,0,0.0,2022-04-01 08:06:49],
[FALSE,0,0,0,0.0,2022-04-01 08:07:49],
[FALSE,0,0,277,0.6,2022-04-01 08:08:49],
[FALSE,0,0,287,0.6,2022-04-01 08:10:38],
2.4 Datalog Feature
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.
Page 19 / 56 - last modified by Xiaoling on 2022/06/29 17:10

User Manual for LoRaWAN End Nodes - SW3L LoRaWAN Outdoor Flow Sensor
2.4.1 Unix TimeStamp
SW3L uses Unix TimeStamp format based on
Users can get this time from the link: https://www.epochconverter.com/ :
Below is the converter example
2.4.2 Set Device Time
Through LoRaWAN MAC Command
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)].
Note:LoRaWAN Server needs to support LoRaWAN v1.0.3(MAC v1.0.3)or higher to support this MAC command
feature.
Page 20 / 56 - last modified by Xiaoling on 2022/06/29 17:10
This manual suits for next models
3
Table of contents
Other Dragino Accessories manuals

Dragino
Dragino LDS03A User manual

Dragino
Dragino LHT52 User manual

Dragino
Dragino LWL01 User manual

Dragino
Dragino LWL02 User manual

Dragino
Dragino LoRaWAN LiDAR ToF User manual

Dragino
Dragino N95S31B User manual

Dragino
Dragino LSN50 LoRa User manual

Dragino
Dragino D20-LB User manual

Dragino
Dragino LHT65 User manual

Dragino
Dragino LoRaWAN LDS02 User manual