Measuring ADC-to-DAC Latency on BeagleBone Boards (esp. AI-64)

Hi All,

I’m curious whether anyone has conducted (or would be interested in conducting) an experiment to measure the single-sample latency from analog input to analog output on any BeagleBone board — especially the BeagleBone AI-64.

We’re investigating the feasibility of using the board for analog-to-analog feedback control, where latency can be a limiting factor for closed-loop performance.

Experimental Concept The idea is to quantify the latency between sampling an analog signal and reproducing it on an analog output, using only the ARM processors.

Proposed Setup The diagram below shows the experimental setup as I envision it.

• Input: Sine wave from a function generator, sampled by the built-in ADC or a convenient external ADC.

• Output: The same signal is written to an external DAC (e.g., the MikroE DAC Click, a cape, or another DAC).

• Measurement: An oscilloscope compares the input and output signals to determine latency. If the latency were 0, the two curves would be on top of each other.

We’re aiming for around 10 μs latency, so if we start with a low-frequency sine wave, increase it to 5 kHz without dropping a period, and the phase shift amounts to no more than 1/20 of the signal period, our performance requirements will be met!

Questions

• Has anyone tried something like this on a BeagleBone (especially AI-64)?

• Any suggestions for a low-latency DAC with a good voltage range and output stage (ideally no need for a custom op-amp output stage)?

Looking forward to any experiences, recommendations, or data — and happy to post results if we move forward with the test.

For my DAC I’ve been using the AD3542R evaluation board. I am controlling it over SPI from a R5 core. The thing blows away the old DACs I am replacing. Don’t recall the latency from my testing, datasheet claims 4ns. I got my SPI transfers down to 2μs. So another 4ns after CS before the voltage goes to commanded?

Make sure to not use the MikroE Click version of the DAC. The MikroE Click 13 DAC iirc has the AD3541, but has trash latency. Something about how MikroE designed their PCB.

I believe someone on this forum figured out the ADC, I recall it not having the best range. You might want to use an external ADC

2 Likes

Thank you @kevinacahalan! That’s really good info and we have been taking a closer look.

A follow-up on your MikroE Click comment: Is that a problem with the entire bus architecture or is it specific to the MikroE Click 13 DAC? I haven’t used MikroE before, but now that it’s built in to the AI-64 I was thinking about trying it. Thanks again!

It’s specific to the board design for the Click 13. I don’t know EE stuff, but an electrical guy told me it had to do with some specific parts put on the board for signal dampening. The signal dampening was overdone. You may be able to solider bridge the signal dampening away. I don’t recall the my rise and fall time measurements, although, I was able to control the DAC 13 board faster than it could rise and fall. So, in the μs range, not ideal…

For talking and controlling the board, I used SPI7 controlled from an R5 core. The DAC 13 uses SPI in the MikroE pinout. I simply plugged my DAC 13 into a bread board and connected over with jumpers.

Random thing, be careful with the AD3542R eval board. I have blown up 2 so far :grimacing:. Keep your higher voltage connections solid. Use screw terminals and solider

If you’d like to control your closed loop from a R5 core, I got this example app you can start from.
https://github.com/kevinacahalan/BeagleBoneAI64_Heterogeneous_App_Example

1 Like