Support for higher sample-rate ADCs and DACs

Status
Not open for further replies.

PhilK

Member
Hi, I was intending to use the audio shield for DAC and ADC functionality in a commercial project where I plug the Teensy3.6 into a custom PCB; I will probably still do this for the experience. However, I just found out the customers' (non-audio) signals I must digitize are 660 kHz bandwidth. I'm at a quandary which path to go. I liked the idea of just using the extensive audio.h code to handle data capture/playback and to feed it through USB to a PC host, since it seemed like the audio.h software was very thorough.

Can I still use this audio.h functionality to interface with 12-bit DACs and ADCs at 1.5 MHz sample rate, or are there likely internal limitations and/or bugs since the code is only tested at <192kHz?

If I don't use audio.h, is there some other library that can manage the DMA between Teensy and my DAC and ADC chips? It seems likely that if I try to hard-code byte-by-byte using the SPI library, I will get missed samples and/or an uneven sample clock.

Many thanks in advance for any library or sources/tutorials you can point me towards.

Best Regards,
Phil
 
Hi, I was intending to use the audio shield for DAC and ADC functionality in a commercial project where I plug the Teensy3.6 into a custom PCB; I will probably still do this for the experience. However, I just found out the customers' (non-audio) signals I must digitize are 660 kHz bandwidth. I'm at a quandary which path to go. I liked the idea of just using the extensive audio.h code to handle data capture/playback and to feed it through USB to a PC host, since it seemed like the audio.h software was very thorough.

Can I still use this audio.h functionality to interface with 12-bit DACs and ADCs at 1.5 MHz sample rate, or are there likely internal limitations and/or bugs since the code is only tested at <192kHz?

If I don't use audio.h, is there some other library that can manage the DMA between Teensy and my DAC and ADC chips? It seems likely that if I try to hard-code byte-by-byte using the SPI library, I will get missed samples and/or an uneven sample clock.

Many thanks in advance for any library or sources/tutorials you can point me towards.

Best Regards,
Phil

If you look into https://github.com/WMXZ-EU/microSoundRecorder, there is an option that allows the use of audio lib with arbitrary ADC sampling.
OK, it is a sound recorder but analog-wise very flexible.
In particular it uses still the DMA/queueing of the audio library but with different sampling rates
 
So far I've been able to use the ADC library to drive both ADCs with simultaneous acquisition at sample rates up to 520 kHz with 12-bits of resolution and up to 400 kHz with 16 bits. The image below is with the sample rate at 520 kHz. The top waveform is the input to A14 (ADC0). The second waveform is the output into DAC0 (from ADC0). The third waveform is the input to A12 (ADC1). The bottom waveform is the output of DAC1 (from ADC1). Note that the input channels 1 and 3 are 180 degrees out of phase with respect to each other (as are channels 2 and 4). I'm using 2048 point buffers for each of the four DMAs, so there is some substantial phase offset between the ADC inputs and the DAC outputs but everything is nicely synced. I've run both DACs up to 7.5 MHz but the settling time limits the useful signal bandwidth to about 100 kHz.
Sample at 520 kHz.jpg
 
Status
Not open for further replies.
Back
Top