(点击 2 次)

Accelerate LoRaWAN IoT Projects with End-to-End Starter Kits

Remote monitoring and control applications, ranging from agriculture and mining to smart cities, require a safe, rugged, low-maintenance, and relatively easy-to-use Internet of Things (IoT) sensor and actuator network for designers of these applications. Deployed long-range wireless interfaces. LoRaWAN is a good choice for this type of application, with a line-of-sight connection range of up to 15 km in rural areas and up to 5 km in urban areas—end devices with 10-year battery life.

Remote monitoring and control applications, ranging from agriculture and mining to smart cities, require a safe, rugged, low-maintenance, and relatively easy-to-use Internet of Things (IoT) sensor and actuator network for designers of these applications. Deployed long-range wireless interfaces. LoRaWAN is a good choice for this type of application, with a line-of-sight connection range of up to 15 km in rural areas and up to 5 km in urban areas—end devices with 10-year battery life.

While LoRaWAN is a mature Low Power Wide Area Network (LPWAN) technology, developers will always need a way to simplify deployment and cloud connectivity.

For engineers new to LoRaWAN IoT projects, dealing with the complexity of not only setting up wireless end devices but also connecting gateways and cloud IoT platforms is a challenge. Those jobs are a lot easier with the vendor’s starter kits, which include everything you need to build and run a prototype.

This article introduces LoRaWAN and shows how the technology complements short-range wireless sensor networks by forming an LPWAN to forward sensor data to the cloud. It then introduces and describes how to use the Digi XON-9-L1-KIT-001 starter kit to design, develop and configure an industrial platform-based LoRaWAN IoT solution. The kit contains a multi-sensor end device, a multi-channel gateway, and a device-to-cloud IoT platform.

What is LoRa and LoRaWAN?

LoRaWAN is an LPWAN technology for IoT devices characterized by tens of kilometers of coverage, low throughput (250 bits/s to 50 Kbits/s depending on carrier frequency), and very low power consumption (battery life) up to ten years, depending on the application). Table 1 compares LoRaWAN with other IoT technologies.


Table 1: LoRaWAN is an LPWAN IoT wireless protocol characterized for low-throughput, long-distance operation. This table shows how this technology compares to other wireless IoT technologies. (Image credit: Semtech)

The LoRa specification defines the physical layer (PHY) and modulation techniques that underpin LoRaWAN. The Media Access Control (MAC) layer of the protocol stack is specified by the LoRaWAN standard (Figure 1).


Figure 1: The LoRa physical layer (PHY) and modulation technology, the LoRaWAN MAC, and the application layer make up the LoRaWAN protocol stack. (Image credit: Semtech)

The key to the technology’s transmission range is the use of a modified form of Direct Sequence Spread Spectrum (DSSS) modulation. DSSS spreads the signal over a wider bandwidth than the original information bandwidth, making it less susceptible to interference, thus extending the transmission range. The disadvantage of DSSS is that it requires a highly accurate (and expensive) reference clock. LoRa Chirp Spread Spectrum (CSS) technology provides a low-cost, low-power DSSS alternative that eliminates the clock. CSS propagates the signal spectrum by generating a chirp signal with a continuously varying frequency (Figure 2).


Figure 2: LoRa CSS technology propagates the signal spectrum by generating a chirp signal with a continuously varying frequency. This technique eliminates the need for expensive reference clocks in DSSS technology. (Image credit: Semtech)

Using CSS, the timing and frequency offsets between the transmitter and receiver are equal, which further reduces the receiver design complexity. LoRa modulation technology also includes a variable error correction scheme that improves the robustness of the transmitted signal, further extending the transmission range. This results in a link budget of approximately 154 dBm for transmitter (Tx) power and receiver (Rx) sensitivity (measured in “decibel-milliwatts dBm”), allowing a single gateway or base station to cover an entire city.

