Author Topic: RFM69HW sensitivity with standard library settings  (Read 18466 times)

fgomes

  • Jr. Member
  • **
  • Posts: 65
RFM69HW sensitivity with standard library settings
« on: December 19, 2016, 07:36:25 PM »
I have two moteinos with a 1/4 wave straight wire as antenna and RFM69HW radio, using default radio configuration parameters. The system is working for some months, and noticed that the lowest level I see in the received messages (I log the RSSI for each received message) was -94dBm. Also noticed that when the average receive level goes down to about -85dBm I start to lose some messages, even using retries. For the standard config shouldn't be expected to receive messages down to -110dBm? This is the receiver sensitivity and the configured receiver threshold, so I was expecting to see messages received with an RSSI level near -110dBm, but it seems to be limiting the reception at about -94dBm. Am I missing some point here?

As an alternative to solve this sensitivity problem, one solution could be to reduce the bandwidth and bitrate. I have already discussed this in this forum a few months ago, I have made some tests in the past and with your help I have obtained better sensitivity results but had the need to calibrate the nodes to minimize the frequency error and to compensate the frequency for temperature variation - between day and night we could have a change of more than 20ºC in the outdoor node and almost no variation in the indoor node. Another way could be to get a better antenna, perhaps a simple dipole for a test, at least it is not so dependent of the ground plane as the 1/4 wave antenna.  Do you have any other suggestions?

The missed messages that are now occurring after some months of the system working in the field seems to be related to have some cars parking between the two nodes, they only park the cars there in the winter to avoid the cold air and ice in the morning, and the system starts to lose some messages at about 8pm and recovers completely at 8am, and it is noticeable in the RSSI graph that the average level drops. For this issue, I think that to raise the antenna could avoid the cars in the middle of the RF link between the two nodes, reducing this problem, don't you think? I have to test it in the field, but since it is more than 100km from here I want to collect all the possible ideas before going there to try them :-)

Best  regards

Fernando

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: RFM69HW sensitivity with standard initialization parameters
« Reply #1 on: December 20, 2016, 12:17:46 AM »
Quote
The system is working for some months, and noticed that the lowest level I see in the received messages (I log the RSSI for each received message) was -94dBm. Also noticed that when the average receive level goes down to about -85dBm I start to lose some messages, even using retries. For the standard config shouldn't be expected to receive messages down to -110dBm? This is the receiver sensitivity and the configured receiver threshold, so I was expecting to see messages received with an RSSI level near -110dBm, but it seems to be limiting the reception at about -94dBm. Am I missing some point here?

If you look at page 14 of the data-sheet the sensitivity at 38.4kbit is -105. At 55kbit it is a bit worse. I've certainly rx'd packets at 55kbit below -100 dBm, but when I use my own ATC which targets a packet error rate  of 5% or lower I usually end up at average RSSI's in the mid -90's. The reason is likely variability. You're quite a bit away from that though.

I've found the most common cause for these issues to be noise at the receiver. This can be conducted via the power line or the UART or radiated. I've had particularly bad experiences here with the Raspberry Pi1, but the Pi2 was also pretty bad. Power supplies differ vastly in this regard: my macbook's USB ports are so bad that I have trouble receiving below -85dBm. Apple iPhone/iPad chargers are pretty good and I use them.

The gold standard here is battery powered Moteino to battery powered Moteino. There's minimal noise with that setup. In fact when I test radio settings I typically use this setup and report the results back to my gateway to avoid the distortions that AC power and a more complicated GW setup introduce. If you need extreme range and don't want to muck around with the GW you could use this setup.

Quote
As an alternative to solve this sensitivity problem, one solution could be to reduce the bandwidth and bitrate. I have already discussed this in this forum a few months ago, I have made some tests in the past and with your help I have obtained better sensitivity results but had the need to calibrate the nodes to minimize the frequency error and to compensate the frequency for temperature variation - between day and night we could have a change of more than 20ºC in the outdoor node and almost no variation in the indoor node.

