Dragino NBSN95 User Manual

Nb-iot sensor node
Hide thumbs Also See for NBSN95:

Advertisement

Quick Links

NBSN95 NB-IoT Sensor Node User Manual
Document Version: 2.1.1
Image Version: NBSN95-v120
Version
Description
1.0
Release
1.0.1
Fix typo of source code link, Added mode 6
1.0.2
Join UDP mode upload, close NB echo function, optimize serial port response,
serial port output real-time time is changed to system running time
1.0.3
Add faq of transmit protocol.
1.1.0
Re-write structure for NB-IoT
Add more AT Commands.
Add MQTT and TCP protocol, improve CoAP and UDP upload.
Remove resend after fail.
Change TDC time default to 60 minutes.
Change the version number to integer, payload will also include version number
now
1.1.1
Add detail description of switch/jumpers, add VDD/5V description
1.1.2
Add notice for MQTT
1.1.3
Add Set Up notice for CoAP
2.0.0
Add NBSN95A
2.1.0
Update protocol stack to D-BC95-003
Added the function of caching failed data
Each mode payload increases the timestamp
Optimize more details
2.1.1
Fix Decode typo
NBSN95 NB-IoT Node User Manual
www.dragino.com
Date
2020-Aug-05
2020-Nov-17
2021-Jan-5
2021-Feb-4
2021-Mar-3
2021-Jun-6
2021-Jul-3
2021-Jul-14
1
48
/

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NBSN95 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Dragino NBSN95

  • Page 1 NBSN95 NB-IoT Sensor Node User Manual Document Version: 2.1.1 Image Version: NBSN95-v120 Version Description Date Release 2020-Aug-05 1.0.1 Fix typo of source code link, Added mode 6 1.0.2 Join UDP mode upload, close NB echo function, optimize serial port response,...
  • Page 2: Table Of Contents

    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...
  • Page 3 5. Developer Guide Get and compile Software Get hardware source 6. FAQ How to Upgrade Firmware 7. Trouble Shooting Connection problem when uploading firmware. AT Command input doesn’t work 8. Order Info 9. Packing Info Support NBSN95 NB-IoT Node User Manual...
  • Page 4: Introduction

    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 logging 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.
  • Page 5: Specifications

    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 NBSN95 NB-IoT Node User Manual...
  • Page 6: Applications

    1.4 Applications ● Smart Buildings & Home Automation ● Logistics and Supply Chain Management ● Smart Metering ● Smart Agriculture ● Smart Cities ● Smart Factory NBSN95 NB-IoT Node User Manual...
  • Page 7: Pin Definitions & Switch

    Directly connect to main VCC(2.9V) OUTPUT power for board In/Out Directly from STM32 chip Used as ADC in NBSN95 image In/Out Directly from STM32 chip Directly from STM32 chip, 10k Used as UART_TXD in NBSN95 In/Out pull up to VCC...
  • Page 8: Jumper Jp2

    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 NBSN95 NB-IoT Node User Manual...
  • Page 9: Hole Option

    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: NBSN95 NB-IoT Node User Manual...
  • Page 10: Use Nbsn95 To Communicate With Iot Server

    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.
  • Page 11: Configure The Nbsn95

    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. The NBSN95 will use CoAP( ) or raw 120.24.4.116:5683...
  • Page 12: Insert Sim Card

    Uplink Topic 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: ✓...
  • Page 13: Use Coap Protocol To Uplink Data

    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. Note( If 12345678 doesn’t work, please...
  • Page 14 After configure the server address and reset the device (via AT+ATZ ), NBSN95 will start to uplink sensor values to CoAP server. NBSN95 NB-IoT Node User Manual...
  • Page 15: 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 NBSN95 NB-IoT Node User Manual...
  • Page 16 NBSN95 NB-IoT Node User Manual...
  • Page 17 NBSN95 NB-IoT Node User Manual...
  • Page 18: Use Mqtt Protocol To Uplink Data

    //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 NBSN95 NB-IoT Node User Manual...
  • Page 19: Use Tcp Protocol To Uplink Data

    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. MQTT protocol has a much higher power consumption compare vs UDP / CoAP protocol. Please check the power analyze document and adjust the uplink period to a suitable interval.
  • Page 20: Change Update Interval

    2.2.9 Change Update Interval User can use below command to change the uplink interval. AT+TDC=600 // Set Update Interval to 600s NBSN95 NB-IoT Node User Manual...
  • Page 21: Working Mode & Uplink Payload

    2.3 Working Mode & Uplink Payload NBSN95 has different working mode for the connections of different type of sensors. This section describes these modes. User can use the AT Command to set NBSN95 AT+CFGMOD to different working modes. For example:...
  • Page 22: Cfgmod=1 (Default Mode)

    If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. The payload is ASCII string, representative same HEX: 0x72403155615900780c541901000000004200fc023260da7c4e where: ➢ Device ID: 0x724031556159 = 724031556159 ➢ Version: 0x0078=120=1.2.0 ➢ BAT: 0x0c54 = 3156 mV = 3.156V NBSN95 NB-IoT Node User Manual...
  • Page 23: Cfgmod=2 (Distance Mode)

    1. Only up to 10 sets of latest data will be cached. 2. Theoretically, the maximum upload bytes are 193. If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. NBSN95 NB-IoT Node User Manual...
  • Page 24 Temperature by DS18b20: 0x010b= 267 = 26.7 °C ➢ Interrupt: 0x00 = 0 ➢ ADC: 0x0ca8 = 3240 mv ➢ Distance by LIDAR-Lite V3HP/Ultrasonic Sensor: 0x0158 = 344 cm ➢ Timestamp: 0x60dacc87 = 1,624,951,943 = 2021-06-29 15:32:23 Connection of LIDAR-Lite V3HP: NBSN95 NB-IoT Node User Manual...
  • Page 25: Cfgmod=3 (3 Adc + I2C)

    Value Device Signal ADC1 Digital in ADC2 Temperature Humidity ADC3 Timestamp Strength 0x03 & Interrupt SHT20/SHT31 SHT20/SHT31 ADC1 uses pin PA0 to measure ADC2 uses pin PA1 to measure ADC3 uses pin PA4 to measure NBSN95 NB-IoT Node User Manual...
  • Page 26 ADC2: 0x0cef =3311 mv ➢ Temperature by SHT20/SHT31: 0x010a = 266 = 26.6 °C ➢ Humidity by SHT20/SHT31: 0x024b =587 = 58.7 %rh ➢ ADC2: 0x0cef = 3311 mv ➢ Timestamp: 0x60dbc494 = 1,625,015,444= 2021-06-30 09:10:44 NBSN95 NB-IoT Node User Manual...
  • Page 27: Cfgmod=4 (3 X Ds18B20)

    1. Only up to 10 sets of latest data will be cached. 2. Theoretically, the maximum upload bytes is 215. If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. NBSN95 NB-IoT Node User Manual...
  • Page 28 ADC: 0x0cde = 3294 mv ➢ Interrupt: 0x00 = 0 ➢ Temperature by DS18b20: 0x00fb = 251 = 25.1°C ➢ Temperature by DS18b20: 0x0100 = 256 = 25.6 °C ➢ Timestamp: 0x60dbcb3f = 1,625,017,151= 2021-06-30 09:39:11 NBSN95 NB-IoT Node User Manual...
  • Page 29: Cfgmod=5 (Weight Measurement By Hx711)

    2.3.5 CFGMOD=5 (Weight Measurement by HX711) Notes about hardware connection: 1) Don’t connect the HX711 module VCC to NBSN95 3.3v VCC, in this case, the NBSN95 will always power on HX711 and the battery will run out soon. 2) HX711 support 5v VCC, but while connect the NBSN95’s +5V to HX711 VCC, the value from HX711 is not stable.
  • Page 30 Temperature by DS18b20: 0x0137 = 311 = 31.1 °C ➢ ADC: 0x0c74 = 3219 mv ➢ Interrupt: 0x00 = 0 ➢ Weigt by HX711: 0x003a = 58 g ➢ Timestamp: 0x60dbe59e = 1,625,023,902= 2021-06-30 11:31:42 NBSN95 NB-IoT Node User Manual...
  • Page 31: Cfgmod=6 (Counting Mode)

    If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. The payload is ASCII string, representative same HEX: 0x72403162907100780cc714060000000260dc03e5 where: ➢ Device ID: 0x724031629071 = 724031629071 ➢ Version: 0x0078=120=1.2.0 ➢ BAT: 0x0cc7 =3271mV =3.271V NBSN95 NB-IoT Node User Manual...
  • Page 32: Payload Explanation And Sensor Interface

    These bytes include the hardware and software version. Higher byte: Specify hardware version: always 0x01 for NBSN95 Lower byte: Specify the software version: 0x6E=110, means firmware version 110 For example: 0x01 6E: this device is NBSN95 with firmware version 110. 2.4.3 Battery Info Ex1: 0x0B45 = 2885mV Ex2: 0x0B49 = 2889mV 2.4.4 Signal Strength...
  • Page 33: Digital Input

    2.4.7 Analogue Digital Converter (ADC) The ADC monitors the voltage on the line, in mV. Max value is from 0v to BAT voltage Ex: 0x021F = 543mv, Example1: Reading a Liquid Level Sensor (Read a resistance value): NBSN95 NB-IoT Node User Manual...
  • Page 34 In the NBSN95, we can use PB4 and PA0 pin to calculate the resistance for the liquid level sensor. The bottom of this sensor equal to 0ohm and top position equals to 10kohm.
  • Page 35: Digital Interrupt

    Below is the installation example: Fix one piece of the magnetic sensor to the door and connect the two pins to NBSN95 as follows: ● One pin to NBSN95’s PB14 pin ●...
  • Page 36: I2C Interface (Sht20)

    There is an example to show how to use the I2C interface to connect to the SHT20 Temperature and Humidity Sensor. This is support in AT+CFGMOD=1 (default value). Hardware connection for SHT20 is as below: NBSN95 NB-IoT Node User Manual...
  • Page 37: Distance Reading

    2.4.10 Distance Reading Refer Ultrasonic Sensor section. 2.4.11 Ultrasonic Sensor The NBSN95 firmware supports ultrasonic sensor (with AT+CFGMOD=2) such as SEN0208 from DF-Robot. This Fundamental Principles of this sensor can be found at this link: https://wiki.dfrobot.com/Weather_- _proof_Ultrasonic_Sensor_with_Separate_Probe_SKU___SEN0208 NBSN95 NB-IoT Node User Manual...
  • Page 38 The NBSN95 detects the pulse width of the sensor and converts it to mm output. The accuracy will be within 1 centimeter. The usable range (the distance between the ultrasonic probe and the measured object) is between 24cm and 600cm.
  • Page 39: Output

    2.4.12 +5V Output NBSN95 will enable +5V output before all sampling and disable the +5v after all sampling. The 5V output time can be controlled by AT Command. AT+5VT=1000 Means set 5V valid time to have 1000ms. So the real 5V output will actually have 1000ms + sampling time for other sensors.
  • Page 40: Downlink Payload

    2.5 Downlink Payload By default, NBSN95 prints the downlink payload to console port. Downlink Control Type FPort Type Code Downlink payload size(bytes) TDC (Transmit Time Interval) RESET INTMOD Examples Set TDC If the payload=0100003C, it means set the END Node’s TDC to 0x00003C=60(S), while type code is 01.
  • Page 41: Firmware Change Log

    2.8 Battery Analysis 2.8.1 Battery Type The NBSN95 battery is a combination of an 8500mAh Li/SOCI2 Battery and a Super Capacitor. The battery is none-rechargeable battery type with a low discharge rate (<2% per year). This type of battery is commonly used in IoT devices such as water meter.
  • Page 42: Power Consumption Analyze

    2.8.4 Replace the battery You can change the battery in the NBSN95.The type of battery is not limited as long as the output is between 3v to 3.6v. On the main board, there is a diode (D1) between the battery and the main circuit.
  • Page 43 NBSN95 NB-IoT Node User Manual...
  • Page 44: Using The At Commands

    : Get or Set MQTT publish topic AT+SUBTOPIC : Get or Set MQTT subscription topic Information AT+FDR : Factory Data Reset AT+PWORD : Serial Access Password AT+LDATA : Get the last upload data AT+CDP : Read or Clear cached data NBSN95 NB-IoT Node User Manual...
  • Page 45: Developer Guide

    5. Developer Guide 5.1 Get and compile Software NBSN95 is an open-source project, developer can compile their firmware for customized applications. User can get the source code from: ➢ Software Source Code: https://github.com/dragino/NBSN95 ➢ Compile instruction: http://wiki.dragino.com/index.php?title=Firmware_Compile_Instruction_--_STM32 ➢ Upgrade firmware instruction See FAQ of this file.
  • Page 46: Faq

    User can upgrade the firmware for 1) bug fix, 2) new feature release. Please see this link for how to upgrade: http://wiki.dragino.com/index.php?title=Firmware_Upgrade_Instruction_for_STM32_base_prod ucts#Hardware_Upgrade_Method_Support_List Notice, NBSN50 and LSN50v2 share the same mother board. They use the same connection and method to update. NBSN95 NB-IoT Node User Manual...
  • Page 47: Trouble Shooting

    ENTER while sending out the command. Some serial tool doesn’t send ENTER while press the send key. In this case, user need to add ENTER in the string to send, as below: NBSN95 NB-IoT Node User Manual...
  • Page 48: Order Info

    16: With M16 waterproof cable hole ● NH: No Hole 9. Packing Info Package Includes: ➢ NBSN95 NB-IoT Sensor Node x 1 ➢ External antenna x 1 Dimension and weight: ➢ Device Size: 13.0 x 5 x 4.5 cm ➢...

Table of Contents