What are the factors that influence the duration for which distance measurement will occur (Using nrf_dm sample).

Hello, guys,

I am working on distance measurement project using two nRF5340DK (nrf_dm sample application). I found duration for which the distance measurement between two DKs happens is random, so can I please know the factors effect this duration and also can we control this duration in code.

Also, can we control interval time between two distance measurements in code.

Regards,
Madan

Parents
  • Hi

    Okay, so for 1 and 5 meters I'd say these numbers look close to what can be expected, while there is one result that looks to be very off on the 8m measurement, which likely chucks up to packet loss or interference from another source. I think there are two things you can do to increase the accuracy of these measurements.

    1. Enable High-precision calculation. As per the documentation, set the CONFIG_DM_HIGH_PRECISION_CALC Kconfig option to enable high precision calculation. Note that this is more power and RAM hungry but should increase the precision and error margin noticably.

    2. Since all your measurements are somewhat off, try to perform zero-distance calibration. The offset depends on the radio design, antenna, and PCB layout, so when using this sample you need to compensate this offset by doing a manual calibration. "To determine the offset value, place the devices at a reference distance of 60 cm from each other and collect a batch of measurement data. The difference between the average measurement value and the actual distance can be used as an estimate of the offset."

    Best regards,

    Simon

  • Hi Simonr, 

    Thanks for your reply

    I believe there may have been a misunderstanding in my previous explanation, and I apologize for any confusion caused.

    My actual question is the number of distance measurements obtained varies with the distance between BLE devices. For example, in case 1, when the devices are approximately 1 meter apart, the number of measurements recorded is 35. However, at distances of 5 meters and 8 meters, only about 5 measurements are recorded.

    Could this discrepancy be attributed to a shorter advertising interval when the devices are closer, resulting in more frequent measurements? Or are there other factors influencing this behavior? Additionally, is there a way for developers to configure the system (in code) to maintain a constant number of measurements regardless of distance?

    Regards,
    Madan

  • Oh, I see. Sorry about the confusion here. Can you confirm you have the measurements running at the same amount of time in all cases, and how long exactly is it you're measuring for? I don't think the advertising interval changes, but since the distance measurement itself takes some time, it can vary a bit, but it shouldn't vary this much as far as I know. 

    I think the main ways to edit how many rangings you need is to change the Kconfig options CONFIG_DM_TIMESLOT_QUEUE_COUNT_SAME_PEER and CONFIG_DM_TIMESLOT_QUEUE_LENGTH that define how many measurements are scheduled. The more measurements scheduled, the more will take place. 

    Best regards,

    Simon

Reply Children
No Data
Related