cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

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
Reply
1 Solution
HeLi_263931
Honored Contributor II

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
Reply
3 Replies
HeLi_263931
Honored Contributor II

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
Reply
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
Reply
HeLi_263931
Honored Contributor II

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.