Show last authors
1 (% style="text-align:center" %)
2 [[image:微信图片_20230822161139.jpg||height="663" width="663"]]
3
4 **Table of Contents:**
5
6 {{toc/}}
7
8
9
10
11
12
13 = 1. Introduction =
14
15 == 1.1 What is SN50v3-NB NB-IoT Sensor Node ==
16
17
18 SN50v3-NB is a Long Range (% style="color:blue" %)**NB-IoT Sensor Node**(%%).  It is designed to facilitate developers to quickly deploy industrial level NB-IoT solutions. It helps users to turn the idea into a practical application and make the Internet of Things a reality. It is easy to program, create and connect your things everywhere.
19
20 SN50v3-NB wireless part is based on NB model allows the user to send data and reach extremely long ranges at low data-rates.It provides ultra-long range spread spectrum communication and high interference immunity whilst minimising current consumption.It targets professional wireless sensor network applications such as irrigation systems, smart metering, smart cities, building automation, and so on.
21
22 SN50v3-NB uses STM32l0x chip from ST, STML0x is the (% style="color:blue" %)**ultra-low-power**(%%) STM32L072xxxx microcontrollers incorporate the connectivity power of the universal serial bus (USB 2.0 crystal-less) with the high-performance ARM® Cortex®-M0+ 32-bit RISC core operating at a 32 MHz frequency, a memory protection unit (MPU), high-speed embedded memories (192 Kbytes of Flash program memory, 6 Kbytes of data EEPROM and 20 Kbytes of RAM) plus an extensive range of enhanced I/Os and peripherals.
23
24 SN50v3-NB is an (% style="color:blue" %)**open source product**(%%), it is based on the STM32Cube HAL drivers and lots of libraries can be found in ST site for rapid development.
25
26 SN50v3-NB supports different uplink methods including (% style="color:blue" %)**MQTT, MQTTs, UDP & TCP**(%%) for different application requirement, and support uplinks to various IoT Servers.
27
28 SN50v3-NB supports (% style="color:blue" %)**BLE configure and OTA update**(%%) which make user easy to use.
29
30 SN50v3-NB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long-term use up to several years.
31
32 SN50v3-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
33
34 [[image:微信图片_20230823093934.png||height="297" width="913"]]
35
36
37 == 1.2 ​Features ==
38
39
40 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
41 * Ultra-low power consumption
42 * Open-source hardware / software
43 * Multiply Sampling and one uplink
44 * Support Bluetooth v5.1 remote configure and update firmware
45 * Uplink via MQTT, MQTTs, TCP, or UDP
46 * Uplink on periodically
47 * Downlink to change configure
48 * 8500mAh Battery for long term use
49 * Nano SIM card slot for NB-IoT SIM
50
51 == 1.3 Specification ==
52
53
54 (% style="color:blue" %)**Common DC Characteristics:**
55
56 * Supply Voltage: 2.5v ~~ 3.6v
57 * Operating Temperature: -40 ~~ 85°C
58
59 (% style="color:blue" %)**I/O Interface:**
60
61 * Battery output (2.6v ~~ 3.6v depends on battery)
62 * +5v controllable output
63 * 3 x Interrupt or Digital IN/OUT pins
64 * 3 x one-wire interfaces
65 * 1 x UART Interface
66 * 1 x I2C Interface
67
68 (% style="color:blue" %)**NB-IoT Spec:**
69
70 (% style="color:#037691" %)**NB-IoT Module: BC660K-GL**
71
72 (% style="color:#037691" %)**Support Bands:**
73
74 * B1 @H-FDD: 2100MHz
75 * B2 @H-FDD: 1900MHz
76 * B3 @H-FDD: 1800MHz
77 * B4 @H-FDD: 2100MHz
78 * B5 @H-FDD: 860MHz
79 * B8 @H-FDD: 900MHz
80 * B12 @H-FDD: 720MHz
81 * B13 @H-FDD: 740MHz
82 * B17 @H-FDD: 730MHz
83 * B18 @H-FDD: 870MHz
84 * B19 @H-FDD: 870MHz
85 * B20 @H-FDD: 790MHz
86 * B25 @H-FDD: 1900MHz
87 * B28 @H-FDD: 750MHz
88 * B66 @H-FDD: 2000MHz
89 * B70 @H-FDD: 2000MHz
90 * B85 @H-FDD: 700MHz
91
92 (% style="color:blue" %)**Battery:**
93
94 * Li/SOCI2 un-chargeable battery
95 * Capacity: 8500mAh
96 * Self Discharge: <1% / Year @ 25°C
97 * Max continuously current: 130mA
98 * Max boost current: 2A, 1 second
99
100 (% style="color:blue" %)**Power Consumption**
101
102 * STOP Mode: 10uA @ 3.3v
103 * Max transmit power: 350mA@3.3v
104
105 == 1.4 Applications ==
106
107
108 * Smart Buildings & Home Automation
109 * Logistics and Supply Chain Management
110 * Smart Metering
111 * Smart Agriculture
112 * Smart Cities
113 * Smart Factory
114
115 == 1.5 Sleep mode and working mode ==
116
117
118 (% 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.
119
120 (% 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.
121
122
123 == 1.6 Button & LEDs ==
124
125
126 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
127
128
129 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
130 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width:226px;background-color:#4F81BD;color:white" %)**Action**
131 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
132 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
133 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
134 )))
135 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
136 (% 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.
137 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
138 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.
139 )))
140 |(% 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.
141
142 (% 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.**
143
144
145 == 1.7 BLE connection ==
146
147
148 SN50v3-NB support BLE remote configure and firmware update.
149
150
151 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:
152
153 * Press button to send an uplink
154 * Press button to active device.
155 * Device Power on or reset.
156
157 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
158
159
160 == 1.8 Pin Definitions , Switch & SIM Direction ==
161
162
163 SN50v3-NB use the mother board which as below.
164
165 [[image:SN50v3-NB.png||height="411" width="727"]]
166
167
168 === 1.8.1 Jumper JP2 ===
169
170
171 Power on Device when put this jumper.
172
173
174 === 1.8.2 BOOT MODE / SW1 ===
175
176
177 **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.
178
179 **2)** (% style="color:blue" %)**Flash**(%%): work mode, device starts to work and send out console output for further debug
180
181
182 === 1.8.3 Reset Button ===
183
184
185 Press to reboot the device.
186
187
188 === 1.8.4 SIM Card Direction ===
189
190 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]].
191
192 (% style="display:none" %)
193
194
195 = 2. Use SN50v3-NB to communicate with IoT Server =
196
197 == 2.1 Send data to IoT server via NB-IoT network ==
198
199
200 The SN50v3-NB is equipped with a NB-IoT module, the pre-loaded firmware in SN50v3-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 SN50v3-NB.
201
202 Below shows the network structure:
203
204 [[image:微信图片_20230823093934.png||height="295" width="907"]]
205
206
207 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1D**(%%) version of SN50v3-NB.
208
209
210 (% 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 SN50v3-NB send data to IoT server.
211
212 * 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]].
213
214 * 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]]. 
215
216 Below shows result of different server as a glance.
217
218 (% border="1" cellspacing="3" style="width:515px" %)
219 |(% 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**
220 |(% 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" %)(((
221 [[image:image-20240506133928-1.png]]
222 )))|(% style="width:170px" %)
223 |(% 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" %)(((
224 [[image:image-20240506141253-3.png]]
225 )))|(% style="width:170px" %)
226 |(% 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" %)[[image:image-20240506141610-4.png]]|(% style="width:170px" %)
227 |(% 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" %)
228 |(% 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" %)
229 |(% 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" %)(((
230 [[image:image-20240506134509-2.png]]
231 )))|(% style="width:170px" %)
232 |(% 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" %)(((
233 (% style="text-align:center" %)
234 [[image:image-20230819113244-11.png||height="141" width="367"]]
235 )))|(% style="width:170px" %)
236
237 (% 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 SN50v3-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]].
238
239
240 == 2.2  Working Mode & Uplink Payload ==
241
242
243 (((
244 SN50v3-NB has different working mode for the connections of different type of sensors. This section describes these modes. User can use the AT Command (% style="color:blue" %)**AT+CFGMOD**(%%) to set SN50v3-NB to different working modes.
245 )))
246
247 (((
248 **For example:**
249 )))
250
251 (((
252 (% style="color:blue" %)**AT+CFGMOD=2     ** (%%) ~/~/** **will set the SN50v3-NB to work in MOD=2 distance mode which target to measure distance via Ultrasonic Sensor.
253 )))
254
255
256 (((
257 The uplink payloads are composed in ASCII String. For example:
258 )))
259
260 (((
261 0a cd 00 ed 0a cc 00 00 ef 02 d2 1d (total 24 ASCII Chars). Representative the actually payload:
262 )))
263
264 (((
265 0x 0a cd 00 ed 0a cc 00 00 ef 02 d2 1d Total 12 bytes
266 )))
267
268
269 (((
270 (% style="color:red" %)**NOTE:**
271 )))
272
273 (((
274 (% style="color:red" %)**1. All modes share the same Payload Explanation from [[HERE>>||anchor="H2.4A0PayloadExplanationandSensorInterface"]].
275 2. By default, the device will send an uplink message every 1 hour.**
276 )))
277
278
279 === 2.2.1 CFGMOD~=1 (Default Mode) ===
280
281
282 (((
283 In this mode, the uplink payload usually contains 27 bytes. ((% style="color:red" %)Note: Time stamp field are added since firmware version v1.2.0)
284 )))
285
286 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:517px" %)
287 |=(% style="width: 55px;background-color:#4F81BD;color:white" %)(((
288 **Size(bytes)**
289 )))|=(% style="width: 35px;background-color:#4F81BD;color:white" %)8|=(% style="width: 24px;background-color:#4F81BD;color:white" %)2|=(% style="width: 24px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 40px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 58px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 36px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 45px;background-color:#4F81BD;color:white" %)**4**
290 |(% style="width:46px" %)Value|(% style="width:46px" %)Device ID|(% style="width:46px" %)Ver|(% style="width:46px" %)BAT|(% style="width:120px" %)Signal Strength|(% style="width:55px" %)(((
291 (((
292 MOD
293 )))
294
295 (((
296 0x01
297 )))
298 )))|(% style="width:60px" %)(((
299 Temperature (DS18B20)(PC13)
300 )))|(% style="width:159px" %)Digital in(PB15) & Interrupt|(% style="width:49px" %)ADC
301 (PA4)|(% style="width:104px" %)(((
302 (((
303 Temperature
304 )))
305
306 (((
307 by
308 )))
309
310 (((
311 SHT20/SHT31
312 )))
313 )))|(% style="width:112px" %)(((
314 (((
315 Humidity
316 )))
317
318 (((
319 by
320 )))
321
322 (((
323 SHT20/SHT31
324 )))
325 )))|(% style="width:94px" %)Timestamp
326
327 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
328
329 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:512px" %)
330 |(% style="width:115px" %)**Frame header**|(% style="width:118px" %)**Frame data(1)**|(% style="width:116px" %)**Frame data(2)**|(% style="width:39px" %)**F…**|(% style="width:117px" %)**Frame data(X)**
331
332 (% style="color:red" %)**NOTE:**
333
334 (% style="color:red" %)**1. Only up to 10 sets of latest data will be cached.**
335
336 (% style="color:red" %)**2. Theoretically, the maximum upload bytes are 215.**
337
338
339 (((
340 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
341 )))
342
343 [[image:image-20230908113118-1.png||height="627" width="877"]]
344
345
346 (((
347 The payload is ASCII string, representative same HEX: (% style="background-color:yellow" %)**0x f866207058378443 0464 0dee 16 01 00f7 00 0001 00fc 0232 64fa7491**
348
349 **where:**
350 )))
351
352 * (% style="color:#037691" %)**Device ID:**(%%) f866207058378443 = 866207058378443
353
354 * (% style="color:#037691" %)**Version:**(%%) 0x04:dSN50v3-NB,0x64=100=1.0.0
355
356 * (% style="color:#037691" %)**BAT:**(%%)  0x0dee = 3566 mV = 3.566V
357
358 * (% style="color:#037691" %)**Singal:**(%%)  0x16 = 22
359
360 * (% style="color:#037691" %)**Model:** (%%)0x01 = 1
361
362 * (% style="color:#037691" %)**Temperature by DS18b20:**(%%) 0x00f7 = 247/10=24.7
363
364 * (% style="color:#037691" %)**Interrupt:**(%%) 0x00 = 0
365
366 * (% style="color:#037691" %)**ADC:**(%%) 0x0001 =1= 1.00mv
367
368 * (% style="color:#037691" %)**Temperature by SHT20/SHT31:**(%%) 0x00fc = 252 = 25.2 °C
369
370 * (% style="color:#037691" %)**Humidity by SHT20/SHT31:**(%%) 0x0232 = 562 = 56.2 %rh
371
372 * (% style="color:#037691" %)**Timestamp:**(%%) 64fa7491 =1694135441=2023-09-08 09:10:41
373
374 (% style="color:blue" %)**Connection mode of I2C sensor and DS18B20 temperature sensor:**
375
376 [[image:image-20240312185720-1.jpeg||height="551" width="883"]]
377 (% style="display:none" %) (%%)
378
379 === 2.2.2 CFGMOD~=2 (Distance Mode) ===
380
381
382 (((
383 This mode is target to measure the distance. Total 25 bytes, ((% style="color:red" %)**Note: Time stamp field are added since firmware version v1.2.0**(%%))
384 )))
385
386 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:517px" %)
387 |=(% style="width: 56px;background-color:#4F81BD;color:white" %)(((
388 **Size(bytes)**
389 )))|=(% style="width: 36px;background-color:#4F81BD;color:white" %)8|=(% style="width: 31px;background-color:#4F81BD;color:white" %)2|=(% style="width: 31px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 41px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 31px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 59px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 51px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 31px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 101px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 49px;background-color:#4F81BD;color:white" %)**4**
390 |(% style="width:46px" %)Value|(% style="width:46px" %)Device ID|(% style="width:46px" %)Ver|(% style="width:46px" %)BAT|(% style="width:120px" %)Signal Strength|(% style="width:55px" %)(((
391 (((
392 MOD
393 )))
394
395 (((
396 0x02
397 )))
398 )))|(% style="width:60px" %)(((
399 Temperature (DS18B20)(PC13)
400 )))|(% style="width:159px" %)Digital in(PB15) & Interrupt|(% style="width:49px" %)ADC
401 (PA4)|(% style="width:104px" %)(((
402 (((
403 (((
404 Distance measure by:
405 )))
406
407 (((
408 1) LIDAR-Lite V3HP
409 )))
410
411 (((
412 Or
413 )))
414
415 (((
416 2) Ultrasonic Sensor
417 )))
418 )))
419 )))|(% style="width:94px" %)Timestamp
420
421 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
422
423 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:512px" %)
424 |(% style="width:115px" %)**Frame header**|(% style="width:118px" %)**Frame data(1)**|(% style="width:116px" %)**Frame data(2)**|(% style="width:39px" %)**F…**|(% style="width:117px" %)**Frame data(X)**
425
426 (((
427 (% style="color:red" %)**NOTE:**
428 )))
429
430 (((
431 (% style="color:red" %)**1.    Only up to 10 sets of latest data will be cached.**
432 )))
433
434 (((
435 (% style="color:red" %)**2.    Theoretically, the maximum upload bytes are 193.**
436 )))
437
438
439 (((
440 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
441 )))
442
443 [[image:image-20230915113054-1.png||height="562" width="815"]]
444
445
446 So the payload is (% style="background-color:yellow" %)**0xf868411056754138 0078 0ca9 11 02 010b 00 0ca8 0158 60dacc87 **
447
448 **where:**
449
450 * (% style="color:#037691" %)**Device ID:**(%%) 0xf868411056754138 = 868411056754138
451
452 * (% style="color:#037691" %)**Version:**(%%)  0x0078=120=1.2.0
453
454 * (% style="color:#037691" %)**BAT:**(%%)  0x0ca9 = 3241mV = 3.241 V
455
456 * (% style="color:#037691" %)**Singal:**(%%)  0x11 = 17
457
458 * (% style="color:#037691" %)**Model:** (%%)0x02 = 2
459
460 * (% style="color:#037691" %)**Temperature by DS18b20:**(%%) 0x010b= 267 = 26.7  °C
461
462 * (% style="color:#037691" %)**Interrupt:**(%%) 0x00 = 0
463
464 * (% style="color:#037691" %)**ADC:**(%%) 0x0ca8 = 3240 mv
465
466 * (% style="color:#037691" %)**Distance by LIDAR-Lite V3HP/Ultrasonic Sensor:**(%%) 0x0158 = 344 cm
467
468 * (% style="color:#037691" %)**Timestamp:** (%%)0x60dacc87 = 1,624,951,943 = 2021-06-29 15:32:23
469
470 (% style="display:none" %) (%%)
471
472 ==== (% style="color:blue" %)**Connection of LIDAR-Lite V3HP:**(%%) ====
473
474
475 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20230512173758-5.png?width=712&height=563&rev=1.1||alt="image-20230512173758-5.png"]]
476
477
478 (% style="color:blue" %)**Connection to Ultrasonic Sensor:**
479
480 (% style="color:red" %)**Need to remove R1 and R2 resistors to get low power,otherwise there will be 240uA standby current.**
481
482 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20230512173903-6.png?width=715&height=596&rev=1.1||alt="image-20230512173903-6.png"]]
483
484
485 === 2.2.3 CFGMOD~=3 (3 ADC + I2C) ===
486
487
488 (((
489 This mode has total 29 bytes. Include 3 x ADC + 1x I2C, ((% style="color:red" %)**Note: Time stamp field are added since firmware version v1.2.0**(%%))
490 )))
491
492 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:517px" %)
493 |=(% style="width: 55px;background-color:#4F81BD;color:white" %)(((
494 **Size(bytes)**
495 )))|=(% style="width: 35px;background-color:#4F81BD;color:white" %)8|=(% style="width: 24px;background-color:#4F81BD;color:white" %)2|=(% style="width: 24px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 40px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 28px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 61px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 61px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)2|=(% style="width: 49px;background-color:#4F81BD;color:white" %)**4**
496 |(% style="width:46px" %)Value|(% style="width:46px" %)Device ID|(% style="width:46px" %)Ver|(% style="width:46px" %)BAT|(% style="width:120px" %)Signal Strength|(% style="width:55px" %)(((
497 (((
498 MOD
499 )))
500
501 (((
502 0x03
503 )))
504 )))|(% style="width:60px" %)(((
505 ADC1
506 (PA4)
507 )))|(% style="width:159px" %)Digital in(PB15) & Interrupt|(% style="width:49px" %)ADC2
508 (PA5)|(% style="width:104px" %)(((
509 (((
510 Temperature
511 )))
512
513 (((
514 by
515 )))
516
517 (((
518 SHT20/SHT31
519 )))
520 )))|(% style="width:112px" %)(((
521 (((
522 Humidity
523 )))
524
525 (((
526 by
527 )))
528
529 (((
530 SHT20/SHT31
531 )))
532 )))|(% style="width:112px" %)ADC3
533 (PA8)|(% style="width:94px" %)Timestamp
534
535 ADC1 uses pin PA4 to measure
536
537 ADC2 uses pin PA5 to measure
538
539 ADC3 uses pin PA8 to measure
540
541 (Suitable for motherboard version: LSN50 v3.1)
542
543
544 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
545
546
547 (% border="1" style="background-color:#f2f2f2; width:510px" %)
548 |(% style="width:114px" %)**Frame header**|(% style="width:119px" %)**Frame data(1)**|(% style="width:118px" %)**Frame data(2)**|(% style="width:39px" %)**F…**|(% style="width:117px" %)**Frame data(X)**
549
550 (% style="color:red" %)**NOTE:**
551
552 (% style="color:red" %)**1.    Only up to 10 sets of latest data will be cached.**
553
554 (% style="color:red" %)**2.    Theoretically, the maximum upload bytes are 226.**
555
556
557 (((
558 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
559 )))
560
561 [[image:image-20230915113214-2.png||height="655" width="947"]]
562
563
564 So the payload is (% style="background-color:yellow" %)**0x f868411056754138 0078 0cf0 12 03 0cbc 00 0cef 010a 024b 0cef 60dbc494**
565
566 **where:**
567
568 * (% style="color:#037691" %)**Device ID:**(%%) 0xf868411056754138 = 868411056754138
569
570 * (% style="color:#037691" %)**Version:**(%%)  0x0078=120=1.2.0
571
572 * (% style="color:#037691" %)**BAT:**(%%)  0x0cf0 = 3312 mV = 3.312 V
573
574 * (% style="color:#037691" %)**Singal:**(%%)  0x12 = 18
575
576 * (% style="color:#037691" %)**Model:**(%%) 0x03 = 3
577
578 * (% style="color:#037691" %)**ADC1:**  (%%)0x0cbc= 3260mV
579
580 * (% style="color:#037691" %)**Interrupt:**(%%) 0x00 = 0
581
582 * (% style="color:#037691" %)**ADC2:**(%%) 0x0cef =3311 mv
583
584 * (% style="color:#037691" %)**Temperature by SHT20/SHT31:**(%%) 0x010a = 266 = 26.6 °C
585
586 * (% style="color:#037691" %)**Humidity by SHT20/SHT31:**(%%) 0x024b =587 = 58.7 %rh
587
588 * (% style="color:#037691" %)**ADC3:**(%%) 0x0cef = 3311 mv
589
590 * (% style="color:#037691" %)**Timestamp:** (%%)0x60dbc494 = 1,625,015,444= 2021-06-30 09:10:44
591
592 (% style="display:none" %) (%%)
593
594
595 === 2.2.4 CFGMOD~=4 (3 x DS18B20) ===
596
597
598 (((
599 Hardware connection is as below.
600 )))
601
602 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20230513134006-1.png?width=736&height=559&rev=1.1||alt="image-20230513134006-1.png"]]
603
604
605 This mode has total 27 bytes. ((% style="color:red" %)**Note: Time stamp field are added since firmware version v1.2.0**(%%)) As shown below:
606
607 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:517px" %)
608 |=(% style="width: 56px;background-color:#4F81BD;color:white" %)(((
609 **Size(bytes)**
610 )))|=(% style="width: 35px;background-color:#4F81BD;color:white" %)8|=(% style="width: 24px;background-color:#4F81BD;color:white" %)2|=(% style="width: 24px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 40px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 58px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)2|=(% style="width: 48px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 61px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 61px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**4**
611 |(% style="width:46px" %)Value|(% style="width:46px" %)Device ID|(% style="width:46px" %)Ver|(% style="width:46px" %)BAT|(% style="width:120px" %)Signal Strength|(% style="width:55px" %)(((
612 (((
613 MOD
614 )))
615
616 (((
617 0x04
618 )))
619 )))|(% style="width:60px" %)(((
620 Temperature1 (DS18B20) (PC13)
621 )))|(% style="width:60px" %)ADC|(% style="width:159px" %)Digital in & Interrupt|(% style="width:104px" %)(((
622 (((
623 Temperature2 (DS18B20) (PA9)
624 )))
625 )))|(% style="width:112px" %)(((
626 (((
627 Temperature3 (DS18B20) (PA10)
628 )))
629 )))|(% style="width:94px" %)Timestamp
630
631 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
632
633 (% border="1" style="background-color:#f2f2f2; width:510px" %)
634 |(% style="width:114px" %)**Frame header**|(% style="width:119px" %)**Frame data(1)**|(% style="width:118px" %)**Frame data(2)**|(% style="width:39px" %)**F…**|(% style="width:117px" %)**Frame data(X)**
635
636 (% style="color:red" %)**NOTE:**
637
638 (% style="color:red" %)**1.    Only up to 10 sets of latest data will be cached.**
639
640 (% style="color:red" %)**2.    Theoretically, the maximum upload bytes is 215.**
641
642
643 (((
644 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
645 )))
646
647
648 [[image:image-20230915113247-3.png||height="679" width="988"]]
649
650
651 So the payload is (% style="background-color:yellow" %)**0x f868411056754138 0078 0cdf 15 04 010a 0cde 00 00fb 0100 60dbcb3f  **
652
653 **where:**
654
655 * (% style="color:#037691" %)**Device ID:**(%%) 0xf868411056754138 = 868411056754138
656
657 * (% style="color:#037691" %)**Version:** (%%)0x0078=120=1.2.0
658
659 * (% style="color:#037691" %)**BAT:**      (%%)0x0cdf = 3295 mV = 3.295 V
660
661 * (% style="color:#037691" %)**Singal:**(%%)  0x15 = 21
662
663 * (% style="color:#037691" %)**Model:**(%%) 0x04 = 4
664
665 * (% style="color:#037691" %)**Temperature1 by DS18b20:**(%%) 0x010a = 226 = 22.6 °C
666
667 * (% style="color:#037691" %)**ADC:** (%%)0x0cde = 3294 mv
668
669 * (% style="color:#037691" %)**Interrupt:**(%%) 0x00 = 0
670
671 * (% style="color:#037691" %)**Temperature2 by DS18b20:** (%%)0x00fb = 251 = 25.1°C
672
673 * (% style="color:#037691" %)**Temperature3 by DS18b20:**(%%) 0x0100  = 256 = 25.6 °C
674
675 * (% style="color:#037691" %)**Timestamp:**(%%)** **0x60dbcb3f = 1,625,017,151= 2021-06-30 09:39:11
676
677 (% style="display:none" %) (%%)
678
679
680 === 2.2.5 CFGMOD~=5 (Weight Measurement by HX711) ===
681
682
683 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20230512164658-2.png?width=729&height=532&rev=1.1||alt="image-20230512164658-2.png"]]
684
685
686 (% style="color:red" %)**Notes about hardware connection:**
687
688 1. Don't connect the HX711 module VCC to SN50v3-NB 3.3v VCC, in this case, the SN50v3-NB will always power on HX711 and the battery will run out soon.
689 1. HX711 support 5v VCC, but while connect the SN50v3-NB's +5V to HX711 VCC, the value from HX711 is not stable.
690 1. Connect SN50v3-NB +5V to HX711 VCC via a LDO module is stable.
691
692 (% style="color:red" %)**Each HX711 need to be calibrated before used. User need to do below two steps:**
693
694 1. Zero calibration. Don't put anything on load cell and run (% style="color:blue" %)**AT+WEIGRE**(%%) to calibrate to Zero gram.
695 1. Adjust calibration factor (default value 400): Put a known weight thing on load cell and run (% style="color:blue" %)**AT+WEIGAP**(%%) to adjust the Calibration Factor.
696
697 **For example:**
698
699 (% style="color:blue" %)**AT+WEIGAP =403.0**
700
701 Response:  Weight is 401 g
702
703
704 Check the response of this command and adjust the value to match the real value for thing.
705
706 This mode has total 25 bytes. ((% style="color:red" %)**Note: Time stamp field are added since firmware version v1.2.0**(%%)). As shown below:
707
708 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:517px" %)
709 |=(% style="width: 55px;background-color:#4F81BD;color:white" %)(((
710 **Size(bytes)**
711 )))|=(% style="width: 45px;background-color:#4F81BD;color:white" %)8|=(% style="width: 29px;background-color:#4F81BD;color:white" %)2|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 65px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 58px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 85px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 40px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**4**
712 |(% style="width:46px" %)Value|(% style="width:46px" %)Device ID|(% style="width:46px" %)Ver|(% style="width:46px" %)BAT|(% style="width:120px" %)Signal Strength|(% style="width:55px" %)(((
713 (((
714 MOD
715 )))
716
717 (((
718 0x05
719 )))
720 )))|(% style="width:60px" %)(((
721 Temperature (DS18B20)
722 )))|(% style="width:60px" %)ADC|(% style="width:159px" %)Digital in & Interrupt|(% style="width:104px" %)(((
723 (((
724 Weight
725 )))
726 )))|(% style="width:94px" %)Timestamp
727
728 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
729
730
731 (% border="1" style="background-color:#f2f2f2; width:510px" %)
732 |(% style="width:114px" %)**Frame header**|(% style="width:119px" %)**Frame data(1)**|(% style="width:118px" %)**Frame data(2)**|(% style="width:39px" %)**F…**|(% style="width:117px" %)**Frame data(X)**
733
734 (% style="color:red" %)**NOTE:**
735
736 (% style="color:red" %)**1.    Only up to 10 sets of latest data will be cached.**
737
738 (% style="color:red" %)**2.    Theoretically, the maximum upload bytes are 193.**
739
740
741 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
742
743 [[image:image-20230915143611-1.png||height="673" width="979"]]
744
745
746 So the payload is (% style="background-color:yellow" %)**0x f868411056754138 0078 0c94 14 05 0137 0c93 00 003a 60dbe59e**
747
748 **where:**
749
750 * (% style="color:#037691" %)**Device ID:** (%%)0xf868411056754138 = 868411056754138
751
752 * (% style="color:#037691" %)**Version:**(%%)  0x0078=120=1.2.0
753
754 * (% style="color:#037691" %)**BAT:**(%%)**      **0x0c94 = 3220 mV = 3.220 V
755
756 * (% style="color:#037691" %)**Singal:**  (%%)0x14 = 20
757
758 * (% style="color:#037691" %)**Model:** (%%)0x05 = 5
759
760 * (% style="color:#037691" %)**Temperature by DS18b20:**(%%) 0x0137 = 311 = 31.1 °C
761
762 * (% style="color:#037691" %)**ADC:** (%%)0x0c93 = 3219 mv
763
764 * (% style="color:#037691" %)**Interrupt:**(%%) 0x00 = 0
765
766 * (% style="color:#037691" %)**Weigt by HX711:** (%%)0x003a  = 58 g
767
768 * (% style="color:#037691" %)**Timestamp:**(%%) 0x60dbe59e = 1,625,023,902= 2021-06-30 11:31:42
769
770 (% style="display:none" %) (%%)
771
772 === 2.2.6 CFGMOD~=6 (Counting mode) ===
773
774
775 (((
776 In this mode, uplink payload includes in total 22 bytes, ((% style="color:red" %)**Note: Time stamp field are added since firmware version v1.2.0**(%%))
777 )))
778
779 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:400px" %)
780 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
781 **Size(bytes)**
782 )))|=(% style="width: 45px;background-color:#4F81BD;color:white" %)8|=(% style="width: 30px;background-color:#4F81BD;color:white" %)2|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 70px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)4|=(% style="width: 56px;background-color:#4F81BD;color:white" %)**4**
783 |(% style="width:46px" %)Value|(% style="width:46px" %)Device ID|(% style="width:46px" %)Ver|(% style="width:46px" %)BAT|(% style="width:120px" %)Signal Strength|(% style="width:55px" %)(((
784 (((
785 MOD 0x06
786 )))
787 )))|(% style="width:60px" %)Pulse count|(% style="width:94px" %)Timestamp
788
789 If the cache upload mechanism is turned on, you will receive the payload shown in the figure below.
790
791
792 (% border="1" style="background-color:#f2f2f2; width:510px" %)
793 |(% style="width:114px" %)**Frame header**|(% style="width:119px" %)**Frame data(1)**|(% style="width:118px" %)**Frame data(2)**|(% style="width:39px" %)**F…**|(% style="width:117px" %)**Frame data(X)**
794
795 (% style="color:red" %)**NOTE:**
796
797 (% style="color:red" %)**1.    Only up to 10 sets of latest data will be cached.**
798
799 (% style="color:red" %)**2.    Theoretically, the maximum upload bytes are 160.**
800
801
802 (((
803 If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
804 )))
805
806 [[image:image-20230915145858-2.png||height="651" width="942"]]
807
808
809 (((
810 The payload is ASCII string, representative same HEX: (% style="background-color:yellow" %)**0x f868411056754138 0078 0cc7 14 06 00000002 60dc03e5**
811
812 **~ where:**
813 )))
814
815 * (% style="color:#037691" %)**Device ID:** (%%)0xf868411056754138 = 868411056754138
816
817 * (% style="color:#037691" %)**Version:** (%%)0x0078=120=1.2.0
818
819 * (% style="color:#037691" %)**BAT:**(%%)  0x0cc7 =3271mV =3.271V
820
821 * (% style="color:#037691" %)**Singal:**(%%)  0x14 = 20
822
823 * (% style="color:#037691" %)**Model:**(%%) 0x06 = 6
824
825 * (% style="color:#037691" %)**Pulse count:**(%%)  0x00000002= 2
826
827 * (% style="color:#037691" %)**Timestamp:**(%%)  0x60dc03e5 = 1,625,031,653= 2021-06-30 13:40:53
828
829 (% style="display:none" %) (%%)
830
831
832 == 2.3 ​Payload Types ==
833
834
835 To meet different server requirement, SN50v3-NB supports different payload type.
836
837 **Includes:**
838
839 * [[General JSON format payload>>||anchor="H2.3.1GeneralJsonFormat28Type3D529"]]. (Type=5)
840
841 * [[HEX format Payload>>||anchor="H2.3.2HEXformatPayload28Type3D029"]]. (Type=0)
842
843 * [[ThingSpeak Format>>||anchor="H2.3.4ThingSpeakPayload28Type3D129"]]. (Type=1)
844
845 * [[ThingsBoard Format>>||anchor="H2.3.3ThingsBoardPayload28Type3D329"]]. (Type=3)
846
847 User can specify the payload type when choose the connection protocol. Example:
848
849 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
850
851 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
852
853 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
854
855
856 === 2.3.1 General Json Format(Type~=5) ===
857
858
859 This is the General Json Format. As below:
860
861 (% style="color:#4472c4" %)**{"IMEI":"866207058378443","Model":"SN50V3-NB","mod":1,"battery":3.56,"signal":25,"DS18B20_Temp":-409.5,"digital in":0,"adc1":1,"temperature":0.0,"humidity":0.0,"1":{0.0,0.0,1,-409.5,2023/10/23 05:57:02},"2":{0.0,0.0,1,-409.5,2023/10/23 03:57:12},"3":{0.0,0.0,1,-409.5,2023/10/23 03:42:12},"4":{0.0,64.1,0,-409.5,2023/10/20 09:55:08},"5":{0.0,64.1,0,-409.5,2023/10/20 09:40:08},"6":{0.0,64.1,0,-409.5,2023/10/20 08:26:14},"7":{0.0,64.1,0,-409.5,2023/10/20 08:11:14},"8":{0.0,64.1,0,-409.5,2023/10/20 07:56:14}}**
862
863
864 (% style="color:red" %)**Notice, from above payload:**
865
866 * Temperature , Humidity , Battery & Signal are the value at uplink time.
867
868 * 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): Temperature, Humidity, Sampling time.
869
870 === 2.3.2 HEX format Payload(Type~=0) ===
871
872
873 This is the HEX Format. As below:
874
875 (% style="color:#4472c4" %)**f86620705837844304640ddc1501Ffff0000010000000065360ee60001f0010000000065360b2e0001f001000000006535ef180001f001000000006535eb940000f0010000028165324e7c0000f0010000028165324af80000f00100000281653239a60000f00100000281653236220000f001000002816532329e**
876
877 [[image:image-20230915150651-3.png||height="185" width="1087"]]
878
879
880 (% style="color:blue" %)**Version:**
881
882 These bytes include the hardware and software version.
883
884 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x00 for SN50v3
885
886 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x64=100, means firmware version 1.0.0
887
888
889 (% style="color:blue" %)**BAT (Battery Info):**
890
891 Ex1: 0x0CBA = 3258mV
892
893
894 (% style="color:blue" %)**Signal Strength:**
895
896 NB-IoT Network signal Strength.
897
898 **Ex1: 0x16 = 22**
899
900 **0**  -113dBm or less
901
902 **1**  -111dBm
903
904 **2...30** -109dBm... -53dBm
905
906 **31**   -51dBm or greater
907
908 **99**    Not known or not detectable
909
910
911 (% style="color:blue" %)**Temperature: **
912
913 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
914
915 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
916
917 (FF3F & 8000: Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
918
919
920 (% style="color:blue" %)**Humidity:   **
921
922 Read:0295(H)=661(D)    Value:  661 / 10=66.1, So 66.1%
923
924
925 (% style="color:blue" %)**TimeStamp:   **
926
927 Unit TimeStamp Example: 64d49439(H) = 1691653177(D)
928
929 Put the decimal value into this link(https:~/~/www.epochconverter.com/) to get the time.
930
931
932 === 2.3.3 ThingsBoard Payload(Type~=3) ===
933
934
935 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
936
937 (% style="color:#4472c4" %)**{"IMEI": "866207058378443", "Model": "SN50V3-NB","mod": 1,"battery": 3.56,"signal": 20,"DS18B20_Temp": 25.9,"digital in": 0,"adc1": 1,"temperature": 0.0,}**
938
939 [[image:image-20231023144508-2.png||height="495" width="920"]]
940
941
942 === 2.3.4 ThingSpeak Payload(Type~=1) ===
943
944
945 This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~~6 are:
946
947 adc1,Battery,Signal,DS18B20_Temp,Temperature&Humidity. This payload type only valid for ThingSpeak Platform.
948
949 As below:
950
951 (% style="color:#4472c4" %)**field1=adc_mV value&field2=BAT value&field3=Signal value3&field4=DS18B20_Temp value&field5=Temperature value&field6=Humidity value**
952
953 [[image:image-20231023154035-4.png]]
954
955
956 == 2.4 Test Uplink and Change Update Interval ==
957
958
959 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%) & AT+NOUD=8
960
961 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
962
963 (% style="color:#037691" %)**AT+TDC=600 ** (%%) ~/~/ Set Update Interval to 600s
964
965 User can also push the button for more than 1 seconds to activate an uplink.
966
967
968 == 2.5 Multi-Samplings and One uplink ==
969
970 (% style="color:red" %)Notice: The AT+NOUD feature is upgraded to Clock Logging, please refer [[Clock Logging Feature>>||anchor="H2.9Clocklogging28Sincefirmwareversionv1.2.129"]]
971
972 To save battery life, SN50v3-NB will sample temperature & humidity 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:
973
974 * (% 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)
975
976 * (% 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.
977
978 The diagram below explains the relationship between TR, NOUD, and TDC more clearly:
979
980 [[image:1692424376354-959.png]]
981
982
983 == 2.6 Trggier an uplink by external interrupt ==
984
985
986 SN50v3-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
987
988 (% style="color:blue" %)**AT command:**
989
990 * (% style="color:#037691" %)**AT+INTMOD **(%%) ~/~/ Set the trigger interrupt mode
991
992 * (% style="color:#037691" %)**AT+INTMOD=0 **(%%) ~/~/ Disable Interrupt
993
994 * (% style="color:#037691" %)**AT+INTMOD=1 **(%%) ~/~/ Trigger by rising and falling edge
995
996 * (% style="color:#037691" %)**AT+INTMOD=2 **(%%) ~/~/ Trigger by falling edge
997
998 * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
999
1000 == 2.7 +5V Output ==
1001
1002
1003 Control the output duration 5V . Before each sampling, device will
1004
1005 ~1. first enable the power output to external sensor,
1006
1007 2. keep it on as per duration, read sensor value and construct uplink payload
1008
1009 3. final, close the power output.
1010
1011 (% style="color:blue" %)**AT command:**(%%)** AT+5VT**
1012
1013 (% border="1" cellspacing="3" style="width:442px" %)
1014 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 204px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 84px;background-color:#4F81BD;color:white" %)**Response**
1015 |(% style="width:154px" %)AT+5VT=?|(% style="width:201px" %)Show 5V open time.|(% style="width:84px" %)(((
1016 0(default)
1017 OK
1018 )))
1019 |(% style="width:154px" %)AT+5VT=1000|(% style="width:201px" %)(((
1020 Close after a delay of 1000 milliseconds.
1021 )))|(% style="width:84px" %)OK
1022
1023 == 2.8 Analogue Digital Converter (ADC) ==
1024
1025
1026 The ADC pins in SN50V3-NB can measure range from 0~~Vbat, it use reference voltage from STM32. If user need to measure a voltage > VBat, please use resistors to divide this voltage to lower than VBat, otherwise, it may destroy the ADC pin.
1027
1028 (% style="color:red" %)**Note:**(%%)** minimum VBat is 2.5v, when batrrey lower than this value. Device won't be able to send LoRa Uplink.**
1029
1030 The ADC monitors the voltage on the PA0 line, in mV.
1031
1032 Ex: 0x021F = 543mv,
1033
1034 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220628150112-1.png?width=285&height=241&rev=1.1||alt="图片-20220628150112-1.png"]]
1035
1036 (% style="color:red" %)**Note: If the ADC type sensor needs to be powered by SN50_v3, it is recommended to use +5V to control its switch.Only sensors with low power consumption can be powered with VDD.**
1037
1038 The position of PA5 on the hardware after **SN50 v3.3** is changed to the position shown in the figure below, and the collected voltage becomes one-sixth of the original.
1039
1040 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20230811113449-1.png?width=608&height=370&rev=1.1||alt="image-20230811113449-1.png" height="370" width="608"]]
1041
1042
1043 == 2.9 Clock logging (Since firmware version v1.2.1) ==
1044
1045
1046 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.
1047
1048 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.
1049
1050 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CLOCKLOG=a,b,c,d(%%)**
1051
1052 (% style="color:#037691" %)**a: **(%%)**0:** Disable Clock logging.  ** 1: **Enable Clock Logging
1053
1054 (% style="color:#037691" %)**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.
1055
1056 (% style="color:#037691" %)**c:**(%%)** **Specify the sampling interval: range **(0 ~~ 255 minutes)**
1057
1058 (% style="color:#037691" %)**d: **(%%)How many entries should be uplink on every TDC **(max 32)**
1059
1060 [[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"]]
1061
1062 **Example:**
1063
1064 **AT+CLOCKLOG=1,65535,1,5**
1065
1066 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).
1067
1068 [[image:image-20240316170545-1.png||height="487" width="1177"]]
1069
1070 (% 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.**
1071
1072
1073 == 2.10 Example Query saved historical records ==
1074
1075
1076 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+CDP(%%)**
1077
1078 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.
1079
1080 [[image:image-20240316170626-2.png||height="701" width="914"]]
1081
1082
1083
1084 == 2.11 Uplink log query ==
1085
1086
1087 * (% style="color:blue" %)**AT command:**(%%)** (% style="color:#037691" %)AT+GETLOG(%%)**
1088
1089 This command can be used to query upstream logs of data packets.
1090
1091 [[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"]]
1092
1093
1094
1095
1096
1097 = 3. Configure SN50v3-NB =
1098
1099 == 3.1 Configure Methods ==
1100
1101
1102 SN50v3-NB supports below configure method:
1103
1104 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
1105
1106 * 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]].
1107
1108 == 3.2 AT Commands Set ==
1109
1110
1111 AT+<CMD>?        : Help on <CMD>
1112
1113 AT+<CMD>         : Run <CMD>
1114
1115 AT+<CMD>=<value> : Set the value
1116
1117 AT+<CMD>=?       : Get the value
1118
1119
1120 (% style="color:blue" %)**General Commands**      
1121
1122 AT                    : Attention       
1123
1124 AT?  : Short Help     
1125
1126 ATZ  : MCU Reset    
1127
1128 AT+TDC  : Application Data Transmission Interval
1129
1130 AT+CFG  : Print all configurations
1131
1132 AT+5VT           : Set extend the time of 5V power  
1133
1134 AT+PRO          : Choose agreement
1135
1136 AT+APN  : Get or set the APN
1137
1138 AT+EXT  : Get or Set Count value
1139
1140 AT+EXT  : Get or Set Count value
1141
1142 AT+RXDL        : Extend the sending and receiving time
1143
1144 AT+SERVADDR :  Server Address
1145
1146 AT+WEIGRE  : Get weight or set weight to 0
1147
1148 AT+WEIGAP  : Get or Set the GapValue of weight
1149
1150 AT+DNSCFG  : Get or Set DNS Server
1151
1152 AT+CFGMOD           : Working mode selection
1153
1154 AT+INTMOD            : Set the trigger interrupt mode
1155
1156 AT+GETSENSORVALUE         : Returns the current sensor measurement
1157
1158 AT+CSQTIME        : Get or Set the time to join the network
1159
1160 AT+DNSTIMER        : Get or Set the NDS timer
1161
1162 AT+TLSMOD : Get or Set the TLS mode
1163
1164 AT+NOUD         : Get or Set the number of data to be uploaded
1165
1166 AT+CDP        : Read or Clear cached data
1167
1168 AT+CUM  : Get or Set cache upload mechanism (0: Off 1: On)
1169
1170 AT+SERVADDR :  Server Address
1171
1172
1173 (% style="color:blue" %)**MQTT Management**
1174
1175 AT+CLIENT               : Get or Set MQTT client
1176
1177 AT+UNAME              : Get or Set MQTT Username
1178
1179 AT+PWD                  : Get or Set MQTT password
1180
1181 AT+PUBTOPIC  : Get or Set MQTT publish topic
1182
1183 AT+SUBTOPIC  : Get or Set MQTT subscription topic
1184
1185
1186 (% style="color:blue" %)**Information**          
1187
1188 AT+FDR  : Factory Data Reset
1189
1190 AT+PWORD  : Serial Access Password
1191
1192 AT+LDATA  : Get the last upload data
1193
1194 AT+CDP  : Read or Clear cached data
1195
1196
1197 = 4. Battery & Power Consumption =
1198
1199
1200 SN50v3-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1201
1202 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1203
1204
1205 = 5. Firmware update =
1206
1207
1208 User can change device firmware to::
1209
1210 * Update with new features.
1211
1212 * Fix bugs.
1213
1214 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/x9xrsq850tqk40f/AAAVLF3bHGDRvn8DQ2q5k6JAa?dl=0]]**
1215
1216 Methods to Update Firmware:
1217
1218 * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
1219
1220 * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
1221
1222 = 6.  Get and compile Software =
1223
1224
1225 NBSN95 is an open-source project, developer can compile their firmware for customized applications. User can get the source code from:
1226
1227 * Software Source Code: [[https:~~/~~/github.com/dragino/SN50V3-NB>>https://github.com/dragino/NBSN95/tree/SN50V3-NB]]
1228 * Compile instruction:  [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20Compile%20Instruction%20~~-~~-%20STM32/>>http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20Compile%20Instruction%20--%20STM32/]]
1229 * Upgrade firmware instruction
1230
1231 (((
1232 See FAQ of this file.
1233 )))
1234
1235 (((
1236 The project file is in: (% style="color:#4472c4" %)** SN50V3-NB\MDK-ARM\uvprojx**
1237 )))
1238
1239
1240 = 7. FAQ =
1241
1242 == 7.1 How can I access t BC660K-GL AT Commands? ==
1243
1244
1245 User can access to BC660K-GL directly and send AT Commands.
1246
1247 [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
1248
1249
1250 = 8. Order Info =
1251
1252
1253 Part Number: (% style="color:blue" %)**SN50v3-NB-XX**
1254
1255 (% style="color:red" %)**XX**(%%):
1256
1257 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
1258
1259 * (% style="color:#037691" %)**1D**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server
1260
1261 (% style="color:blue" %)**YY: The grand connector hole size**
1262
1263 * (% style="color:#037691" %)**M12**(%%): M12 hole
1264
1265 * (% style="color:#037691" %)**M16**(%%): M16 hole
1266
1267 * (% style="color:#037691" %)**M20**(%%): M20 hole
1268
1269 = 9. ​Packing Info =
1270
1271
1272 (% style="color:#037691" %)**Package Includes**:
1273
1274 * SN50v3-NB NB-IoT Sensor Node x 1
1275
1276 * External antenna x 1
1277
1278 (% style="color:#037691" %)**Dimension and weight**:
1279
1280 * Device Size: 13.0 x 5 x 4.5 cm
1281
1282 * Device Weight: 150g
1283
1284 * Package Size / pcs : 14.0 x 8x 5 cm
1285
1286 * Weight / pcs : 180g
1287
1288 = 10. Support =
1289
1290
1291 * 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.
1292
1293 * 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]].
1294
1295 = 11. FCC Warning =
1296
1297
1298 Any Changes or modifications not expressly approved by the party responsible for compliance could void the user's authority to operate the equipment.
1299
1300
1301 This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.
1302
1303
1304 Note: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
1305
1306 —Reorient or relocate the receiving antenna.
1307
1308 —Increase the separation between the equipment and receiver.
1309
1310 —Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.
1311
1312 —Consult the dealer or an experienced radio/TV technician for help.
1313
1314
1315 This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator& your body.
1316
1317 (% style="display:none" %) (%%)
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0