1

In order to acquire 3 analog signals with Raspberry pi 4 I want to use ADS1256 Waveshare's AD expansion board ( 8 channels single-ended, 24 bit). I was wandering if there's a way to set a different sampling frequency to each channel. ADS1256's datasheet states that the maximum fs is 30kSPS. Since I need to acquire 3 signals and one of them need to be sampled at 10kHz, I want to know if there's a way to set a specific fs to each channel. In this way I could sample correctly the audio signal (10kHz) and not oversample the other ones. So far, I've just downloaded the source code ( Python) provided by Waveshare https://www.waveshare.com/wiki/File:High-Precision-AD-DA-Board-Code.7z but I don't understand if there's a way to change it to do what I want. Thanks

2
  • Ah, let me see. ADS1256 can convert in either "continuous mode" or "single shot mode". In single shot mode you can decide the sampling speed. Let us take Channel 1 for example, if you take one one-shot conversion each second, then sampling rate is just 1 sps. if you take one one-shot conversion each half second, then the sample rate is 2 sps. If you are converting 2 channels, each second you take Channel One 100 one one-shot conversions, and in the same second you take Channel Two 1,000 conversions (evenly or not evenly spread out), then you have Channel One 100sps, Channel Two 1000 sps.
    – tlfong01
    Oct 30, 2020 at 13:01
  • #Dmitry Grigoryev's 3 signals at 10 kHz is for continuous conversions, for continuous wave. The one shot mode is for the case that you only need to take random number of samples for a randomly long time for one or two, up to 8 channels.
    – tlfong01
    Oct 30, 2020 at 13:10

1 Answer 1

2

3 signals at 10 kHz is exactly 30 kSPS, so you should be able to sample all three channels at the same rate, then throw away unneeded samples on slow channels.

Sampling different channels at different rates is difficult to implement correctly. Naive implementations result in jitter, because two consecutive samples of a fast channel will have a shorter sampling time than the same two samples with a sample of a slow channel in between.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.