The LoRa transmission system

published: 28 September 2020 / updated 8 October 2020

Lire cette page en français

 

Communication solutions with an ARDUINO card

Here are some possible communication solutions to an ARDUINO card.

Cable transmission

Cable transmission does not require any interface. It is possible to connect the serial port of the ARDUINO card on a telephone cable type cable:

3 pair telephone cable roll of 100 meters

This solution is suitable for short distances, around 100 meters maximum. Beyond that, there is a risk of interference, except when using shielded cables.

Cable transmission does not consume power.

The reactivity of the ARDUINO card to a command transmitted by cable is instantaneous.

For a 3 pair telephone cable type cable, price 40 €.

Bluetooth transmission

Bluetooth transmission requires a Bluetooth interface:

Bluetooth transceiver module

This solution is suitable for very short distances, typically of the order of a few meters.

Transmission via Bluetooth consumes power.

The reactivity of the ARDUINO card to a command transmitted by Bluetooth is very fast.

For an HC 06 Bluetooth module, price 6 €.

Wifi transmission

Bluetooth transmission requires a Wifi interface:

Wifi transceiver module

This solution is suitable for very short distances, typically of the order of a few ten meters.

Transmission via WiFi consumes power.

The reactivity of the ARDUINO card to a command transmitted by WiFi is very fast.

For an HC 01 Wifi module, price 6 €.

GSM transmission

GSM transmission requires a GSM interface:

GSM transceiver module

This solution requires a GSM subscription. Depending on the subscription, communications may be chargeable.

This solution is suitable for very long distance communications with fixed or mobiles equipments.

The reactivity of the ARDUINO card to a command transmitted by GSM depends on the responsiveness of the GSM network. The transmission of commands by SMS can be very random, especially for SMS sent to networks in foreign countries.

solution range *
meters
price €
wire10040
Bluetooth106
WiFi306
GSM--25 **
loRa300015

* typical range

** cost of GSM subscription and communications not included

The LoRa transmission system

LoRa is a communication technology that uses a low power wide area network. LoRa allows wireless connection of devices and gateways.

This standard does not yet require any subscription. It offers peer to peer communication

LoRa transceiver module REYAX LR890

LoRa, WiFi and Bluetooth are complementary and do not overlap. Compared to Wi-Fi and Bluetooth which offer a very short range, LoRa benefits from a very narrow bandwidth. Gateways or hubs are used barely 1% of the time by devices connected. This considerably reduces the bandwidth. Traffic is slow and unidirectional between the sensors and the gateway. LoRa is the best way to communicate over several kilometers, with very little power and in a very simple way!

The LoRa transmitter for ARDUINO

The REYAX LR890 module costs around € 15. It weighs 7 grams.

The consumption, in transmission, is 43 mA (3.3V). In reception, she is 16.5 mA and can drop to 0.5 mA in SLEEP mode.

All features are available here:
  The LORA REYAX RYLR896 transmitter

To ensure point-to-point transmission, two LoRa modules are required.

Each module is transmitter and receiver.

The ARDUINO card communicates via its serial port with the LoRa module.

All transmissions are processed through AT commands. Example:

AT+SEND=50,5,HELLO 

This string is transmitted by the ARDUINO card to the LoRa transmission module:

A LoRa module can communicate with a LoRaWan gateway. It is generally a case connected to a router by Ethernet link. It is therefore possible to have an application web that communicates with one or more LoRa modules.

Here is how to write a word .ATsend" with FlashForth on the map ARDUINO to send a message with the AT SEND command:

\ convert a number to a decimal string 
: .#s ( n ---) 
    base @ >r 
    0 <# #s #> type 
    r> base ! 
  ; 
 
\ Send data to the appointment Address n 
\ ex: AT+SEND=50,5,HELLO 
: (ATsend) ( LORAaddress str ---) 
    ." AT+SEND="  
    rot .#s    \ convert LORAaddress to string and type 
    [char] , emit 
    dup .#s    \ convert str len to string and emit 
    [char] , emit 
    type ; 
: .ATsend" ( LORAaddress ---) 
    postpone s" 
    postpone (ATsend) 
  ; immediate 
 
\ exemple (COMPILE ONLY) 
\ : lights.on ( ---) 
\    120 .ATsend" LIGHTS ON" ; 

LoRa transmission security

A single LoRa module can communicate with several remote LoRa modules.

These LoRa modules must be differentiated by their NETWORKID. The transmitter and the receiver must have the same NETWORKID.

Then, each module receives an ADDRESS, by default 0. This address is between 0..65535.

Finally, the transmission can be encrypted by AES key of 32 characters. Modules LoRa transmitter and receiver must have the same AES key. If a module receives a message encrypted with an unknown AES key, it will ignore the message.

And finally, each module is assigned a transmission frequency. Transmitter and receiver modules must work on the same frequency.

AT+BAND=868500000

Selects the transmit receive frequency on 868.5 MHz.

AT+NETWORKID=6

Select the NETWORKID to 6. It is not recommended to take the number 0 which is a public ID on the LoRa network.

AT+ADDRESS=120

Selects address 120 of the LoRa module. This is the address that will be used by SEND

AT+CPIN=FABC0002EEDCAA90FABC0002EEDCAA90

Installs 32 character string AES encryption. This key must be the same on the transmitter and receiver modules.

AT+SEND=120,9,LIGHTS ON

Transmits the string "LIGHTS ON" to the LoRa module which has address 120.

On the same frequency, a fleet of 65535 LoRa modules can be managed, each module having his address. If we send with address 0, we will address all LoRa modules.

If we add the AES encryption key, it will be hundreds of thousands of LoRa modules who can live together within a radius of a few kilometers!

The range of the modules can be increased by changing the transmit power. We can also act on the receiving antenna. With a directional antenna, one can reach 20 to 30 kilometers of range...

Conclusion

The LoRa transmission system is therefore the solution that will suit many ARDUINO assemblies requiring a long distance connection. This solution does not require any subscription with an operator.

Depending on the country, it is recommended to stay within the authorized frequencies. The signal transmission must not exceed a certain power.

Do not plan to remotely control a drone with a LoRa module. Optimal transmission time of a command via the LoRa network is very short: between 1 to 3 seconds.

It is the ideal transmission system for simple orders:

In these times when ecology is a key word, a municipality can perfectly very fine control of public lighting:

- by lighting in quarters according to certain criteria

- by turning off certain quarters at night hours without activity

With a portable application connected to the web, an operator can turn on emergency lighting of a district or the whole municipality.