RFM69 output power


As I was mentioning in my 1000.1000 Hardware selection, I have opted for the cool RFM69HW radio module. Weirdly enough, in quite a few sources (big distributor and ebay) the higher power HW module is cheaper. So there ie no reason not to get the higher power module, given quantity discounts. But I want it to operate at lower power most of times. The datasheet does not show any differences at lower power, so I had no reason not to go for the higher power module. It even says so on the features list on the front page, I can turn the power down to -18dBm.

What happens?

Unaware of the full details, frustration emerged when I started mixing in both types of modules. The Radiohead implementation I am using (1.71) makes sure no single power value will work for both module types: over 13 dBm and a W module will not work, under 14 dBm and a HW module will not work.  Digging through the code shows no problems, it does not really work as expected, but it should. The datasheet makes things more clear which power amplifier to enable based on the level and the library implements it properly. We can see there is some overlapping in the ranges as well.

A nice graph shows the power levels, from which we can see that the power ranges in the middle are achievable with different configurations.

So doing some digging around the datasheet of the IC, same one present on both modules, we learn that the IC contains 2 types of amplifiers. PA0 is the lower power one and is always directly connected to the LNA input and both to the antenna. For higher power, one has to use additionally the PA1 and PA2 and optionally a BOOST setting to squeeze out the last couple of dB. So how are these connected on the actual module. The RF69 datasheet shows a blurry picture of the module schematic for up to 13dBm output power, on page 76/77. We see that PA1 and PA2 never reach the antenna, just PA0.

Compared to that, the high power RFM69HW uses a switch which is driven by RX/TX pin, after some module reverse engineering. This means that only PA1 and PA2 reach the antenna, and never PA0, during transmission.

Fixing it

The fix lies in understanding how the modules work. Because it uses only PA0,  the RFM69W can only have PA0 turned on and the output power ca be adjusted between -18 and +13 dBm. The high power RFM69HW can only use PA1 or PA2 or both, but never PA0, so the output power range is -2 to +20 dBm. Now the curves on the graph above make sense: the blue one works for RFM69W and the other colors are valid for RFM69HW!

This means that the code used to configure the modules needs to know which type I am using in order to configure the power output within the overlapping range. I fixed the function controlling the output power and will suggest the changes to the Radiohead developers.

With the power setting correctly implemented, the library can properly set a power level, within the limits, for either module. A quick test shows that knowing which module is attached, any power between -18 and +20 dBm can correctly set each module within the appropriate limits. Measuring the RSSI at a nearby node, we can observe that the RFM69HW is capped down below -2 dBm and the RFM69W is capped up above +13 dBm. The measurements were quick and dirty, so take them with a grain of salt.

Hardware  fix

There is a posibile hardware fix: the RF69 IC should make sure not to switch the antenna to PA_BOOST when the power level is set low, but that might require a new chip revision.

The software fix can get the RFM69HW down to -2 dB, with few users wanting to go lower as reducing the output power does not bring much benefit in power consumption.

Code fix for power setting function

Use for whatever other library driving the RFM69, original implementation coming from Radiohead library.

void RH_RF69::setTxPower(int8_t power)
 _power = power;
 uint8_t palevel;
 #ifndef RFM69_HW
 if (_power < -18) _power = -18;
 if (_power > 13) _power = 13; //limit for RFM69W
 palevel = RH_RF69_PALEVEL_PA0ON | ((_power + 18) & RH_RF69_PALEVEL_OUTPUTPOWER);
 if (_power < -2) _power = -2; //RFM69HW only works down to -2.

if (_power <= 13)
 // -2dBm to +13dBm
 //Need PA1 exclusivelly on RFM69HW
 palevel = RH_RF69_PALEVEL_PA1ON | ((_power + 18) & RH_RF69_PALEVEL_OUTPUTPOWER);
 else if (_power >= 18)
 // +18dBm to +20dBm
 // Need PA1+PA2
 // Also need PA boost settings change when tx is turned on and off, see setModeTx()
 palevel = RH_RF69_PALEVEL_PA1ON | RH_RF69_PALEVEL_PA2ON | ((_power + 11) & RH_RF69_PALEVEL_OUTPUTPOWER);
 // +14dBm to +17dBm
 // Need PA1+PA2
 palevel = RH_RF69_PALEVEL_PA1ON | RH_RF69_PALEVEL_PA2ON | ((_power + 14) & RH_RF69_PALEVEL_OUTPUTPOWER);
 spiWrite(RH_RF69_REG_11_PALEVEL, palevel);
Bookmark the permalink.


  1. Based on +13dbm Schematic version, I am interested to know how the resonant frequency and tuning is achieved, I can see capacitors and Inductor values in the datasheet for 868Mhz, but cannot make sense of the LC circuit above.

    • Do you mean the L2 and C1 connected to VR_PA pin? That is the output of the amplifier regulator connecting to the amplifier output (in DC)

  2. Great job. Was just using an RFM69HW with (as it turns out) older radiohead and found the same thing. No output (spectrum analyzer sniffing the antenna in near field). I had it working with the lowpowerlabs firmware, so knew it had to be some software issue. Was single stepping the code and spotted the PA0 issue. Changed to 14 dB and it worked, so before changing the source code I googled and found your posting here that confirmed the radiohead code bug. Just goes to show the need to find the latest source code. Too many git pulls out there. Anyhow, thanks for your post.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.