In North America, LoRaWAN uses the 902 to 928 MHz Industrial, Scientific, and Medical (ISM) spectrum allocation scheme. The wireless protocol defines a 64 x 125 kHz uplink from 902.3 MHz to 914.9 MHz in 200 kHz increments. There are also eight 500kHz uplinks from 903MHz to 914.9 MHz in 1.6 MHz increments. The eight downlinks are 500kHz wide, from 923.3 MHz to 927.5 MHz. The maximum transmit (TX) power in North America is 30 dBm, but for most applications, 20 dBm transmit power is sufficient. There is no duty cycle limit, but there is a maximum dwell time of 400 ms per channel, per FCC regulations.

Mesh networking is a technology that increases transmission range by forwarding information between nodes to reach the edge of the network, but this technology increases complexity, reduces capacity and shortens battery life. Instead of using a mesh network, LoRaWAN uses a star topology where each (long distance) node is directly connected to a gateway. Nodes are not associated with a specific gateway. Instead, data transmitted by one node is usually received by multiple gateways. Each gateway then forwards packets received from end nodes to a cloud-based network server via some form of backhaul (usually cellular, Ethernet, satellite, or Wi-Fi) (Figure 3).


Figure 3: LoRaWAN uses a star topology, where each end device is directly connected to one or more gateways. Each gateway then forwards the information to a cloud-based web server via a backhaul connection. (Image credit: Semtech)

For long-distance star networks to be practical, gateways must be able to receive information from a large number of nodes. LoRaWAN achieves this high capacity by employing an adaptive data rate gateway capable of simultaneously receiving information on multiple channels. An eight-channel gateway can support hundreds of thousands of messages per day. Assuming each end device sends ten messages per day, this type of gateway can support approximately 10,000 devices. If more capacity is required, the number of gateways can be increased in the network.

LPWAN Starter Kit for Rapid Prototyping

LPWAN technology is complex and challenging for inexperienced engineers. Developers need to not only set up wireless end devices with secure, strong connections, but also connect them to gateways as part of the network and then connect to the cloud IoT platform.

Building an end-to-end LoRaWAN IoT solution is much simpler with a custom starter kit such as Digi’s XON-9-L1-KIT-001 (Figure 4). With such a starter kit, engineers can quickly become familiar with each step in the process and know they can move quickly to the next stage. Therefore, non-professionals can quickly build a complete LoRaWAN IoT solution prototype.


Figure 4: The XON-9-L1-KIT-001 LoRaWAN Starter Kit includes everything needed for prototyping network connectivity, including the HXG3000 Ethernet gateway, uplinks and downlinks, client shields, antennas, power supplies, and programming interfaces. (Image credit: Digi)

LoRa features a trade-off of network downlink latency against battery life; Digi starter kits support LoRaWAN Class A (lowest power, bidirectional end device) and Class C (lowest latency, end device receiver always on, bidirectional end device) .

This starter kit provides everything you need to quickly and safely prototype LoRaWAN. Specifically, the kit includes an uplink/downlink, an expansion board or “client shield” with a LoRaWAN module, an LED, a digital input, temperature sensor, a Digi 8-channel LoRaWAN HXG3000 Ethernet gateway, An embedded developer application programming interface (API) and a device-to-cloud 30-day free trial account with scan-ready mobile configuration.

The HXG3000 gateway provides long-range, non-line-of-sight two-way communication via LoRaWAN and can process up to 1.5 million messages per day. The product includes a 1.7 dBm omnidirectional radio with up to 27 dBm Tx power and -138 dBm Rx sensitivity. Operates in the license-exempt US 902 MHz to 928 MHz band. The device can operate on AC power or via Power over Ethernet (PoE). Ethernet and LTE Cat M1 backhaul models available.

Digi’s LoRaWAN Client Shield is part of a starter kit to meet the needs of engineers prototyping and developing LoRaWAN sensors. The device interfaces with select compatible STMicroelectronics Nucleo (eg NUCLEO-L053R8) and Arduino ARM Keil® Cortex®-M class microcontroller development boards for LoRaWAN client connectivity. In addition to the Arduino stackable connectors, the client shield features a low-power thermistor temperature sensor, digital input slide switches, and a digitally controlled red, green, and blue (RGB) LED. There is a U.FL connector on the shield and the associated antenna is also included as part of the kit. The shield also integrates a LoRaWAN module that operates in the license-exempt US 902 MHz to 928 MHz frequency band. The TX power was 14 to 20 dBm (Figure 5).


