Publications

Accessibility


Basics of LoRa Technology for Crop and Livestock Management (AE1999, Dec. 2020)

LoRaWan is a new technology that can be used to remotely monitor farm assets and crop and livestock conditions. This technology is an example of “the Internet of Things” (IoT) for agriculture. This technology allows farmers and ranchers to install small sensors in fields and pastures to remotely monitor condition’s like rainfall, soil moisture and water level in stock tanks. The data can be viewed on cellphones or computer monitors.

John Nowatzki, Ag Machine Systems Specialist

Availability: Web only



LoRaWAN Technology

Agricultural producers and businesses can use data gathered through the IoT for management decisions. This technology allows farmers to install small sensor devices in their crop fields to monitor conditions such as rainfall, soil moisture and temperature. Ranchers could use LoRaWAN technology to monitor the water level in stock tanks in remote pastures. They can view the data on their cellphones or computer monitors.

LoRaWAN uses a long-range and lower-power wireless network to communicate between LoRaWAN gateways and remote nodes. LoRaWAN uses a license-free radio frequency that enables long-range transmissions (up five miles in rural areas) with low power consumption. The LoRaWAN protocols are defined and maintained by the LoRa Alliance (https://lora-alliance.org/), a nonprofit association of member companies committed to enabling large-scale deployment of LoRaWAN IoT through the development and promotion of open standards.

The nodes can be small and battery-operated sensor devices, and installed in remote locations. The LoRaWAN gateways communicate with the nodes, receiving the data from the sensor devices and transmitting signals back to the sensor devices so they can be managed remotely. The LoRaWAN gateway also functions to move the data to the Internet so it can be viewed by users.

The LoRaWAN gateway uses high bandwidth networks such as Wi-Fi, Ethernet or cellular to connect to the internet. The cellular connection is used only if a direct connection is not available because of the additional cellular subscription costs.

The LoRaWAN gateways also require electricity to function. The electricity can be supplied by a normal AC electrical supply or by a 12-volt battery. If a battery is used to power the gateway, a solar charger is required to maintain the battery power.

After the data are transferred to the internet, it needs to be managed to make it available to view on websites. There are several options to accomplish this. The method explained in this publication focuses on using an open-source software called The Things Network.

Using The Things Network to Manage LoRaWAN Systems

The Things Network (TTN) (www.thethingsnetwork.org/) is an example of a network server that can be used to receive data from gateways and make it available on the internet. The Things Network is a nonprofit, open-source online community dedicated to helping people manage LoRaWAN data from sensor devices and make it viewable on the internet.

The procedure to connect the nodes and LoRaWAN gateways to The Things Network involves several steps. Each LoRaWAN gateway and sensor device has a unique address hard coded into; the address is referred to as an EUI (a globally unique extended unique identifier). Each device’s EUI needs to be registered under an TTN application.

An example of an application on The Things Network could be several soil moisture sensor devices in crop fields all connected to one LoRaWAN gateway using LoRaWAN communication. The application also needs to be set up and registered on The Things Network.

Viewing the Data on myDevices Cayenne

To make the data viewable on the internet, it needs to be displayed on a website. You have several options to accomplish this. The method explained in this publication focuses on using a free and open-source website called myDevices Cayenne. myDevices Cayenne is a server that provides visual dashboards for sensor data collected using LoRaWAN technology (https://developers.mydevices.com/cayenne/features/). The Cayenne online dashboard allows users to visualize sensor data and define rules to send email or text message alerts if the data reach a specified level.

soil moisture sensor
Figure 1. Soil moisture sensor. (John Nowatzki, NDSU)

temperature sensor
Figure 2. Temperature sensor. (John Nowatzki, NDSU)

motion sensor
Figure 3. Motion sensor. (SimicVojislav_istockphoto.com)

rain gauge sensor
Figure 4. Rain gauge sensor. (John Nowatzki, NDSU)

GPS tag sensor
Figure 5. GPS tag sensor. (John Nowatzki, NDSU)

 

LoRaWAN gateway
Figure 6. LoRaWAN gateway. (John Nowatzki, NDSU)

Procedures to Setup a LoRaWAN System on TTN

  1. Create an account, log in and open the Console on TTN (www.thethingsnetwork.org/).
  2. Create an Application.
  • For Application ID, choose a unique ID of lowercase, alphanumeric characters.
  • For Application Description, enter any descriptive name.
  • Leave the checkbox enabled to automatically register the Application to your default region.
  • Click “Register” to finish.
  • Registering a gateway.
    • Connect the gateway to a laptop either directly with a ethernet cable or wirelessly with a Wifi network.
    • Sign into your user account on TTN server.
    • Click on the words “Register Gateway”. Complete the following steps:
      • Gateway ID: Enter the EUI on the gateway label.
      • Description: Enter a brief description.
      • Frequency Plan: Choose United States 915 MHz.
      • Router: Select ttn-router-us-west.
      • Click “Register Gateway”.
  • Register devices.
    • Open the application TTN and click “Register Device.”
    • For the Device ID, choose the application and provide a unique ID of lowercase, alphanumeric characters.
    • For Device EUI, enter the EUI that came with the device.
    • Leave the App Key blank. It will be generated automatically.
    • For App EUI, select the Application EUI generated by the TTN when the Application was created.
    • Click “Register” to finish.
    • You will be redirected to the newly registered device where you can find the generated App Key needed to activate the device.
  • Add an Integration to the Application.
    • Log in to TTN and Select Console.
      • Select an Application that you already have created.
      • Select “Integrations” at the top of the page.
      • Select “Add Integration.”
      • Choose “myDevices. (Several integrations are available on The Things Network; however, this publication uses the myDevices option.)

    Procedures to Develop Dashboard on myDevices Cayenne

    1. Create an account on myDevices Cayenne and log in (https://mydevices.com/).
    2. Select “Add a Device.”
    3. Search for the specific device to add. Devices can be searched by name or manufacturer.
    4. Add the device EUI in the “DevEUI” section.
    5. Click “Add Device.”
    6. The visualization of the sensor device data will be viewable on the myDevices Cayenne website: https://cayenne.mydevices.com/cayenne/dashboard.

    LoRaWAN Wireless Technology

    Long Range Wide Area network

    More information is available at www.thethingsnetwork.org/docs/.

    Creative Commons License
    Feel free to use and share this content, but please do so under the conditions of our Creative Commons license and our Rules for Use. Thanks.