Troubleshooting MQTT Gateway with Amplified NRF24L01+PA+LNA Long Range Antenna



  • Hi folks, I am having some issues with my gateway that I can't figure out. I have had my gateway setup for some time now but having issues with some nodes that are a little further away. To resolve the issue, I decided to use a long range antenna. I opted for this antenna link text. When operating from the regular NRF antenna I have no issues but when I swap it to this one, I lose communication to all my nodes, and my error led starts flashing. It flashes twice and stops. After researching a little I came across these error codes for the flashes. Each row indicates the error number so 2 flashes means Failed to Transmit messages which seems correct since I cant get it to communicate with anything.

            INDICATION_ERR_HW_INIT,                   //!< HW initialization error
    my err->INDICATION_ERR_TX,                        //!< Failed to transmit message.
    	INDICATION_ERR_TRANSPORT_FAILURE,         //!< Transport failure.
    	INDICATION_ERR_INIT_TRANSPORT,            //!< MySensors transport hardware (radio) init failure.
    	INDICATION_ERR_FIND_PARENT,               //!< Failed to find parent node.
    	INDICATION_ERR_GET_NODEID,                //!< Failed to receive node ID.
    	INDICATION_ERR_CHECK_UPLINK,              //!< Failed to check uplink
    	INDICATION_ERR_SIGN,                      //!< Error signing.
    	INDICATION_ERR_LENGTH,                    //!< Invalid message length.
    	INDICATION_ERR_VERSION,                   //!< Protocol version mismatch.
    	INDICATION_ERR_NET_FULL,                  //!< Network full. All node ID's are taken.
    	INDICATION_ERR_INIT_GWTRANSPORT,          //!< Gateway transport hardware init failure.
    	INDICATION_ERR_LOCKED,                    //!< Node is locked.
    	INDICATION_ERR_FW_FLASH_INIT,             //!< Firmware update flash initialisation failure.
    	INDICATION_ERR_FW_TIMEOUT,                //!< Firmware update timeout.
    	INDICATION_ERR_FW_CHECKSUM,               //!< Firmware update checksum mismatch.
    

    I have tried different power supplies as I am feeding my Arduino nano with a regular USB 5V adapter you would use to charge your phone. I have the NRF power VCC pin being fed from the 3.3V pin on the arduino nano.

    • I have tried multiple and all have the same effect.
    • I have tried powering the radio separately as well using an external power supply from my home lab.
    • At this point, I don't think the problem is power.
    • I do have a capacitor 48uF 10V so I have that covered.
    • Thinking it might be interference, I also covered my entire 3d printed housing with aluminum foil leaving only the antenna exposed but this did nothing except obstruct the led lights...

    The Serial Monitor Log doesn't show me much of anything that gives me any clue as to what is going on.

    Here are a few lines on the tail of that log.

    1575208 TSF:MSG:FPAR REQ,ID=6
    1575212 TSF:CKU:OK,FCTRL
    1575215 TSF:MSG:GWL OK
    1577435 !TSF:MSG:SEND,0-0-6-6,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    1585840 TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    1585845 TSF:MSG:BC
    1585847 TSF:MSG:FPAR REQ,ID=5
    1585850 TSF:PNG:SEND,TO=0
    1585852 TSF:CKU:OK
    1585854 TSF:MSG:GWL OK
    1588473 !TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    1589928 TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    1589934 TSF:MSG:BC
    1589936 TSF:MSG:FPAR REQ,ID=5
    1589939 TSF:CKU:OK,FCTRL
    1589941 TSF:MSG:GWL OK
    1592551 !TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    1592772 TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    1592777 TSF:MSG:BC
    1592779 TSF:MSG:FPAR REQ,ID=3
    1592782 TSF:CKU:OK,FCTRL
    1592784 TSF:MSG:GWL OK
    1595167 !TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    1595585 TSF:MSG:READ,4-4-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    1595590 TSF:MSG:BC
    1595592 TSF:MSG:FPAR REQ,ID=4
    1595595 TSF:CKU:OK,FCTRL
    1595597 TSF:MSG:GWL OK
    1597721 !TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    
    

    It seems I am getting NACK. Any clue as to what I could try?



  • The GW is receiving incoming messages just fine. Nodes 3 to 6 are sending find parent requests and the GW attempts to reply, but it can't reach the nodes.

    So first of all, the Arduino Nano may not be able to deliver enough current for this NRF24 PA-LNA module, which can draw more than 100mA in high power modes. The Nano has no dedicated regulator for 3.3V. It provides the voltage through an in the UART controller integrated LDO, which may provide 20 - 50mA depending on the particular chip. Drawing more than that continuously can potentially damage the UART controller.

    If you use another power supply to feed the NRF24 with 3.3V (you did connect both grounds, didn't you?), there may still be too much noise. You may try to add a ceramic capacitor (~100nF) in addition to the electrolytic capacitor to help filter out high-frequency noise as well. Try lowering the MY_RF24_PA_LEVEL, which reduces power consumption during transmission. Shielding (and grounding it) the module by wrapping it with aluminium foil may help, too. Maybe try a different 2.4 GHz antenna.

    Besides that, I didn't have much luck with those cheap PA-LNA modules. Mine had barely a better range than the regular, non-amplified transceivers and they were generally rather unreliable, dropping messages seemingly randomly.

    You also never know which knock-off NRF24 clones you get on those modules. Some work great, some not so much.

    If nothing helps, I'd suggest investing in better transceivers. For example CDEbyte E01-ML01DP5 if you wish to stick with NRF24. It has the same pinout, so it is interchangeable. I use them in my GW and repeaters and they are far more reliable than those black ones.



  • @BearWithBeard thanks for the response. Few things I might have failed to tie in both grounds so I will check on that today to see if that helps. I did try shielding with foil as well as lowering the PA but neither worked. I'll swing by in a bit and let you know if that floating ground may have been my issue. If it isn't I might consider the other radio you mentioned. What kind of range are you getting with those?



  • @BearWithBeard hello again, I went ahead and checked it and I did have the grounds bonded together so nothing. I tried a second antenna ( same brand) and get similar results. I tried adding another cap just in case the one I have is faulty but no difference. Unfortunately, I do not have a ceramic cap but I'll see if I can get one of those to test. I have gone ahead and ordered the CDEByte radios but they will take over a month to get here 😞 . I also made sure to reduce the PA level to min and still has the same effect. Guess I am going back to the normal pcb transceiver. Bummed out that I can't get this to work. I thought it would be a simple swap of modules although I did realize the power requirements were different. The aluminum foil thing didn't do a thing for me either. If you can think of anything else I can try let me know.



  • No, sorry. If you're certain that you supply clean, stable 3.3V with enough current to the PA-LNA and nothing else in your setup changed, I'm out of ideas what could be causing the issue, apart from the NRF24 module itself or the antennas.

    Regarding the E01-ML01DP5 transceivers, I can cover a three-story house (pumice stone walls and reinforced concrete floors) plus attic and basement with a GW and a single repeater (see rough sketch below) - which is roughly the same range of my 2.4GHz WiFi signal (WiFI router + WiFi repeater) - whereas with those black modules, I had to use a repeater on every floor. But be aware that RF signals can be influenced by many external factors. Just because I can reach through multiple stone walls, it doesn't warrant the same in anybody else's location.

    alt text



  • @BearWithBeard ok sounds good, I assume with this I would be able to talk to all my other nodes that are on the pcb antenna type NRF modules. I purchased two of the CDEByte modules so I can add a repeater if needed later. I'll swing back in a month once I set it all up.

    One other question, if I wanted to power this new module and a nano off of a good quality USB plug, could I get one of these https://amzn.to/38h3DfW and power it from the 5v pin on the nano to get my 3v3? If not any suggestions on what the best way to do that would be? Want to make sure I get whatever I need before the new modules get here.

    Thanks again!



  • So you mean USB > Nano > 5V Pin > 1117-3.3 Regulator > 3.3V for NRF24? Yes, that should work. The Nano passes 5V from the USB port more or less straight through to the 5V pin. Add some capacitors to the regulator, 10µF in and 10 - 100µF out electrolytic or tantalum should be fine to ensure its stability.



  • @BearWithBeard awesome thanks again for your help!



  • @BearWithBeard I found my problem. It turns out my arduino had a false contact on one of the ground pins I was using to power my radio. When I noticed, I resoldered the header pin on the nano and it magically started working. It works with both the normal and the long range antenna and I do see a big difference in range. Thanks for all the help again. Guess I will have some spare radios now...


Log in to reply
 

Suggested Topics

160
Online

9.8k
Users

10.3k
Topics

106.7k
Posts