Dragino NBSN95 User Manual

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

Advertisement

Quick Links

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

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_NBSN95A NB-IoT Sensor Node User Manual last modified by Xiaoling on 2023/08/30 14:15...
  • Page 2: Table Of Contents

    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 ...
  • Page 3 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 ...
  • Page 4 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 •...
  • Page 5 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) •...
  • Page 6: Introduction

    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 logging and powered by SOCl2 battery for long term use and secure data transmission.
  • Page 7: Applications

    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 •...
  • Page 8 Directly from STM32 chip   PA13 In/Out Directly from STM32 chip   In/Out Directly from STM32 chip Default use to turn on/off LED1 in NBSN95 image   Ground   5v output power Controlled by PB5(Low to Enable, High to Disable) LED1  ...
  • Page 9: Jumper Jp2

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

    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...
  • Page 13: Test Requirement

    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 NBSN95 supports.
  • Page 14: Connect Usb - Ttl To Nbsn95 To Configure It

    Server Address / Uplink Topic to 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 15: Use Coap Protocol To Uplink Data

    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 •...
  • Page 16 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual reset the device After configure the server address and (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...
  • Page 17: Use Udp Protocol To Uplink Data(Default Protocol)

    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     ...
  • Page 18 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...
  • Page 19: Use Mqtt Protocol To Uplink Data

    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 TLS and other related encryption. • AT+PRO=3                                                 // Set to use MQTT protocol to uplink •...
  • Page 20 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 21: Use Tcp Protocol To Uplink Data

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual 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. 2.2.8 ...
  • Page 22: Change Update Interval

    • AT+TDC=600        //  Set Update Interval to 600s   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 AT+CFGMOD to set NBSN95 to different working modes.
  • Page 23 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual Frame header Frame data(1) Frame data(2) F… Frame data(X) NOTE: 1. Only up to 10 sets of latest data will be cached. 2. Theoretically, the maximum upload bytes are 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.
  • Page 24: Cfgmod=2 (Distance Mode)

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual   2.3.2  CFGMOD=2 (Distance Mode) This mode is target to measure the distance. Total 25 bytes, (Note: Time stamp field are added since firmware version v120)   Size(bytes) Value Device...
  • Page 25 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual So the payload is 0xf868411056754138 0078 0ca9 11 02 010b 00 0ca8 0158 60dacc87  where: • Device ID: 0xf868411056754138 = 868411056754138 • Version:    0x0078=120=1.2.0 • BAT:      0x0ca9 = 3241mV = 3.241 V •...
  • Page 26: Cfgmod=3 (3 Adc + I2C)

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual 2.3.3  CFGMOD=3 (3 ADC + I2C) This mode has total 29 bytes. Include 3 x ADC + 1x I2C, (Note: Time stamp field are added since firmware version v120) Size(bytes)
  • Page 27: Cfgmod=4 (3 X Ds18B20)

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual So the payload is 0x f868411056754138 0078 0cf0 12 03 0cbc 00 0cef 010a 024b 0cef 60dbc494  where: • Device ID: 0xf868411056754138 = 868411056754138 • Version:    0x0078=120=1.2.0 •...
  • Page 28 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual This mode has total 27 bytes. (Note: Time stamp field are added since firmware version v120)  As shown below: Size(bytes) Value Device Signal Temperature1 Digital in & Temperature2 Temperature3 Timestamp...
  • Page 29: Cfgmod=5 (Weight Measurement By Hx711)

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual So the payload is 0x f868411056754138 0078 0cdf 15 04 010a 0cde 00 00fb 0100 60dbcb3f   where: • Device ID: 0xf868411056754138 = 868411056754138 • Version: 0x0078=120=1.2.0 • BAT:      0x0cdf = 3295 mV = 3.295 V •...
  • Page 30 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual 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.
  • Page 31: Cfgmod=6 (Counting Mode)

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual So the payload is 0x f868411056754138 0078 0c94 14 05 0137 0c93 00 003a 60dbe59e  where: Device ID: 0xf868411056754138 = 868411056754138 • • Version:    0x0078=120=1.2.0 • BAT:      0x0c94 = 3220 mV = 3.220 V •...
  • Page 32 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual Frame header Frame data(1) Frame data(2) F… Frame data(X) NOTE: 1.    Only up to 10 sets of latest data will be cached. 2.    Theoretically, the maximum upload bytes are 160. If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
  • Page 33: 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 ...
  • Page 34: Digital Input

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual Example: If payload is:  0x0105:  (0105 & FC00 == 0), temp = 0x0105 /10 = 26.1 degree If payload is:  0xFF3F:  (FF3F & FC00 == 1) , temp = (0xFF3F - 65536)/10 = -19.3 degree. 2.4.6 ...
  • Page 35 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual 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 36: Digital Interrupt

     , from the bottom of buoy. 2.4.8  Digital Interrupt Digital Interrupt refers to pin PB14, and there are different trigger methods. When there is a trigger, the NBSN95 will send a packet to the server. Example to use with door sensor The door sensor is shown at right.
  • Page 37 When the two pieces are close to each other, the 2 wire output will be short or open (depending on the type), while if the two pieces are away from each other, the 2 wire output will be the opposite status. So we can use NBSN95 interrupt interface to detect the status for the door or window.
  • Page 38: I2C Interface (Sht20)

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual The above photos shows the two parts of the magnetic switch fitted to a door. The software by default uses the falling edge on the signal line as an interrupt. We need to modify it to accept both the rising edge (0v -->...
  • Page 39 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual PB6(SDA) PB7(SCK) are I2C interface. User can use these pins to connect to an I2C device and get the sensor data. There is an example to show how to use the I2C interface to connect to the SHT20 Temperature and Humidity Sensor.
  • Page 40: Distance Reading

    _proof_Ultrasonic_Sensor_with_Separate_Probe_SKU___SEN0208 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 41: Output

    You can see the serial output in ULT mode as below: 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.
  • Page 42: Weigh Sensor Hx711

    Such as: 0x60da837e = 1624933246 = 2021-06-29 2:20:46+32(Beijing time) User can get this time from link:  https://www.epochconverter.com/ Below is the converter example 2.5  Downlink Payload By default, NBSN95 prints the downlink payload to console port. Downlink Control Type FPort Type Code Downlink payload size(bytes)
  • Page 43: Firmware Change Log

    Note: Always test the actually current pass by the JP2 jumper when connect to a new type of sensor. 2.8 Battery & Power Consumption NBSN95 uses ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
  • Page 44: Using The At Commands

    User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual 4.  Using the AT Commands 4.1  Access AT Commands See this link for detail: https://www.dropbox.com/sh/jao1xt9kw5r3yq4/AAAMpJkZzExF2JLbRWxGoQ9Na?dl=0 AT+<CMD>?                    : Help on <CMD> AT+<CMD>                      : Run <CMD> AT+<CMD>=<value>      : Set the value AT+<CMD>=? ...
  • Page 45: Developer Guide

    AT+FDR              : Factory Data Reset AT+PWORD       : Serial Access Password 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 •...
  • Page 46 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/xwiki/bin/view/Main/Firmware%20Upgrade %20Instruction%20for%20STM32%20base%20products/#H2.HardwareUpgradeMethodSupportList Notice, NBSN95 and LSN50v2 share the same mother board. They use the same connection and method to update. 7.  Trouble Shooting 7.1  Connection problem when uploading firmware Please see: http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20Upgrade%20Instruction%20for...
  • Page 47 User Manual for LoRaWAN End Nodes - NBSN95_NBSN95A NB-IoT Sensor Node User Manual   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 •...

This manual is also suitable for:

Nbsn95a

Table of Contents