<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NRF52840 - 10 kHz ADC sampling and continuous signal transmission via BLE - Is it possible?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78365/nrf52840---10-khz-adc-sampling-and-continuous-signal-transmission-via-ble---is-it-possible</link><description>Hello. 
 
 I am working with an nrf52840 Development kit. My objective is to sample data from two ADC channels (the input signal has a maximum frequency of 10kHz) and send it via BLE to a tablet device. The graph is supposed to be shown on the display</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Aug 2021 10:28:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78365/nrf52840---10-khz-adc-sampling-and-continuous-signal-transmission-via-ble---is-it-possible" /><item><title>RE: NRF52840 - 10 kHz ADC sampling and continuous signal transmission via BLE - Is it possible?</title><link>https://devzone.nordicsemi.com/thread/325264?ContentTypeID=1</link><pubDate>Tue, 17 Aug 2021 10:28:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76d34d30-8bc4-4c41-b8ad-3ccb11c3cdf3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You need to count the amount of data transferred. You can for instance refer to the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_att_mtu.html"&gt;Experimental: ATT_MTU Throughput Example&lt;/a&gt;. This example is also good if you want to experiment with different configurations to see which impact it has on throughput.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 - 10 kHz ADC sampling and continuous signal transmission via BLE - Is it possible?</title><link>https://devzone.nordicsemi.com/thread/324957?ContentTypeID=1</link><pubDate>Sun, 15 Aug 2021 05:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b274083e-219c-4896-aacb-873c830b04b5</guid><dc:creator>Thiago</dc:creator><description>&lt;p&gt;Hello, Einar.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&amp;nbsp;I modified the configuration of the connection interval as you suggested. Could you suggest to me a way to read&amp;nbsp;the throughput of my application? I would like to know if the module is already working next to the limit or if it is still possible to increase the performance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 - 10 kHz ADC sampling and continuous signal transmission via BLE - Is it possible?</title><link>https://devzone.nordicsemi.com/thread/324028?ContentTypeID=1</link><pubDate>Mon, 09 Aug 2021 13:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:546eaec2-7491-448d-aeea-8bb941c701a0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Can it be done using an nrf52840?[/quote]
&lt;p&gt;Looking at your samples, if you have 10 ks/s and transfer each sample as an uint_16, that means that the raw dat would be 10 ks/s * 16 bit/s = 160 kbps. You will of course have some overhead, but it should be OK from a throughput perspective. With everything optimal you can get about 700 kbps of throughput with BLE (1 Mbps PHY) and 1400 kbps (2 Mbps phy). (Practical real life throughput will typically be significantly lower though, for several reasons.)&lt;/p&gt;
[quote user=""]Is there any problem with how I configured the module?[/quote]
&lt;p&gt;You use a too short connection interval. To achieve higher throughput it is better to use longer connection intervals, and ensure that the event length is as long as the connection interval. This way you can send many packet per connection interval. With NRF_SDH_BLE_GAP_EVENT_LENGTH set to 400 (*1.25 ms) you can set the connection interval to 0.5 s, which may be a sensible value. Then transfer data using long indications (&amp;gt; 200 byte).&lt;br /&gt;There is a trade-off with long event lengths and connection intervals, though. Whenever there is a packet loss the retransmission happens in the next connection event. So in this case you will spend a long time before being able to retransmit. And in that case you would have to buffer up the data. This also makes the whole think a bitt less rea-time, and this is a limitation of BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>