Dragino NBSN95 User manual

NBSN95_NBSN95A NB-IoT Sensor Node User
Manual
last modified by Xiaoling
on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
Table of Contents
1. Introduction ........................................................................................................................................................................ 6
1.1 What is NBSN95 NB-IoT Sensor Node .................................................................................................................... 6
1.2 Features ......................................................................................................................................................................... 6
1.3 Specification .................................................................................................................................................................. 6
1.4 Applications ................................................................................................................................................................... 7
1.5 Pin Definitions & Switch .............................................................................................................................................. 7
1.5.1 Jumper JP2 ............................................................................................................................................................. 9
1.5.2 BOOT MODE / SW1 .............................................................................................................................................. 9
1.5.3 Reset Button ............................................................................................................................................................ 9
1.5.4 LED ........................................................................................................................................................................... 9
1.6 Hole Option ................................................................................................................................................................... 9
2. Use NBSN95 to communicate with IoT Server .......................................................................................................... 11
2.1 How it works ............................................................................................................................................................... 11
2.2 Configure the NBSN95 .............................................................................................................................................. 12
2.2.1 Power On NBSN95 ............................................................................................................................................. 12
2.2.2 Test Requirement ................................................................................................................................................ 13
2.2.3 Insert SIM card .................................................................................................................................................... 13
2.2.4 Connect USB – TTL to NBSN95 to configure it ............................................................................................... 14
2.2.5 Use CoAP protocol to uplink data ..................................................................................................................... 15
2.2.6 Use UDP protocol to uplink data(Default protocol) .......................................................................................... 17
2.2.7 Use MQTT protocol to uplink data .................................................................................................................... 19
2.2.8 Use TCP protocol to uplink data ........................................................................................................................ 21
2.2.9 Change Update Interval ...................................................................................................................................... 22
2.3 Working Mode &Uplink Payload ............................................................................................................................. 22
2.3.1 CFGMOD=1 (Default Mode) ............................................................................................................................... 22
2.3.2 CFGMOD=2 (Distance Mode) ............................................................................................................................ 24
2.3.3 CFGMOD=3 (3 ADC + I2C) ............................................................................................................................... 26
2.3.4 CFGMOD=4 (3 x DS18B20) ............................................................................................................................... 27
2.3.5 CFGMOD=5 (Weight Measurement by HX711) ............................................................................................... 29
2.3.6 CFGMOD=6 (Counting mode) ............................................................................................................................ 31
2.4 Payload Explanation and Sensor Interface ............................................................................................................. 33
2.4.1Device ID ............................................................................................................................................................... 33
2.4.2 Version Info ........................................................................................................................................................... 33
2.4.3 Battery Info ........................................................................................................................................................... 33
2.4.4 Signal Strength ..................................................................................................................................................... 33
2.4.5 Temperature (DS18B20) ..................................................................................................................................... 33
2.4.6 Digital Input ........................................................................................................................................................... 34
2.4.7 Analogue Digital Converter (ADC) ..................................................................................................................... 34
2.4.8 Digital Interrupt ..................................................................................................................................................... 36
2.4.9 I2C Interface (SHT20) ......................................................................................................................................... 38
2.4.10 Distance Reading ............................................................................................................................................... 40
2.4.11 Ultrasonic Sensor .............................................................................................................................................. 40
2.4.12 +5V Output .......................................................................................................................................................... 41
2.4.13 Weigh Sensor HX711 ....................................................................................................................................... 42
2.4.14 Timestamp .......................................................................................................................................................... 42
2.5 Downlink Payload ...................................................................................................................................................... 42
2.6 Firmware Change Log ............................................................................................................................................... 43
2.7 Use VDD or +5V to Power External Sensor ........................................................................................................... 43
2.8 Battery & Power Consumption .................................................................................................................................. 43
3. Access NB-IoT Module .................................................................................................................................................. 43
4. Using the AT Commands .............................................................................................................................................. 44
4.1 Access AT Commands ............................................................................................................................................. 44
5. Developer Guide ............................................................................................................................................................. 45
Page 2 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
5.1 Get and compile Software ........................................................................................................................................ 45
5.2 Get hardware source ................................................................................................................................................. 45
6. FAQ .................................................................................................................................................................................. 46
6.1 How to Upgrade Firmware ........................................................................................................................................ 46
7. Trouble Shooting ............................................................................................................................................................ 46
7.1 Connection problem when uploading firmware ...................................................................................................... 46
7.2 AT Command input doesn't work ............................................................................................................................ 46
7.3 Not able to connect to NB-IoT network and keep showing "Signal Strength:99". ............................................... 46
8. Order Info ......................................................................................................................................................................... 46
9. Packing Info ..................................................................................................................................................................... 47
10. Support .......................................................................................................................................................................... 47
Page 3 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
Table of Contents:
•1. Introduction
•1.1 What is NBSN95 NB-IoT Sensor Node
•1.2 Features
•1.3 Specification
•1.4 Applications
•1.5 Pin Definitions & Switch
•1.5.1 Jumper JP2
•1.5.2 BOOT MODE / SW1
•1.5.3 Reset Button
•1.5.4 LED
•1.6 Hole Option
Page 4 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
•2. Use NBSN95 to communicate with IoT Server
•2.1 How it works
•2.2 Configure the NBSN95
•2.2.1 Power On NBSN95
•2.2.2 Test Requirement
•2.2.3 Insert SIM card
•2.2.4 Connect USB – TTL to NBSN95 to configure it
•2.2.5 Use CoAP protocol to uplink data
•2.2.6 Use UDP protocol to uplink data(Default protocol)
•2.2.7 Use MQTT protocol to uplink data
•2.2.8 Use TCP protocol to uplink data
•2.2.9 Change Update Interval
•2.3 Working Mode &Uplink Payload
•2.3.1 CFGMOD=1 (Default Mode)
•2.3.2 CFGMOD=2 (Distance Mode)
•Connection of LIDAR-Lite V3HP:
•2.3.3 CFGMOD=3 (3 ADC + I2C)
•2.3.4 CFGMOD=4 (3 x DS18B20)
•2.3.5 CFGMOD=5 (Weight Measurement by HX711)
•2.3.6 CFGMOD=6 (Counting mode)
•2.4 Payload Explanation and Sensor Interface
•2.4.1Device ID
•2.4.2 Version Info
•2.4.3 Battery Info
•2.4.4 Signal Strength
•2.4.5 Temperature (DS18B20)
•2.4.6 Digital Input
•2.4.7 Analogue Digital Converter (ADC)
•2.4.8 Digital Interrupt
•2.4.9 I2C Interface (SHT20)
•2.4.10 Distance Reading
•2.4.11 Ultrasonic Sensor
•2.4.12 +5V Output
•2.4.13 Weigh Sensor HX711
•2.4.14 Timestamp
•2.5 Downlink Payload
•2.6 Firmware Change Log
•2.7 Use VDD or +5V to Power External Sensor
•2.8 Battery & Power Consumption
•3. Access NB-IoT Module
•4. Using the AT Commands
•4.1 Access AT Commands
•5. Developer Guide
•5.1 Get and compile Software
•5.2 Get hardware source
•6. FAQ
•6.1 How to Upgrade Firmware
•7. Trouble Shooting
•7.1 Connection problem when uploading firmware
•7.2 AT Command input doesn't work
•7.3 Not able to connect to NB-IoT network and keep showing "Signal Strength:99".
•8. Order Info
•9. Packing Info
•10. Support
Page 5 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
1. Introduction
1.1 What is NBSN95 NB-IoT Sensor Node
NBSN95 is a Long Range NB-IoT Sensor Node. It is designed for outdoor data loggingand powered by Li/
SOCl2 battery for long term use and secure data transmission. 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.
NarrowBand-Internet of Things (NB-IoT) is a standards-based low power wide area (LPWA) technology
developed to enable a wide range of new IoT devices and services. NB-IoT significantly improves the power
consumption of user devices, system capacity and spectrum efficiency, especially in deep coverage.
NBSN95 uses STM32l0x chip from ST, STML0x is the ultra-low-power STM32L072xx 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.
NBSN95 is an open source product, it is based on the STM32Cube HAL drivers and lots of libraries can be found
in ST site for rapid development.
1.2 Features
• STM32L072xxxx MCU
• NB-IoT Bands: B1/B3/B8/B5/B20/B28 @H-FDD
• Pre-load bootloader on USART1/USART2
• MDK-ARM Version 5.24a IDE
• I2C, LPUSART1, USB, SPI2
• 3x12bit ADC, 1x12bit DAC
• 20xDigital I/O
• Open-source hardware / software
• IP66 Waterproof Enclosure
• Ultra-Low Power consumption
• AT Commands to change parameters
• Micro SIM card slot for NB-IoT SIM
• 8500mAh Battery for long term use
1.3 Specification
Micro Controller:
Page 6 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
• MCU: STM32L072xxxx
• Flash: 128KB
• RAM: 20KB
• EEPROM: 6KB
• Clock Speed: 32Mhz
Common DC Characteristics:
• Supply Voltage: 2.1v ~ 3.6v
• Operating Temperature: -40 ~ 85°C
• I/O pins: Refer to STM32L072 datasheet
NB-IoT Spec:
• B1 @H-FDD: 2100MHz
• B3 @H-FDD: 1800MHz
• B8 @H-FDD: 900MHz
• B5 @H-FDD: 850MHz
• B20 @H-FDD: 800MHz
• B28 @H-FDD: 700MHz
Battery:
• Li/SOCI2 un-chargeable battery
• Capacity: 8500mAh
• Self Discharge: <1% / Year @ 25°C
• Max continuously current: 130mA
• Max boost current: 2A, 1 second
Power Consumption
• STOP Mode: 10uA @ 3.3v
• Max transmit power: [email protected]
1.4 Applications
• Smart Buildings & Home Automation
• Logistics and Supply Chain Management
• Smart Metering
• Smart Agriculture
• Smart Cities
• Smart Factory
1.5 Pin Definitions & Switch
Page 7 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
No. Signal Direction Function Remark
1 VCC(2.9V) OUTPUT VCC Directly connect to main power for board
2 PA0 In/Out Directly from STM32 chip Used as ADC in NBSN95 image
3 PA1 In/Out Directly from STM32 chip
4 PA2 In/Out Directly from STM32 chip, 10k pull up to VCC Used as UART_TXD in NBSN95 image
5 PA3 In/Out Directly from STM32 chip, 10k pull up to VCC Used as UART_RXD in NBSN95 image
6 PB6 In/Out Directly from STM32 chip, 10k pull up to VCC
7 PB7 In/Out Directly from STM32 chip, 10k pull up to VCC
8 PB3 In/Out Directly from STM32 chip, 10k pull up to VCC
9 PB4 In/Out Directly from STM32 chip
10 PA9 In/Out Directly from STM32 chip, 10k pull up to VCC
11 PA10 In/Out Directly from STM32 chip, 10k pull up to VCC
12 GND Ground
13 VCC(2.9V) OUTPUT VCC Directly connect to main power for board
14 Jumper Power on/off jumper
15 PA4 In/Out Directly from STM32 chip
16 NRST In Reset MCU
17 PA12 In/Out Directly from STM32 chip
18 PA11 In/Out Directly from STM32 chip
19 PA14 In/Out Directly from STM32 chip
20 PB13 In/Out Directly from STM32 chip
21 PB12 In/Out Directly from STM32 chip
22 PB15 In/Out Directly from STM32 chip
23 PB14 In/Out Directly from STM32 chip
24 PA13 In/Out Directly from STM32 chip
25 PA8 In/Out Directly from STM32 chip Default use to turn on/off LED1 in NBSN95 image
26 GND Ground
27 +5V Out 5v output power Controlled by PB5(Low to Enable, High to Disable)
28 LED1 Controlled by PA8 Blink on transmit
29 BOOT MODE Configure device in working mode or ISP program
mode
Flash: Normal Working mode and send AT
Commands
ISP: UART Program Mode
30 NRST In Reset MCU
Page 8 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
1.5.1 Jumper JP2
Power on Device when put this jumper.
1.5.2 BOOT MODE / SW1
1) 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.
2) Flash: work mode, device starts to work and send out console output for further debug
1.5.3 Reset Button
Press to reboot the device.
1.5.4 LED
It will flash:
1. When boot the device in flash mode
2. Send an uplink packet
1.6 Hole Option
The NBSN95 provides different hole size options for different size sensor cable. The options provided are M12,
M16. The definition is as below:
Page 9 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
Page 10 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
2. Use NBSN95 to communicate with IoT Server
2.1 How it works
The NBSN95 is equipped with a NB-IoT module, the pre-loaded firmware in NBSN95 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 NBSN95.
The diagram below shows the working flow in default firmware of NBSN95:
Page 11 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
2.2 Configure the NBSN95
2.2.1 Power On NBSN95
Page 12 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
2.2.2 Test Requirement
To use NBSN95 in your city, make sure meet below requirements:
• Your local operator has already distributed a NB-IoT Network there.
• The local NB-IoT network used the band that NBSN95supports.
• Your operator is able to distribute the data received in their NB-IoT network to your IoT server.
Below figure shows our testing structure. Here we have NB-IoT network coverage by China Mobile, the
band they use is B8. TheNBSN95 will use CoAP(120.24.4.116:5683) or raw UDP(120.24.4.116:5601) or
MQTT(120.24.4.116:1883)or TCP(120.24.4.116:5600)protocol to send data to the test server
2.2.3 Insert SIM card
Insert the NB-IoT Card get from your provider.
User need to take out the NB-IoT module and insert the SIM card like below:
Page 13 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
2.2.4 Connect USB – TTL to NBSN95 to configure it
User need to configure NBSN95 via serial port to set the Server Address/ Uplink Topicto define where and how-
to uplink packets. NBSN95 support AT Commands, user can use a USB to TTL adapter to connect to NBSN95 and
use AT Commands to configure it, as below.
In the PC, use below serial tool settings:
• Baud: 9600
• Data bits: 8
• Stop bits: 1
• Parity: None
• Flow Control: None
Make sure the switch is in FLASH position, then power on device by connecting the jumper on NBSN95. NBSN95
will output system info once power on as below, we can enter the password: 12345678 to access AT Command
input.
Page 14 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
Note: the valid AT Commands can be found at:https://www.dropbox.com/sh/jao1xt9kw5r3yq4/
AAAMpJkZzExF2JLbRWxGoQ9Na?dl=0
2.2.5 Use CoAP protocol to uplink data
Note: if you don't have CoAP server, you can refer this link to set up one:http://wiki.dragino.com/xwiki/
bin/view/Main/Set%20up%20CoAP%20Server/
Use below commands:
•AT+PRO=1 // Set to use CoAP protocol to uplink
•AT+SERVADDR=120.24.4.116,5683// to set CoAP server address and port
•AT+URI=5,11,"mqtt",11,"coap",12,"0",15,"c=text1",23,"0" //Set COAP resource path
For parameter description, please refer to AT command set
Page 15 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
After configure the server address and reset the device (via AT+ATZ ), NSE01 will start to uplink sensor values to
CoAP server.
Page 16 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
2.2.6 Use UDP protocol to uplink data(Default protocol)
This feature is supported since firmware version v1.0.1
•AT+PRO=2 // Set to use UDP protocol to uplink
•AT+SERVADDR=120.24.4.116,5601 // to set UDP server address and port
•AT+CFM=1 // If the server does not respond, this command is unnecessary
Page 17 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
Page 18 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
2.2.7 Use MQTT protocol to uplink data
This feature is supported since firmware version v110, it supports only plain MQTT now it doesn't support
TLSandotherrelatedencryption.
•AT+PRO=3 // Set to use MQTT protocol to uplink
•AT+SERVADDR=120.24.4.116,1883 // Set MQTT server address and port
•AT+CLIENT=CLIENT// Set up the CLIENT of MQTT
•AT+UNAME=UNAME// Set the username of MQTT
•AT+PWD=PWD// Set the password of MQTT
•AT+PUBTOPIC=T1_PUB// Set the sending topic of MQTT
•AT+SUBTOPIC=T1_SUB // Set the subscription topic of MQTT
Page 19 / 47 - last modified by Xiaoling on 2023/08/30 14:15

User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual
To save battery life, NBSN95 will establish a subscription before each uplink and close the subscription 3 seconds
after uplink successful. Any downlink commands from server will only arrive during the subscription period.
Page 20 / 47 - last modified by Xiaoling on 2023/08/30 14:15
Other manuals for NBSN95
1
This manual suits for next models
1
Table of contents
Popular Data Logger manuals by other brands

Data Harvest
Data Harvest DS186 manual

Measurement Computing
Measurement Computing USB-7204 user guide

Spectrum Technologies
Spectrum Technologies WatchDog A160 product manual

Sper scientific
Sper scientific 800018 instruction manual

AEMC instruments
AEMC instruments 1246 quick start guide

Klipspringer
Klipspringer LEBI-20 Series user manual

Eagle Tree Systems
Eagle Tree Systems eLogger V3 instruction manual

TiTLEY Scientific
TiTLEY Scientific AnaBat Roost Logger quick start guide

YOKOGAWA
YOKOGAWA MX100 user manual

Spectrum
Spectrum 2120WP product manual

HWM
HWM Multilog 2 WW Installation and setup

Pego
Pego PLUSR EXPERT DL3 Use and maintenance manual