Interestingly though, this investigation turned from:
“Is the Analog Discovery Pro good enough for our project”
to
“Is Digilent good enough for our project”….
Let me explain why.
Analog Discovery 2 – 1 MHz streaming limitation
The Analog Discovery 2 has a high enough sampling rate for measurements and arbitrary waveform generation (both 125 MSps). The 2^15 (32,768) samples buffer size however would require the PC application to stream the data to and from a PC continually. Using a regular USB2 connection to a laptop and a small Python application (based on Digilents’ provided example files) I configured the AD2 to generate a 50 kHz signal on output channel 1 which then was recorded on input channel 1. This showed that playback+recording could be done reliably as fast as 0.5 MSps, but that at 1 MSps gaps started to appear in the recorded data. The plot below shows a typical 1 second measurement of a 50 kHz signal sampled at 1 MHz, which basically shows in the plot as a solid square (see red ‘line’ below) because of the high density of the data. We can zoom in to see the individual sine-periods, but it would take forever to verify that there are no anomalies in the signal.
In my experience, when searching for anomalies in any signal, inspecting the differentiated signal often helps. Viewing that signal the proverbial gap-needle in a data-hay-stack often becomes quite visible as a spike. That is exactly what happened in this case, see the purple data, just after the 0.2 sec mark.
It should be noted that the API allows the user to query the AD2 for dropped and corrupted samples, which indeed started to show around this rate.
Conclusion: the AD2 would not suffice.
Analog Discovery Pro 3250 – 2^18 samples spike
At this point I moved on to the Analog Discovery Pro 3250. In one of the tests, I synthesized a 4 second, 50 kHz sine wave at 1MSps (subplot 1 below) to be sent on output channel 1 and then recorded on input channel 1 (subplot 2 below) at the same rate. Even though the AD Pro memory size should allow for playback from memory (avoiding the gaps we noticed with the AD2) we were still seeing spikes in the differentiated signal (subplot 3 below).
Using a table-top signal generator these spikes never showed; hence we isolated the issue to the AD Pro’s playback feature. Detailed inspection of the distance between the spikes showed that they were 2^18 (262,144) samples apart which reeks of a software (SW) or firmware issue.
After creating a simple script which reproduced the issue, we reported our findings to Digilent’s online forum (see Glitch in playback at 1 MHz) where prolific poster Atila picked it up. After some back and forth, Attila reported that he had located the root cause of the issue (yup, it was a memory issue) and was working on a solution. To my delight, less than a day and a half (1.4972 days to be exact) after posting the issue, a SW update was posted which indeed fixed the issue.
Analog Discovery Pro 3250 – End of playback jump
Digging even deeper into the playback quality using my favorite differentiated-data-sanity-check revealed that there was one more pulse / hiccup to resolve which seemed to happen at the start (or end) of the playback-signal. This one turned out to be much harder to reproduce and in order to isolate the issue to the Analog Discovery Pro playback or recording side I utilized a desktop oscilloscope. This showed that the bug was again located in the playback functionality. Without having any type of trigger from the AD Pro to the desktop scope I needed a playback signal which allowed me to repeatedly trigger the AD Pro output right at the start of the periodic signal. In this case I repeatedly played a 5 second, 8 kHz sinusoidal signal sampled at 6 MHz (blue below), of which the amplitude reduced from 1 V to 0 V over the duration of those 5 seconds (orange).
Using the table-top oscilloscope this looks like the blue signal on ch2 (left plot) at different zoom levels (ignore the yellow signal on ch1):
1 sec/div | 20 ms/div | 200 usec/div |
Again, I presented this to Digilent’s forum for support (Pulse at end of buffer with funcPlayPattern) which was again promptly picked up by Attila. This time we needed an even simpler experiment to show what was happening which, ended up being a sawtooth signal from +1V to -0.5 V over a period of 100 ms seconds (a shorter duration to speed up the experiment), played back at the same 6 MHz rate.
20 ms/div | 100 ns/div |
|
-
from the end value of the playback-signal (-0.5 V)
-
to the start value of the playback-signal for ~50 ns (+1 V)
-
then returns to the end value of the playback-signal for ~3 samples (-0.5 V)
-
before actually starting the playback-signal (+1 V)
This time, just over 1.75 days (1.7563 days to be precise) after the initial post an updated SW release was posted which fixed this issue, as shown below.
Conclusion: The Analog Discovery Pro 3250 playback function works as expected.
To-Use or Not-To-Use
At this point in our investigation, we could show our client that indeed the Analog Discovery Pro 3250 was suitable for the job. However, as shown, the investigation revealed some bugs which, even though they were fixed, led to the question if we should advise to use Digilen’s Analog Discovery Pro or not.
For me, the responsiveness of understanding and fixing the presented bugs far outweighs the risk of any latent obscure bugs we might face in the future, and it is with full conviction that we advised our client to move ahead with the Analog Discovery Pro 3250, advice he gladly followed.