Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20231017170656-1.png||height="573" width="833"]]
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 LDS40-NB NB-IoT LiDAR ToF Distance Sensor ==
25
26
27 The Dragino LDS40-NB is a (% style="color:blue" %)**NB-IoT LiDAR ToF (Time of Flight) Distance Sensor**(%%) for Internet of Things solution. It is capable of measuring the distance to objects as close as 0m to 40m. The LiDAR probe uses (% style="color:blue" %)**laser induction technology**(%%) for distance measurement.
28
29 The LDS40-NB can be applied to scenarios such as horizontal distance measurement, parking management system, object proximity and presence detection, intelligent trash can management system, robot obstacle avoidance, automatic control, sewer, etc.
30
31 It detects the distance between the measured object and the sensor, and uploads the value via wireless to NB-IoT IoT Server.
32
33 LDS40-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 LDS40-NB (% style="color:blue" %)**supports BLE configure **(%%)and(% style="color:blue" %)** OTA update**(%%) which make user easy to use.
36
37 LDS40-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
38
39 LDS40-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
40
41 [[image:image-20231017170816-2.png||height="324" width="878"]]
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 * Laser technology for distance detection
50 * Measure Distance: 0.1m ~~ 40m @ 90% Reflectivity; 0.1m ~~ 13.5m @ 10% Reflectivity
51 * Distance resolution: 1cm
52 * Multiply Sampling and one uplink
53 * Support Bluetooth v5.1 remote configure and update firmware
54 * Uplink on periodically
55 * Downlink to change configure
56 * IP65 Waterproof Enclosure
57 * 8500mAh Battery for long term use
58 * Nano SIM card slot for NB-IoT SIM
59
60 == 1.3 Specification ==
61
62
63 (% style="color:blue" %)**Common DC Characteristics:**
64
65 * Supply Voltage: 2.5v ~~ 3.6v
66 * Operating Temperature: -40 ~~ 85°C
67
68 (% style="color:blue" %)**Probe Specification:**
69
70 * Storage temperature:-30°C~~80°C
71 * Operating temperature: -20°C~~60°C
72 * Measure Distance:
73 ** 0.1m ~~ 40m @ 90% Reflectivity
74 ** 0.1m ~~ 13.5m @ 10% Reflectivity
75 * Distance resolution: 1cm
76 * Ambient light immunity: 100klux
77 * Enclosure rating : IP65
78 * Light source : VCSEL
79 * Central wavelength : 850nm
80 * FOV : 3°
81 * Material of enclosure : ABS+PC
82 * Wire length : 75cm
83
84 (% style="color:blue" %)**NB-IoT Spec:**
85
86 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
87
88 (% style="color:#037691" %)**Support Bands:**
89
90 * B1 @H-FDD: 2100MHz
91 * B2 @H-FDD: 1900MHz
92 * B3 @H-FDD: 1800MHz
93 * B4 @H-FDD: 2100MHz
94 * B5 @H-FDD: 860MHz
95 * B8 @H-FDD: 900MHz
96 * B12 @H-FDD: 720MHz
97 * B13 @H-FDD: 740MHz
98 * B17 @H-FDD: 730MHz
99 * B18 @H-FDD: 870MHz
100 * B19 @H-FDD: 870MHz
101 * B20 @H-FDD: 790MHz
102 * B25 @H-FDD: 1900MHz
103 * B28 @H-FDD: 750MHz
104 * B66 @H-FDD: 2000MHz
105 * B70 @H-FDD: 2000MHz
106 * B85 @H-FDD: 700MHz
107
108 (% style="color:blue" %)**Battery:**
109
110 * Li/SOCI2 un-chargeable battery
111 * Capacity: 8500mAh
112 * Self Discharge: <1% / Year @ 25°C
113 * Max continuously current: 130mA
114 * Max boost current: 2A, 1 second
115
116 (% style="color:blue" %)**Power Consumption**
117
118 * STOP Mode: 10uA @ 3.3v
119 * Max transmit power: 350mA@3.3v
120
121 == 1.4 Applications ==
122
123
124 * Horizontal distance measurement
125 * Parking management system
126 * Object proximity and presence detection
127 * Intelligent trash can management system
128 * Robot obstacle avoidance
129 * Automatic control
130 * Sewer
131
132 == 1.5 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.6 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
146 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
147 |=(% 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**
148 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
149 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
150 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
151 )))
152 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
153 (% 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.
154 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
155 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.
156 )))
157 |(% 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.
158
159 (% 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.**
160
161
162 == 1.7 BLE connection ==
163
164
165 LDS40-NB support BLE remote configure and firmware update.
166
167
168 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:
169
170 * Press button to send an uplink
171 * Press button to active device.
172 * Device Power on or reset.
173
174 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
175
176
177 == 1.8 Pin Definitions , Switch & SIM Direction ==
178
179
180 [[image:image-20231107091343-1.png||height="441" width="776"]]
181
182
183 === 1.8.1 Jumper JP2 ===
184
185
186 Power on Device when put this jumper.
187
188
189 === 1.8.2 BOOT MODE / SW1 ===
190
191
192 **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.
193
194 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
195
196
197 === 1.8.3 Reset Button ===
198
199
200 Press to reboot the device.
201
202
203 === 1.8.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.9 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
218 (% style="color:blue" %)**Probe Mechanical:**
219
220
221 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLDS40-LoRaWAN%20LiDAR%20ToF%20Distance%20Sensor%20User%20Manual/WebHome/1666948963951-832.png?rev=1.1||alt="1666948963951-832.png"]]
222
223
224 = 2. Use LDS40-NB to communicate with IoT Server =
225
226 == 2.1 Send data to IoT server via NB-IoT network ==
227
228
229 The LDS40-NB is equipped with a NB-IoT module, the pre-loaded firmware in LDS40-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 LDS40-NB.
230
231 Below shows the network structure:
232
233 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS40-NB_NB-IoT_LiDAR_ToF_Distance_Sensor_User_Manual/WebHome/image-20231017170816-2.png?width=878&height=324&rev=1.1||alt="image-20231017170816-2.png"]]
234
235
236 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1D**(%%) version of LDS40-NB.
237
238
239 (% 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 LDS12-NB send data to IoT server.
240
241 * 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]].
242
243 * 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]]. 
244
245 Below shows result of different server as a glance.
246
247 (% border="1" cellspacing="4" style="width:515px" %)
248 |(% 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**
249 |(% 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" %)(((
250 (% style="text-align:center" %)
251 [[image:image-20230819113244-8.png||height="183" width="367"]]
252 )))|(% style="width:170px" %)
253 |(% 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" %)(((
254 (% style="text-align:center" %)
255 [[image:image-20230819113244-9.png||height="119" width="367"]]
256 )))|(% style="width:170px" %)
257 |(% 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" %)
258 |(% 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" %)
259 |(% 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" %)
260 |(% 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" %)(((
261 (% style="text-align:center" %)
262 [[image:image-20230819113244-10.png||height="104" width="367"]]
263 )))|(% style="width:170px" %)
264 |(% 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" %)(((
265 (% style="text-align:center" %)
266 [[image:image-20230819113244-11.png||height="141" width="367"]]
267 )))|(% style="width:170px" %)
268
269 (% 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 LDS40-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]].
270
271
272 == 2.2 ​Payload Types ==
273
274
275 To meet different server requirement, LDS40-NB supports different payload type.
276
277 **Includes:**
278
279 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
280
281 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
282
283 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
284
285 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
286
287 User can specify the payload type when choose the connection protocol. Example:
288
289 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
290
291 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
292
293 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
294
295
296 === 2.2.1 General Json Format(Type~=5) ===
297
298
299 This is the General Json Format. As below:
300
301 (% style="color:#4472c4" %)**{"IMEI":"866207052559857","Model":"LDS40-NB","ds18b20_temperature":-0.1,"distance":357,"distance_signal_strength":1285,"temperature":29,"battery":3.51,"signal":22,"1":{358,1301,27,2023/11/06 10:01:07},"2":{357,1293,27,2023/11/06 09:46:07},"3":{67,3047,27,2023/11/06 08:56:32},"4":{12,1262,27,2023/11/06 08:21:48},"5":{10,5873,29,2023/11/06 07:52:21},"6":{2175,736,46,2023/11/06 07:05:43},"7":{2204,843,51,2023/11/06 06:42:58},"8":{2252,995,58,2023/11/06 06:27:58}}**
302
303 [[image:image-20231107092434-3.png||height="712" width="955"]]
304
305
306 (% style="color:red" %)**Notice, from above payload:**
307
308 * DS18b20_temperature, Distance, Distance signal strength, Temperature, Battery & Signal are the value at uplink time.
309
310 * 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): Distance, Distance signal strength, LIDAR Temperature, Sampling time.
311
312 === 2.2.2 HEX format Payload(Type~=0) ===
313
314
315 This is the HEX Format. As below:
316
317 (% style="color:#4472c4" %)**f86620705255985710640dba1a01000000000b04e3001c65489ec5000a16f1001d65489b35087f02e0002e65489047089c034b003365488af208cc03e3003a6548876e08bb018c001e6548806a08cb018f001e654879d308cf018d001e6548764e08d60189001d654872ca**
318
319 [[image:image-20231107092040-2.png||height="199" width="1215"]]
320
321
322 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
323
324
325 [[image:image-20231106161710-2.png||height="758" width="1012"]]
326
327 (% style="color:blue" %)**Version:**
328
329 These bytes include the hardware and software version.
330
331 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x10 for LDS40-NB
332
333 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x64=100, means firmware version 1.0.0
334
335
336 (% style="color:blue" %)**BAT (Battery Info):**
337
338 Ex1: 0x0DB4 = 3508mV
339
340
341 (% style="color:blue" %)**DS18B20 Temperature sensor:**
342
343 This is optional, user can connect external DS18B20 sensor to the +3.3v, 1-wire and GND pin . and this field will report temperature.
344
345 **Example**:
346
347 If payload is: 0105H:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
348
349 If payload is: FF3FH :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
350
351
352 (% style="color:blue" %)**Distance:**
353
354 Represents the distance value of the measurement output, the default unit is cm, and the value range parsed as a decimal number is **0-4000**. In actual use, when the signal strength value Strength.
355
356 **Example**:
357
358 If the data you get from the register is __**0x0B 0xEA**__, the distance between the sensor and the measured object is **0BEA(H) = 3050 (D)/10 = 305cm**.
359
360
361 (% style="color:blue" %)**Distance signal strength:**
362
363 Refers to the signal strength, the default output value will be between 0-65535. When the ranging gear is fixed, the farther the ranging, the lower the signal strength.
364
365 In actual use, when the signal strength value Strength≤60, the measured value of Dist is considered unreliable, and the default output is 4500. When the signal strength is greater than 60 and the actual distance is and the actual distance is 45~~60m, the output value of Dist is 4500. When the signal strength is greater than 60 and the actual distance is more than 60m, there will be over-period data appearing as 0 or other abnormal values.
366
367 **Example**:
368
369 If payload is: 01D7(H)=471(D), distance signal strength=471, 471>100,471≠65535, the measured value of Dist is considered credible.
370
371 Customers can judge whether they need to adjust the environment based on the signal strength.
372
373
374 (% style="color:blue" %)**Interrupt Pin & Interrupt Level:**
375
376 This data field shows if this packet is generated by interrupt or not.
377
378 (% style="color:red" %)**Note: The Internet Pin is a separate pin in the screw terminal. **
379
380 **Example:**
381
382 If byte[0]&0x01=0x00 : Normal uplink packet.
383
384 If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
385
386
387 (% style="color:blue" %)**LiDAR temp:**
388
389 Characterize the internal temperature value of the sensor.
390
391 **Example: **
392
393 If payload is: 001C(H) <<24>>24=28(D), LiDAR temp=28°C.
394
395 If payload is: FFF2(H) <<24>>24=-14(D), LiDAR temp=-14°C.
396
397
398 (% style="color:blue" %)**TimeStamp:   **
399
400 Unit TimeStamp Example: 64d49439(H) = 1691653177(D)
401
402 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]]) to get the time.
403
404
405 === 2.2.3 ThingsBoard Payload(Type~=3) ===
406
407
408 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
409
410 (% style="color:#4472c4" %)** { "IMEI": "866207052559857",
411 "Model": "LDS40-NB",
412 "ds18b20_temperature": -0.1,
413 "distance": 356,
414 "distance_signal_strength": 1298,
415 "temperature": 28,
416 "battery": 3.49,
417 "signal": 22
418 }**
419
420 [[image:image-20231106173419-7.png||height="586" width="1127"]]
421
422
423 === 2.2.4 ThingSpeak Payload(Type~=1) ===
424
425
426 This payload meets ThingSpeak platform requirement. It includes six fields. Form 1~~6 are:
427
428 DS18b20_temperature, Distance, Distance signal strength, Temperature, Battery & Signal. This payload type only valid for ThingsSpeak Platform.
429
430 As below:
431
432 (% style="color:#4472c4" %)**field1=Distance value&field2=Distance signal strength value&field3=Temperature value&field4=Battery value&field5=Signal value&field6=DS18B20_temperature value**
433
434 [[image:image-20231106165759-6.png||height="891" width="876"]]
435
436
437 == 2.3 Test Uplink and Change Update Interval ==
438
439
440 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%) & AT+NOUD=8
441
442 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
443
444 (% style="color:#037691" %)**AT+TDC=600 ** (%%) ~/~/ Set Update Interval to 600s
445
446 User can also push the button for more than 1 seconds to activate an uplink.
447
448
449 == 2.4 Multi-Samplings and One uplink ==
450
451
452 To save battery life, LDS40-NB will sample distance 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:
453
454 * (% 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)
455
456 * (% 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.
457
458 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
459
460 [[image:1692424376354-959.png]]
461
462
463 == 2.5 Trggier an uplink by external interrupt ==
464
465
466 LDS40-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
467
468 (% style="color:blue" %)**AT command:**
469
470 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
471
472 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
473
474 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
475
476 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
477
478 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
479
480 == 2.6 LiDAR ToF Measurement ==
481
482 === 2.6.1 Principle of Distance Measurement ===
483
484
485 The LiDAR probe is based on TOF, namely, Time of Flight principle. To be specific, the product emits modulation wave of near infrared ray on a periodic basis, which will be reflected after contacting object. The product obtains the time of flight by measuring round-trip phase difference and then calculates relative range between the product and the detection object, as shown below.
486
487 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLDS12-LoRaWAN%20LiDAR%20ToF%20Distance%20Sensor%20User%20Manual/WebHome/1654831757579-263.png?rev=1.1||alt="1654831757579-263.png"]]
488
489
490 === 2.6.2 Distance Measurement Characteristics ===
491
492
493 The detection angle of the LDS40-NB is 3 degrees, and the size of the light spot at different distances is the side length of the detection range. The size of the light spot at different distances is the side length of the detection range. The side length of the detection range (the shape is square), as shown.
494
495 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:510px" %)
496 |(% style="width:240px" %)**Distance(m)**|(% style="width:26px" %)1|(% style="width:35px" %)2|(% style="width:36px" %)3|(% style="width:32px" %)5|(% style="width:33px" %)7|(% style="width:34px" %)10|(% style="width:43px" %)20|(% style="width:41px" %)30|(% style="width:41px" %)40
497 |(% style="width:240px" %)**Detection range side length (cm)**|(% style="width:26px" %)5|(% style="width:35px" %)10|(% style="width:36px" %)16|(% style="width:32px" %)26|(% style="width:33px" %)37|(% style="width:34px" %)52|(% style="width:43px" %)105|(% style="width:41px" %)156|(% style="width:41px" %)208
498
499 Note that generally, the side length of the detected target object should be greater than the side length of the detection range of the LDS40-NB; when the detected object is smaller than the detection range side length; when the detected object is smaller than the detection range side length, the effective range of the radar will be reduced.
500
501
502 === 2.6.3 Notice of usage ===
503
504
505 Possible invalid /wrong reading for LiDAR ToF tech:
506
507 * Measure high reflectivity object such as: Mirror, Smooth ceramic tile, static milk surface, will have possible wrong readings.
508
509 * While there is transparent object such as glass, water drop between the measured object and the LiDAR sensor, the reading might be wrong.
510
511 * The LiDAR probe is cover by dirty things; the reading might be wrong. In this case, need to clean the probe.
512
513 * The sensor window is made by Acrylic. Don't touch it with alcohol material. This will destroy the sensor window.
514
515 === 2.6.4 Reflectivity of different objects ===
516
517
518 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:379px" %)
519 |=(% style="width: 54px;background-color:#4F81BD;color:white" %)Item|=(% style="width: 231px;background-color:#4F81BD;color:white" %)Material|=(% style="width: 94px;background-color:#4F81BD;color:white" %)Relectivity
520 |(% style="width:53px" %)1|(% style="width:229px" %)Black foam rubber|(% style="width:93px" %)2.4%
521 |(% style="width:53px" %)2|(% style="width:229px" %)Black fabric|(% style="width:93px" %)3%
522 |(% style="width:53px" %)3|(% style="width:229px" %)Black rubber|(% style="width:93px" %)4%
523 |(% style="width:53px" %)4|(% style="width:229px" %)Coal (different types of coal)|(% style="width:93px" %)4~~8%
524 |(% style="width:53px" %)5|(% style="width:229px" %)Black car paint|(% style="width:93px" %)5%
525 |(% style="width:53px" %)6|(% style="width:229px" %)Black Jam|(% style="width:93px" %)10%
526 |(% style="width:53px" %)7|(% style="width:229px" %)Opaque black plastic|(% style="width:93px" %)14%
527 |(% style="width:53px" %)8|(% style="width:229px" %)Clean rough board|(% style="width:93px" %)20%
528 |(% style="width:53px" %)9|(% style="width:229px" %)Translucent plastic bottle|(% style="width:93px" %)62%
529 |(% style="width:53px" %)10|(% style="width:229px" %)Carton cardboard|(% style="width:93px" %)68%
530 |(% style="width:53px" %)11|(% style="width:229px" %)Clean pine|(% style="width:93px" %)70%
531 |(% style="width:53px" %)12|(% style="width:229px" %)Opaque white plastic|(% style="width:93px" %)87%
532 |(% style="width:53px" %)13|(% style="width:229px" %)White Jam|(% style="width:93px" %)90%
533 |(% style="width:53px" %)14|(% style="width:229px" %)Kodak Standard Whiteboard|(% style="width:93px" %)100%
534 |(% style="width:53px" %)15|(% style="width:229px" %)(((
535 Unpolished white metal surface
536 )))|(% style="width:93px" %)130%
537 |(% style="width:53px" %)16|(% style="width:229px" %)Glossy light metal surface|(% style="width:93px" %)150%
538 |(% style="width:53px" %)17|(% style="width:229px" %)stainless steel|(% style="width:93px" %)200%
539 |(% style="width:53px" %)18|(% style="width:229px" %)Reflector plate, reflective tape|(% style="width:93px" %)>300%
540
541 == 2.7 Set Transmit Interval Time ==
542
543
544 (((
545 Feature: Change NB-IoT End Node Transmit Interval.
546 )))
547
548 (((
549 (% style="color:blue" %)**AT Command: AT+TDC**
550 )))
551
552 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
553 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 137px;background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
554 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
555 30000
556 OK
557 the interval is 30000ms = 30s
558 )))
559 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
560 OK
561 Set transmit interval to 60000ms = 60 seconds
562 )))
563
564 (((
565 (% style="color:blue" %)**Downlink Command: 0x01**
566 )))
567
568 (((
569 Format: Command Code (0x01) followed by 3 bytes time value.
570 )))
571
572 (((
573 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
574 )))
575
576 * (((
577 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
578 )))
579 * (((
580 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds 
581
582
583
584 )))
585
586 = 3. Configure LDS40-NB =
587
588 == 3.1 Configure Methods ==
589
590
591 LDS40-NB supports below configure method:
592
593 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
594
595 * 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]].
596
597 == 3.2 AT Commands Set ==
598
599
600 AT+<CMD>?        : Help on <CMD>
601
602 AT+<CMD>         : Run <CMD>
603
604 AT+<CMD>=<value> : Set the value
605
606 AT+<CMD>=?       : Get the value
607
608
609 (% style="color:blue" %)**General Commands**      
610
611 AT                    : Attention       
612
613 AT?  : Short Help     
614
615 ATZ  : MCU Reset    
616
617 AT+TDC  : Application Data Transmission Interval
618
619 AT+CFG  : Print all configurations
620
621 AT+CFGMOD           : Working mode selection
622
623 AT+DEUI  : Get or set the Device ID
624
625 AT+INTMOD            : Set the trigger interrupt mode
626
627 AT+5VT           : Set extend the time of 5V power  
628
629 AT+PRO          : Choose agreement
630
631 AT+RXDL  : Extend the sending and receiving time
632
633 AT+DNSCFG  : Get or Set DNS Server
634
635 AT+GETSENSORVALUE   : Returns the current sensor measurement
636
637 AT+NOUD  : Get or Set the number of data to be uploaded
638
639 AT+CDP     : Read or Clear cached data
640
641 AT+ALARM:  Get or Set alarm of distance
642
643 AT+SERVADDR :  Server Address
644
645
646 (% style="color:blue" %)**UDP Management**
647
648 AT+CFM  :  Upload confirmation mode (only valid for UDP)
649
650
651 (% style="color:blue" %)**MQTT Management**
652
653 AT+CLIENT               : Get or Set MQTT client
654
655 AT+UNAME              : Get or Set MQTT Username
656
657 AT+PWD                  : Get or Set MQTT password
658
659 AT+PUBTOPIC  : Get or Set MQTT publish topic
660
661 AT+SUBTOPIC  : Get or Set MQTT subscription topic
662
663
664 (% style="color:blue" %)**Information**          
665
666 AT+FDR  : Factory Data Reset
667
668 AT+PWORD  : Serial Access Password
669
670 AT+LDATA  : Get the last upload data
671
672 AT+CDP  : Read or Clear cached data
673
674
675 = 4. Battery & Power Consumption =
676
677
678 LDS40-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
679
680 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
681
682
683 = 5. Firmware update =
684
685
686 User can change device firmware to::
687
688 * Update with new features.
689
690 * Fix bugs.
691
692 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/bol5zyj6l4t6ge4/AAAtUvkHQ1tKwbVi_RCCmqFQa?dl=0]]**
693
694 Methods to Update Firmware:
695
696 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
697
698 * Update through UART TTL interface : **[[Instruction>>url:http://8.211.40.43/xwiki/bin/view/Main/Firmware%20Upgrade%20Instruction%20for%20STM32%20base%20products/#H4.2.FirmwareupgradeusingSTM32Cubeprogramer]]**.
699
700 = 6. FAQ =
701
702 == 6.1 How can I access t BC660K-GL AT Commands? ==
703
704
705 User can access to BC660K-GL directly and send AT Commands.
706
707 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
708
709
710 = 7. Trouble Shooting =
711
712 == 7.1 Significant error between the output distant value of LiDAR and actual distance ==
713
714
715 (((
716 (% style="color:blue" %)**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.)
717 )))
718
719 (((
720 (% style="color:red" %)**Troubleshooting**(%%): Please avoid use of this product under such circumstance in practice.
721 )))
722
723
724 (((
725 (% style="color:blue" %)**Cause ②**(%%)**: **The IR-pass filters are blocked.
726 )))
727
728 (((
729 (% style="color:red" %)**Troubleshooting**(%%): please use dry dust-free cloth to gently remove the foreign matter.
730 )))
731
732
733 = 8. Order Info =
734
735
736 Part Number: (% style="color:blue" %)**LDS40-NB-XX**
737
738 (% style="color:red" %)**XX**(%%):
739
740 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
741
742 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
743
744 (% 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
745
746
747 = 9. ​Packing Info =
748
749
750 (% style="color:#037691" %)**Package Includes**:
751
752 * LDS40-NB NB-IoT LiDAR ToF Distance sensor x 1
753
754 * External antenna x 1
755
756 (% style="color:#037691" %)**Dimension and weight**:
757
758 * Device Size: 13.0 x 5 x 4.5 cm
759
760 * Device Weight: 150g
761
762 * Package Size / pcs : 14.0 x 8x 5 cm
763
764 * Weight / pcs : 180g
765
766 = 10. Support =
767
768
769 * 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.
770
771 * 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]].
772
773 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0