This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Real time data transfer

Hi, I would like to transfer real time ecg data from a 3-channel adc (250 Hz per channel, 16 bits ) using nRF51822 to an android device. I would like to know if this is possible and if so, how I could achieve this. Presently I could transfer ecg data from a single channel adc at 50Hz, 10 bits, using the Nordic UART service. I tried to increase the sampling rate of the adc to 100Hz but I keep losing so much data and at that rate, it is nothing close to the promised transfer rate with nRF51822 and Nexus 5. Please I would be glad to get some help from you.

Parents
  • Hi agustino,

    Let's do some math:

    • If I understand it correctly, you want to transfer 2B (16bit) of data x 3 channels x 250 (Hz) per second = 1500B.
    • Nexus 5 (unless running very original KitKat 4.4 FW) is using 48.75ms connection interval which means that you have 1000/48.75 ~ 20.5 connections per second.
    • Assuming you will have simple protocol without any metadata (headers) so you could squeeze 20B into one MTU. That makes 1500/20 = 75 MTUs needed per second.
    • Finally you see that Nexus and Nordic would need to transfer 75/20.5 ~ 4 MTUs per connection interval.

    That seems to be theoretically possible because Nexus 5 can get 4 MTUs (round trips) per connection interval (this is tested). So the only questions is if you are able to feed the Event Notification Tx data on S110 Peripheral stack side and get Android to take that data stream up to the application. At least for some limited time you should see this throughput (by using some BLE sniffer). Questions also is if 250Hz ADC sampling and ongoing BLE connection can live together without data loss and instability.

    Cheers Jan

  • Well as usually with the Andorid masterpiece: try and measure;)

Reply Children
No Data
Related