Introduction: Arduino Internet of Things (IoT) Using NiceRf LoRa1276

About: Projects, Articles & tech reviews for Home & Industry

LPWAN and LORA

Internet of things (IoT) has evolved in such way that every day is cheaper, smaller and less power hungry to communicate "things" that were impossible a few years ago. Now technologies like GSM and WiFi are the most used for that task, but has their disadvantages:

GSM, 3G, LTE: High costs: A data plan is needed for communications, high energy consumption

WiFi, BLUETOOTH : Low distance coverage ( tens of meters inside buildings) high energy consumption!

To overcome the disadvantages of previous technologies, LPWAN ( Low Power Wide Area Network ) has been proposed, and must fill some requirements:

  • Oriented to devices with low data volume and sporadic communications.

  • Low power consumption, so battery operated devices could work for many years.

  • Wide area coverage to send and receive data without problems inside buildings, basements, industrial boxes, etc.

There are now a lot of technologies in the same path like LoRa, LTE-MTC, RPMA, UNB, and others more

LoRa alliance ( CISCO, IBM, SEMTECH, MICROCHIP and others ) aims to create a wireless communication standard for battery operated devices with regional, national or global coverage. The main advantage of LoRa is the use of ISM (Industrial, Scientific and Medical) bands, so every person could create their own LPWAN without paying royalties or spectrum fees, as longs as stays inside nations's regulations.


For more information, please visit: Absolutelyautomation.com

Step 1: REQUIRED COMPONENTS

Here is the list for the required components for this project with the absolute lowst prices! If tou find something cheaper somewhere, please msg me!

Step 2: NiceRF LoRa1276

NiceRF LoRa1276

There are a lot of manufacturers of LoRa compatible modules. All of them uses SEMTECH chips, guaranteeing better interoperability between different manufacturer's modules. The module used here is LoRa1276, manufactured by NiceRF. The modules cost about 20 dollars/pair (worldwide shipping included!) and incorporates SX1276 chip. The manufacturer claims 10km range in line-of-sight, and 1k in urban environments with a max transmission power of 120mW. The modules' package aren't hobbyist friendly due to distance between pads (1.27 mm) isn't compatible with standard breadboard (2.54 mm), however is possible to make a homemade adapter with a bit of creativity.

The SX1276 chip embedded in the module is able to operate from 100 MHz to 1050 MHz. However, this chip requires some external components between RF input/output pins and antenna. To minimize component burden and design complexity, the integrator put some passive and active components (capacitors, inductors, RF switch) to form a matched network, that will operate efficiently only in a small frequency range. There are different versions of modules manufactured to work in different ISM bands (a,b,c,d) to match local radio spectrum regulations, because not all countries allow to use the same ISM bands. In this example the 915Mhz version is used.

Step 3: Lora 1276 and Arduino

Lora 1276 and Arduino

Communication with the module is done via SPI, using and Arduino Nano (Clone) for the setup. Additional to the SPI signals, this module requires handling of additional signals. As the module works with 3.3 V max and Arduino Nano with 5 V, some signal level translation is required between Arduino and SX1276. If you don't have a signal level translation chip in your parts bin, you can work with resistors to make a voltage divider and work with the SPI in the lowest speed.

The module can work as a transmitter and as a receiver, but not simultaneously. The sample code is based on an example provided by NiceRF. The module can works in different modes:

  • Modulation: OOK, FSK and LoRa

  • Error detection and correction: FEC and Cheksum

  • Power modes: Low power modes (for battery operated devices ) and full power modes.

  • Interference suppression: Multiple chirp and spread factors


In the example presented, the highest power and sensibility settings were used, and works in the following way:

The transmitter sends a periodic message, on each packet sent a LED is toggled

The receiver is listening for the message, if it's received without errors a LED is toggled, if an error is detected another different LED will be toggled That's a very easy way to test the range of the devices. Put the transmitter in a fixed site and move the receiver until a bad message received or no message received at all in the expected interval of time.

The software is just a little example, but could be expanded to make a more robust system

Step 4: CONCLUSIONS

CONCLUSIONS

  • In the example presented, a wire was cut to 1/4 wavelength ( 915 MHz) as an antenna. With a better designed antenna and in a higher position like building roof, or a tower a much more range could be obtained in urban environments.

  • The module only provides the lowest OSI model layers, it's up to the user to choose an already developed communication stack or made their own according their needs.

  • To test the maximum sensitivity of the receiver (and the longest transmission range) a Temperature Compensated Crystal Oscillator (TCXO) is mandatory. The module only incorporates a low cost crystal.

  • The example shown, not exactly communicates a device with internet, but adding an Ethernet module to the Arduino is a relative simple task.

For more information, please visit: Absolutelyautomation.com