<?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>Question about high speed ADC usage</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7277/question-about-high-speed-adc-usage</link><description>Hi, 
 I need to send an audio signal through BLE connection of nRF51822 module, this signal need to quantized and sampled at rate of minimum 8000 sample/second by ADC, i configured the minimum connection interval to 9 ms but the sampling still very low</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 May 2015 05:39:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7277/question-about-high-speed-adc-usage" /><item><title>RE: Question about high speed ADC usage</title><link>https://devzone.nordicsemi.com/thread/25725?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 05:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38b99907-1dcf-44d6-875a-31cf66e410b4</guid><dc:creator>ahmed</dc:creator><description>&lt;p&gt;Thanks alot RK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about high speed ADC usage</title><link>https://devzone.nordicsemi.com/thread/25724?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 03:29:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec5067d3-0e2d-47a2-8837-d681342dc212</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Well of course you get garbage if you try to use something which expects ascii data to print binary data. But that doesn&amp;#39;t mean you have to use ascii it means you have to write code on the receiving side to read the binary data and convert it there. I suspect all you really want to do is put it back to the binary format you started with, which makes turning it to ascii for transmission a complete waste of bandwidth and processing power on both sides.&lt;/p&gt;
&lt;p&gt;To be honest trying to stream data at that kind of rate is something BTLE isn&amp;#39;t designed for, I don&amp;#39;t even know of a BTLE audio streaming protoco, A2DP doesn&amp;#39;t exist for BTLE, I think. Taking the app_uart code designed for occasional short string transfers isn&amp;#39;t going to get you anywhere near the throughput you&amp;#39;re trying to achieve.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about high speed ADC usage</title><link>https://devzone.nordicsemi.com/thread/25728?ContentTypeID=1</link><pubDate>Wed, 27 May 2015 14:24:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df5878ff-5714-4919-82f0-992052c504a3</guid><dc:creator>ahmed</dc:creator><description>&lt;p&gt;Dear RK,&lt;/p&gt;
&lt;p&gt;The UART just use ASCII format, i try to send the 10 bit as integer and get a rubbish characters at terminal program (i receive the data through nRF51 dongle with ble_uart s120 example connected to laptop), then try to send it as hex format and get a separate representative of result ( for example if the ADC result is 1023 i receive 3 254), so i forced to convert it to ASCII. Now, is S120 support transferring 4 packets per connection ? how can i reconfigure the ble_uart S120 example to do this ?&lt;/p&gt;
&lt;p&gt;Thanks alot my friend, i appreciate your supporting.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about high speed ADC usage</title><link>https://devzone.nordicsemi.com/thread/25727?ContentTypeID=1</link><pubDate>Wed, 27 May 2015 11:48:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79564bfd-d7c6-4258-8e14-34b8411ae266</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;10 bits is 2 bytes, not 4. Don&amp;#39;t tell me you&amp;#39;re converting to ASCII and sending strings are you? You have a max 20 byte payload per packet, if we assume the 4 packets per connection is correct and 9ms is the min connection interval then you have 444 packets a seconds, if you send one sample per packet then yes you get 444 sample/second.&lt;/p&gt;
&lt;p&gt;But you can do much better. If you send the 10 bit readings as 2-bytes, but you send 10 of them in each packet (2 x 10 = 20 bytes) you can get 4,440 samples per second. But you can do better. 20 bytes is 160 bits, if you pack all the information in 10 bits at a time you can send 16 samples per packet, now you&amp;#39;re on 7,104 samples per second. If you can get the connection interval down to the minimum of 7.5ms, that&amp;#39;s 8533 samples a second.&lt;/p&gt;
&lt;p&gt;That relies on an awful lot of variables being EXACTLY right however.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about high speed ADC usage</title><link>https://devzone.nordicsemi.com/thread/25726?ContentTypeID=1</link><pubDate>Wed, 27 May 2015 10:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7320b44a-3958-42e0-9e7b-c9ae3eee80bc</guid><dc:creator>ahmed</dc:creator><description>&lt;p&gt;Dear RK,&lt;/p&gt;
&lt;p&gt;It is 10 bit ADC data sending via UART as a text which mean 4 byte by using UART over Bluetooth ble_nus_string_send, i need 8K sample/second, if the 9 ms is minimum connection time with 4 packets that is mean i just can get a 444 sample/second (1/9ms * 4), are this calculation right ?&lt;/p&gt;
&lt;p&gt;Thanks for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about high speed ADC usage</title><link>https://devzone.nordicsemi.com/thread/25723?ContentTypeID=1</link><pubDate>Wed, 27 May 2015 00:31:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb705d44-7224-43c6-acd5-85c93128e710</guid><dc:creator>RK</dc:creator><description>&lt;pre&gt;&lt;code&gt;#define 	BLE_GAP_CP_MIN_CONN_INTVL_MIN   0x0006
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That&amp;#39;s in 1.25ms intervals so 7.5ms is the absolute minimum. That&amp;#39;s per BTLE spec.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand why you refer to increasing &amp;#39;the sampling rate&amp;#39;, doesn&amp;#39;t seem like the ADC sampling rate is your problem, it&amp;#39;s the BTLE transfer throughput.  How are you sending the data, in what sized packets? There&amp;#39;s a theoretical maximum of 6 packets per connection interval (I don&amp;#39;t recall where that comes from) but it&amp;#39;s stated in other questions that many implementations are limited to 4. if you&amp;#39;re sending 20 bytes per packet, at 9ms connection interval that&amp;#39;s around 8kB/second, if you&amp;#39;re only sending one byte per packet, it&amp;#39;s about 450 b/second.&lt;/p&gt;
&lt;p&gt;And what&amp;#39;s on the other end of this link? Just because you request a minimum connection interval of 7.5ms, doesn&amp;#39;t mean the master on the other side lets you have it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>