When you’re looking to add some wireless functionality to a project, there are no shortage of options. You really don’t need to know much of the technical details to make use of the more well-documented modules, especially if you just need to get something working quickly. On the other hand, maybe you’ve gotten to the point where you want to know how these things actually work, or maybe you’re curious about that cheap RF module on AliExpress. Especially in the frequency bands below 1 GHz, you might find yourself interfacing with a module at really low level, where you might be tuning modulation parameters. The following overview should give you enough of an understanding about the basics of RF modulation to select the appropriate hardware for your next project.
Three of the most common digital modulation schemes you’ll see in specifications are Frequency Shift Keying (FSK), Amplitude Shift Keying (ASK), and LoRa (Long Range). To wrap my mechanically inclined brain around some concepts, I found that thinking of RF modulation in terms of pitches produced by a musical instrument made it more intuitive.
And lots of pretty graphs don’t hurt either. Signals from two different RF dev boards were captured and turned into waterfall and FFT plots using a $20 RTL-SDR dongle. Although not needed for wireless experimentation, the RTL-SDR is an extremely handy debugging tool, even to just check if a module is actually transmitting.
Amplitude Shift Keying
As the name suggests, with Amplitude Shift Keying the amplitude is shifted between two levels, like playing a single note (frequency) on a piano loudly or softly, to represent binary data. ASK modulation’s main advantage lies in its simplicity, which allows for very cheap hardware. It is also very bandwidth-efficient since it only outputs on a narrow frequency band. However, ASK modulation is badly affected by interference, which limits its effective range. A simplified form of ASK modulation is On-Off Shift Keying (OOK), where the transmitter is simply switched on (1) and off (0). This has a power saving advantage since no power is emitted for a 0 symbol. ASK is often used in cheap RF remote controls for consumer devices and automatic garage doors. RF modules that support more complex modulation schemes often can also do ASK and OOK modulation.
Frequency Shift Keying
In Frequency Shift Keying the transmitted signal shifts between two different frequencies to represent binary data, like two different notes from a piano. This would technically be 2-FSK modulation. Four different frequencies can also be used (4-FSK) to represent 01, 11, 10 and 00. FSK uses more bandwidth, but is less susceptible to interference than ASK, allowing for a much longer effective range up to multiple kilometres. On real hardware, the rapid frequency changes can cause the desired frequency to be “overshot”, creating interference. To solve this, a common variation on FSK is Gaussian FSK, where the shifts between frequencies are smoothed to help reduce the effective bandwidth of the signal. Bluetooth Low Energy uses GFSK modulation.
The current darling for long range applications is LoRa, which most Hackaday readers would have heard of many times. LoRa is a form of “chirp spread spectrum” modulation. The “chirp” signal sweeps smoothly across specific frequency range: usually 125 kHz, 250 kHz or 500 kHz wide. How long the sweep takes to complete is determined by the “spreading factor” (SF). The SF is between 7 and 12, which is equal to the number of bits encoded in each chirp. A higher spreading factor reduces the data rate, and increases power consumption, but also makes it easier for the receiver to distinguish the signal from background noise, and helps with longer-range transmissions. Data is encoded by shifting the start frequency of the sweep. When the sweep reaches the end of the top frequency, it “rolls over” and start again from the bottom frequency.
LoRa modulation allows for good receiver sensitivity and interference immunity, but it comes at the cost of bandwidth efficiency. Another disadvantage is the higher cost of hardware, partly due to the patent on LoRa modulation. All manufacturers of LoRa RF chips must pay license fees to the patent holder, Semtech.
When working with RF, it’s always a good idea to know what your local regulations are with regard to allowed frequencies and output power. You don’t want authorities knocking on your door for jamming everyone in the neighbourhood’s key fobs. If you stay within the ISM bands, usually 868/915 MHz and 2.4GHz, licensing isn’t required. However, you can always get your ham radio license, and access more of the frequency spectrum, at much higher power output to even achieve intercontinental communications.
The modulation schemes above are only some many in existence, each with advantages and disadvantages. You’ll probably end up with a few choices in your parts inventory, so don’t be afraid to play around with them for different use cases. And be sure to pull out an SDR dongle and have a look!