Figure 5: The XON-9-L1-KIT-001 client shield with the LoRaWAN module inside can be mounted on an STMicroelectronics Nucleo (shown here) or an Arduino board. (Image credit: Digi)

Digi X-ON is a complete device-to-cloud platform for IoT end devices. The platform also provides a cloud solution that integrates development and operation. X-ON integrates an integrated LoRaWAN network server and interfaces with the server to support devices and gateways running the LoRaWAN wireless protocol. This connection server handles the connection process, including network and application server authentication and generation of session keys.

Through this platform, developers can complete the following tasks:

・ Configure, monitor and diagnose devices or gateways from web and mobile interfaces
・ Automatic deployment of devices and gateways with the configuration application
・ Manage wireless network gateways
・ Collect and process data directly from terminal devices
・ Get real-time, two-way device data between multiple cloud platforms using the cloud-to-cloud API
・Record and track real-time data information for interactive operation and troubleshooting with end devices and gateways

Integrate data through open APIs to develop more complex applications with third-party utilities (Figure 6).


Figure 6: Digi X-ON is a device-to-cloud platform for IoT end devices. The platform enables developers to automatically deploy devices and gateways using a smartphone’s configuration application. The developer can then configure, monitor and diagnose the device or gateway from the web and mobile device interfaces. (Image credit: Digi)

Start the LoRaWAN project

Since the Client Shield, STMicroelectronics Nucleo, and Arduino boards use embedded ARM Keil microcontrollers, and “Mbed enabled for ARM Keil”, it is relatively straightforward to start a project with the Digi Starter Kit. (The ARM Keil Mbed is an IoT device platform and operating system (OS) based on a 32-bit ARM Keil Cortex M-class microcontroller.) The client shield includes an embedded AT instruction language and a simplified ARM Keil Mbed C++ Embedded API designed to abstract design complexity to simplify development.

With the Mbed compatibility of the Digi LoRaWAN Starter Kit, application development can use ARM Keil’s Mbed online resources. These resources include three options. The Mbed online compiler enables developers to start application development immediately without any installation required. The only thing required is an Mbed account.

For more advanced application development, the Digi LoRaWAN Starter Kit can be connected with Mbed Studio, a desktop integrated development environment (IDE) for building, compiling and debugging Mbed programs. Finally there is Mbed CLI, a command-line tool that can be integrated into a developer’s preferred IDE.

The fastest development route is to create a Digi X-ON account first. Next, developers need to register for an Mbed online compiler account. Then, after installing the client shield on the development board, you need to connect the component to the desktop computer with a USB cable. The “PWR” LED on the client shield and the “COM” LED on the development board will light up, indicating that the electronics are powered up.

The Mbed Online Compiler then guides the developer through a series of simple steps to add the hardware platform to the compiler. Once the hardware is added, code can be imported into the compiler from the sensor application examples in the Mbed repository (or other library) and downloaded to the board. The compiler can also be used to change the LoRaWAN configuration such as device class and network connection mode (Figure 7).


Figure 7: LoRaWAN configurations such as device class, network join mode, etc. can easily be changed using the ARM Keil Mbed online compiler. (Image credit: Digi)

As long as the gateway is running, the client shield/dev board will connect to the network and start sending uplinks every 15 seconds (in default mode). On the X-ON account page, whenever the “Stream” button is pressed, the data transmitted from the device will be displayed on the screen.

Epilogue

For designers of IoT detection and actuator networks, LoRaWAN enables license-free RF access, transmission distances of tens of kilometers, low power consumption, good security and scalability, and robust connectivity. But, like many IoT wireless protocols, handling end-device connections, configuration, gateways, and streaming sensor data to the cloud can be a challenge.

