This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF51 with PTR5518 range problems

Hi friends,

I'm using a NRF51 IC with this 4.0BLE Modul PTR5518 and i have big problems with Range. As a protocoll i use gazell. In air it is possible do get some correct signals up to 6-7 m but that it don't work properly anymore. If you have a human body in between it is a disaster, you only get good signals with a range <1m. Can i somehow approve this? Please help me if you can. I'm very desperate.

Thank you in advance. Tanja

  • Have you interfaced your module with anything else, or mounted it somewhere?

  • Yes I have mounted in an housing, but this makes no difference. I tested also the Module alone and it was the same result. The problem is not really the range itself, we are able to talk with the module in a range of 7-9 meters without problems (no data gets lost). The problem is if something is in between, especially a body part, like a hand which shields the module. Is it also somehow possible that the dimensions of the room especially the height, where you use it somehow can influence the range and the behavior when it is shielded?

    Thank you for your answers.

  • Here the gazell setup code, maybe there is a mistake??

    //The Gazell pipe on which the communication between host and device is carried out. Must be between 1 and 6.
    #define GAZELL_DATA_PIPE                                                                                                                                    (1)
    
    //THE PAIRING PIPE MUST ALWAYS BE PIPE 0, or else the concept won't work!!!
    #define GAZELL_PAIRING_PIPE                                                                                                                               (0)
    
    //Not used on the remote, but kept here for consistency
    #define GAZELL_PAIRING_DATA_STORAGE_ADDRESS                                                                  (0x0003FC00)
    
    //Please read the Flash module description and the documentation of flash_segment_t/struct flash_segment before
    //changing the values of any defines that begin with 'GAZELL_PAIRING_FLASH_'.
    
    #define GAZELL_PAIRING_FLASH_NUMBER_OF_FIELDS                                               (16)
    
    #define GAZELL_PAIRING_FLASH_0_RELATIVE_ADDRESS_DIRTY_BITS    (4)
    
    #define GAZELL_PAIRING_FLASH_0_RELATIVE_ADDRESS_FIELDS                             (8)
    
    #define GAZELL_PAIRING_FLASH_1_RELATIVE_ADDRESS_DIRTY_BITS    (72)
    
    #define GAZELL_PAIRING_FLASH_1_RELATIVE_ADDRESS_FIELDS                             (76)
    
    #define GAZELL_PAIRING_PROCEDURE_TIMEOUT_MS                                                                 (60)
    
    #define GAZELL_MINIMUM_INTERVAL_BETWEEN_PAIR_AND_UNPAIR_MS        (2000)
    
    #define GAZELL_MAX_NUM_STORED_PACKETS                                                                               (8)
    
    #define GAZELL_DEVICE_DUMMY_PACKET_SEND_INTERVAL_10MS                       (5)
    
    #define GAZELL_CHANNEL_TABLE                                                                                                                        2, 8, 12, 18, 22, 28, 32, 38, 42, 48, 52, 58, 62, 68, 80
    
    #define GAZELL_BAUDRATE_KBITPS                                                                                                                    (250)
    
    
    void Gazell_Init(void)
    {
    #if (GAZELL_MODE_DEVICE == GAZELL_MODE)
                    flash_segment_t flashSegmentPairingID0 = {
                                   .bitsPerField = 32,
                                   .numberOfFields = GAZELL_PAIRING_FLASH_NUMBER_OF_FIELDS,
                                   .relativeAddressOfFirstDirtyBit = GAZELL_PAIRING_FLASH_0_RELATIVE_ADDRESS_DIRTY_BITS,
                                   .relativeAddressOfFirstField = GAZELL_PAIRING_FLASH_0_RELATIVE_ADDRESS_FIELDS
                    };
                    flash_segment_t flashSegmentPairingID1 = {
                                   .bitsPerField = 32,
                                   .numberOfFields = GAZELL_PAIRING_FLASH_NUMBER_OF_FIELDS,
                                   .relativeAddressOfFirstDirtyBit = GAZELL_PAIRING_FLASH_1_RELATIVE_ADDRESS_DIRTY_BITS,
                                   .relativeAddressOfFirstField = GAZELL_PAIRING_FLASH_1_RELATIVE_ADDRESS_FIELDS
                    };
    
                    flashSegmentNumberParingID0 = Flash_RegisterSegment(flashSegmentPairingID0);
                    flashSegmentNumberParingID1 = Flash_RegisterSegment(flashSegmentPairingID1);
    
                    pairID[0] = Flash_ReadData(flashSegmentNumberParingID0);
                    pairID[1] = Flash_ReadData(flashSegmentNumberParingID1);
    
                    nrf_gzll_init(NRF_GZLL_MODE_DEVICE);
                    nrf_gzll_set_max_tx_attempts(50);
                    if((pairID[0] != 0) && pairID[1] != 0)
                    {
                                   nrf_gzll_set_base_address_1(GenerateValidBaseAddressFromChipID(pairID));
                                   isPaired = TRUE;
                    }
    #elif (GAZELL_MODE_HOST == GAZELL_MODE)
                    pairID[0] = NRF_FICR->DEVICEID[0];
                    pairID[1] = NRF_FICR->DEVICEID[1];
                    nrf_gzll_init(NRF_GZLL_MODE_HOST);
                    nrf_gzll_set_base_address_1(GenerateValidBaseAddressFromChipID(pairID));
    #else
    #error GAZELL_MODE is undefined or it has some unknown value.
    #endif
                    nrf_gzll_set_tx_power(NRF_GZLL_TX_POWER_4_DBM);
    #if (250 == GAZELL_BAUDRATE_KBITPS)
                    nrf_gzll_set_datarate(NRF_GZLL_DATARATE_250KBIT);
                    nrf_gzll_set_timeslot_period(2700);
    #elif (1000 == GAZELL_BAUDRATE_KBITPS)
                    nrf_gzll_set_datarate(NRF_GZLL_DATARATE_1MBIT);
                    nrf_gzll_set_timeslot_period(900);
    #elif (2000 == GAZELL_BAUDRATE_KBITPS)
    #else
    #error Wrong baudrate selected. Possible values are 2000, 1000 or 250.
    #endif
             nrf_gzll_set_device_channel_selection_policy(NRF_GZLL_DEVICE_CHANNEL_SELECTION_POLICY_USE_CURRENT);
                    generateAndSetChannelTable();
                    nrf_gzll_set_timeslots_per_channel(5);
                    nrf_gzll_set_timeslots_per_channel_when_device_out_of_sync(1);
                    nrf_gzll_enable();
    }
    
  • Hello tanja

    RF systems are very sensitive to their surroundings. Walls that are not in the direct line of sight can reflect the RF signal causing multipath induced attenuation, especially if there is any metal within the walls like pipes or reinforcement bars. Objects in line of sight would typically attenuate or scatter the signal. Other wireless systems operating in the same band can worsen your SNR, and objects close to the antenna will typically alter its characteristics. Testing the range of a system indoors and outdoors can yield very different results.

    I would like you to test the gazelle code that comes with SDK 12.3.0 and see how well your system does. I do find it a bit strange that you only get around 7-9 meter range with 4dBm output power and 250kb/s datarate, in my opinion you should have more than that.

    I did a quick test with two nRF51 DK's and a slightly modified version of the gzll_ack_payload example. I simply changed it so the host retransmits the button presses made on the device, that way I could see on the device DK that the transmit was successful both ways. I still had a connection around 20 meters away through two glass doors. This office has a lot of metal pipes, some walls of plaster and some of reinforced concrete.

    If you have any of our devkits available I would also suggest trying your code on those. This would help eliminate any hardware issues.

    EDIT, Additional answers

    1. The example is a part of the SDK, you can download it here. The latest SDK version to support the nRF51 series is 12.3.0. The gazell example code can be found in the \examples\proprietary_rf\gzll\gzll_ack_payload subfolder.

    2. I think we would need to see the design to properly evaluate it. If you would like for us at Nordic to evaluate your schematic design and/or layout you can either upload it to your original post here on DevZone, or if your design is confidential you can create a mypage case at nordicsemi.com.

    3. When frequency hopping the timeslots per channel option affects the number of retransmits before it changes frequency. If many of your channels are filled with noise from other sources this can affect your range. The nRF51's radio has a sensitivity of -96 dBm (0.1% BER) at 250kbps, but if there is a lot of noise present at the receiver you will need a stronger signal, or shorter range, to achieve the same BER.

    4. How much power do you measure? Do you have a picture of the measured spectrum?

    5. If I completely cover the antenna I have around 10-13 meters range, also through a glass door.

    If you still have poor range with the SDK examples there might be a problem with the module you are using.

    Best regards

    Jørn Frøysa

  • Hi Jorn,

    First of all, thank you very much for your fast response.

    1. Our next step is to test this things as you also said with the gazell example code, can you please send me an link to this example library?

    2)We are using this Module as I already said on both sides, on the one hand in an Remote and on the other side we are using an RF PCB in our Control box where also this Modul from Xungtong (NRF51822) is located.

    1. We already made some approvements especially by the Remote(copper around antenna, bigger hole in main pcb) to get the output power better. It helps a little bit but we are not satisfied with that.

    2. We also made a lot of tests with this frequency hopping (jump between at least 15 channels) which we need that we can certify our HS also for the american market. This makes the range even worse than with an fixed channel.

    3. a little bit better is the performance with 250k Baudrate.

    4. We also made some measurements regarding output power in our EMC chamber and matched this with an stand alone PTR5518 (only supplied, sending all the time without main HS PCB) and we can't see any differences on the output power when we compare it to our Design.

    5. As I already said, the problem is when something is in between, can you maybe test with your Setup these two nRF51DK's which you talked in the comment above, what happens when you shield it with your hands, we are loosing our connection when we are 2-3 meters away from the other module.

    I hope you understand my description.

    I'm looking forward to hearing from you, thank you upfront.

    Best Regards Tanja

Related