You can certainly reduce bitrate quite a bit without temp compensation. Just use a RXBW that ensures that the entire signal is within the filter bandwidth at any temperature. At low FDev's such a wide filter will hurt a little but you can get a LOT of improvement over 55kbit. Cutting bitrate in half gives you around 3 dBm in sensitivity.

Quote
Another way could be to get a better antenna, perhaps a simple dipole for a test, at least it is not so dependent of the ground plane as the 1/4 wave antenna.

Dipoles are a huge improvement over monopoles with insufficient ground plane. Just use captcha's PCB dipoles he posted here. They'll improve the link on both sides so that alone would likely completely solve your problem. You could go even further and use a directional antenna like the Yagi.

Quote
Do you have any other suggestions?

You can gain a couple dBm in sensitivity by switching on sensitivity boost:

Quote
RegTestLna (0x58)
SensitivityBoost
High sensitivity or normal sensitivity mode:
0x1B   Normal mode
0x2D   High sensitivity mode

Quote
I think that to raise the antenna could avoid the cars in the middle of the RF link between the two nodes, reducing this problem, don't you think?

Removing any metal objects between the two transceivers will definitely help  :).

Joe
 
« Last Edit: December 20, 2016, 05:45:27 AM by joelucid »

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: RFM69HW sensitivity with standard initialization parameters
« Reply #2 on: December 21, 2016, 06:09:03 AM »
Quote
I've found the most common cause for these issues to be noise at the receiver.