As shown, the Digi LoRaWAN Starter Kit addresses many of these issues. Features include: Client shield with simplified ARM Keil Mbed C++ embedded API, LoRaWAN gateway with Ethernet backhaul, and X-ON device-to-cloud platform with scan-ready mobile configuration. Using this starter kit, developers can quickly get up and running with LoRaWAN hardware prototypes, develop and port application code for sensors and actuators, and use the cloud platform to analyze and Display data.

Remote monitoring and control applications, ranging from agriculture and mining to smart cities, require a safe, rugged, low-maintenance, and relatively easy-to-use Internet of Things (IoT) sensor and actuator network for designers of these applications. Deployed long-range wireless interfaces. LoRaWAN is a good choice for this type of application, with a line-of-sight connection range of up to 15 km in rural areas and up to 5 km in urban areas—end devices with 10-year battery life.

While LoRaWAN is a mature Low Power Wide Area Network (LPWAN) technology, developers will always need a way to simplify deployment and cloud connectivity.

For engineers new to LoRaWAN IoT projects, dealing with the complexity of not only setting up wireless end devices but also connecting gateways and cloud IoT platforms is a challenge. Those jobs are a lot easier with the vendor’s starter kits, which include everything you need to build and run a prototype.

This article introduces LoRaWAN and shows how the technology complements short-range wireless sensor networks by forming an LPWAN to forward sensor data to the cloud. It then introduces and describes how to use the Digi XON-9-L1-KIT-001 starter kit to design, develop and configure an industrial platform-based LoRaWAN IoT solution. The kit contains a multi-sensor end device, a multi-channel gateway, and a device-to-cloud IoT platform.

What is LoRa and LoRaWAN?

LoRaWAN is an LPWAN technology for IoT devices characterized by tens of kilometers of coverage, low throughput (250 bits/s to 50 Kbits/s depending on carrier frequency), and very low power consumption (battery life) up to ten years, depending on the application). Table 1 compares LoRaWAN with other IoT technologies.


Table 1: LoRaWAN is an LPWAN IoT wireless protocol characterized for low-throughput, long-distance operation. This table shows how this technology compares to other wireless IoT technologies. (Image credit: Semtech)

The LoRa specification defines the physical layer (PHY) and modulation techniques that underpin LoRaWAN. The Media Access Control (MAC) layer of the protocol stack is specified by the LoRaWAN standard (Figure 1).


Figure 1: The LoRa physical layer (PHY) and modulation technology, the LoRaWAN MAC, and the application layer make up the LoRaWAN protocol stack. (Image credit: Semtech)

The key to the technology’s transmission range is the use of a modified form of Direct Sequence Spread Spectrum (DSSS) modulation. DSSS spreads the signal over a wider bandwidth than the original information bandwidth, making it less susceptible to interference, thus extending the transmission range. The disadvantage of DSSS is that it requires a highly accurate (and expensive) reference clock. LoRa Chirp Spread Spectrum (CSS) technology provides a low-cost, low-power DSSS alternative that eliminates the clock. CSS propagates the signal spectrum by generating a chirp signal with a continuously varying frequency (Figure 2).


Figure 2: LoRa CSS technology propagates the signal spectrum by generating a chirp signal with a continuously varying frequency. This technique eliminates the need for expensive reference clocks in DSSS technology. (Image credit: Semtech)

Using CSS, the timing and frequency offsets between the transmitter and receiver are equal, which further reduces the receiver design complexity. LoRa modulation technology also includes a variable error correction scheme that improves the robustness of the transmitted signal, further extending the transmission range. This results in a link budget of approximately 154 dBm for transmitter (Tx) power and receiver (Rx) sensitivity (measured in “decibel-milliwatts dBm”), allowing a single gateway or base station to cover an entire city.

In North America, LoRaWAN uses the 902 to 928 MHz Industrial, Scientific, and Medical (ISM) spectrum allocation scheme. The wireless protocol defines a 64 x 125 kHz uplink from 902.3 MHz to 914.9 MHz in 200 kHz increments. There are also eight 500kHz uplinks from 903MHz to 914.9 MHz in 1.6 MHz increments. The eight downlinks are 500kHz wide, from 923.3 MHz to 927.5 MHz. The maximum transmit (TX) power in North America is 30 dBm, but for most applications, 20 dBm transmit power is sufficient. There is no duty cycle limit, but there is a maximum dwell time of 400 ms per channel, per FCC regulations.

