Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20231017135304-1.png||height="553" width="823"]]
5
6
7
8
9
10
11
12 **Table of Contents:**
13
14 {{toc/}}
15
16
17
18
19
20
21 = 1. Introduction =
22
23 == 1.1 What is LDS12-NB NB-IoT LiDAR ToF Distance Sensor ==
24
25
26 The Dragino LDS12-NB is a (% style="color:blue" %)**NB-IoT LiDAR ToF (Time of Flight) Distance Sensor**(%%) for Internet of Things solution. It is capable to measure the distance to an object as close as 10 centimeters (+/- 5cm up to 6m) and as far as 12 meters (+/-1% starting at 6m)!. The LiDAR probe uses laser induction technology for distance measurement.
27
28 The LDS12-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.
29
30 It detects the distance between the measured object and the sensor, and uploads the value via wireless to NB-IoT IoT Server.
31
32 LDS12-NB supports different uplink methods including (% style="color:blue" %)**MQTT, MQTTs, UDP & TCP**(%%) for different application requirement, and support uplinks to various IoT Servers.
33
34 LDS12-NB (% style="color:blue" %)**supports BLE configure **(%%)and(% style="color:blue" %)** OTA update**(%%) which make user easy to use.
35
36 LDS12-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
37
38 LDS12-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
39
40 [[image:image-20231017101030-1.png||height="317" width="898"]]
41
42
43 == 1.2 ​Features ==
44
45
46 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
47 * Ultra-low power consumption
48 * Laser technology for distance detection
49 * Measure Distance: 0.1m~~12m
50 * Accuracy :  ±5cm@(0.1-5m), ±1%@(5m-12m)
51 * Multiply Sampling and one uplink
52 * Support Bluetooth v5.1 remote configure and update firmware
53 * Uplink on periodically
54 * Downlink to change configure
55 * IP65 Waterproof Enclosure
56 * 8500mAh Battery for long term use
57 * Nano SIM card slot for NB-IoT SIM
58
59 == 1.3 Specification ==
60
61
62 (% style="color:blue" %)**Common DC Characteristics:**
63
64 * Supply Voltage: 2.5v ~~ 3.6v
65 * Operating Temperature: -40 ~~ 85°C
66
67 (% style="color:blue" %)**Probe Specification:**
68
69 * Storage temperature:-20°C ~~ 75°C
70 * Operating temperature : -20°C ~~ 60°C
71 * Measure Distance:
72 ** 0.1m ~~ 12m @ 90% Reflectivity
73 ** 0.1m ~~ 4m @ 10% Reflectivity
74 * Accuracy : ±5cm@(0.1-5m), ±1%@(5m-12m)
75 * Distance resolution : 1cm
76 * Ambient light immunity : 70klux
77 * Enclosure rating : IP65
78 * Light source : LED
79 * Central wavelength : 850nm
80 * FOV : 3.6°
81 * Material of enclosure : ABS+PC
82 * Wire length : 25cm
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 LDS12-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-20231111174542-1.png]]
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/LLDS12-LoRaWAN%20LiDAR%20ToF%20Distance%20Sensor%20User%20Manual/WebHome/1654827224480-952.png?rev=1.1||alt="1654827224480-952.png"]]
222
223
224 = 2. Use LDS12-NB to communicate with IoT Server =
225
226 == 2.1 Send data to IoT server via NB-IoT network ==
227
228
229 The LDS12-NB is equipped with a NB-IoT module, the pre-loaded firmware in LDS12-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 LDS12-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/LDS12-NB_NB-IoT_LiDAR_ToF_Distance_Sensor_User_Manual/WebHome/image-20231017101030-1.png?width=898&height=317&rev=1.1||alt="image-20231017101030-1.png"]]
234
235
236 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1D**(%%) version of LDS12-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 LDS12-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, LDS12-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":"LDS12-NB","ds18b20_temperature":-0.1,"distance":356,"distance_signal_strength":259,"temperature":26,"battery":3.52,"signal":26,"1":{358,272,26,2023/11/11 07:44:02},"2":{349,268,26,2023/11/11 07:29:02},"3":{0,25,26,2023/11/11 07:14:06},"4":{0,9,26,2023/11/11 06:59:06},"5":{0,0,4095,2023/11/11 06:37:49},"6":{0,0,4095,2023/11/11 06:34:49},"7":{0,0,4095,2023/11/11 06:31:49},"8":{0,0,4095,2023/11/11 06:28:49}}**
302
303
304 [[image:image-20231111154942-1.png||height="740" width="1000"]]
305
306
307 (% style="color:red" %)**Notice, from above payload:**
308
309 * DS18b20_temperature, Distance, Distance_signal_strength, Temperature, Battery & Signal are the value at uplink time.
310
311 * 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.
312
313 === 2.2.2 HEX format Payload(Type~=0) ===
314
315
316 This is the HEX Format. As below:
317
318 (% style="color:#4472c4" %)**f8662070525598570f640dbe1a0100000001630104001a654f33b101660110001a654f30c2015d010c001a654f2d3e00000019001a654f29be00000009001a654f263a000000000fff654f213d000000000fff654f2089000000000fff654f1fd5000000000fff654f1f21**
319
320 [[image:image-20231111160008-3.png||height="187" width="1142"]]
321
322
323 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
324
325 [[image:image-20231111155832-2.png||height="879" width="950"]]
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: 0x0F for LDS12-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-1200. 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 distance measurement gear is fixed, the farther the distance measurement is, the lower the signal strength; the lower the target reflectivity, the lower the signal strength. When Strength is greater than 100 and not equal to 65535, the measured value of Dist is considered credible.
364
365 **Example**:
366
367 If payload is: 01D7(H)=471(D), distance signal strength=471, 471>100,471≠65535, the measured value of Dist is considered credible.
368
369 Customers can judge whether they need to adjust the environment based on the signal strength.
370
371
372 (% style="color:blue" %)**Interrupt Pin & Interrupt Level:**
373
374 This data field shows if this packet is generated by interrupt or not.
375
376 (% style="color:red" %)**Note: The Internet Pin is a separate pin in the screw terminal. **
377
378 **Example:**
379
380 If byte[0]&0x01=0x00 : Normal uplink packet.
381
382 If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
383
384
385 (% style="color:blue" %)**LiDAR temp:**
386
387 Characterize the internal temperature value of the sensor.
388
389 **Example: **
390
391 If payload is: 001C(H) <<24>>24=28(D), LiDAR temp=28°C.
392
393 If payload is: FFF2(H) <<24>>24=-14(D), LiDAR temp=-14°C.
394
395
396 === 2.2.3 ThingsBoard Payload(Type~=3) ===
397
398
399 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
400
401 (% style="color:#4472c4" %)** {"IMEI": "866207052559857",
402 "Model": "LDS12-NB",
403 "ds18b20_temperature": -0.1,
404 "distance": 354,
405 "distance_signal_strength": 250,
406 "temperature": 26,
407 "battery": 3.49,
408 "signal": 24
409 }**
410
411 [[image:image-20231111174002-6.png||height="595" width="1176"]]
412
413
414 === 2.2.4 ThingSpeak Payload(Type~=1) ===
415
416
417 This payload meets ThingSpeak platform requirement. It includes six fields. Form1~~6are:
418
419 Distance, Distance signal strength, Temperature, Battery, Signal&DS18b20 temperature, This payload type only valid for ThingsSpeak Platform.
420
421 As below:
422
423 (% style="color:#4472c4; font-weight:bold" %)**field1=Distance value&field2=Distance signal strength **(% style="color:#4472c4" %)**value&field3=Temperature value&field4=Battery value&field5=Singal value&field6=DS18b20 temperature value**
424
425 [[image:image-20231111165313-5.png]]
426
427
428 == 2.3 Test Uplink and Change Update Interval ==
429
430
431 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%) & AT+NOUD=8
432
433 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
434
435 (% style="color:#037691" %)**AT+TDC=600 ** (%%) ~/~/ Set Update Interval to 600s
436
437 User can also push the button for more than 1 seconds to activate an uplink.
438
439
440 == 2.4 Multi-Samplings and One uplink ==
441
442 (% style="color:red" %)Notice: The AT+NOUD feature is upgraded to Clock Logging, please refer [[Clock Logging Feature>>||anchor="H2.8Clocklogging28Sincefirmwareversionv1.2.129"]]
443
444 To save battery life, LDS12-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:
445
446 * (% 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)
447
448 * (% 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.
449
450 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
451
452 [[image:1692424376354-959.png]]
453
454
455 == 2.5 Trggier an uplink by external interrupt ==
456
457
458 LDS12-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
459
460 (% style="color:blue" %)**AT command:**
461
462 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
463
464 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
465
466 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
467
468 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
469
470 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
471
472 == 2.6 LiDAR ToF Measurement ==
473
474 === 2.6.1 Principle of Distance Measurement ===
475
476
477 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.
478
479 [[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"]]
480
481
482 === 2.6.2 Distance Measurement Characteristics ===
483
484
485 With optimization of light path and algorithm, The LiDAR probe has minimized influence from external environment on distance measurement performance. Despite that, the range of distance measurement may still be affected by the environment illumination intensity and the reflectivity of detection object. As shown in 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/1654831774373-275.png?rev=1.1||alt="1654831774373-275.png"]]
488
489
490 (((
491 (% style="color:blue" %)**① **(%%)Represents the detection blind zone of The LiDAR probe, 0-10cm, within which the output data is unreliable.
492 )))
493
494 (((
495 (% style="color:blue" %)**② **(%%)Represents the operating range of The LiDAR probe detecting black target with 10% reflectivity, 0.1-5m.
496 )))
497
498 (((
499 (% style="color:blue" %)**③ **(%%)Represents the operating range of The LiDAR probe detecting white target with 90% reflectivity, 0.1-12m.
500 )))
501
502
503 (((
504 Vertical Coordinates: Represents the radius of light spot for The LiDAR probe at different distances. The diameter of light spot depends on the FOV of The LiDAR probe (the term of FOV generally refers to the smaller value between the receiving angle and the transmitting angle), which is calculated as follows:
505 )))
506
507 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLDS12-LoRaWAN%20LiDAR%20ToF%20Distance%20Sensor%20User%20Manual/WebHome/1654831797521-720.png?rev=1.1||alt="1654831797521-720.png"]]
508
509 (((
510 In the formula above, d is the diameter of light spot; D is detecting range; β is the value of the receiving angle of The LiDAR probe, 3.6°. Correspondence between the diameter of light spot and detecting range is given in Table below.
511 )))
512
513 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LLDS12-LoRaWAN%20LiDAR%20ToF%20Distance%20Sensor%20User%20Manual/WebHome/1654831810009-716.png?rev=1.1||alt="1654831810009-716.png"]]
514
515 (((
516 If the light spot reaches two objects with different distances, as shown in Figure 3, the output distance value will be a value between the actual distance values of the two objects. For a high accuracy requirement in practice, the above situation should be noticed to avoid the measurement error.
517 )))
518
519
520 === 2.6.3 Notice of usage ===
521
522
523 Possible invalid /wrong reading for LiDAR ToF tech:
524
525 * Measure high reflectivity object such as: Mirror, Smooth ceramic tile, static milk surface, will have possible wrong readings.
526 * While there is transparent object such as glass, water drop between the measured object and the LiDAR sensor, the reading might be wrong.
527 * The LiDAR probe is cover by dirty things; the reading might be wrong. In this case, need to clean the probe.
528 * The sensor window is made by Acrylic. Don't touch it with alcohol material. This will destroy the sensor window.
529
530 === 2.6.4 Reflectivity of different objects ===
531
532
533 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:379px" %)
534 |=(% 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
535 |(% style="width:53px" %)1|(% style="width:229px" %)Black foam rubber|(% style="width:93px" %)2.4%
536 |(% style="width:53px" %)2|(% style="width:229px" %)Black fabric|(% style="width:93px" %)3%
537 |(% style="width:53px" %)3|(% style="width:229px" %)Black rubber|(% style="width:93px" %)4%
538 |(% style="width:53px" %)4|(% style="width:229px" %)Coal (different types of coal)|(% style="width:93px" %)4~~8%
539 |(% style="width:53px" %)5|(% style="width:229px" %)Black car paint|(% style="width:93px" %)5%
540 |(% style="width:53px" %)6|(% style="width:229px" %)Black Jam|(% style="width:93px" %)10%
541 |(% style="width:53px" %)7|(% style="width:229px" %)Opaque black plastic|(% style="width:93px" %)14%
542 |(% style="width:53px" %)8|(% style="width:229px" %)Clean rough board|(% style="width:93px" %)20%
543 |(% style="width:53px" %)9|(% style="width:229px" %)Translucent plastic bottle|(% style="width:93px" %)62%
544 |(% style="width:53px" %)10|(% style="width:229px" %)Carton cardboard|(% style="width:93px" %)68%
545 |(% style="width:53px" %)11|(% style="width:229px" %)Clean pine|(% style="width:93px" %)70%
546 |(% style="width:53px" %)12|(% style="width:229px" %)Opaque white plastic|(% style="width:93px" %)87%
547 |(% style="width:53px" %)13|(% style="width:229px" %)White Jam|(% style="width:93px" %)90%
548 |(% style="width:53px" %)14|(% style="width:229px" %)Kodak Standard Whiteboard|(% style="width:93px" %)100%
549 |(% style="width:53px" %)15|(% style="width:229px" %)(((
550 Unpolished white metal surface
551 )))|(% style="width:93px" %)130%
552 |(% style="width:53px" %)16|(% style="width:229px" %)Glossy light metal surface|(% style="width:93px" %)150%
553 |(% style="width:53px" %)17|(% style="width:229px" %)stainless steel|(% style="width:93px" %)200%
554 |(% style="width:53px" %)18|(% style="width:229px" %)Reflector plate, reflective tape|(% style="width:93px" %)>300%
555
556 == 2.7 Set Transmit Interval Time ==
557
558
559 (((
560 Feature: Change NB-IoT End Node Transmit Interval.
561 )))
562
563 (((
564 (% style="color:blue" %)**AT Command: AT+TDC**
565 )))
566
567 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
568 |=(% 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**
569 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
570 30000
571 OK
572 the interval is 30000ms = 30s
573 )))
574 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
575 OK
576 Set transmit interval to 60000ms = 60 seconds
577 )))
578
579 (((
580 (% style="color:blue" %)**Downlink Command: 0x01**
581 )))
582
583 (((
584 Format: Command Code (0x01) followed by 3 bytes time value.
585 )))
586
587 (((
588 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
589 )))
590
591 * (((
592 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
593 )))
594 * (((
595 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds 
596
597
598
599 )))
600
601 == 2.8 Clock logging (Since firmware version v1.2.1) ==
602
603
604 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.
605
606 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.
607
608 * (% style="color:blue" %)**AT Command: AT+CLOCKLOG=a,b,c,d**
609
610 (% style="color:blue" %)**a: **(%%)**0:** Disable Clock logging.  ** 1: **Enable Clock Logging
611
612 (% 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.
613
614 (% style="color:blue" %)**c:**(%%)** **Specify the sampling interval: range **(0 ~~ 255 minutes)**
615
616 (% style="color:blue" %)**d:**(%%)** **How many entries should be uplink on every TDC **(max 32)**
617
618 [[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"]]
619
620 **Example:**
621
622 **AT+CLOCKLOG=1,65535,1,5**
623
624 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).
625
626 (% class="wikigeneratedid" %)
627 [[image:image-20240316100927-1.png||height="495" width="1199"]]
628
629 (% class="wikigeneratedid" %)
630 (% 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.**
631
632
633 == 2.9 Example Query saved historical records ==
634
635
636 * (% style="color:blue" %)**AT Command: AT+CDP**
637
638 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.
639
640 (% class="wikigeneratedid" %)
641 [[image:image-20240316101017-2.png||height="688" width="892"]]
642
643
644
645 == 2.10 Uplink log query ==
646
647
648 * (% style="color:blue" %)**AT Command: AT+GETLOG**
649
650 This command can be used to query upstream logs of data packets.
651
652 [[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"]]
653
654
655
656
657 = 3. Configure LDS12-NB =
658
659 == 3.1 Configure Methods ==
660
661
662 LDS12-NB supports below configure method:
663
664 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
665
666 * 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]].
667
668 == 3.2 AT Commands Set ==
669
670
671 AT+<CMD>?        : Help on <CMD>
672
673 AT+<CMD>         : Run <CMD>
674
675 AT+<CMD>=<value> : Set the value
676
677 AT+<CMD>=?       : Get the value
678
679
680 (% style="color:blue" %)**General Commands**      
681
682 AT                    : Attention       
683
684 AT?  : Short Help     
685
686 ATZ  : MCU Reset    
687
688 AT+TDC  : Application Data Transmission Interval
689
690 AT+CFG  : Print all configurations
691
692 AT+CFGMOD           : Working mode selection
693
694 AT+DEUI  : Get or set the Device ID
695
696 AT+INTMOD            : Set the trigger interrupt mode
697
698 AT+5VT           : Set extend the time of 5V power  
699
700 AT+PRO          : Choose agreement
701
702 AT+RXDL  : Extend the sending and receiving time
703
704 AT+DNSCFG  : Get or Set DNS Server
705
706 AT+GETSENSORVALUE   : Returns the current sensor measurement
707
708 AT+NOUD  : Get or Set the number of data to be uploaded
709
710 AT+CDP     : Read or Clear cached data
711
712 AT+SHTEMP:  Get or Set alarm of temp
713
714 AT+SHHUM:  Get or Set alarm of moisture
715
716 AT+SERVADDR :  Server Address
717
718
719 (% style="color:blue" %)**UDP Management**
720
721 AT+CFM  :  Upload confirmation mode (only valid for UDP)
722
723
724 (% style="color:blue" %)**MQTT Management**
725
726 AT+CLIENT               : Get or Set MQTT client
727
728 AT+UNAME              : Get or Set MQTT Username
729
730 AT+PWD                  : Get or Set MQTT password
731
732 AT+PUBTOPIC  : Get or Set MQTT publish topic
733
734 AT+SUBTOPIC  : Get or Set MQTT subscription topic
735
736
737 (% style="color:blue" %)**Information**          
738
739 AT+FDR  : Factory Data Reset
740
741 AT+PWORD  : Serial Access Password
742
743 AT+LDATA  : Get the last upload data
744
745 AT+CDP  : Read or Clear cached data
746
747
748 = 4. Battery & Power Consumption =
749
750
751 LDS12-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
752
753 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
754
755
756 = 5. Firmware update =
757
758
759 User can change device firmware to::
760
761 * Update with new features.
762
763 * Fix bugs.
764
765 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/updownw8k9moopf/AABbSniCMejVpn_Nc99URE-3a?dl=0]]**
766
767 Methods to Update Firmware:
768
769 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
770
771 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
772
773 = 6. FAQ =
774
775 == 6.1 How can I access t BC660K-GL AT Commands? ==
776
777
778 User can access to BC660K-GL directly and send AT Commands.
779
780 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
781
782
783 = 7. Trouble Shooting =
784
785 == 7.1 Significant error between the output distant value of LiDAR and actual distance ==
786
787
788 (((
789 (% 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.)
790 )))
791
792 (((
793 (% style="color:red" %)**Troubleshooting**(%%): Please avoid use of this product under such circumstance in practice.
794 )))
795
796
797 (((
798 (% style="color:blue" %)**Cause ②**(%%)**: **The IR-pass filters are blocked.
799 )))
800
801 (((
802 (% style="color:red" %)**Troubleshooting**(%%): please use dry dust-free cloth to gently remove the foreign matter.
803 )))
804
805
806 = 8. Order Info =
807
808
809 Part Number: (% style="color:blue" %)**LDS12-NB-XX**
810
811 (% style="color:red" %)**XX**(%%):
812
813 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
814
815 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
816
817 (% 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
818
819
820 = 9. ​Packing Info =
821
822
823 (% style="color:#037691" %)**Package Includes**:
824
825 * LDS12-NB NB-IoT LiDAR ToF Distance sensor x 1
826
827 * External antenna x 1
828
829 (% style="color:#037691" %)**Dimension and weight**:
830
831 * Device Size: 13.0 x 5 x 4.5 cm
832
833 * Device Weight: 150g
834
835 * Package Size / pcs : 14.0 x 8x 5 cm
836
837 * Weight / pcs : 180g
838
839 = 10. Support =
840
841
842 * 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.
843
844 * 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]].
845
846 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0