iBeacon distance

Hi,

   We are using iBeacon to locate the relative position of mobile phone between two beacons.And the distance between mobile phone and beacons no more than 20m.

Is that feasible with ibeacon? And should we need adding PA in RF?

(sdk 14.2 with nRF52810)

Thanks!

Parents
  • Hi,

    The feasibility depends on your accuracy requirements. If you just need to know if something is "likely close by or probably far away", then using a beacon an measure RSSI may be good enough. But for the most part, this does not work very well. See this post. Regarding PA, that would increase the power thus range. So you would be able to do the distance estimation over a bit longer distance. But the issue with low accuracy would remain the same.

  • Thanks for your reply!

    We don't need very highly accuracy.Here is my application.

    There are two beacons with 20 meters apart. If mobile phone enter the space, we  will calculate the position P.

    ±5 meters offset is acceptable. 

    I have two problems

    1.Could APP find two beacons at the time to calculate the D2 and D3?

    2.If the beacons need PA, how could I design in hardware? 

  • BTW,the distance of D2 or D3 will not too long, no more than 50m. Could I use the hardwware of refence design in datasheet? Is there any setting in SDK of TX power?

  • This does not seem like a good fit for using only RSSI. Based on what you write it seems you want a higher accuracy than what is possible with this method.

    Taylor said:
    ±5 meters offset is acceptable. 

    If you are going to use this in an open field, then perhaps it is OK, and that is only if you calibrate for specific phones. If not, then this is far from what you can achieve in the real world. As mentioned, you can really just distinguish between "neer" and "far away" using RSSI. 

    Taylor said:
    1.Could APP find two beacons at the time to calculate the D2 and D3?

    You can scan and get RSSI data for several peripherals, yes. Perhaps not at the exact same instance, but that should not be a problem. You can use nRF Connect for mobile for testing just to get RSSI data from several advertisers.

    Taylor said:
    2.If the beacons need PA, how could I design in hardware? 

    I am not sure you need it, if you for instance us nRF52840, as that has +8 dBm output power. If you do, then I suggest you  open a separate thread about your HW design.

  • Thanks!

    I'll test beacons after my new hardware back.

    I have some problems about the   example of beacon.(sdk 14.2)

    ret_code_t app_timer_init(void)
    {
        // Stop RTC to prevent any running timers from expiring (in case of reinitialization)
        rtc1_stop();
    
        // Initialize operation queue
        m_op_queue.first           = 0;
        m_op_queue.last            = 0;
        m_op_queue.size            = APP_TIMER_CONFIG_OP_QUEUE_SIZE+1;
    
        mp_timer_id_head            = NULL;
        m_ticks_elapsed_q_read_ind  = 0;
        m_ticks_elapsed_q_write_ind = 0;
    
    #if APP_TIMER_WITH_PROFILER
        m_max_user_op_queue_utilization   = 0;
    #endif
    
        NVIC_ClearPendingIRQ(SWI_IRQn);
        NVIC_SetPriority(SWI_IRQn, SWI_IRQ_PRI);
        NVIC_EnableIRQ(SWI_IRQn);
    
        rtc1_init(APP_TIMER_CONFIG_RTC_FREQUENCY);
    
        m_ticks_latest = rtc1_counter_get();
    
        return NRF_SUCCESS;
    }

    Why we should to close SWI_IRQ? Wha't the rtcl_count means?

Reply
  • Thanks!

    I'll test beacons after my new hardware back.

    I have some problems about the   example of beacon.(sdk 14.2)

    ret_code_t app_timer_init(void)
    {
        // Stop RTC to prevent any running timers from expiring (in case of reinitialization)
        rtc1_stop();
    
        // Initialize operation queue
        m_op_queue.first           = 0;
        m_op_queue.last            = 0;
        m_op_queue.size            = APP_TIMER_CONFIG_OP_QUEUE_SIZE+1;
    
        mp_timer_id_head            = NULL;
        m_ticks_elapsed_q_read_ind  = 0;
        m_ticks_elapsed_q_write_ind = 0;
    
    #if APP_TIMER_WITH_PROFILER
        m_max_user_op_queue_utilization   = 0;
    #endif
    
        NVIC_ClearPendingIRQ(SWI_IRQn);
        NVIC_SetPriority(SWI_IRQn, SWI_IRQ_PRI);
        NVIC_EnableIRQ(SWI_IRQn);
    
        rtc1_init(APP_TIMER_CONFIG_RTC_FREQUENCY);
    
        m_ticks_latest = rtc1_counter_get();
    
        return NRF_SUCCESS;
    }

    Why we should to close SWI_IRQ? Wha't the rtcl_count means?

Children
  • Hi,

    Taylor said:
    I have some problems about the   example of beacon.(sdk 14.2)

    This is from the app_timer implementation in <SDK 14.2>\components\libraries\timer\app_timer.c. The app_timer is a SW library that lets you create an arbitrary number of timers using a single RTC instance (RTC1). This library is central in the SDK and is used by most examples.

    You do not normally need to consider this implementation details of this library as it is provided read for use.

    Taylor said:
    Why we should to close SWI_IRQ?

    What do you mean by closing the SWI_IRQ? If you mean clear, then this is done to make sure that there is no pending SWI interrupt before enabling it (for instance in case that was used by some other code before staring the app_timer). Note that this code typically only run once during startup, so there is usually no point in optimizing away things you think is not needed.

    Taylor said:
    Wha't the rtcl_count means?

    That is the counter value of RTC1.

  • I have downloaded the same softdevice and app in nRF52810 and nRF52832.And I don't edit anything.

    I can find the beacon when use nRF52832, but can't find in nRF52810.Here is the hardware of nRF52810.

    I didn't use 32.768kHz crystal oscillator in 52810, but used in nRF52832.Is that question?

  • Hi,

    Taylor said:
    I didn't use 32.768kHz crystal oscillator in 52810, but used in nRF52832.Is that question?

    Yes, that will be a problem. If the FW attempts to start the LFXO and the crystal is not there SoftDevice initialization will block forever, waiting for the clock that does not exist to start.

    If you still use the beacon example in SDK 14.2 you need to change the clock configuration in sdk_config.h to use internal LFRC instead, so that it looks like this:

    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_XTAL_ACCURACY  - External crystal clock accuracy used in the LL to compute timing windows.
     
    // <0=> NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_XTAL_ACCURACY
    #define NRF_SDH_CLOCK_LF_XTAL_ACCURACY 1
    #endif


Related