www.dragino.com
LSN50 LoRa Sensor Node User Manual 2 / 60
1. Introduction 4
1.1 What is LSN50 LoRa Sensor Node 4
1.2 Specifications 5
1.3 Features 6
1.4 Applications 6
1.5 Pin Definitions 7
1.6 Hardware Change log 8
1.7 Hole Option 9
2. Use LSN50 with LoRaWAN firmware 10
2.1 How it works 10
2.2 Quick guide to connect to LoRaWAN server (OTAA) 11
2.3 Working Mode & Uplink Payload 14
2.3.1 MOD=1 (Default Mode) 14
2.3.2 MOD=2 (Distance Mode) 15
2.3.3 MOD=3 (3 ADC + I2C) 16
2.3.4 MOD=4 (3 x DS18B20) 17
2.3.5 Decode payload in The Things Network 18
2.4 Payload Explanation and Sensor Interface 21
2.4.1 Battery Info 21
2.4.2 Temperature (DS18B20) 21
2.4.3 Digital Input 21
2.4.4 Analogue Digital Converter (ADC) 22
2.4.5 Digital Interrupt 23
2.4.6 I2C Interface (SHT20) 25
2.4.7 Distance Reading 26
2.4.8 Ultrasonic Sensor 26
2.4.9 +5V Output 27
2.5 Downlink Payload 28
2.6 Show Data in Mydevices IoT Server 29
2.7 Firmware Change Log 32
2.8 Battery Analysis 34
2.8.1 Battery Type 34
2.8.2 Power consumption Analyze 34
2.8.3 Battery Note 35
2.8.4 Replace the battery 35
3. Using the AT Commands 36
3.1 Access AT Commands 36
3.2 Common AT Command Sequence 38
3.2.1 Multi-channel ABP mode (Use with SX1301/LG308) 38
3.2.2 Single-channel ABP mode (Use with LG01/LG02) 38
4. Upload Firmware 39
4.1 Upload Firmware via Serial Port 39
4.2 Upload Firmware via ST-Link V2 42
5. Developer Guide 44
5.1 Source Code 44
5.2 Compile Source Code 44