FHSS, or frequency hopping spread spectrum, is a popular communications approach these days. In this article, I am going to describe a simple FHSS technique that can be easily implemented for low-power designs using an 8-bit microcontroller.
The approach targets automated meter reading applications where data only needs to be sent once per day and where the industry requires a minimum of 15 years battery life. An additional design constraint is that, because there is no guarantee that a collector (the device that collects the meter readings) will be in range at any given time, there is no way to maintain synchronicity between transmitter and receiver.
FHSS was devised, not by a famous inventor, nor a trained and skilled engineer, but by a very famous actress: Hedy Lamarr. She got the idea, as the story goes, playing the piano; she thought that if radio frequencies could be changed in a seemingly random order where the sending and receiving ends are both in sequence, communications could be protected from the enemy. It was a great idea, but it was definitely ahead of its time. She filed her patent in 1942, but the technology was not realized until 1962, when it was used by US Navy ships during the Cuba blockade.
Today, FHSS is everywhere. Most often, though, it is not used to make communications secret as Ms. Lamarr envisioned. Instead, it is employed for two basic reasons. First, under the FCC rules in 10CFR47, Part 15, Paragraph 247, spread spectrum radios operating in ISM bands can transmit unlicensed with significantly more power than non-spread spectrum radios, giving them better range. Second, spread spectrum techniques provide some measure of interference rejection.
In an FHSS radio, the transmitter and receiver hop in a pseudo-random pattern over a fixed number of channels while communicating data. Transmit power, number of channels in the hopping table, hop rate, and synchronization method are all design parameters that are interrelated and that must be defined during the design phase of a project.
The technique I'm going to describe is designed for the 902-928MHz band, but can be applied to any legal operating RF band by changing the aforementioned parameters. According to 10CFR47 15.247, an FHSS transmitter with 25 channels can transmit up to 100mW with a minimum 20dB channel-width of 250kHz. That same paragraph says that if the 20dB channel-width is less than 250kHz, 50 channels must be used, and the maximum output power can be one watt. The technique I am presenting here will work with either: You just need to increase the timings and such for 50 channels.
Without going into detail, I will say that I generally stay away from the 50-channel implementation for battery-powered devices for several reasons. There are twice as many channels, which means that synchronization takes twice as long. Also, it takes quite a bit of current to generate one watt of transmit power. Along the same lines, it is very difficult to maintain that level of transmit power for the entire life of a battery. Lastly, most power amplifiers are very inefficient, and at one watt they generate a lot of heat. All of this is bad news in battery-powered applications, especially where primary-chemistry (i.e., non-rechargeable) batteries are used.
With the power level, transmit channel width, and channel count defined, the hopping rate is the next design element we need to calculate. We can use the FCC rules here as well: Paragraph 15.247 states that the average time of occupancy on any channel shall not be greater than 0.4 seconds in any 10-second period. That sets the lower limit of our hopping rate: We have to hop with a periodicity of less than or equal to every 400msec. The upper end of the hopping rate is determined by our radio itself and the data rate.
When an FSK receiver receives a packet from a transmitter, the packet generally has prepended to it a so-called "preamble" of ones and zeros in an alternating pattern. A receiver is essentially AC coupled and acts as a high pass filter; it does not like DC. The preamble establishes a DC reference that can be used to discriminate between 1s and 0s. This reference is then used for the duration of the packet to decode the frequency shifts into 1s and 0s. The one-zero-one-zero pattern is also used, in part, to determine the start of the packet and to qualify a packet; a packet cannot be received unless the minimum number of one-zero combinations is received.
Most modern FSK radios have a digital baseband that can be programmed to use varying thresholds of preamble detection. The minimum number of preamble bits combined with the application’s packet size and data rate are used to determine the upper end of the hop rate.
In our case, our packet will use 24 bits of preamble, and the packet will be 22 bytes composed of four start bytes for start-of-packet identification, 16 data bytes, and two CRC bytes. The data rate will be 128kbit/s. Therefore, it will take 1.56 msec to transmit the entire packet.
With frequency-hopping the receiver needs to be synchronized with the transmitter's hopping pattern, but most battery-powered applications require the radio to sleep between communications bursts. This is a very different situation from other radio applications, like WiFi, where the radio is essentially on all the time. In a WiFi application, synchronization is kept, once acquired, and data can stream back and forth on demand. In a battery-powered application, though, there is usually no way to maintain synchronization: Radios can be asleep or be no longer in range, or the application might require peer-to-peer communication with no central master. The FHSS algorithm employed in these applications must reachieve synchronization every time communication is required. I will describe the synchronization method next time.
In the meantime, I welcome your questions and comments.