Improving RFM69 radio range by adding an external LNA



  • Hello, I am happy to work with some my sensors nodes! thanks for the graet work you do!. I need some help,
    I have a Mysensors setup as follows, RFM69HW radios, an online RPI running domoticz connected to an ethernet Gateway on top a 4th floor terraze, an omnidirectinal antenna 8dB, 8 meters of antenna cable that loss 6dB including connectors, independent 3.3V low noise power supply for radio. Node's set up is Arduino promini 3.3V, RFM69HW radios, 8dB Ceramic antenna , independent power supply 3.3V regulators MIC5003 for radio and other for arduino promini. I have to increase the range. Now I have perfect link with a 130m distance, but I need to increase the range because other nodes have some walls and others are farther. I also have configured de modem mode to 4800 Tx rate and link increases the range in 10 meters more but not enoug.
    My plan is to add a LNA in the gateway antenna and a LNA chip in the RFM69HW radio Break-out board I have that connect it to the Arduino, to make more sensible the link and increase the range. I see that this radio has a register containing the radio state (Tx or Rx) that can be used (the registed value) for by-passing the LNA when radio is in transmission and connect the LNA when radio is in receiving state, But I cannot figure out how to get this register in to a pin in the arduino, then I can use this arduino pin to enable or disable the LNA. I ask this because according to my quick research there is no bidirectional LNA. I hope with this arrangement to pick-up signal as low as -120dB. I cannot use repeater nodes because I have no way to supply them (unless solar, but it is expensive and ugly). I cannot use big external antennas in nodes although the nodes are in fixed position, I have tested small smd antennas but the ceramic antennas work better then I decided to is this one. I hope someone that have work in the radio library can tell me how to get the radio state (tx/rx) in an arduino pin output, or even in some of DIO pins in the RFM69HW radio that can be used to control the (external) LNA. Thanks


  • Mod

    @jimy-aguirre you might be able to use these (but I am not 100% sure because I have not used them myself):
    #define MY_DEFAULT_RX_LED_PIN
    #define MY_DEFAULT_TX_LED_PIN

    See https://www.mysensors.org/apidocs/group__lEDSettingGrpPub.html for details.

    Or even easer, implement MY_INDICATION_HANDLER as described in https://forum.mysensors.org/post/89230 to switch on/off the LNA.

    An alternative might be to switch to RFM69 with lower frequency (if legal in your area), or to a RFM95/96/97/98 with LoRa support that can get you sensitivity down to -148dBm.

    Going down to 1200 bps should give you 4dB compared to 4800. The datasheet says you can an additional 2dB by doing this: "Set SensitivityBoost in RegTestLna to 0x2D to reduce the noise floor in the receiver" but I am not sure of MySensors supports that.



  • @mfalkvidd Had thought to query frequency but became increasingly confused by the information presented in relation to the 4 floor building and omnidirectional antennae, but the ethernet gateway on 8m of antenna cable stopped me dead at 6dB loss and 8dB ? and ceramic antennae which is impossible even as dBi. I relented from writing the analogy of the retired obstetrician getting 150% exam pass mark after changing engine spark plugs via the exhaust pipe, hence not banned...yet..
    The principle driver for folks using high frequency seems to be the aesthetics of the device due a perception over size on antennae without some lateral thinking.
    If for any reason the black 433MHz rubber ducks on my nodes offended my eye a lick of white paint would render them almost invisible against the white walls, but range has never ever been an issue through multiple barriers, and all are low power devices.
    If I wanted vertical penetration through 4 floors I would align the antennae horizontal, a dipole or quad can be disguised in the rim of a lampshade or a picture frame, nobody lives in clean rooms, I plead the 5th when it comes to this place.
    If this is not a theoretical but real scenario @Jimy-Aguirre, perhaps a little more information may help...



  • Hello, Thanks for help. @mfalkvidd I have read the forum and the API instructions you mentioned, It looks like what I need to get the extra range I require now, I think I will use the MY_INDICATION_HANDLER option. When I get it working I will update the post.
    @zboblamont, Thanks for your post, The gateway is in the 4th floor in a building but the nodes are around the building in different houses. I am collecting energy readings in a small area and just for few houses only, but some nodes are apart 700m. My current set-up only gives me 130m, my main purpose is to test the link range of my node devices. The orientation of the omnidirectional antenna is vertical. Then I think the best option is to install a good LNA like this, in both Gateway and node, of course a small LNA in the node because of the available space. I will try it. Anyway it is very possible I have to use repeater nodes. Thanks again to both of you.


  • Mod

    @jimy-aguirre might it be possible to move the gateway closer to the antenna so you can get rid of (at least some of) the cable attenuation?



  • @jimy-aguirre I second @mfalkvidd 's suggestion of relocating the gateway (or indeed Gateway+Controller), 6dB is a brutal loss, cutting your signal to ca 25% from vague memory.
    From the amplifier spec of 890-960 MHz your selected frequency is limited in range and penetration by default, even 433MHz nodes with full antennae would struggle to get 700m through structures.
    No experience in using LoRa as suggested earlier, but many sing it's praises and it may offer a possible solution..



  • It sounds like you are getting excellent range.

    If you haven't spent a lot of time with locating, orienting, tuning/optimizing the antennas (and feed line) on your gateway and your nodes, this can make a big difference. I noticed you mentioned 8db omni antenna. Of course a true omnidirectional antenna would radiate in a sphere, and gain above 0db means directionality.

    Good antenna info at Low Power Labs. A few notes from reading there and other places :

    • No antenna is omnidirectional in 3 dimensions. Radiation patterns either give OR take. Vertical or horizontal orientation impact is not intuitive and varies by antenna type and desired directionality both horizontal and vertical.

    • Use feed line in half-wavelength multiples to minimize RF going back to the transmitter

    I only mention this because it sounds like it might be much easier than working on the radios. Of course, maybe you have already done these things.

    Good luck!

    Tim



  • Hi to all, wow, all of your suggestions are great. Thanks for the tip/help you provided. About to cut the Rf cable in half-wavelength multiples I have to say I did not have read about it before. Thanks @Grubstake. I understand that the vertical antenna gain pattern is like a big donut in horizontal position. After read the Low Power Labs antenna reading I think if is it a good idea to put a ground plane to the antenna I have in a 5 meter mast, the antenna is about 1.6 meter (it is long for the working frequency of 915Mhz, the wave length is 0.328 meter) it mean it is almost 5 wavelength. I don't know how is the internal antenna structure, but the external appearance is like a fluorescent light tube.
    I will change the antenna cable, I have the RG58 now I will use the LRM400 that I have ordered and now I am waiting it arrives. It is supposed to be more efficient (less loss). And I am figuring out how to put the gateway closer to the antenna as it is suggested by @mfalkvidd and @zboblamont. I will do all his mods I am sure they will help, I have ordered two of this LNA/PA to install in the antenna line two of the same modules. One connect as PA and the other connected as LNA, I am still looking for the RF switches in “ready to use board” but I did not find it yet.
    Also as I am planing to put RF PA and LNA stages in the radio break-out PCB to be used with the RFM69HW, I am reading about the RF PA and LNA IC chips parameters and now I am defining the working parameters what I need, for example the P1dB is the point where the linearity is lost. And NF lower is better, IP3 bigger is better. Max input is defined in some data-sheets, but some data-sheets are not clear about the max output, but I think it is near the P1dB. The gain is the simplest one to understand. For now I am planning to use the TQP7M9103 for the PA that gives 29.5dB output, and for the LNA, a cascade of two SBB5089Z that gives 40dB gain, I still have to design the PCB, and define the RF switch stage. Thanks to all for your help.



  • @jimy-aguirre Indeed your doughnut analogy is correct for field strength, the higher the gain of the antenna the more the doughnut is squeezed vertically, extending the radiation lobe outward. One effect of this is to bear in mind is that you ideally want the antennae at approximately the same elevation in line of sight, parking it on top of a 5m pole with an extended doughnut may not align the radiation lobes to optimal.
    Minimising loss with a cable suited to your frequency is crucial to maximising TX/RX capability, RG58 at 915MHz is a match made in hell.
    Your antenna sounds like a colinear or similar high gain stuffed into a tube, a ground plane is not going to help the antenna one bit, quite the contrary...
    Frankly I'd set things up without the linear first to see how it performs with the better cable, you may be surprised and end up with a less complex solution.
    Gain figures can be misleading, concentrate on maximising receive quality - If your receive signal is into the noise, no amount of amplication will restore it, period. An analogy would be you talking through a megaphone which the recipent hears, but you cannot make out a word in reply.. 😉
    Good luck



  • Hello, I have received the RF amplifiers that will be the LNA and RF-PA for my project. I will use one of them as LNA and the other one as PA. It is supposed the RF switches for LNA and RF-PA control will arrive tomorrow, then I made the code implementation suggested by @mfalkvidd using the Indication Function, and for testing purposes I use some LEDs in the pins I have selected for LNA and RF-PA control signals outputs (A3 & A4, I have not too much available on that board).
    The LEDs work really good, the RX signal is "ON" almost always, and the TX LED flashes "ON" on TX commands as expected, but to be sure I decided to include in the Indication function a Serial.println(*** TRANSMITTING ***); as a debug output. To be sure that TX signal is high when any TX signal is send through the radio, as well to get cached the short and fast TX... but I see come weird.

    #define MY_INDICATION_HANDLER  // this define the event for TX function
    /*...
    ...*/
    void indication( const indication_t ind )
    {
      if (INDICATION_TX == ind)
      {
        // Switch TX signal on here
        digitalWrite(PA_PIN, HIGH);
        digitalWrite(LNA_PIN, LOW);
    Serial.println("***************TRANSMITTING**************");
      }
      else
      {
        digitalWrite(PA_PIN, LOW);
        digitalWrite(LNA_PIN, HIGH);
      }
    }
    

    Here it is some of the MY_DEBUG output

    69551 TSF:MSG:READ,9-9-0,s=6,c=1,t=47,pt=5,l=4,sg=0:2
    79246 GWT:RFC:MSG=0;0;3;0;18;PING
    89252 GWT:RFC:MSG=0;0;3;0;18;PING
    99260 GWT:RFC:MSG=0;0;3;0;18;PING
    109267 GWT:RFC:MSG=0;0;3;0;18;PING
    110900 GWT:RFC:MSG=9;7;1;0;47;SEND_ALL        // This is an excecuted transmitting command
    ***************TRANSMITTING**************      // This mean the TX signal was turned High for the RF-PA Ampllifier as Expected
    110904 RFM69:SWR:SEND,TO=9,SEQ=7,RETRY=0
    110912 RFM69:CSMA:RSSI=-89
    110914 RFM69:CSMA:RSSI=-91
    

    The TX signal is on when a data is send to the nodes but not always, for example to report back to the node the RSSI level or when an acknowledge is sent to the node, in these two cases de TX signal remains in OFF state (this means the RF-PA will be off and the LNA will be ON in a transmit command).

    And this is the Debug output where it is transmitting but the TX signal is not turned ON.

    111037 RFM69:CSMA:RSSI=-90
    111040 RFM69:CSMA:RSSI=-95
    111054 RFM69:SWR:ACK,FROM=9,SEQ=8,RSSI=-40
    111058 TSF:MSG:SEND,0-0-9-9,s=7,c=1,t=47,pt=0,l=8,sg=0,ft=0,st=OK:SEND_ALL
    119274 GWT:RFC:MSG=0;0;3;0;18;PING
    128539 RFM69:SAC:SEND ACK,TO=9,RSSI=-40    // This is a SEND command but the  Indication Function was not triggered  :(
    128543 RFM69:CSMA:RSSI=-92
    128546 RFM69:CSMA:RSSI=-94
    128548 RFM69:CSMA:RSSI=-91
    

    I was checking the list of important events that trigger the Indication function but I did not find any sentence that help me to include the acknowledge and the RSSI transmissions in the way they triggers the Indication function. Sorry for my explanation I hope you understand what I mean.
    To summarize not every transmission triggers the TX signal pin "ON" Any suggestions are very welcome!. Thanks in advance.



  • Hello to all, I have received the RF switches modules. I connected everything and the preliminary test reveal that system works, but I have still the same previous problem, The acknowledge messages does not activate the TX signal during the gateway acknowledge transmitting. Then the node is missing the acknowledge. But the other messages are transmitted and received by the node correctly.
    Can anybody help to fix this issue in the Mysensors library? Or what can I do to fix it. Thanks in advance.


  • Mod

    @jimy-aguirre I think this behavior is intentional. The indication is designed for giving user feedback when sending or receiving messages. Most users do not expect to see acknowledgement packets as messages.

    I think you could add a call to set tx indication here to activate the pa when sending acks: https://github.com/mysensors/MySensors/blob/67efa7a7a24e589aad5e0b605fd6c88a858f4038/hal/transport/RFM69/MyTransportRFM69.cpp#L231


Log in to reply
 

Suggested Topics

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts