I have been developing a sensor and actuator network for a while now using HopeRF’s cheap RFM69 HW modules. These modules use the licence-free ISM and SRD frequency bands (433 MHz resp. 868 MHz) to send and receive packets and they cost around 5€ per module. HopeRF sells them in two different flavours: RFM69W and RFM69HW (RFM69CW and RFM69HCW also available in a different form factor).
The main difference between these two types is the maximum output power. While a RFM69W module can “only” output from -18 dBm to +13 dBm, the maximum output power of a RFM69HW module is +20 dBm (=100 mW). They are really great indoors because of their range and low attenuation compared to WIFI frequencies of >2 GHz.
There is a downside however: The datasheet is kind of… sketchy regarding some important information. Much better than the datasheet of the previous generation of RF modules (RFM12 for example), but still hard to understand in some parts. I will try to figure out the power level settings of +20 dBm RFM69HW modules in this post while comparing them to the regular RFM69W modules. Of course the datasheet contains information about setting the output power, but there are some ambiguities and contradictions. But more on that later…
First of all, it is worth noticing that the high power modules have two power amplifiers on board (PA1 and PA2). The regular RFM69W modules only have one power amplifier PA0. It is a fact that PA0 can only be used with the regular modules while the high power modules can only use PA1 and PA2, probably due to hardware components fitted/not fitted.
In order to set the output power of high power devices, you have to enable PA1 or PA1 together with PA2 first. Then you can set the power level in register 0x11 from 0 to 31. Depending on the enabled PA combination, you get two different relationships between power level (register value) and output power [dBm]. The following table (taken from the datasheet) gives an overview.
Sound easy, right? Well, it isn’t…
If you look at the power ranges and the formulas, you notice that (except for PA0) the OutputPower must have an offset of 16 for the formula to actually make sense and match the given power range. Later in the datasheet this is explained in a footnote: “Only the 16 upper values of OutputPower are accessible [if you use PA1 or PA1+PA2].” Okay, understood.
Then there is also another possibility: You can switch on the “high output power +20dBm settings” by writing special values in two registers. According to the datasheet you have to do this to really get the +20 dBm output power. Otherwise (with PA1+PA2 enabled) you “only” get +17 dBm. It would be interesting to know what really happens behind the curtains when these high power settings are enabled. Just by looking at the formula and power range, you notice a +3 dB difference between these settings. So maybe the output power is just doubled?
There is also another interesting plot in the datasheet:
Using PA0 with a RFM69HW module is pointless, you get no output. So the PA0 measurement results are probably made with a regular RFM69W module. It is also interesting that according to the curves you get around 2-3 dBm more output vs. programmed power if you only use PA1. Using PA1+PA2 the output power seems to be more precise. PA1+PA2 with high power settings is only used for output powers greater than +17 dBm. But looking at the table before, you could also go down to +5 dBm with this setting.
So let’s say we want to set an output power of +7 dBm. Which setting do we use? There are 3 possibilities (only PA1 enabled, PA1+PA2 and PA1+PA2 with +20 dBm high power settings). Does it matter which setting we use? What could be advantages or disadvantages?
Personally I use these modules in low power battery applications, so the amount of current consumption is interesting to me. I don’t want to have more output power than needed for a given range between sender and receiver. And I don’t want to consume more power while sending packets than I need because of battery life.
So to answer these questions I made an experiment. I put one RFM69HW module at the one end of my flat and another one at the other end, covering a distance of about 10 meters with some walls and doors between them. One module just receives packets and logs the RSSI value during reception. A STM32 controller fetches the packets and transmits them to my PC. The other module (also in connection with a STM32) is configured as a sender, it iterates over every register power level from 0 to 31 and every PA setting (that is: PA1 enabled, PA1+PA2 enabled and again both tests with +20 dBm high power settings enabled). During every iteration 5 packets are sent out in short intervals to average the results. Every packet payload contains the current power setting, so the receiver knows the current sender configuration and can correlate the measured RSSI value with the power setting. I repeated the same test with a regular RFM69W on the sender side to get results with PA0.
Another thing which interested me: What is the current consumption while sending these packets? Again, iterating over some (not all) power constellations, I switched on the unmodulated TX carrier and measured with an amperemeter. I may have violated the 1% duty cycle rule during this test, but it’s for a greater cause, right? 😉
Now to the results… I put all the received packets and RSSI values in a CSV file and produced an Excel sheet with some plots. There are a few surprises.
First let’s look at the measured RSSI value vs. power level (register value from 0 to 31):
The first surprise is that if using PA1 and PA2 together, you DO get output for power levels smaller than 16. An ascending power level from 0 to 15 leads to an ascending RSSI value, then it drops and again ascends from 16 to 31. This is a contradiction to the footnote saying that only the upper 16 values are accessible. At least that seems to be valid if only PA1 is enabled. I do not know what really happens for power levels <16, and since the datasheet kind of prohibits these values, I give them no further thought. It is interesting that PA1 with the highest power setting leads to an RSSI value which is comparable to that of the +20 dBm setting with PA1+PA2 enabled. PA1 with “+20 dBm high power settings enabled” (yellow) performs quite badly and this constellation is not even considered in the datasheet, so no further thoughts here either. Keep in mind that there are different output formulas for the PA constellations, so this plot may be confusing. PA1+PA2 vs. PA1+PA2 (HP) actually perform quite the same.
This plot here takes the different formulas into consideration:
Again, ignore the values of PA1+PA2 before the drop because these are the “forbidden” power levels from 0 to 15. You see that the curves of PA1+PA2 and PA1+PA2 (HP) nearly overlap except for the highest power settings. It is interesting that the highest power setting of PA1+PA2 leads to a greater RSSI than PA1+PA2 (HP). You can also see that the calculated output powers of PA1 do not match the ones of PA1+PA2 when the same RSSI value is considered. This confirms the plot of the datasheet as shown earlier. The experiment also confirms that using only PA1 you can get lower power settings than using PA1 and PA2 together. If you want to bridge only short distances, use RFM69W devices (only PA0) because you can reduce the output power significantly compared to the high power modules.
As earlier announced I also examined the current consumption of the RFM69 modules while sending with different power settings. Correlating these findings with RSSI values on the receiver end leads to the following plot:
To sum it up: PA1 (orange) seems to perform best and gives the best current vs. RSSI relation. PA1+PA2 and PA1+PA2 (HP) play in the same league but looking more carefully PA1+PA2 performs slightly better when looking at the current consumption. Only when output powers greater than +17 dBm are needed, PA1+PA2 (HP) should be used.
PA0 (RFM69W) looks quite disappointing compared to PA1 (RFM69HW) when the current consumption gets to around 25 mA: PA1 seems to be performing better. Of course the minimum current consumption is smaller in RFM69W modules because of their smaller minimum output power.
At last a plot showing the current consumptions vs. different calculated output power settings according to the formulas in the datasheet.
There are also the “forbidden” power levels from 0 to 15 included, so you can ignore those. PA1+PA2 and PA1+PA2 (HP) are nearly the same. PA1 is always some milliamperes below the other two PA constellations which of course is good. Considering the earlier findings where I said that the calculated output power is actually below the real output power (also according to the datasheet), this is even better.
So again my conclusion for now:
If you use RFM69HW modules, enable PA1 (and only PA1!) for output powers less than +13 dBm. Combine PA1 and PA2 for powers between +13 dBm and +17 dBm. And only if you need more power, use PA1+PA2 with high power settings to get more than +17 dBm.
RFM69HW modules seem to perform slightly better than regular RFM69W devices while keeping the output power constant. Since they only cost a little bit more, I would recommend these high power modules in nearly every application. Of course, if the distance between sender and receiver is only very small, go for RFM69W modules.
I developed a library written in C++ where these findings are taken into account. You can find the relevant blog post here.
If someone is interested in the raw data:
- Excel sheet with received packets, RSSI values and current consumption
- Excel sheet with current consumptions
That’s it for now. 😉