The first Measurements
After getting the boards up and running, I started performing the first signal measurements.
The first thing I wanted to investigate was the primary RF output signal. I wanted to verify the
transmission timing and, most importantly, confirm that the module was actually transmitting an RF signal.
And guess what? It worked! Juhuu! :)
Unfortunately, my spectrum analyser at home is not particularly reliable when it comes to absolute power
measurements. The readings are more of an estimate than an accurate power measurement, so I would not put
too much confidence in the absolute values.
Nevertheless, the image on the right shows a LoRa transmission using a spreading factor of 9 and a bandwidth
of 812.5 kHz.
And it looks gorgeous!
The signal has beautifully steep edges, clearly defining the occupied bandwidth. It is also possible to see
that the power is not distributed perfectly evenly across the signal. However, this could be an artefact
caused by the mixer or other imperfections in my spectrum analyser.
Regardless of the measurement uncertainty, the important thing is that the signal is present and the
transceiver is working as intended.
The first Harmonic
After inspecting the fundamental signal, I also wanted to investigate the first harmonic at approximately
4.8 GHz.
The corresponding measurement is shown in the image on the right.
As expected, the harmonic has significantly lower power than the fundamental signal. Nevertheless, its
spectral shape is still clearly visible, including the relatively sharp edges.
It would be very interesting to investigate the actual power level of this harmonic and how it behaves under
different operating conditions. Unfortunately, this would require a better spectrum analyser and, ideally,
my long-standing dream of having access to an EMC chamber.
One particularly interesting observation is that the bandwidth of the harmonic appears to be approximately
twice that of the fundamental signal.
This is consistent with the expected behaviour of nonlinear RF systems, where harmonic generation can
produce spectral components at integer multiples of the fundamental frequency.
Overall, the harmonic signal looks quite clean, especially considering that this is a first measurement
using my relatively modest equipment.
How does LoRa Work?
LoRa transmits information using a modulation technique called Chirp Spread Spectrum (CSS).
Instead of representing information using a fixed carrier frequency or simply switching the carrier on and
off, LoRa uses frequency sweeps called chirps. These chirps continuously change their frequency over a
defined bandwidth.
The information is encoded by shifting the starting frequency of these chirps relative to one another.
The bandwidth determines the frequency range over which the chirps sweep. Depending on the configuration and
the transceiver, the SX1280 supports bandwidths ranging from 203 kHz to 1625 kHz.
For example, with a bandwidth of 812.5 kHz, the chirp sweeps across a frequency range of approximately 812.5
kHz.
The speed at which the chirp sweeps through this range is determined by the spreading factor (SF).
A higher spreading factor means that more chips are used to represent a symbol, resulting in a longer symbol
duration.
This has several important consequences:
- A higher spreading factor increases the processing gain and improves the receiver's ability to
detect weak
signals.
- It generally allows for greater communication range under otherwise identical conditions.
- The longer symbol duration reduces the maximum achievable data rate.
- The longer transmission time increases the energy required to transmit a given packet.
So, as is often the case in engineering, there is a trade-off between range and data throughput.
Coding Rate
Another important parameter is the coding rate.
LoRa uses forward error correction (FEC) to improve communication reliability in the presence of
transmission errors.
The coding rate determines how much redundancy is added to the transmitted data.
For example, a coding rate of 4/8 means that four information bits are represented using eight coded bits.
This provides more redundancy, allowing the receiver to recover information even if some of the transmitted
bits are corrupted.
A higher level of redundancy improves robustness but reduces the effective data throughput.
For long-range communication, a coding rate of 4/8 can be useful, particularly when the signal quality is
poor. However, it is not necessarily the best choice in every situation, since it also increases airtime.
Low Data Rate Optimisation
LoRa also provides a feature called Low Data Rate Optimisation (LDRO).
This feature is intended to improve robustness when using long symbol durations, particularly with high
spreading factors and narrow bandwidths.
It helps the receiver handle the effects of clock inaccuracies and other timing-related issues that become
more significant during long transmissions.
The Preamble
Finally, there is the preamble.
The preamble consists of a sequence of chirps that precedes the actual packet data.
Its primary purpose is to allow the receiver to detect the incoming transmission and synchronise its timing
and frequency with the sender.
Once synchronisation has been established, the receiver can proceed with decoding the packet.
The LoRa Chirps at a Glance
As mentioned earlier, LoRa transmission is based on frequency sweeps, the so-called chirps.
Basically, these are continuously rising or falling frequency sweeps across a defined bandwidth.
Depending on the frequency offset of the chirp, it represents a particular symbol.
My spectrum analyser is capable of analysing these signals, which makes it possible to visualise how the
chirps behave during transmission.
The spreading factor determines how long a chirp takes to sweep through the defined frequency range.
As expected, a transmission using a spreading factor of 12 takes significantly longer than one using a
spreading factor of 9.
This is particularly interesting because it allows the relationship between spreading factor and symbol
duration to be observed directly.
The higher spreading factor provides improved sensitivity and can increase the achievable communication
range, but it also results in a lower data rate and longer transmission times.
The images on the right show the difference between SF9 and SF12.
The timing difference is particularly striking: the SF12 symbol duration is approximately eight times longer
than the SF9 symbol duration, assuming the same bandwidth.
This is a nice illustration of how LoRa trades data throughput for improved sensitivity and communication
range.
And, of course, seeing these chirps directly on the spectrum analyser makes the whole thing much more
tangible than simply reading about them in a datasheet.