Maximum sample rate of ADC

34 views
Skip to first unread message

Jonas

unread,
Mar 1, 2015, 6:08:37 PM3/1/15
to libbu...@googlegroups.com
Hi, 

I've looked through the documentation and comments but couldn't find out what the maximum sampling frequency of the ADC on a BeagleBone Black is, using the library.
These are the methods (of class AnalogInput) in question:

/**
* Grabs a number of readings from the analog input, sampled
* with the specified frequency.
*
* @param amountSamples the amount samples to be taken
* @param frequency the frequency that should be used for sampling
* @return an array of values ranging between 0.0 and 1.0.
* These represent the percentage of the voltage reference
* that were supplied to the pin when the measurement was
* taken.
*/
double[] sample(int amountSamples, float frequency);
/**
* Grabs a number of readings asynchronously from the analog input,
* sampled with the specified frequency.
* The program will continue execution while the samples are being
* taken.
*
* @param amountSamples the amount samples to be taken
* @param frequency the frequency that should be used for sampling
* @return A future containing an array of the sampled values.
* These values range between 0.0 and 1.0, which represents
* the percentage of the reference voltage that has been
* measured.
*/
Future<double[]> sampleAsync(int amountSamples, float frequency);

Thanks for any advice!

Datenheld

unread,
Mar 22, 2015, 7:31:04 AM3/22/15
to libbu...@googlegroups.com
Hi Jonas,

the max sampling frequency should be 8MHz, but in reality, I'd be surprised to achieve this. The ADC implementation has various problems anyway. I do not advise to sample high frequencies with it. Maybe a future update will solve this.

HTH

Datenheld

unread,
Mar 22, 2015, 7:31:43 AM3/22/15
to libbu...@googlegroups.com
Moreover, the frequency won't be accurate. It will be calcuated to the nearest possible value as you can only set it via delay times and dividers.
Reply all
Reply to author
Forward
0 new messages