LoRa-to-LoRa, RPi gateway, MQTT, Watson IoT Platform & Node-RED dashboard

Hovig Ohannessian
3 min readJul 26, 2018

--

Adafruit Feather M0 RFM95 is a low range (LoRa) packet RF Transceiver with a RFM95W radio module. 868 MHz or 915 MHz can be used for transmission/reception. This is a great device for asset tracking (e.g. wildlife animals, pipes, sensors, smart buildings, smart cities, home automation, etc.).

We will set our radio frequency to 868MHz for this project where the transmitting LoRa will send GPS data to the receiving LoRa once the onboard LoRa radio is configured within a range of up to 1.2 miles where there’s no blocking buildings. In the cities, the range will definitely be less than 0.5 mile.

The GPS module is powered from the LoRa VCC/GND and its serial RX/TX pins which are connected to LoRa’s serial TX/RX pins. For additional check on how radio’s pins are mapped, we can see from the pinouts that:

  • Pin io1 will be connected externally to pin 9
  • Pin io0 is already connected internally to pin 7
  • Pin 8 is connected internally to the radio’s CD (chip select) pin
  • Pin 4 is connected internally to the radio’s RESET pin
  • Pin 5 will enable GPS

The receiving LoRa device is configured to listen to data received by the onboard LoRa radio then write the data to another serial port and pass it to Raspberry Pi 3.

The Raspberry Pi 3 acts as a gateway device that will use MQTT to publish the data to IBM Cloud’s Watson IoT Platform. From Watson IoT Platform, there’s a lot can be done but we will mainly grab the data and display it on a dashboard.

For the data visualization, the dashboard will mainly map the latitude and the longitude sent from the GPS module. This particular GPS type generates speed and direction data where the speed will be displayed, along with the temperature of that same location sent/received to/from Watson’s Weather Insights.

The Node-RED code will look like as the following:

This simple project will require some hardware, Watson IoT Platform and Node-RED instances setups in order to get to the final results. More step-by-step details can be found here.

--

--