Because it fits so well: I just finished a new esp8266/rfm69hw gateway. To make it more resilient against bad power supplies I added a ferrite bead (http://www.digikey.com/product-detail/en/murata-electronics-north-america/BLM18PG471SN1D/490-5223-1-ND/1948399) and a feed through capacitor (http://www.mouser.de/Datasheets/_/?Keyword=NFM18PS474R0J3&FS=True&utm_source=eciaauthorized&utm_medium=aggregator&utm_campaign=viewall&utm_term=NFM18PS474R0J3) after the low noise regulator.

Now the two power supplies I tested worked as well as a battery. And I receive way lower: -105 dBm no longer a rare occurrence at 55555bit/s:

Code: [Select]
Dec 21 11:59:03 esp_817a48.lx  [38] [RX_RSSI:-102]
Dec 21 11:59:03 esp_817a48.lx  thol1 -> nd:38,nr:80,pw:-17,ph:1,vc:298,t:226,h:410,mv:267,fp:7
Dec 21 11:59:06 esp_817a48.lx  [38] [RX_RSSI:-107]
Dec 21 11:59:06 esp_817a48.lx  thol1 -> nd:38,nr:81,pw:-17,ph:1,vc:295,t:226,h:411,mv:282,fp:7
Dec 21 11:59:09 esp_817a48.lx  [38] [RX_RSSI:-105]
Dec 21 11:59:09 esp_817a48.lx  thol1 -> nd:38,nr:82,pw:-17,ph:1,vc:296,t:226,h:412,mv:282,fp:7
Dec 21 11:59:12 esp_817a48.lx  [38] [RX_RSSI:-101]
Dec 21 11:59:12 esp_817a48.lx  thol1 -> nd:38,nr:83,pw:-17,ph:1,vc:298,t:226,h:413,mv:281,fp:7
Dec 21 11:59:14 esp_817a48.lx  [38] [RX_RSSI:-104]
Dec 21 11:59:14 esp_817a48.lx  thol1 -> nd:38,nr:84,pw:-17,ph:1,vc:296,t:226,h:416,mv:281,fp:7
Dec 21 11:59:17 esp_817a48.lx  [38] [RX_RSSI:-104]
Dec 21 11:59:17 esp_817a48.lx  thol1 -> nd:38,nr:85,pw:-17,ph:1,vc:298,t:226,h:418,mv:281,fp:7
Dec 21 11:59:20 esp_817a48.lx  [38] [RX_RSSI:-104]
Dec 21 11:59:20 esp_817a48.lx  thol1 -> nd:38,nr:86,pw:-17,ph:1,vc:299,t:226,h:420,mv:282,fp:7

fgomes

  • Jr. Member
  • **
  • Posts: 65
Re: RFM69HW sensitivity with standard library settings
« Reply #3 on: December 23, 2016, 06:03:21 AM »
Hi Joe, thanks for all you tips! I was also suspecting of the interference between the CPU module and the RFM69HW, but you are right, the power supply could also be a problem - in the past I had that kind of issue and I did exactly the same thing you are now doing, ferrite + capacitor in the powerline of the RFM69HW, it was mandatory in that project to cope with a powerline adapter that was used in that project, otherwise I had a lousy Rx noise level.

This power supply decoupling you have done was only to the power of the RFM69HW right? I'm assuming that you have separated the power supply lines for the ESP and for the RFM69, and introduced this decoupling on the RFM69 side, can you confirm? In another project I'm using the ESP8266 (a podcast player) it was an hard work to do the power supply decoupling in order to remove the noise in the audio, due to the extreme current spikes the ESP generates. Since i was using an audio decoder module that didn't have separate grounds for analog and digital part, it was very difficult to get acceptable noise levels due to the current spikes on the ESP, and had to introduce this kind of filtering, plus higher capacitors really near the ESP (ESP-12E module).

I'll also order some pcb dipoles as you suggested, because the monopoles that i'm using have no specific ground plane, so their behavior will vary depending on their placement and the environment.

Once again thanks for your help!

Best regards

Fernando

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: RFM69HW sensitivity with standard library settings
« Reply #4 on: December 23, 2016, 07:22:00 AM »
Quote
This power supply decoupling you have done was only to the power of the RFM69HW right? I'm assuming that you have separated the power supply lines for the ESP and for the RFM69, and introduced this decoupling on the RFM69 side, can you confirm?

I did a first design in which I did decouple the ESP and the RFM69. I had two different ground planes for each domain and used an isolator between all logic lines between ESP and RFM69. On top of the ferrite and the filter I had a common mode choke - all only for the rfm69 subsystem.

I had assumed this would work great ... only it didn't. Especially the common mode choke severely degraded performance.

I haven't completely figured out why. My best guess is that the two ground planes which now effectively had a differential 433 mhz signal on them due to the common mode filtering were acting as antenna, feeding the noise back to the main antenna.

Now I've simplified the design: I have only one ground domain and filter the power supply for both the ESP and the RFM69 together. I have 1uF and a 500pF decoupling caps at the 8266 and the rfm69, taking care of 433 mhz noise created at each chip. The isolator is gone.

This design works much better.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: RFM69HW sensitivity with standard library settings
« Reply #5 on: December 23, 2016, 10:50:00 AM »
Generally speaking, with proper layout a single ground plane is almost always the right way forward. What's important is minimizing ground return paths to prevent loops, using ferrite and small capacitors on all I/O at the point of exit with a clean chassis ground if possible (including keypads, all I/O to other boards and power supplies) and ensuring decent differential mode filtering on all logic supplies internally. Switch mode supply chip components need to be close to the chips with low stray inductance (i.e. fat copper pours). It's possible to use the inherent capacitance of an ESD protection diode as part of the EMI filtering so that gets you ESD protection for free. A common mode choke on input supply is often needed to prevent conducted common mode noise on the supply.

I think most of these interference issues are common mode noise on I/O and connecting power supply cables which act as antennae which your real antenna would pick up and degrade the S/N on the radio receiver. The others are due to conducted noise on power supplies getting through on power supply and I/O pins of the transceiver, so using a ferrite pi-filter on all fast switching logic devices is a good thing, that means having a pi filter on the input supply to the transeiver and pi filters on the power supply or supplies to the MCU.

Mark.
« Last Edit: December 23, 2016, 10:59:58 AM by perky »

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: RFM69HW sensitivity with standard library settings
« Reply #6 on: December 23, 2016, 11:46:46 AM »
FWIW attached is my current design which works pretty well. I have about 10 dBm less noise on this one than without filters. Good thing about a ESP8266 based gateway is that you only have power coming in (other than doing debug on the FTDI header). So fix that and things should be fine.

I think I'll play around with adding the choke again. If the issue was really the two grounds may this could help even more.

BTW, now that this one doesn't have much conducted noise I notice the radiated noise much more. Fairly significant: switching my LCD displays on or having the router near a 433mhz AC plug increases noise levels by more than 10 dBm!

And here is the gateway together with 3 small loop th-motes and captcha's dipole. Th-motes have a 32.7k clock crystal and - drum-roll, this is my first mote with one - an on/off switch.  :) An air trimmer is mounted on the underside of the board.



Joe
« Last Edit: December 23, 2016, 12:09:30 PM by joelucid »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RFM69HW sensitivity with standard library settings
« Reply #7 on: December 29, 2016, 09:25:04 PM »
How much improvement are you getting now with this fancier dipole esp8266 gateway as compared to a regular monopole Moteino?  I recall that originally (https://lowpowerlab.com/forum/projects/(update)-rfm69-library-for-esp8266-moteino-compatible!/msg13730/#msg13730), with a more rough and ready dipole setup, you thought you were getting a 16dBm improvement.

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: RFM69HW sensitivity with standard library settings
« Reply #8 on: December 30, 2016, 06:47:47 AM »
Quote
I recall that originally (https://lowpowerlab.com/forum/projects/(update)-rfm69-library-for-esp8266-moteino-compatible!/msg13730/#msg13730), with a more rough and ready dipole setup, you thought you were getting a 16dBm improvement.

Oh I don't think my first dipole was any worse than this one. This one resonates at ~440 Mhz which is close but not as close as my hand-tuned one. Plus the FR-4 will give you some dielectric loss - something that doesn't matter too much here but I'm painfully aware of for the small loop.

I like to use captcha's because it's just so easy to build/use.

With this setup (captcha dipole, small loop TH motes and esp8266 gw) I can cover a good sized home entirely with every sensor sending at the lowest tx power setting of -18 dBm (powerLevel 0 in Felix terms on the rfm69w). This requires a low noise installation location for the espgw though, which will then receive down to -105 dBm or so. Have the GW next to a computer or a 433mhz AC plug and the noise might cost you 10 dBm in sentitivity which still has you easily covered.

The small loop is still not where I'd want it to be though. The circuit inside the loop costs around 6 dBm. And I'd say dielectric losses another 6 dBm or so. A copper ring for the outer loop and a circuit board / battery perpendicular and outside of the loop should improve things dramatically. Unfortunately with the range I'm getting there isn't too much motivation for pushing on.

Joe
« Last Edit: December 30, 2016, 06:57:40 AM by joelucid »

fgomes

  • Jr. Member
  • **
  • Posts: 65
Re: RFM69HW sensitivity with standard library settings
« Reply #9 on: January 02, 2017, 01:09:07 PM »
Hi Joe,

I was checking your schematic and noticed that you are using the filter to supply both the ESP and the RFM, don't you notice some interference of the ESP8266 power consumption on the RFM69? I was thinking if it wouldn't be better to have two separate filters to supply the RFM69 and the ESP8266? I didn't tried it yet, I'm waiting for the capacitors + inductors (just ordered them a few minutes ago), but as I said before, in a previous project I had lots of interference caused by power consumption spikes of the ESP8266, it caused a strong interference in all the analog signals powered by the same power supply (I had an audio decoder and audio amplifier connected to it).

BTW, I was able to send someone to check the gateway antenna placement, he found out that he had placed the antenna very close to a metallic window frame, he just re-positioning the antenna some 10cm away and that gave a signal about 10dBm better :-)

Best regards

Fernando



perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: RFM69HW sensitivity with standard library settings
« Reply #10 on: January 02, 2017, 01:40:30 PM »
All sources of high speed and potentially glitchy switching really should have a pi filter on their supplies IMO (to prevent switching noise both to and from the device). So that's the MCU and radio, and boost or buck regulators.
Mark.

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: RFM69HW sensitivity with standard library settings
« Reply #11 on: January 02, 2017, 04:26:18 PM »
Quote
I was thinking if it wouldn't be better to have two separate filters to supply the RFM69 and the ESP8266?

Or better yet three filters - one to filter any noise entering through the power line and then one radio and the MCU. I have the pi filter on the power supply and then 500pF and 0.1uF at the radio and the MCU and I chose the 500pF especially to filter in the 430 mhz area.

In the other design I talked about I had  the filter in front of the rfm69 only and also isolated the logic lines interfacing between esp8266 and rfm69. The theory was I don't care about noise in the esp8266 world, but want to keep the rfm69 clean.  But that design didn't work well because of the common mode choke - maybe due to the split ground plane. I'll attach it for illustration.

BTW, on further testing I've noticed that radiated interference plays a large role, too. You definitely want to place the gateway where there isn't much rf noise.

Quote
BTW, I was able to send someone to check the gateway antenna placement, he found out that he had placed the antenna very close to a metallic window frame, he just re-positioning the antenna some 10cm away and that gave a signal about 10dBm better :-)

Nice!

Joe

 

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RFM69HW sensitivity with standard library settings
« Reply #12 on: January 20, 2017, 08:41:47 AM »
Or better yet three filters - one to filter any noise entering through the power line and then one radio and the MCU. I have the pi filter on the power supply and then 500pF and 0.1uF at the radio and the MCU and I chose the 500pF especially to filter in the 430 mhz area.


When you put one together, have you experimented by leaving off one set of filters or another and noticing whether it, in fact, makes any difference when you later install it?  It seems like it would be a great way to finally develop hard evidence as to which ones make a difference and which ones don't.

Also, in the interest of keeping things both simple and easy, have you considered making just a shield for the Wemos D1 Mini?  That way the ESP8266 part is already handled.  Or is your board larger on purpose, so as to create greater physical separation between the ESP8266 and the RFM69?  Or is it that you wanted just a single co-planar ground plane?
« Last Edit: January 20, 2017, 11:00:04 AM by WhiteHare »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RFM69HW sensitivity with standard library settings
« Reply #13 on: January 20, 2017, 10:54:07 AM »
See attachment for side photo.

I have a different design that should be arriving within the next couple of weeks that I think will probably surpass the performance of this early attempt that's shown in the photos.
« Last Edit: January 20, 2017, 11:00:25 AM by WhiteHare »

fgomes

  • Jr. Member
  • **
  • Posts: 65
Re: RFM69HW sensitivity with standard library settings
« Reply #14 on: January 29, 2017, 09:18:40 PM »
Hi Joe,

I was trying to follow your suggestion of adding the lna sensitivity boost. To test it I have reduced the power level of one node to the minimum - setPowerLevel(0) - and moved it two floors above the other node. With the standard initialization the nodes didn't communicate. I've added the sensitivity boost - writeReg(0x58, 0x2d) - at the end of the startup function and nodes started to communicate, so it did make sense add the boost in this case. I also played with the other LNA register (0x18), and found out that even without the sensitivity boost, they communicate if I write to the REG_LNA - writeReg(0x18, 0x88). But this didn't make sense to me because 0x88 is already the default value, confirmed reading the registers after initializing it and also when I didn't initialize it. Trying to go deep on it, I have added only one call writing other default value to a different register that has nothing to do with the LNA, the RegAfcBw - writeReg(0x1a, 0x8a) - and the nodes also communicate, with only the standard initialization plus that writeReg(0x1a, 0x8a).

So it seems that if I write to a RFM69HW register at the end of the setup function, even writing values equal to the base values (for example writing 0x88 on REG_LNA, its value already was 0x88), the nodes communicate, but without that writeReg the nodes don't communicate (some messages are able to pass from time to time, but most of them fail).

Do you know the reason for this behavior? I'm not finding it! Could it be only "wrong statistics", that I didn't take a log enough observation to have meaning? I just let it receive about 10 messages (the node transmits only one message per minute) for each test...

Best regards

Fernando