Dragino-LOGO

Dragino DS20L LoRaWAN Lidar Distance Sensor

Dragino-DS20L-LoRaWAN-Lidar-Distance-Sensor-PRODUCT

Product Information

Specifications

  • Product Name: DS20L – LoRaWAN Lidar Distance Sensor
  • Technology: LoRaWAN
  • Measurement Range: 3cm to 200cm
  • Battery: 2400mAh non-chargeable battery
  • Protocol: LoRaWAN v1.0.3 Class A

Product Information

The Dragino DS20L is a smart distance detector based on long-range wireless LoRaWAN technology. It utilizes a LiDAR sensor to measure the distance between the DS20L device and an object. The device then transmits this distance data to an IoT platform via LoRaWAN communication.

The DS20L is designed for applications requiring long-range data transmission such as smart cities and building automation. It offers ultra-long range spread spectrum communication with high interference immunity while keeping power consumption to a minimum.

Users have the option to power the DS20L with its built-in 2400mAh non-chargeable battery for long-term use or an external power source for continuous distance measurement and alarm/counting functions. The device is fully compatible with LoRaWAN v1.0.3 Class A protocol and can work with a standard LoRaWAN gateway.

Product Usage Instructions

Initial Setup:

  • Before using the DS20L, ensure it is properly powered either by the built-in battery or an external power source.

Configuration:

  • You can configure the DS20L using AT commands via the program cable. Follow the instructions in the user manual to set up the device according to your requirements.

Measurement:

  • Place the DS20L with the LiDAR probe facing towards the object you want to measure the distance to. The device will detect the distance using the LiDAR sensor and transmit the data via LoRaWAN.

Data Transmission:

  • Ensure that the DS20L is within range of a LoRaWAN gateway for successful data transmission to the IoT platform. Check the user manual for guidance on setting up the communication.

FAQ

  • Q: How do I update the firmware of DS20L?
    • A: To update the firmware of DS20L, connect the device to a computer using the program cable and follow the instructions provided in the user manual for firmware update process.
  • Q: Can DS20L work with any LoRaWAN gateway?
    • A: DS20L is compatible with a standard LoRaWAN gateway. Ensure that your LoRaWAN gateway supports LoRaWAN v1.0.3 Class A protocol for proper functionality.