Mesh networking is a technology that increases transmission range by forwarding information between nodes to reach the edge of the network, but this technology increases complexity, reduces capacity and shortens battery life. Instead of using a mesh network, LoRaWAN uses a star topology where each (long distance) node is directly connected to a gateway. Nodes are not associated with a specific gateway. Instead, data transmitted by one node is usually received by multiple gateways. Each gateway then forwards packets received from end nodes to a cloud-based network server via some form of backhaul (usually cellular, Ethernet, satellite, or Wi-Fi) (Figure 3).


Figure 3: LoRaWAN uses a star topology, where each end device is directly connected to one or more gateways. Each gateway then forwards the information to a cloud-based web server via a backhaul connection. (Image credit: Semtech)

For long-distance star networks to be practical, gateways must be able to receive information from a large number of nodes. LoRaWAN achieves this high capacity by employing an adaptive data rate gateway capable of simultaneously receiving information on multiple channels. An eight-channel gateway can support hundreds of thousands of messages per day. Assuming each end device sends ten messages per day, this type of gateway can support approximately 10,000 devices. If more capacity is required, the number of gateways can be increased in the network.

LPWAN Starter Kit for Rapid Prototyping

LPWAN technology is complex and challenging for inexperienced engineers. Developers need to not only set up wireless end devices with secure, strong connections, but also connect them to gateways as part of the network and then connect to the cloud IoT platform.

Building an end-to-end LoRaWAN IoT solution is much simpler with a custom starter kit such as Digi’s XON-9-L1-KIT-001 (Figure 4). With such a starter kit, engineers can quickly become familiar with each step in the process and know they can move quickly to the next stage. Therefore, non-professionals can quickly build a complete LoRaWAN IoT solution prototype.


Figure 4: The XON-9-L1-KIT-001 LoRaWAN Starter Kit includes everything needed for prototyping network connectivity, including the HXG3000 Ethernet gateway, uplinks and downlinks, client shields, antennas, power supplies, and programming interfaces. (Image credit: Digi)

LoRa features a tradeoff of network downlink latency against battery life; Digi starter kits support LoRaWAN Class A (lowest power, bidirectional end device) and Class C (lowest latency, end device receiver always on, bidirectional end device) .

This starter kit provides everything you need to quickly and safely prototype LoRaWAN. Specifically, the kit includes an uplink/downlink, an expansion board or “client shield” with a LoRaWAN module, an LED, a digital input, temperature sensor, a Digi 8-channel LoRaWAN HXG3000 Ethernet gateway, An embedded developer application programming interface (API) and a device-to-cloud 30-day free trial account with scan-ready mobile configuration.

The HXG3000 gateway provides long-range, non-line-of-sight two-way communication via LoRaWAN and can process up to 1.5 million messages per day. The product includes a 1.7 dBm omnidirectional radio with up to 27 dBm Tx power and -138 dBm Rx sensitivity. Operates in the license-exempt US 902 MHz to 928 MHz band. The device can operate on AC power or via Power over Ethernet (PoE). Ethernet and LTE Cat M1 backhaul models available.

Digi’s LoRaWAN Client Shield is part of a starter kit to meet the needs of engineers prototyping and developing LoRaWAN sensors. The device interfaces with select compatible STMicroelectronics Nucleo (eg NUCLEO-L053R8) and Arduino ARM Keil® Cortex®-M class microcontroller development boards for LoRaWAN client connectivity. In addition to the Arduino stackable connectors, the client shield features a low-power thermistor temperature sensor, digital input slide switches, and a digitally controlled red, green, and blue (RGB) LED. There is a U.FL connector on the shield and the associated antenna is also included as part of the kit. The shield also integrates a LoRaWAN module that operates in the license-exempt US 902 MHz to 928 MHz frequency band. The TX power was 14 to 20 dBm (Figure 5).


