NRF24L01 Signal Strength request



  • Hi,

    I'd like to be able to get the signal strength of all nodes on my network from my controller.
    The aim is to have an idea if each nodes are in range and not just on the edge of the signal lost.

    My guess is it will work more or less like the battery level, but I have no idea how to get that information.

    Can you help me? Very much appreciated.


  • Admin

    The NRF-radio does unfortunately not expose signal level.

    The only thing you can do is lowering the amplification level and see when/if you loose the communication (not sure if this setting actually does anything on the none-antenna/amp version though) and use this information as a poor-mans signal-level indicator.



  • ive seen somewhere on ebay for gain areiel thats click in board for nrf24 should be good ive seen on mysensor website abt dog pooping lol it long away range really more than 5 -8 house away...



  • @hek Actually, nRF24L01+ have very limited receive signal strength indicator. Not sure if it supported in library, but documentation note:
    6.4 Received
    Power Detector measurements
    Received Power Detector (RPD
    ), located in register 09, bit 0, triggers at received power levels above -64
    dBm that are present in the RF channel you receive on. If the received power is less than -64 dBm,
    RDP = 0.
    The RPD can be read out at any time while nRF24L01+
    is in receive mode. This offers a snapshot of the
    current received power level in the channel. The RP
    D status is latched when a valid packet is received
    which then indicates signal strength from your own
    transmitter. If no packets are received the RPD is
    latched at the end of a receive period as a result of
    host MCU setting CE low or
    RX time out controlled by
    Enhanced ShockBurst™.
    The status of RPD is correct when RX mode is enabl
    ed and after a wait time of Tstby2a +Tdelay_AGC=
    130us + 40us. The RX gain varies over temperature wh
    ich means that the RPD threshold also varies over
    temperature. The RPD threshold value is reduced by

    • 5dB at T = -40°C and increased by + 5dB at 85°C


  • @hek Library provide testRPD() function.
    /**

    • Test whether a signal (carrier or otherwise) greater than
    • or equal to -64dBm is present on the channel. Valid only
    • on nRF24L01P (+) hardware. On nRF24L01, use testCarrier().
    • Useful to check for interference on the current channel and
    • channel hopping strategies.
    • @return true if signal => -64dBm, false if not
      */


  • I've been messing around with this lately, and made a simple a 3-level signal status indicator that can be used to indicate signal quality via LED etc.

    In order to get the signal strength for all (most) received payloads, testRPD(); can be called just before calling radio.avialable().

    bool rpd = radio.testRPD();

    while ( radio.available() ){
    signalStrength = rpd + 1;
    radio.read, etc...
    }

    Then I also set the signalStrength variable to 0 if a transmission fails, and use the resulting 3-level output to drive an LED. (Bright, Low, Off)


  • Admin

    @TMRh20Projects

    Ohh.. cool. So in the MySensors case we could check this when message has been received from the parent.

    Would it improve things to calculate a average of the last X transmissions received?

    Is rdp value available after sending (with ack enabled)?



  • From the datasheet, it sounds like RPD is only available in receive mode, but I haven't tested to see for sure if there is any indication with auto-ack.

    I'm not sure about the need to calculate an average, because it just returns a boolean value (>64dBM or <64dBM), but I've had decent success in connecting it directly to a variable (signalStrength) and using that to drive an LED via analogWrite. I check it every X ms and removing and re-connecting my external antenna gives immediate results.

    The catch with using this method is that the signal strength indicator is only a true indication of if the device is actively receiving data and/or transmitting data.

    Datasheet:
    The RPD status is latched when a valid packet is received
    which then indicates signal strength from your own transmitter. If no packets are received the RPD is
    latched at the end of a receive period as a result of host MCU setting CE low or RX time out controlled by
    Enhanced ShockBurst™.

    So it sounds like RPD can be checked at any time 170ms after entering RX mode, but it may indicate the signal strength of interference as well if not used in conjunction with radio.available().


  • Admin

    Hmm.. Ok, so in the following setup it would it be possible to read out the last RDP value just after "Repeater" transmits to "GW" . Guess we wouldn't want "Repeater"->sub-"Node" communication to affect the RPD.

    GW <-> Repeater <-> Node


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.