“`

Introduction

1.1 What is LoRaWAN Smart Distance Detector

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
The Dragino DS20L is a smart distance detector base on long-range wireless LoRaWAN technology. It uses LiDAR sensor to detect the distance between DS20L and object, then DS20L will send the distance data to the IoT Platform via LoRaWAN. DS20L can measure range between 3cm ~ 200cm.
DS20L allows users to send data and reach extremely long ranges via LoRaWAN. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. It targets professional wireless sensor network applications such smart cities, building automation, and so on.
DS20L has a built-in 2400mAh non-chargeable battery for long-term use up to several years*. Users can also power DS20L with an external power source for continuous measuring and distance alarm / counting purposes.
DS20L is fully compatible with LoRaWAN v1.0.3 Class A protocol, it can work with a standard LoRaWAN gateway.
1.2 Features
· LoRaWAN Class A protocol · LiDAR distance detector, range 3 ~ 200cm · Periodically detect or continuously detect mode · AT Commands to change parameters · Remotely configure parameters via LoRaWAN Downlink · Alarm & Counting mode · Firmware upgradable via program port or LoRa protocol · Built-in 2400mAh battery or power by external power source
1.3 Specification
Page 6 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
LiDAR Sensor: · Operation Temperature: -40 ~ 80 °C · Operation Humidity: 0~99.9%RH (no Dew) · Storage Temperature: -10 ~ 45°C · Measure Range: 3cm~200cm @ 90% reflectivity · Accuracy: ±2cm @ (3cm~100cm); ±5% @ (100~200cm) · ToF FoV: ±9°, Total 18° · Light source: VCSEL
1.4 Power Consumption
Battery Power Mode: · Idle: 0.003 mA @ 3.3v · Max : 360 mA
Continuously mode: · Idle: 21 mA @ 3.3v · Max : 360 mA
1.5 Use Case
Regular Distance Detect

Dragino-DS20L-LoRaWAN-Lidar-Distance-Sensor-FIG-1 Dragino-DS20L-LoRaWAN-Lidar-Distance-Sensor-FIG-2
Counting / Alarm
Page 7 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
1.6 LiDAR probe position
Page 8 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
The black oval hole in the picture is the LiDAR probe.
1.7 Interface Definition

Dragino-DS20L-LoRaWAN-Lidar-Distance-Sensor-FIG-3

1.8 Program Cable Pin Mapping
Page 9 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Usage For the Program Cable: 1) Configure DS20L via AT Command 2) Update Firmware 3) Input for external interrupt 4) Input for external power
Page 10 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
1.9 Mechanical
Dragino-DS20L-LoRaWAN-Lidar-Distance-Sensor-FIG-4

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual

Configure DS20L to connect to LoRaWAN network

2.1 How it works
The DS20L is configured as LoRaWAN OTAA Class A mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the DS20L. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
2.2 Quick guide to connect to LoRaWAN server (OTAA)
Following is an example for how to join the TTN v3 LoRaWAN Network. Below is the network structure; we use the LPS8v2 as a LoRaWAN gateway in this example.
The LPS8v2 is already set to connected to TTN network , so what we need to now is configure the TTN server.
Page 12 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Step 1: Create a device in TTN with the OTAA keys from DS20L.
Each DS20L is shipped with a sticker with the default device EUI as below:
You can enter this key in the LoRaWAN Server portal. Below is TTN V3 screenshot: Register the device
Page 13 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Add DevEUI and AppKey Page 14 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Step 2: Activate on DS20L
Press the button for 5 seconds to activate the DS20L. The switch is switched to E and the external power supply is used. The switch is switched to I and DS20L will be power by the built-in battery.
Page 15 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to JOIN LoRaWAN network. Green led will solidly turn on for 5 seconds after joined in network.
After join success, it will start to upload messages to TTN and you can see the messages in the panel.

2.3 Uplink Payload
2.3.1 Device Status, FPORT=5
Users can use the downlink command(0x26 01) to ask DS20L to send device configure detail, include device configure status. DS20L will uplink a payload via FPort=5 to server.
The Payload format is as below.

Size(bytes) 1

2

1

1

2

Value

Sensor Model

Firmware Version

Frequency Band

Sub-band

BAT

Sensor Model: For DS20L, this value is 0x21 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 16 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
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 Uplink Payload, FPORT=2
AT+MOD=1 (Case: Regular Report Distance) Regularly detect distance and report. When the distance exceeds the limit, the alarm flag is set to 1, and the
report can be triggered by external interrupts.
Uplink Payload totals 10 bytes.

Size(bytes) Value

2

1

BAT MOD+ Alarm+ Interrupt

2 Distance

1 Sensor State

4 Interrupt Count

MOD+ Alarm+ Interrupt:

Size(bit) Value

[bit7:bit6] MOD

bit5 Digital Interrupt

bit4
Distance Alarm 0: No Alarm; 1: Alarm

Battery Info: Check the battery voltage for DS20L Ex1: 0x0E10 = 3600mV
MOD & Alarm & Interrupt:

Page 17 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
MOD: Example: (0x60>>6) & 0x3f =1 0x01: Regularly detect distance and report. 0x02: Uninterrupted measurement with counting(external power supply). 0x03: Uninterrupted measurement with distance alarm(external power supply). Alarm: When the detection distance exceeds the limit, the alarm flag is set to 1. Interrupt: Whether it is an external interrupt.
Distance info: Example: If payload is: 0708H: distance = 0708H = 1800 mm
Sensor State: Ex1: 0x00: Normal collection distance Ex2: 0x0x: Distance collection is wrong Ex3: 0xFF: No sensor connection was detected
Interript Count: If payload is:000007D0H: count = 07D0H =2000
AT+MOD=2 (Continuously Measure with Counting) The power consumption of uninterrupted measurement is high, and the device needs to use external power
supply.(The switch is switched to E and the external power supply is used.)

Example: Measure with Counting
· Set the person or object count mode: AT+MOD=2,0,50,200 Continuous measurement and counting, detect and count passing people or objects in distance limit mode.
Uplink Payload totals 13 bytes.

Size(bytes) Value

2

1

BAT MOD+Collection mode

4 Counting

4 Pulse Time

2 Collection Threshold

MOD+Collection mode + Count flag:

Page 18 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

Size(bit) Value

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual

[bit7:bit6] MOD

bit5 Collection mode

BAT & MOD & Collection mode & Interrupt Flag & Counting & Pulse_time & Collection_threshold: BAT: The current total battery voltage of the node. Example: 0x0c 36(hex) = 3126(DEC)/1000 = 3.126V
MOD: Example: (0x80>>6) & 0x3f =2 0x01: Regularly detect distance and report. 0x02: Uninterrupted measurement with counting(external power supply). 0x03: Uninterrupted measurement with distance alarm(external power supply).
Collection mode: Interrupt pin input level signal flag. Example: (bytes[2] >> 7) & 0x01 = 1 0x00: Low level acquisition. 0x01: High level acquisition.
Counting: The total count from startup to this moment. Example:0x 00 00 10 10(HEX) = 4112(DEC)
Collection_threshold: Within the set pulse detection time, collection starts when the object or person enters the set detection range. Example: 0x00 32(hex) = 50(DEC)(unit: mm)

Page 19 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Note: The minimum threshold is 10 and the maximum is 2000.(Unit:mm)
Pulse_time: Within the set pulse detection time, the object or person enters the detection range and starts collecting. Example: 0x00 00 00 C8(hex) = 200(DEC)(unit: ms) Note: This threshold is unlimited.
AT+MOD=3 (Continuously Measure with Distance detection + Alarm )(Since firmware v1.0.2) The power consumption of uninterrupted measurement is high, and the device needs to use external power supply. (The switch is switched to E and the external power supply is used.)

Example: Measure with Distance
· Set the distance or object count mode: AT+MOD=3,0,50,200
Continuous measurement and distance detection, Detect the distance of a person or object in distance limit mode and alarm out of limit.
Uplink Payload totals 6 bytes.

Size(bytes) 2

Value

BAT

1 MOD+Interrupt flag+alarm flag

2 distance_mm

1 distance state

MOD+Alarm flag+Interrupt flag:

Size(bit) Value

[bit7:bit6] MOD

bit5 Alarm flag

bit4 Interrupt flag

BAT & MOD & Interrupt flag & alarm flag & distance & distance state: BAT:

Page 20 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
The current total battery voltage of the node. Example: 0x0c 36(hex) = 3126(DEC)/1000 = 3.126V MOD: Example: (0xC0>>6) & 0x3f =3 0x01: Regularly detect distance and report. 0x02: Uninterrupted measurement counting(external power supply). 0x03: Uninterrupted measurement with distance alarm(external power supply). Interrupt flag: Example: (0xC0>>4) & 0x01 = 0 0x00: The pin is in a low state. 0x01: The pin is in a high state. Alarm flag: Example: (0xC0>>5) & 0x01 = 0 0x00: Not in alarm state. 0x01: In alarm state. Distance info: Example: If payload is: 0708H: distance = 0708H = 1800 mm Distance state: Ex1: 0x00: Normal collection distance Ex2 0x0x: Distance collection is wrong
2.4 Decode payload in The Things Network
While using TTN network, you can add the payload format to decode the payload.
Page 21 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
The payload decoder function for TTN is here: DS20L TTN Payload Decoder: https://github.com/dragino/dragino-end-node-decoder
2.5 Show Data in DataCake IoT Server
DATACAKE provides a human friendly interface to show the sensor data, once we have data in TTN, we can use DATACAKE to connect to TTN and see the data in DATACAKE. Below are the steps: Step 1: Be sure that your device is programmed and properly connected to the network at this time. Step 2: To configure the Application to forward data to DATACAKE you will need to add integration. To add the DATACAKE integration, perform the following steps:
Page 22 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Page 23 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
For more detailed instructions, refer to the following instructions: Welcome – Datacake Docs
Page 24 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Step 3: Create an account or log in Datacake. Step 4: Search the DS20L and add DevEUI.
Page 25 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
After added, the sensor data arrive TTN V3, it will also arrive and show in Datacake. Page 26 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
2.6 Frequency Plans
The DS20L uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country.
http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/

Configure DS20L

3.1 Configure Methods
DS20L supports below configure method: · AT Command via UART Connection : See UART Connection. · LoRaWAN Downlink. Instruction for different platforms: See IoT LoRaWAN Server section.
3.2 General Commands
These commands are to configure: Page 27 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
· General system settings like: uplink interval. · LoRaWAN protocol & radio related command.
They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
End Device AT Commands and Downlink Command

3.3 Commands special design for DS20L
These commands only valid for DS20L, as below:

3.3.1 Set Transmit Interval Time
Feature: Change LoRaWAN End Node Transmit Interval. AT Command: AT+TDC

Command Example AT+TDC=?
AT+TDC=60000

Function Show current transmit Interval
Set Transmit Interval

Response
30000 OK the interval is 30000ms = 30s
OK Set transmit interval to 60000ms = 60 seconds

Downlink Command: 0x01 Format: Command Code (0x01) followed by 3 bytes time value.
If the downlink payload=0100003C, it means set the END Node’s Transmit Interval to 0x00003C=60(S), while type code is 01.
· Example 1: Downlink Payload: 0100001E // Set Transmit Interval (TDC) = 30 seconds · Example 2: Downlink Payload: 0100003C // Set Transmit Interval (TDC) = 60 seconds

3.3.2 Set Interrupt Mode
Feature, Set Interrupt mode for pin of GPIO_EXTI. When AT+INTMOD=0 is set, GPIO_EXTI is used as a digital input port. AT Command: AT+INTMOD

Command Example AT+INTMOD=?
AT+INTMOD=3 (default)

Function Show current interrupt mode
Set Transmit Interval 0. (Disable Interrupt), 2. (Trigger by falling edge) 3. (Trigger by rising edge)

Response
0 OK The mode is 0 =Disable Interrupt
OK

Downlink Command: 0x06 Format: Command Code (0x06) followed by 3 bytes.
This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.

Page 28 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
· Example 1: Downlink Payload: 06000000 // Turn off interrupt mode · Example 2: Downlink Payload: 06000003 // Set the interrupt mode to rising edge trigger Note: 1. This interrupt only takes effect in mode 1. 2. If set INTMOD=1, the interrupt mode will not work properly because the rising edge and falling edge cannot exist at the same time, which will affect the low power consumption of the motherboard and increase battery consumption.

3.3.3 Set work mode
Feature: Switch working mode(Note: After the modified mode is issued, the node will automatically reset and restart)
AT Command: AT+MOD (1: Regular Measurement , 2: Continuous Measuring & Couting, 3: Continuous Measuring & Distance Alarm)

Command Example AT+MOD=? AT+MOD=1
AT+MOD=2,0,50,200

Function Get the current working mode. Set the working mode to Regular measurements.
Set the working mode to Continuous measurement with counting.

Response OK
OK Attention: Take effect after ATZ
OK Attention: Take effect after ATZ

AT+MOD=3,0,1800,200

Set the working mode to Continuous measurement with distance alarm.

OK Attention: Take effect after ATZ

Explanation of MOD=2

Command Example AT+MOD=2,aa,bb,cc
Example: AT+MOD=2,1,50,200

Parameters 2: Set MOD=2 AA: Counting Condition
BB: Distance setting CC: Min Counting Time

Explanation Continuous Measuring & Counting
0: Count while detect value Smaller than Distance Settings(Parameters BB) 1: Count while detect value Bigger than Distance Settings(Parameters BB) 10mm~2000mm
The object is detected within the set distance for CC time, count +1 (unit :ms) (Unit: ms)

DS20L adopts uninterrupted measurement + counting mode.

Within a distance of 50 to 2000mm(bigger than 50mm), when DS20L detects an object for 200ms, count +1.

Downlink Command: Format: Command Code (0x0A) followed by 6 bytes.
· Example: 0A 01 // Same as AT+MOD=1 · Example: 0A 02 00 00 32 00 00 00 C8 // Same as AT+MOD=2,0,50,200 Explanation of MOD=3

Command Example AT+MOD=3,aa,bb,cc

Parameters 3: Set MOD=3 AA: Distance Alarm Condition

Explanation Continuous measurement with distance alarm 0: Distance alarm while detect value Smaller than Distance Settings(Parameters BB)

Page 29 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual

BB: Distance Setting CC: Min Alarm Time
Example: AT+MOD=3,0,50,200 DS20L adopts uninterrupted measurement + distance alarm mode. When the distance is detected to be less than 50mm for 200ms, node alarm.

1: Distance alarm while detect value Bigger than Distance Settings(Parameters BB) 10mm~2000mm When continuous CC time detects the distance exceeds the set range, alarm (Unit: ms)

Downlink Command: Format: Command Code (0x0A) followed by 6 bytes.
· Example: 0A 01 // Same as AT+MOD=1 · Example: 0A 03 00 00 32 00 00 00 C8 // Same as AT+MOD=2,0,50,200
3.3.4 Set threshold and threshold mode(Valid only if AT+MOD=1)

Feature, Set threshold and threshold mode When AT+DOL=0,0,0,0,400 is set, No threshold is used, the sampling time is 400ms. AT Command: AT+DOL

Command Example AT+ DOL = AT+ DOL =1,1800,100,0,400 Command Example
AT+DOL=1,1800,3,0,400

Function Get the current threshold mode and sampling time
Set the distance limit range of 100~1800mm, detect once every 400ms, over-limit alarm.

Response 0,0,0,0,400 OK
OK

Function The first bit sets the limit mode
The second bit sets the upper limit value The third bit sets the lower limit value The fourth bit sets the over-limit alarm or person or object count. The fifth bit sets the sampling time

Parameter 0: Do not use upper and lower limits 1: Use upper and lower limits 2: Less than the upper limit 3: Greater than the lower limit 3~2000MM 3~2000MM 0: Over-limit alarm, DO output is high 1: Person or object counting statistics 100~10000ms

Downlink Command: 0x07

Format: Command Code (0x07) followed by 9 bytes.

If the downlink payload=07 01 0708 0064 00 0190, it means set the END Node’s limit mode to 0x01,upper limit value to 0x0708=1800(mm), lower limit value to 0x0064=100(mm), to over-limit alarm(0x00), the sampling time to 0x0190=400(ms), while type code is 0x07.

· Example 0: Downlink Payload: 07 00 0000 0000 00 0190 —> AT+DOL=0,0,0,0,400

// No

threshold is used, the sampling time is 400ms

· Example 1: Downlink Payload: 07 01 0708 0064 00 0190 —> AT+DOL=1,1800,100,0,400 //MOD1 uses

distance alarm mode, when the TDC time arrives, the node sampling time is 400ms. When the node detects

that the distance is lower than 100mm or higher than 1800mm, it sends an alarm packet. The alarm flag is 1.

Otherwise, the node normally uplink and the alarm flag is 0.

Page 30 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Note: AT+DOL command is applied to MOD1. For example:
· AT+MOD=1 AT+DOL=1,500,244,0,300

Case Study

4.1 Detect the level for rabbish bin
4.1.1 Case Description
DS20L’s ToF FoV angle: ±9°, total 18°, very suitable for object height acquisition. This case describes how to set up DS20L to calculate the amount of garbage in the trash can.
As shown in the figure below, DS20L detects the distance regularly. When the garbage in a trash can reaches the set capacity, it will issue a warning and regularly report the status of the trash can at that time. Note: This mode uses scheduled collection, has very low power consumption and is powered
Page 31 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
4.1.2 Software Configuration
· Open the serial port assistant tool, enter the key, and set AT+MOD=1 and AT+DOL=2,200,10,400 · or send downlink command 0A 01 and 07 02 00 C8 00 0A 01 90 Every 20 minutes, DS20L will check rabish level of the trash can. If it exceeds the set threshold, it will alarm. Detail explain for this command please see Working Mode . Notice: To save battery life, user can ignore the alarm setting ( AT+DOL).
Page 32 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

4.1.3 Test Result

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual

4.2 Uses DS20L to Count object pass in the machine
4.2.1 Case Decription
DS20L has angle of ToF FoV: ±9°, Total 18°, which is good to use it for object counting. This case descript how to set up DS20L to count how many PCBA pass in the SMT machine.
As show below, DS20L keep checking the detect distance, when there is a PCB pass the rail, the distance shown in DS20L will become a small value and DS20L will count PCB +1.
Notice: To continously count object, user need to use external power source to power DS20L, Use battery is not enough
Page 33 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
4.2.2 Software Configuration
· Open the serial port assistant tool, enter the key, and set AT+MOD=2,0,50,200 · or send downlink command 0A 02 00 00 32 00 00 00 CB This command will continouse read distance, if distance read below 5cm and last for more than 200ms. Counting + 1. Detail explain for this command please see Working Mode .
Page 34 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

4.2.3 Test Result

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual

4.3 Distance Alarm
4.3.1 Case description
DS20L’s ToF FoV angle: ±9°, total 18°, very suitable for object distance detection. This case describes how to set up DS20L to determine whether people enter prohibited areas.
As shown in the figure below, DS20L continuously checks the detection distance. When someone breaks into a prohibited area, the detection distance of DS20L becomes a small valu and sends an Alarm.
Notice: To continously count object, user need to use external power source to power DS20L, Use battery is not enough.
Page 35 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
4.3.2 Software configuration
Open the serial port assistant tool, enter the key, and set AT+MOD=3,0,1800,200 Or send downlink command 0A 03 00 07 08 00 00 00 CB This command will continue to read the distance, if the reading distance is below 1800 cm and lasts longer than
200 ms. Then DS20L will send an Alarm. Detail explain for this command please see Working Mode .
Page 36 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

4.3.3 Test Result

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual

Battery & Power Consumption

DS20L use built-in 2400mAh non-chargeable battery for long-term use up to several years*. See below link for detail information about the battery info and how to replace.
Battery Info & Power Consumption Analyze .
6. Firmware update
User can change firmware DS20L to: · Change Frequency band/ region. · Update with new features. · Fix bugs.
Firmware and changelog can be downloaded from : Firmware download link Methods to Update Firmware:
· (Recommanded way) OTA firmware update via wireless: http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/
· Update through UART TTL interface: Instruction.

FAQ

7.1 What is the frequency plan for DS20L?

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
DS20L use the same frequency as other Dragino products. User can see the detail from this link: Introduction
7.2 How to connect external power supply to DS20L?
Use the positive pole of the regulated power supply to connect the 3.3v pin of the interface; Use the negative pole of the regulated power supply to connect the GND pin of the interface.
When using external power supply, the gear position is in E position(
7.3 Why cannot Mode be modified?
If mode cannot be modified, upgrade the firmware version to v1.0.2 or later.
7.4 Why is there no response to burning firmware through TremoProgrammer?
If we use the TremoProgrammer (green arrow icon) to update the firmware, we need to keep the two pins of JP3 connected while burning.
Page 38 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
The shipping node has boot program, it is recommended to directly use Dragino Sensor Manager Utility.exe for firmware burning.
Refer to the link: UART Access for LoRa ST v4 base model – DRAGINO
7.5 How to check the problem when the sensor status is 0xFF (255)
The sensor state 0xFF(H)=255(D) indicates that the node has not detected the sensor connection and needs to check whether the sensor is properly connected and can work properly.
First, we need to see if the sensors work properly when the node is active. 1. Reactivate the node
· Battery powered, reactivate the node (three options) : a. Reinstall the battery b. Switch the side power mode switch to E (external power) and back to I (battery power) c. Click the RESET button Page 39 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
· External power, reactivate the node(three options) a. Turn off the external power supply and turn it on again b. Switch the side power mode switch to I (battery power) and back to E (external power) c. Click the RESET button
2. Check the sensor probe with our phone’s camera · After reactivating the node, quickly use the phone camera to take a picture of the sensor probe, if we can observe bright spots, it means that the sensor is working. Then it is recommended to re-download the latest firmware to solve the problem that the sensor does not recognize.
· If no bright spots are observed (a short time after the node is activated), then we need to open the node housing and check that the sensor wiring is secure. Page 40 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
3. Checking Sensor cables Check the sensor cables and secure them.
If after stable wiring, repeat the above operations still can not observe the bright spot, the sensor is broken, please contact your purchase channel to communicate return and exchange matters.

Trouble Shooting

8.1 AT Command input doesn’t work
In the case if user can see the console output but can’t type input to the device. Please check if you already include the ENTER while sending out the command. Some serial tool doesn’t send ENTER while press the send key, user need to add ENTER in their string.
8.2 Significant error between the output distant value of LiDAR and actual distance
Cause Due to the physical principles of The LiDAR probe, the above phenomenon is likely to occur if the detection object is the material with high reflectivity (such as mirror, smooth floor tile, etc.) or transparent substance. (such as glass and water, etc.)
Page 41 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

User Manual for LoRaWAN /NB -IoT End Nodes – DS20L — LoRaWAN Smart Distance Detector User Manual
Troubleshooting: Please avoid use of this product under such circumstance in practice. Cause : The IR-pass filters are blocked. Troubleshooting: please use dry dust-free cloth to gently remove the foreign matter.

Order Info

Part Number: DS20L-XXX XXX: The default frequency band
· AS923: LoRaWAN AS923 band · AU915: LoRaWAN AU915 band · EU433: LoRaWAN EU433 band · EU868: LoRaWAN EU868 band · KR920: LoRaWAN KR920 band · US915: LoRaWAN US915 band · IN865: LoRaWAN IN865 band · CN470: LoRaWAN CN470 band
10. Packing Info
Package Includes: · DS20L LoRaWAN Smart Distance Detector x 1
Dimension and weight: · Device Size: cm · Device Weight: g · Package Size / pcs : cm · Weight / pcs : g

Support

· 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.
· 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.
Page 42 / 42 – last modified by Mengting Qiu on 2024/07/11 17:37

FCC Caution: Any Changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter.
NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and , if not installed and used in accordance with the Instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: –Reorient or relocate the receiving antenna. –Increase the separation between the equipment and receiver. –Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. –Consult the dealer or an experienced radio/TV technician for help.
FCC Radiation Exposure Statement: This equipment complies with FCC radiation exposure limits set forth for uncontrolled environment .This equipment should be installed and operated with minimum distance 20cm between the radiator& your body.

Documents / Resources

Dragino DS20L LoRaWAN Lidar Distance Sensor [pdf] Instruction Manual
ZHZDS20L, ZHZDS20L ds20l, DS20L LoRaWAN Lidar Distance Sensor, DS20L, LoRaWAN Lidar Distance Sensor, Lidar Distance Sensor, Distance Sensor, Sensor

References

Leave a comment

Your email address will not be published. Required fields are marked *