Figure 5: The XON-9-L1-KIT-001 client shield with the LoRaWAN module inside can be mounted on an STMicroelectronics Nucleo (shown here) or an Arduino board. (Image credit: Digi)

Digi X-ON is a complete device-to-cloud platform for IoT end devices. The platform also provides a cloud solution that integrates development and operation. X-ON integrates an integrated LoRaWAN network server and interfaces with the server to support devices and gateways running the LoRaWAN wireless protocol. This connection server handles the connection process, including network and application server authentication and generation of session keys.

Through this platform, developers can complete the following tasks:

・ Configure, monitor and diagnose devices or gateways from web and mobile interfaces
・ Automatic deployment of devices and gateways with the configuration application
・ Manage wireless network gateways
・ Collect and process data directly from terminal devices
・ Get real-time, two-way device data between multiple cloud platforms using the cloud-to-cloud API
・Record and track real-time data information for interactive operation and troubleshooting with end devices and gateways

Integrate data through open APIs to develop more complex applications with third-party utilities (Figure 6).


Figure 6: Digi X-ON is a device-to-cloud platform for IoT end devices. The platform enables developers to automatically deploy devices and gateways using a smartphone’s configuration application. The developer can then configure, monitor and diagnose the device or gateway from the web and mobile device interfaces. (Image credit: Digi)

Start the LoRaWAN project

Since Client Shields, STMicroelectronics Nucleo and Arduino boards use embedded ARM Keil microcontrollers, and “Mbed enabled for ARM Keil”, it is relatively straightforward to start a project with the Digi Starter Kit. (The ARM Keil Mbed is an IoT device platform and operating system (OS) based on a 32-bit ARM Keil Cortex M-class microcontroller.) The client shield includes an embedded AT instruction language and a simplified ARM Keil Mbed C++ Embedded API designed to abstract design complexity to simplify development.

With the Mbed compatibility of the Digi LoRaWAN Starter Kit, application development can use ARM Keil’s Mbed online resources. These resources include three options. The Mbed online compiler enables developers to start application development immediately without any installation required. The only thing required is an Mbed account.

For more advanced application development, the Digi LoRaWAN Starter Kit can be connected with Mbed Studio, a desktop integrated development environment (IDE) for building, compiling and debugging Mbed programs. Finally there is Mbed CLI, a command-line tool that can be integrated into a developer’s preferred IDE.

The fastest development route is to create a Digi X-ON account first. Next, developers need to register for an Mbed online compiler account. Then, after installing the client shield on the development board, you need to connect the component to the desktop computer with a USB cable. The “PWR” LED on the client shield and the “COM” LED on the development board will light up, indicating that the electronics are powered up.

The Mbed Online Compiler then guides the developer through a series of simple steps to add the hardware platform to the compiler. Once the hardware is added, code can be imported into the compiler from the sensor application examples in the Mbed repository (or other library) and downloaded to the board. The compiler can also be used to change the LoRaWAN configuration such as device class and network connection mode (Figure 7).


Figure 7: LoRaWAN configurations such as device class, network join mode, etc. can easily be changed using the ARM Keil Mbed online compiler. (Image credit: Digi)

As long as the gateway is running, the client shield/dev board will connect to the network and start sending uplinks every 15 seconds (in default mode). On the X-ON account page, whenever the “Stream” button is pressed, the data transmitted from the device will be displayed on the screen.

Epilogue

For designers of IoT detection and actuator networks, LoRaWAN enables license-free RF access, transmission distances of tens of kilometers, low power consumption, good security and scalability, and robust connectivity. But, like many IoT wireless protocols, handling end-device connections, configuration, gateways, and streaming sensor data to the cloud can be a challenge.

As shown, the Digi LoRaWAN Starter Kit addresses many of these issues. Features include: Client shield with simplified ARM Keil Mbed C++ embedded API, LoRaWAN gateway with Ethernet backhaul, and X-ON device-to-cloud platform with scan-ready mobile configuration. Using this starter kit, developers can quickly get up and running with LoRaWAN hardware prototypes, develop and port application code for sensors and actuators, and use the cloud platform to analyze and display data.


"Remote monitoring and control applications, ranging from agriculture …