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 (% style="color:red" %)Notice: The AT+NOUD feature is upgraded to Clock Logging, please refer [[Clock Logging Feature>>||anchor="H2.8Clocklogging28Sincefirmwareversionv1.2.129"]]
452
453 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:
454
455 * (% 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)
456
457 * (% 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.
458
459 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
460
461 [[image:1692424376354-959.png]]
462
463
464 == 2.5 Trggier an uplink by external interrupt ==
465
466
467 LDS40-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
468
469 (% style="color:blue" %)**AT command:**
470
471 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
472
473 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
474
475 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
476
477 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
478
479 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
480
481 == 2.6 LiDAR ToF Measurement ==
482
483 === 2.6.1 Principle of Distance Measurement ===
484
485
486 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.
487
488 [[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"]]
489
490
491 === 2.6.2 Distance Measurement Characteristics ===
492
493
494 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.
495
496 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:510px" %)
497 |(% 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
498 |(% 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
499
500 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.
501
502
503 === 2.6.3 Notice of usage ===
504
505
506 Possible invalid /wrong reading for LiDAR ToF tech:
507
508 * Measure high reflectivity object such as: Mirror, Smooth ceramic tile, static milk surface, will have possible wrong readings.
509
510 * While there is transparent object such as glass, water drop between the measured object and the LiDAR sensor, the reading might be wrong.
511
512 * The LiDAR probe is cover by dirty things; the reading might be wrong. In this case, need to clean the probe.
513
514 * The sensor window is made by Acrylic. Don't touch it with alcohol material. This will destroy the sensor window.
515
516 === 2.6.4 Reflectivity of different objects ===
517
518
519 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:379px" %)
520 |=(% 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
521 |(% style="width:53px" %)1|(% style="width:229px" %)Black foam rubber|(% style="width:93px" %)2.4%
522 |(% style="width:53px" %)2|(% style="width:229px" %)Black fabric|(% style="width:93px" %)3%
523 |(% style="width:53px" %)3|(% style="width:229px" %)Black rubber|(% style="width:93px" %)4%
524 |(% style="width:53px" %)4|(% style="width:229px" %)Coal (different types of coal)|(% style="width:93px" %)4~~8%
525 |(% style="width:53px" %)5|(% style="width:229px" %)Black car paint|(% style="width:93px" %)5%
526 |(% style="width:53px" %)6|(% style="width:229px" %)Black Jam|(% style="width:93px" %)10%
527 |(% style="width:53px" %)7|(% style="width:229px" %)Opaque black plastic|(% style="width:93px" %)14%
528 |(% style="width:53px" %)8|(% style="width:229px" %)Clean rough board|(% style="width:93px" %)20%
529 |(% style="width:53px" %)9|(% style="width:229px" %)Translucent plastic bottle|(% style="width:93px" %)62%
530 |(% style="width:53px" %)10|(% style="width:229px" %)Carton cardboard|(% style="width:93px" %)68%
531 |(% style="width:53px" %)11|(% style="width:229px" %)Clean pine|(% style="width:93px" %)70%
532 |(% style="width:53px" %)12|(% style="width:229px" %)Opaque white plastic|(% style="width:93px" %)87%
533 |(% style="width:53px" %)13|(% style="width:229px" %)White Jam|(% style="width:93px" %)90%
534 |(% style="width:53px" %)14|(% style="width:229px" %)Kodak Standard Whiteboard|(% style="width:93px" %)100%
535 |(% style="width:53px" %)15|(% style="width:229px" %)(((
536 Unpolished white metal surface
537 )))|(% style="width:93px" %)130%
538 |(% style="width:53px" %)16|(% style="width:229px" %)Glossy light metal surface|(% style="width:93px" %)150%
539 |(% style="width:53px" %)17|(% style="width:229px" %)stainless steel|(% style="width:93px" %)200%
540 |(% style="width:53px" %)18|(% style="width:229px" %)Reflector plate, reflective tape|(% style="width:93px" %)>300%
541
542 == 2.7 Set Transmit Interval Time ==
543
544
545 (((
546 Feature: Change NB-IoT End Node Transmit Interval.
547 )))
548
549 (((
550 (% style="color:blue" %)**AT Command: AT+TDC**
551 )))
552
553 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
554 |=(% 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**
555 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
556 30000
557 OK
558 the interval is 30000ms = 30s
559 )))
560 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
561 OK
562 Set transmit interval to 60000ms = 60 seconds
563 )))
564
565 (((
566 (% style="color:blue" %)**Downlink Command: 0x01**
567 )))
568
569 (((
570 Format: Command Code (0x01) followed by 3 bytes time value.
571 )))
572
573 (((
574 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
575 )))
576
577 * (((
578 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
579 )))
580 * (((
581 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds 
582 )))
583
584 == 2.8 Clock logging (Since firmware version v1.2.1) ==
585
586
587 Sometimes when we deploy lots of end nodes in field. We want all sensors sample data at the same time, and upload these data together for analyze. In such case, we can use clock loging feature.
588
589 We can use this command to set the start time of data recording and the time interval to meet the requirements of the specific collection time of data.
590
591 * (% style="color:blue" %)**AT Command: AT+CLOCKLOG=a,b,c,d**
592
593 (% style="color:blue" %)**a:**(%%)** 0:** Disable Clock logging.  ** 1: **Enable Clock Logging
594
595 (% style="color:blue" %)**b:**(%%)** **Specify First sampling start second: range **(0 ~~ 3599, 65535)   ** ~/~/ (% style="color:red" %)**Note:**(%%)** **If parameter b is set to 65535, the log period starts after the node accesses the network and sends packets.
596
597 (% style="color:blue" %)**c:**(%%)** **Specify the sampling interval: range **(0 ~~ 255 minutes)**
598
599 (% style="color:blue" %)**d:**(%%)** **How many entries should be uplink on every TDC **(max 32)**
600
601 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SPH01-NB_NB-IoT_Soil_pH_Sensor_User_Manual/WebHome/image-20240315141254-1.png?rev=1.1||alt="image-20240315141254-1.png"]]
602
603 **Example:**
604
605 **AT+CLOCKLOG=1,65535,1,5**
606
607 After the node sends the first packet, data is recorded to the memory at intervals of 1 minute. For each TDC uplink, the uplink load will include: battery information + the last 5 memory records (payload + timestamp).
608
609 (% class="wikigeneratedid" %)
610 [[image:image-20240316092934-1.png||height="481" width="1159"]]
611
612 (% class="wikigeneratedid" %)
613 (% style="color:red" %)**Note: Users need to synchronize the server time before configuring this command. If the server time is not synchronized before this command is configured, the command takes effect only after the node is reset.**
614
615
616 == 2.9 Example Query saved historical records ==
617
618
619 * (% style="color:blue" %)**AT Command: AT+CDP**
620
621 This command can be used to search the saved history, recording up to 32 groups of data, each group of historical data contains a maximum of 100 bytes.
622
623 (% class="wikigeneratedid" %)
624 [[image:image-20240316093055-2.png||height="596" width="773"]]
625
626
627 == 2.10 Uplink log query ==
628
629
630 * (% style="color:blue" %)**AT Command: AT+GETLOG**
631
632 This command can be used to query upstream logs of data packets.
633
634 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20240407191922-2.png?width=903&height=631&rev=1.1||alt="image-20240407191922-2.png"]]
635
636
637 == 2.11 Scheduled domain name resolution ==
638
639
640 This command is used to set up scheduled domain name resolution.
641
642 (% style="color:blue" %)**AT command:**
643
644 * (% style="color:#037691" %)**AT+DNSTIMER=XX   **(%%)~/~/ Unit: hour
645
646 After setting this command, domain name resolution will be performed regularly.
647
648
649 = 3. Configure LDS40-NB =
650
651 == 3.1 Configure Methods ==
652
653
654 LDS40-NB supports below configure method:
655
656 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
657
658 * 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]].
659
660 == 3.2 AT Commands Set ==
661
662
663 AT+<CMD>?        : Help on <CMD>
664
665 AT+<CMD>         : Run <CMD>
666
667 AT+<CMD>=<value> : Set the value
668
669 AT+<CMD>=?       : Get the value
670
671
672 (% style="color:blue" %)**General Commands**      
673
674 AT                    : Attention       
675
676 AT?  : Short Help     
677
678 ATZ  : MCU Reset    
679
680 AT+TDC  : Application Data Transmission Interval
681
682 AT+CFG  : Print all configurations
683
684 AT+CFGMOD           : Working mode selection
685
686 AT+DEUI  : Get or set the Device ID
687
688 AT+INTMOD            : Set the trigger interrupt mode
689
690 AT+5VT           : Set extend the time of 5V power  
691
692 AT+PRO          : Choose agreement
693
694 AT+RXDL  : Extend the sending and receiving time
695
696 AT+DNSCFG  : Get or Set DNS Server
697
698 AT+GETSENSORVALUE   : Returns the current sensor measurement
699
700 AT+NOUD  : Get or Set the number of data to be uploaded
701
702 AT+CDP     : Read or Clear cached data
703
704 AT+ALARM:  Get or Set alarm of distance
705
706 AT+SERVADDR :  Server Address
707
708
709
710 (% style="color:blue" %)**MQTT Management**
711
712 AT+CLIENT               : Get or Set MQTT client
713
714 AT+UNAME              : Get or Set MQTT Username
715
716 AT+PWD                  : Get or Set MQTT password
717
718 AT+PUBTOPIC  : Get or Set MQTT publish topic
719
720 AT+SUBTOPIC  : Get or Set MQTT subscription topic
721
722
723 (% style="color:blue" %)**Information**          
724
725 AT+FDR  : Factory Data Reset
726
727 AT+PWORD  : Serial Access Password
728
729 AT+LDATA  : Get the last upload data
730
731 AT+CDP  : Read or Clear cached data
732
733
734 = 4. Battery & Power Consumption =
735
736
737 LDS40-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
738
739 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
740
741
742 = 5. Firmware update =
743
744
745 User can change device firmware to::
746
747 * Update with new features.
748
749 * Fix bugs.
750
751 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/bol5zyj6l4t6ge4/AAAtUvkHQ1tKwbVi_RCCmqFQa?dl=0]]**
752
753 Methods to Update Firmware:
754
755 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
756
757 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
758
759 = 6. FAQ =
760
761 == 6.1 How can I access t BC660K-GL AT Commands? ==
762
763
764 User can access to BC660K-GL directly and send AT Commands.
765
766 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
767
768
769 = 7. Trouble Shooting =
770
771 == 7.1 Significant error between the output distant value of LiDAR and actual distance ==
772
773
774 (((
775 (% 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.)
776 )))
777
778 (((
779 (% style="color:red" %)**Troubleshooting**(%%): Please avoid use of this product under such circumstance in practice.
780 )))
781
782
783 (((
784 (% style="color:blue" %)**Cause ②**(%%)**: **The IR-pass filters are blocked.
785 )))
786
787 (((
788 (% style="color:red" %)**Troubleshooting**(%%): please use dry dust-free cloth to gently remove the foreign matter.
789 )))
790
791
792 = 8. Order Info =
793
794
795 Part Number: (% style="color:blue" %)**LDS40-NB-XX**
796
797 (% style="color:red" %)**XX**(%%):
798
799 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
800
801 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
802
803 (% 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
804
805
806 = 9. ​Packing Info =
807
808
809 (% style="color:#037691" %)**Package Includes**:
810
811 * LDS40-NB NB-IoT LiDAR ToF Distance sensor x 1
812
813 * External antenna x 1
814
815 (% style="color:#037691" %)**Dimension and weight**:
816
817 * Device Size: 13.0 x 5 x 4.5 cm
818
819 * Device Weight: 150g
820
821 * Package Size / pcs : 14.0 x 8x 5 cm
822
823 * Weight / pcs : 180g
824
825 = 10. Support =
826
827
828 * 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.
829
830 * 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]].
831
832 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0