LoRa Gateway Antenna Upgrade

My self-assembled LoRa Gateway used to have an inexpensive SMA antenna, which actually did not fit to the “professional” casing with its prepared openings for Type-N connectors. And having plans to install the gateway somewhere outdoor sooner or later, I decided to upgrade the antenna. I ordered the following parts:

Here are some pictures how the installation looks now …

img_3493img_3491

And what about the effect?

I did some measurements before and after replacing the old antenna using the TTN Mapper app on iPhone and a LoRaWAN node based on the Adafruit Feather 32u4 with LoRa. On two measurement points in a distance of 1280m and 748m I measured the signal strengh two times.

Result: With the new antenna, the signal strengh improved from -117dBm to -112dBm

You will have to decide on your own if this gain of about 5 dBm actually justifies the purchase of such a more “professional” antenna. I think if you just want to play around and get experience, then an inexpensive SMA antenna is good enough. But if you actually plan to place the gateway outdoor, then maybe you should consider to do what I did.

ttnmapper

Advertisements

STM32 Microcontroller and LoRa Breakout Board

Another popular approach to build LoRa nodes is to use inexpensive but powerful 32-bit microcontrollers (like the STM32 family) in combination with a LoRa RF transceiver (like the Semtech SX1276).

To make it easier to build prototypes, there are vendors that provide modules that fit onto a breadboard, like the Adafruit RFM9X LoRa Packet Radio Breakout Board.

Sure, if you build your prototypes without a breadboard, you can also use the cheaper variant of directly using a HOPERF RFM95W Transceiver Module.

I am using a STM32F103C8. I don’t go into details about programming and flashing for the STM32 family of microprocessors. Pleaser refer to this page, which is a good starting point: http://wiki.stm32duino.com .

Wiring it up …

To communicate with the STM32 microcontroller, I use a FTDI USB-to-Serial interface cable.

stm32_adafruit_rfm9x_lora_Steckplatine

Next to the SPI interface of the RFM9x, also the data ports G0 and G1 are connected to the STM32.

The LoRaWAN stack …

Again we use the Arduino LMIC communication stack from https://github.com/matthijskooijman/arduino-lmic .

You need to adapt the pin mapping as follows:

const lmic_pinmap lmic_pins = { 
 .nss = PA4, 
 .rxtx = LMIC_UNUSED_PIN, 
 .rst = PB0, 
 .dio = {PA3, PB5, LMIC_UNUSED_PIN}, 
};

Use the ttn-otaa example to connect to The Things Network.

That’s it.

Please also check this interesting project, that uses similar components and software: CitizenSensorA low budget battery powered LoRa node to smart up your city at https://github.com/orangewaylab/CitizenSensor .

IMG_3488

 

Assembly of LoRa Gateway finished

Open issues

  • I don’t use a special antenna. This one has a SMA connector and I bought it together with the LoRa board from the Imst webshop. Would be nice to have an antenna with a Type N connector, as there are already fitting openings in the metal case.
  • To get rid of an additional power supply cable, I added a cheap passive PoE injector and splitter. In an outdoor installation, this should be better an active PoE solution.

Assembling my own LoRa Gateway

The christmas holidays are coming, and I decided to dive a little deeper into LoRaWAN, The Things Network, the LoRa Nodes and the data processing and visualization in the backend.

But all of the above is hard if there is no LoRa Gateway in the neighborhood 😬.

So I decided to assembly my own LoRa Gatway using the following components:

I couldn’t wait to start assembling the gateway, but unfortunately, I had no female-to-female jumper cable at hand, so I improvised with a breadboard.

The Things Network  Community Zürich provides instructions for assembling the components and for setting up the software: From zero to LoRaWAN network in a weekend. This was all I needed to follow to get the gateway up and running.

There are still many decision to make:

  • Use a simple backplane to connect Raspberry Pi with the iC880A-SPI board instead to use these jumper cables (already decided)
  • Outdoor or indoor installation? The casing says “outdoor”.
  • Outdoor scenario: External WiFi antenna or ethernet cable?
  • Outdoor scenario: Is the antenna sufficient, or do I need something more “professional” (expensive) ?
  • Outdoor scenario: 250V or 5V power cable or Power over Ethernet (PoE) solution?

New project: LoRaWAN hacking

Inspired by the first meeting of the The Things Network Community Stuttgart this week I decided to make first steps with LoRaWAN communication. I was looking for a solution that works without soldering, and actually Dragino provides a extension module for Raspberry Pi, which is intended to build LoRaWAN solutions.

Dragino LoRA/GPS HAT

I ordered via Maker Shop EXP TECH, and actually the hardware arrived just one day after ordering. Great service.

img_2838

Next to the Semtech LoRa transceiver there is also a GPS receiver on the extension board.

As I already have experience with FSK modulation in the 868MHz band, I think the first steps will be to check out how to use this kind of communication, before switching to LoRa and LoRaWAN.