1kHz sampling rate with custom characteristic vs NUS via Android vs via PC


I created a BLE device with custom characteristic showing the sensor value (int16). But I can't achieve 1khz sampling rate.


1. Is sending data via NUS faster since the central reads its receive buffer instead of reading the custom characteristic everytime of the peripheral device? Is 1kHz sampling rate doable for both option? 

2.  With android since the minimum possible interval is 7.5ms , it means I can't achive 1khz sampling rate? How about in pc (windows10)  is this doable?

TIA

Parents
  • Hi,

    What are you sampling from?

    Bluetooth LE have a minimum connection interval of 7.5ms, so you will not be able to send data faster than this. If you do not need to receive the sampled data at 1kHz rate on the phone/PC side, you can buffer multiple samples on the nRF side and send it in a larger chunk every 7.5ms.

    Best regards,
    Jørgen

  • Hello, 

    I'm sampling a load cell amplifier thru SPI like interface but it has low sampling rate so I'm switching to analog type load cell amplifier soon via ADC. 

    I needed the data to render a graph for visualization and do computation so the more the samples the better but I'm only targeting 1kHz. 

    Attach is my current setup with 16bit value.
    If I decided to send it every 20ms then 20*2 = 40bytes. I prefer custom characteristic but is this still doable with this setup since its too big or is array permissible with characteristic?  Or do I need to switch to NUS?

    And based on what I have read I have to change the MTU size since the default is 23bytes?

    Thank you Jørgen!


Reply
  • Hello, 

    I'm sampling a load cell amplifier thru SPI like interface but it has low sampling rate so I'm switching to analog type load cell amplifier soon via ADC. 

    I needed the data to render a graph for visualization and do computation so the more the samples the better but I'm only targeting 1kHz. 

    Attach is my current setup with 16bit value.
    If I decided to send it every 20ms then 20*2 = 40bytes. I prefer custom characteristic but is this still doable with this setup since its too big or is array permissible with characteristic?  Or do I need to switch to NUS?

    And based on what I have read I have to change the MTU size since the default is 23bytes?

    Thank you Jørgen!


Children
No Data
Related