Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor I
4,489 Views

Maximum ADC sampling rate.

Hello,

I am workng on a project where I need to sample audio inputs. How shall I increase the ADC sampling rate on the edison such that it meets the audio sampling rate of 8khz or more..?

24 Replies
Highlighted
Valued Contributor I
21 Views

I see that the ADC mux is connected to I2C and SPI through some ADC chip.Do I have to configure SPI0 or I2C some how to increase the ADC sampling rate?

Highlighted
Employee
21 Views

Hi,

There are several threads that discuss ADC sampling with the Edison.

Take a look at

Sergio

0 Kudos
Highlighted
Valued Contributor I
21 Views

I have already looked into the above two threads but they dont give an answer.I want to go with the MRAA way to sample the signal but at frequencies like 2,4, and 8khz. Could some one tell me how do I get high sample rate with MRAA?

0 Kudos
Highlighted
Valued Contributor I
21 Views

Can some body please tell me how to increase the ADC sampling rate using MRAA? I was able to generate fast PWM enough for audio data where the audio is being played from a file but now I want live audio from a mic and for that the sampling frequency needs to be high.

Highlighted
Valued Contributor I
21 Views

I see that the adc pins on the edison are connected to ADS7951 and it has a 1mhz sampling rate. So how shall I achieve 8khz sampling rate on the edison arduino board.

0 Kudos
Highlighted
Valued Contributor I
21 Views

Intel_Alvarado CMata_Intel

Any idea on this?

Highlighted
Employee
21 Views

Hi,

We will run some tests. We will let you know our results soon.

Sergio

Highlighted
Valued Contributor I
21 Views

Ok,I will wait to hear from you.

Highlighted
Employee
21 Views

Hi,

 

2.9 KHz is the best we can get with Edison.

Sergio

0 Kudos
Highlighted
Novice
21 Views

Is that at a uniform sample rate? I have a project where I was trying to get uniform sampling rate from the Edison ADC in python. Specifically, I read analogin values from python for a second, sleeping 1ms between samples. Obviously this wouldn't actually give me 1000 samples per second every time, but there was also way too much variability, from around 540-890.

Since Edison doesn't have an RTOS, I tried to switch to the Quark, but I saw that the Quark sleep can only go as low as 0.01s, whereas I need to be sampling an ADC (this time, I have an I2C ADC connected) at least 1KHz. Can someone provide some insight into how I might do this in an accurate manner?

0 Kudos
Highlighted
Valued Contributor I
21 Views

But the edison arduino hardware guide says that the 1MHz is the sampling rate of the ADS7951 Chip. So atleast it should give samples in the order of KHz. Since the ADS7951 is connected to SPI0 cant we change SPI0 interface parameters and get higher sampling rate?

Highlighted
Employee
21 Views

Hi,

menonv That is the lowest sleep the Quark can do.

Sriranjan The chip is fixed on the board and cannot be changed, that is the fastest sampling rate Edison is capable of.

Sergio

0 Kudos
Highlighted
Valued Contributor I
21 Views

Intel_Alvarado the edison arduino hardware guide says the sampling freq of ads7951 is 1MHz.

Highlighted
Employee
21 Views

It is true ADS7951 has maximum sampling rate of 1 MSPS (MSPS means Million Sample Per Second not to be confused with MHz). Which means the ADS7951 can be connected to 1 MHz SPI to sample and transfer data at 1 MHz. Edison SPI linux driver in the current release that is used by Arduino for Edison can only reach 2.9KHz. Intel made the SPI driver source code available through the BSP for the users to make changes and customize the SPI driver to fits their needs.

Sergio

Highlighted
Valued Contributor I
21 Views

Intel_Alvarado

Could you give us a step by step guide to change the SPI driver, change the kernel and how to compile/ upload it to edison.I followed the procedure given in the bsp (last page) but I never could update the kernel or reflect the changes through a pr_info() print statement.

Highlighted
Employee
21 Views

Hi,

There is no document that discusses increasing speed of ADC through kernel changes. The engineering team is aware of this and they may have improvements in future releases.

Sergio

0 Kudos
Highlighted
Valued Contributor I
21 Views

OK Intel_Alvarado.So couid you please tell me how to get the ADC working at 2.9 and 2Khz?

0 Kudos
Highlighted
Novice
21 Views

Hello Sriranjan! have you ever use spi2 to driver the ads7951 successfully?

Highlighted
Employee
21 Views

Hi,

The sampling rate was obtained by creating a C++code that loops without delay or print statements. In the loop the following was done:

Sample analog pin

Write high to GPIO

Sample analog pin

Write low to GPIO

C++ sample code can be found here: https://github.com/intel-iot-devkit/mraa/tree/master/examples/c%2B%2B mraa/examples/c++ at master · intel-iot-devkit/mraa · GitHub

Sergio

0 Kudos