LoRa radio range tests with varying software configurations
July 03, 2023
Image source: a pretty bad creation by Dall-E
After getting my sending and receiving LoRa modules set up and ready for the next step of my journey towards understanding HAB a little better, I decided to take the sending and receiving module out for a test run to see what sort of range I can expect in a built up area near my home. This post will detail the results after using various transmission options and physical configuration.
A few notes before I dive in. Firstly, although I’ve tried to make these tests as reliable and accurate as possible, I’m still testing range through a semi built up area. There’s a mix of houses and open space, but still a lot of structures in the signal path. An ideal test would be to use direct line of sight, but I will do that at some point before a potential flight.
The space between the sender and receiver doesn’t contain any noticeable hills to get in the way of the signal. It’s roughly flat ground.
For the software side, the tests are done using the RadioLib library, which allows easy configuration of a LoRa settings like spread factor, bandwidth, power etc.., which I have tweaked to get optimum range. The settings I have tweaked work for my current setup though, and I don’t expect they work for all situations. The settings in RadioLib can be configured by using methods such as:
int state = radio.begin(433);
radio.setBandwidth(x);
radio.setSpreadingFactor(x);
radio.setCodingRate(x);
radio.setOutputPower(x);
radio.setCRC(true);
Attempt 1
- Bandwidth - 125kHz
- Spread factor - 7
- Coding rate - 7
- Output power - default (10 dBm)
- Antenna - wire on sender and wire on receiver
- Distance observed - 200m
This was the first attempt without configuring any settings. I was expecting a longer distance but on reflection and reviewing this great article, it’s no surprise the distance was so short as the settings are really dialled down.
Attempt 2
- Bandwidth - 31.25kHz
- Spread factor - 11
- Coding rate - 8
- Output power - default (10 dBm)
- Antenna - wire on sender and wire on receiver
- Distance observed - 550m
After updating the settings of bandwidth, spread factor and coding rate, the distance jumps up to 550m, but still not close to the distance I was expecting/hoping for.
Attempt 3
- Bandwidth - 31.25kHz
- Spread factor - 11
- Coding rate - 8
- Output power - default (10dBm) on receiver, maximum (20dBm) on sender
- Antenna - wire on sender and wire on receiver
- Distance observed - 930m
The third attempt was one update to the output power of the receiver only, to the maximum configurable on the LoRa module, which is +20dBm:
Attempt 4
- Bandwidth - 31.25kHz
- Spread factor - 11
- Coding rate - 8
- Output power - maximum (20dBm) on sender and receiver
- Antenna - wire on sender and wire on receiver
- Distance observed - 2.5km
This was the furthest distance I received out of all my tests, which I was very excited to see! 2.5km is a huge distance through a built up area.
Attempt 5
- Bandwidth - 31.25kHz
- Spread factor - 11
- Coding rate - 8
- Output power - maximum (20dBm) on sender and receiver
- Antenna - rubber duck antenna with pigtail extension on sender and wire on receiver
- Distance observed - 1.85km
Attempt 6
- Bandwidth - 31.25kHz
- Spread factor - 11
- Coding rate - 8
- Output power - maximum (20dBm) on sender and receiver
- Antenna - wire on sender and rubber duck antenna with pigtail extension on receiver (reverse of above)
- Distance observed - 2.05km
Attempt 7
- Bandwidth - 31.25kHz
- Spread factor - 11
- Coding rate - 8
- Output power - maximum (20dBm) on sender and receiver
- Antenna - wire on sender and rubber duck antenna without pigtail extension on receiver
- Distance observed - 2km
So apparently there’s not much noticeable difference with and without pigtail between the LoRa module and the rubber duck antenna, although wire antenna is better overall. I suspect my rubber duck antenna is poor quality, as it was only £9 from Amazon.
Although this isn’t useful for understanding likely distances when tracking a HAB, it is useful for determining which configurations are better than others when it comes to antenna usage and general settings.
Senior Engineer at Haven