BLE Latency between App and Sensor

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi There,

   

I have a BLE keypad that measures the user's response speed (in milliseconds) from a START command that it receives from the App.

   

Obviously the BLE device is very accurate and we have no problem achieving 1 ms accuracy.

   

However, the START command that comes from the App via the BLE cause an unknown latency which we are trying to address somehow as we aim to build a system that is accurate down to the millisecond.

   

Any help will be greatly appreciated.

   

Thanks,

   

Moe 

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You can try to measure round-trip times by having the BLE device answering that start commando, and measure the time it takes to do so (maybe doing it multiple times).

View solution in original post

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You can try to measure round-trip times by having the BLE device answering that start commando, and measure the time it takes to do so (maybe doing it multiple times).

0 Likes
Anonymous
Not applicable

If we assume that the round time travel is equally divided between the app and the device, we should be fine but one side may cause higher latency than the other which I will never know and if altogether we have 20ms for a round trip that is split 70-30 between the devices, I won't be able to achieve 1ms accuracy.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Well BLE is not designed for low-latency applications, but for low-power.

   

You can quite reliably measure latency when you use multiple packets, send from both sides, with time-stamps in them (so each side knows when the other side did send a packet, and received another one). I think NTP does something similar since it can calculate the latency between the NTP server and the client.

   

But it gets complicated when the delay is not constant, though.