LoRa Sensor Node-LSN50
- 1 INTRODUCTION
- 2 Getting Start
- 3 Case Study 1: With Oil Sensor
- 4 Case Study 2: With DS18B20 Temperature Sensor
- 5 Order Infomation
- 6 Resource
What is the LSN50
LSN50 is a Long Range LoRa Sensor Node. It is designed for outdoor use and powered by Li/SOCl2 battery for long term use power consumption and secure data transmission.It is designed to facilitate developers to quickly deploy industrial level LoRa and IoT solutions. It help 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.
It is based on SX1276/SX1278 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, smartphone detection, building automation, and so on.
LSN50 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.
LSN50 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.
- MCU: STM32L072CZT6
- EEPROM: 6KB
- Clock Speed: 32Mhz
- LoRa Chip: sx1276/sx1278
- 168 dB maximum link budget.
- +20 dBm - 100 mW constant RF output vs.
- +14 dBm high efficiency PA.
- Programmable bit rate up to 300 kbps.
- High sensitivity: down to -148 dBm.
- Bullet-proof front end: IIP3 = -12.5 dBm.
- 127 dB Dynamic Range RSSI.
- LoRaWAN 1.0.2 Specification
Absolute Maximum Ratings:
- VCC: 0.5v ~ 3.9v
- Operating Tempature: -40 ~ 85°C
- I/O pins: 0.5v ~ VCC+0.5V
Common DC Characteristics:
- Supply Voltage: 2.1v ~ 3.6v
- Operating Tempature: -40 ~ 85°C
- I/O pins: Refer to STM32L072 datasheet
- STOP Mode: 2.7uA @ 3.3v
- LoRa Transmit Mode:
125mA @ 20dBm 44mA @ 14dBm
- Li/SOCI2 unchargable battery
- Capacity: 4000mAh
- Self Discharge: <1% / Year @ 25°C
- Max continuously current: 130mA
- Max boost current: 2A, 1 second
- Size:65 x 50 x 50mm
- Net Weight: 140g
- STM32L072CZT6 MCU
- SX1276/78 Wireless Chip
- Pre-load bootloader on USART1/USART2
- MDK-ARM Version 5.24a IDE
- 2x12bit ADC, 1x12bit DAC
- 18xDigital I/Os
- LoRa™ Modem
- Preamble detection
- Baud rate configurable
- Open source hardware / software
- Available Band:433/868/915/920 Mhz
- IP66 Waterproof Enclosure
- Ultra Low Power consumption
- AT Commands to change parameters
- 4000mAh Battery for long term use
- Wireless Alarm and Security Systems
- Home and Building Automation
- Automated Meter Reading
- Industrial Monitoring and Control
- Long range Irrigation Systems,etc.
Power On/Off the LSN50
The LSN50 is power off before shipping to avoid accident during shipping. We use a jumper to power on/off the LSN50, This will be useful for monitoring power consumption when connecting to different sensors and with different software. User can power on the device by simply adding the jumper to the board , as below.
Use the AT Command
- Tips:If you want to know the more commands,you can send: AT?.)
- Flashloader(Here is just sample application.You can also use the same type of programming application.And the method is similar.)
- STM32CubeExpansion_LRWAN.zip(Include source code).
- Please follow the below of examples:
Current consumption test in "Stop mode" mode
- Remove the jumper from JP2, connect with a multimeter, and hit 20uA.
The LSN50 provide different hole size option for different size sensor case. the option now provided is M12/M16 and M20. the definition is as below:
Case Study 1: With Oil Sensor
- The oil sensor is a structure with a linear sliding resistance that shows the purpose of oil (liquid) position by sliding with different resistance values.
- This time using a length of 50cm oil sensor, slide the slider in the top 10k and sliding down to 0.
- Because the program is collected in this way: Acquisition, when the PA0 port pulled low close to 0V.As the ADC data acquisition needs current into the PA0 port will have a voltage drop.
- The example sensor length is only 50cm so the maximum of PA0 output is 1.5v.Acquisition：PA1 = 0v, PA0 = [10k / (10k + 10k)] * 3.0v = 1.5v (10k divider resistance on LSN50 and 10k resistance on oil sensor.)
- LSN50 in the stop mode mode the Vcc is about 3.3v, and the runtime is 3v.Because the sensor length is 50cm, in order to achieve the accuracy to the mm, PA0 is 1.5v and the sensor length is 50cm.1.5v/ 5000 = 3mv/ 1mm, which means 3mv stands for 1mm.
- About device's ADC is 12bit that we can calculate ADC resolution: ADC resolution = 212- 1 = 4095.
- Then calculate the actual voltage V. V = 3.0 v * Code / 4095. (Shown below)
- Finally we can calculate the liquid level of the oil sensor.Go to Calculation method.
- The accuracy and resolution of ADC :In short, the resolution is the minimum scale.The accuracy is related to the whole system, like 1v voltage and what you measure out of the system is how many volts.
- Only for our LSN50 such as:
(On TTN) The value of the first two above is 00 00, which is 0
The actual level value of H = Actual voltage V * 1000/4095 * 3 H = 0 * 3.0v * 1000 / (3.0v * 4095) (mm)
If (On TTN) data = 00 10 is 16
H = 16 * 3.0v * 1000 / (3.0v * 4095) (mm)
Case Study 2: With DS18B20 Temperature Sensor
- DS18B20 Temperature range is -55~125℃.
The delay time when the temperature changes is 750ms.Temperature measurement error is 0.5 ℃. The programmable resolution is 9~12 bits.The temperature conversion time reaches the maximum value of 750ms when the conversion accuracy is 12-bits.
- The DS18B20 is configured as 12 bits at factory shipment. When reading the temperature, a total of 16 bits are read. The first 5 bits are sign bits. When the current 5 bits are 1, the read temperature is negative. When the current 5 bits are 0, Take the temperature is positive. When the temperature is positive read method: the hexadecimal number can be converted into decimal. When the temperature is negative, the reading method is: add 1 after the hexadecimal inversion, and then convert it to 10 hexadecimal. Example: 0550H = +85 degrees, FC90H = -55 degrees.
- DS18B20, a total of 16
The first five are the positive negative 0 plus 1 The next seven bits are the integral values of the temperature, and the true value is obtained according to the complement of these seven bits The next four bits are small values of temperature, 1/16=0.0625 for LSB, Temperature = top 5 (+/ -), 7 bits (* 1).C). Final 4 (* 0.0625)
A = 8 lower reading temperature; // for example, a=0111 1110
B = 8 high reading temperature; // for example, b=0000 0101
Temp = b < < 8; //temp this value is a number of 16 digits to the left 8 bit temp=0000 0101 0000
Temp =temp =temp+b //temp is equal to 0000 0101 0111 1110 is equal to 0X57E is equal to 1406
Temp = temp * 0.0625;The final temp is equal to the actual temperature of 1406*0.0625=87.875 degrees
Order Info- LSN50-XX-YY
- 433: Best Tuned at 433Mhz
- 868: Best Tuned at 868Mhz
- 915: Best Tuned at 915/920 Mhz
- 12: With M12 waterproof cable hole
- 16: With M16 waterproof cable hole
- 20: With M20 waterproof cable hole