Microcontroller projects

LoRa without WAN

last updated: 2020-10-04

Introduction

LoRa is the first possibility to reach all devices in a house by radio without repeater (long range). The second cool feature is the minimal power needed to do so. We can power our devices with batteries for a long time. The disadvantage is the reduction of data that can be processed, but e.g. temperature control must not be that very quick.

More about LoRa and LoRaWAN will be treated in the following tutorial:

http://weigu.lu/tutorials/sensors2bus/09_lorawan/index.html

One of the goals is to use all my heating thermostats with LoRa. The first step was to dive a little deeper into sleep modes, so that the thermostat and other devices could function on battery for al long time (min. 1 year). This information can be found in the tips and tricks section and is needed to understand the following content:

http://weigu.lu/microcontroller/tips_tricks/sleep_tips_tricks/index.html

LoRa sender with DS18B20 temperature sensor on a breadboard

To use a minimum on energy we run the mega328 chip (Arduino) on internal RC with a maximum of 4 MHz. To do so we have to burn an alternative bootloader. Then we can add the LoRa chip (SX1276) by using a breakout board RFM95W from hoperf. The board needs the SPI interface (MOSI, MISO, SCK, SS), a Reset (input) and an Interrupt DIO0, to signalize if data is received.

board

By sending the temperature every 2 minutes we get over 2.3 years! for our battery life with a 1200mAh battery (2xAAA).

## LoRa sender with Promini LoRa board running on batteries

The next step was to use a PCB and I found the TTGO promini lora board from LILYGO which was really cheap and contained an Arduino (mega328p) and the SX1276 chip. I use the 868 MHz version (Europe) and the board came in version 2. Pictures showed the older version, and there was no circuit available. To understand the board, I had to draw the circuit and to reduce the power consumption to strip some components from the board.

The first LoRa sender will be an Arduino mega328p driven temperature and humidity sensor, running on 2 AAA alkaline batteries.

LoRa gateway