Jump to content
  • 0

External Clock for Analog Discovery 2


zeckjia

Question

20 answers to this question

Recommended Posts

  • 0
40 minutes ago, zeckjia said:

I want to add an external clock (5 MHz or 10 MHz) from GPS for my data acquisition. Is this possible on AD2?

I don't see anything in the AD1 or AD2 Hardware Reference that suggests that an external clock is possible. How the AD3 clocking is implemented is unknown so far as my search efforts have indicated.

Link to comment
Share on other sites

  • 0

Hi @zeckjia,

The Analog Discovery 2 does not support having an external clock signal.

The Analog Discovery 3 can support an external clock ranging between 10 MHz and 50 MHz (with the ability to adjust the Phase for better alignment) on the Trigger 1 line; there is some additional information on this within the WaveForms Help Tab in the System Frequency section of the Analog Discovery 3 category:

image.png

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

It's disturbing to me that important information about how a product might be used is left out of product documentation and replaced by a less informative description in, beta software of all places, that Digilent makes so hard to obtain. Recently there seems to be a concerted effort at making it hard to find important information that customers, and potential buyers need.

This kind of attitude will have a negative effect on any future decision to purchase Digilent products, by me, in the future.

Link to comment
Share on other sites

  • 0

Hi @JColvin and @attila

The abiility to use an external reference clock is great. This is new informatiom to me (which is a bit worrying).

I have not encountered this configuration option in the API documentation. Did I miss it, or is this not (yet) a public API function? And is it AD3 only, or would it also work on the ADP3x50?

The decision to put this kind of relevant information in the Waveforms help file (and only there) is unfortunate. Most other companies that sell measurement equipment have their data sheets and user/programmer manuals downloadable as PDF files, which is preferable.

 

Link to comment
Share on other sites

  • 0
15 hours ago, JColvin said:

Hi @zeckjia,

The Analog Discovery 2 does not support having an external clock signal.

The Analog Discovery 3 can support an external clock ranging between 10 MHz and 50 MHz (with the ability to adjust the Phase for better alignment) on the Trigger 1 line; there is some additional information on this within the WaveForms Help Tab in the System Frequency section of the Analog Discovery 3 category:

image.png

Let me know if you have any questions.

Thanks,
JColvin

Thanks, @JColvin!

Do you know how accurate the clock in AD2 is? Is there a value to quantify AD2's clock accuracy? Thanks!

Link to comment
Share on other sites

  • 0
22 hours ago, reddish said:

How long do you want your acquisitions to be?

There's another ongoing thread discussing a similar use-case, it may be useful to read that as well.

Hi @zygot!

We expect the acquisition to run for 2-3 days, but this can be partitioned into multiple short-time acquisitions. We only need the raw data to be saved in binary files. Currently, we are using NI DAQs together with the MATLAB Data Acquisition Toolbox, which supports background acquisition without using too much CPU and memory. We could run a 30-minute acquisition without interruption.

I was happy to see AD2 could use the MATLAB Data Acquisition Toolbox as well with a higher sample rate than NI DAQs, until I figured it does not support external clocks. I'm working on a passive radar project and need to acquire data using 3 systems simultaneously. These systems are far away from each other so we cannot sync them in one place. We have to use GPS clocks to ensure high accuracy.

Thanks

Link to comment
Share on other sites

  • 0

Hello,

The particular screenshot of the Help Tab I pulled is also available in the 3.20.1 release version that launched with the AD3, and was mentioned in this thread: https://forum.digilent.com/topic/25916-analog-discovery-3-information/#comment-77521 and also referenced via proxy here: https://forum.digilent.com/topic/25915-analog-discovery-3/#comment-77556.

Based on WaveForms change logs, the ADP3000 series boards first had access to external clock back in 3.17.1 which released back in October 2021, https://digilent.com/reference/software/waveforms/waveforms-3/change-logs/3-17-1 (which I confirmed just now after downloading 3.17.1 and checking  the in-app device options), but as best as I can tell, there has been only a single question about it on the Forum in September 2022: https://forum.digilent.com/topic/23871-external-reference-clock/.

image.png

 

 

I'm not as familiar with the API/SDK side of things as I would like to be, but this function was also available in the 3.20.1 Release of the SDK as well via FDwfParamSet; it only says it's supported by the ADP3000 series boards (not sure when they gained this particu but I would think this would also be supported by the Analog Discovery 3. I will defer to @attila on this detail.

image.png

Truthfully though, thank you for the feedback and desire to know more about this particular feature; I'm not sure when came into existence i.e. if it was an idea Attila had or if it came from a customer request like the one for Dual Mode to use two identical devices to extend the number of analog / digital channels and have all of the data (and synchronization of the two devices) handled within a single instance of WaveForms which takes advantage of the external clocking (a blog post on Dual Mode that was started before this thread I'm typing on will be published relatively soon). I believe the ADP3000 series boards gained support for Dual Mode towards the end of April 2023 in 3.19.34, https://forum.digilent.com/topic/8908-waveforms-beta-download/.

Clearly, Digilent underestimated the perceived value of this particular feature (I wouldn't have even called it a hardware feature per se, though I suppose it technically is as Attila had to add FPGA logic in order to support it, as is the case for many of the new WaveForms features). We will work on getting this feature better publicly documented.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi @zeckjia,

I'm not personally sure on the accuracy of the clock for the AD2. The Hardware Design Guide has a small section on it here: https://digilent.com/reference/test-and-measurement/analog-discovery-2/hardware-design-guide#clock_generator, and there are a couple of threads on the AD2 clock which might help give you some insight here: https://forum.digilent.com/topic/20004-ad2-pattern-generator-creates-clock-drift/ and here: https://forum.digilent.com/topic/24529-repeatability-issue-using-ad2-oscilloscope-and-waveform-generator/?sortby=date.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

It's a bit awkward that there are 2 cross-linked thread going on at once, but they are certainly about the same subject.

Whether the AD3 was produced to avoid being unable to procure Spartan 6 devices at a reasonable cost or not is irrelevant to users. An external system clock input that the user can provide is a "BIG DEAL" in terms of how useful the AD3 is as a cheap, general purpose instrument. How big an improvement depends on how the clocking is implemented. The diagram above doesn't make a lot of sense to me; though a lot of decisions that Digilent make fall into that category. I'm hoping that the diagram is inaccurate.

It's just my opinion, but your current documentation will cost you sales from people who need useful technical details about the AD3 Theory of operation. Digilent provided this for the original AD and AD2. I'm betting that the hardware reference manual for those products didn't hurt sales at all. Certainly there hasn't been any new products from other vendors under-cutting Digilent's sales of these devices.

Wise up and treat your customers properly and I guarantee you at least one more sale.

Having said all of that, the AD3, like its predecessors, is an educational product, at an educational product price, and with support that's better than expensive products with similar functionality, that is analog acquisition, analog waveform generation, digital data acquisition, and a few other capabilities. It's pretty obvious that people with a limited budget would like to use the product line for more than educational purposes.

 

Link to comment
Share on other sites

  • 0
1 hour ago, JColvin said:

I'm not personally sure on the accuracy of the clock for the AD2.

I'm assuming that the 20 MHz DSC1101 in the AD and AD2 is the cheapest +/- 50 ppm version. Even that Frequency Stability (Including frequency variations due to initial tolerance, temp. and power supply voltage.) is exceptional for a product at the price point of these products.  For useful range of the converters used in these devices this should be very good. That doesn't mean that there aren't a lot of other things to consider as your links point out.

I haven't done an analysis of  the clock circuits' stability or phase noise impact on ADC or DAC conversions accuracy. I also wouldn't expect more than about 12-bits of useful resolution out of the converters. There's no sophisticated AGC on the ADC keeping the input near full scale.  They are cheap products for what they do. That's how I use them.

It's possible to get more utility out of a product than it was designed to do, but then you have to verify that things work as hoped for. You can spend your time and money on expensive instruments with guaranteed specifications ( and hope that yours meets it ) or you can spend you time doing verification, assuming that you already have a lot of very expensive equipment on hand.

Link to comment
Share on other sites

  • 0
5 hours ago, zeckjia said:

I was happy to see AD2 could use the MATLAB Data Acquisition Toolbox as well with a higher sample rate than NI DAQs, until I figured it does not support external clocks.

A product that does AD or DA conversion and doesn't have an well designed time base or an external clock input is fine for educational or hobby use, if it's cheap enough. Otherwise both of those things are a requirement for most serious applications. The AD3 might be a step in the right direction. That's why people like you need details.  

Link to comment
Share on other sites

  • 0
4 hours ago, JColvin said:

Clearly, Digilent underestimated the perceived value of this particular feature (I wouldn't have even called it a hardware feature per se, though I suppose it technically is as Attila had to add FPGA logic in order to support it, as is the case for many of the new WaveForms features).

I would presume that the external clock enters the FPGA and (via some MCMD/PLL blocks) is scaled up to the desired clock frequency.

This is a really a big deal for any measurements that require precise timing in a lab, as well as measurements that need to have a high degree of synchronization across multiple sites. Indeed radar is a good example, but I've been doing stuff like this for long-distance quantum entanglement experiments. In short, it may allow the AD devices to be used for all kinds of measurements for which you'd normally need devices that are five to fifty times as expensive.

Indeed the value is listed in the documentation, but I wouldn't go so far as to say it is "documented". In fact, pydwf defines this value but lists it as "undocumented". That's because the description in the document had no information the first time I encountered it (several versions back), and still has way too little information to be usable. To realize that, try reading the description with the eyes of an outsider. What does "reference input" mean? Should it be a 10 MHz signal, or something else? What does "use trigger-1 as reference IO" mean?

So what I did with pydwf, is I glossed the documentation, rolled my eyes at the sheer lack of good information in the description, and just typed over the value, calling it "undocumented" and adding a "ToDo".

The dwfsdk.pdf document has a lot of this kind of semi-information. It is, essentially, at the quality level typical of company-internal documentation; it's probably good enough for people who implemented the features themselves, and who have access to the source code and other company-internal design documents. But to outsiders like myself, when trying to get stuff to work, the only thing we can do is play with the Waveforms application, read the C header file, the super-hard-to-read Python examples (due to the low-level ctypes interface that they use for lack of proper Python support), and dwfsdk.pdf, and try to essentially reverse-engineer how stuff works. I know, because I have done this for a bunch of features in the library.

But the library is just too big to do this for everything (478 functions at 3.20.1 !!!), and it's a moving target. Nowadays I dread to see a new release of DWF, because I will need to update pydwf. What have they added this time? Oh dear, signal processing functionality (what the hell? And buggy too, for the first few versions). Support for the SWD protocol, nrgh. Digital-in and Analog-in counters with under-defined behavior - ouch. "cmd" versions of all the SPI functions, aaarghh!?!

You guys have super talented software engineers ( @attila is one of them, I hope for his sake he's not alone. If he is, he must be some kind of programming demigod). The quality of the software work is plain as day considering what you have managed to wrangle out of those FPGAs, and also when looking at the Waveforms GUI application, which is miles ahead of anything else on the market in the price segment you're targeting.

But having said that, your documentation is in dire need of a second pair of eyes. In fact I think there's about 2 years of work for a talented technical writer before it could be considered "good".

Edited by reddish
Link to comment
Share on other sites

  • 0

Hi @reddish @zygot,

AD3 topology is similar to AD2 but better.

A dedicated low-jitter PLL (CDCE6214) is used to drive the ADC and DAC.
By default (standalone/master) the PLL uses a local oscillator, providing to ADC a clock with less than 3ps jitter in 50Hz and 20MHz range.
A PLL in the FPGA is used to generate internal clocks, and also a low frequency clock which can be adjusted (10-50MHz) and optionally output on the Trigger IOs.
The device can also be used with external reference clock of 10-50MHz (slave) applied to Trig1, bypassing the FPGA and driving the dedicated PLL. With 10MHz reference clock we measured less than 4ps jitter on ADC clock relative to the reference.
The reference clock minimum is limited to 10MHz due to the PLL specs.

image.png

New users are usually overwhelmed by the features available, often saying it's too much... only to request another feature a few minutes later.
The SPI functions were designed so the CS is controlled by software, but we had several requests for hardware-controlled CS, which is why the Cmd variants were added.

Link to comment
Share on other sites

  • 0

Hi @attila

This is all good information of course but the right place for it is a standalone reference document, not a forum post or a Waveforms help file entry.

> New users are usually overwhelmed by the features available, often saying it's too much.

Well one, features are not useful unless they are discoverable and documented.

And then, the intended audience for dwfsdk.pdf and other reference material is not new users.

> [...] which is why the Cmd variants were added.

I suppose that's a rationale, but it should be explained in dwfsdk.pdf. Why is there (seemingly) duplication of functionality? Which functions should I prefer as a user? Right now I simply have no way of knowing.

I could list literally dozens of places where the API documentation could be significantly improved. In fact, I'm quite willing to do just that, but only if I see a commitment at the side of Digilent to make improvements.

( Please don't take my criticism personal -- I think you're making a pretty awesome product -- but with improved documentation and code examples it could be so much better! )

Link to comment
Share on other sites

  • 0

@attila,

Having the capability of a user supplied clock source is by far and away the most significant improvement of the Analog Devices product line to date. Why it wouldn't be featured in Digilent's advertising and product reference manual is astonishing to me. This easily justifies the cost increase of the AD3 all by itself, as far as I'm concerned.

I don't understand the rational of anyone telling you "Please spare us important details that make understanding how your product works and how it might be useful to me, and also make finding relevant information as hard to find as possible by hiding it and chopping it up into a myriad of disconnected pieces.", or why it would guide your good sensibilities. The hardware documentation for the AD and AD2 were adequate; not so for the AD3.

Yes converting signals between the analog and digital realms involves a lot of complicated theory, as does a physical implementation. If people don't want to take the time to resolve their confusion when reading good documentation then that's their privileged.

Please tell customers and potential customers that you value their time and intelligence by providing sufficient product information in one place, and with sufficient details that allow them evaluate suitability of the Analog Discovery product line for any particular purpose efficiently and effectively in a timely manner. This would be good for Digilent, its customers, and everyone else.

Confusing people who know what questions need to be asked is a lot worse, for everyone,  than confusing people who'd rather not know too much about how to use a product.

That's my opinion.

Edited by zygot
Link to comment
Share on other sites

  • 0
9 hours ago, attila said:

The device can also be used with external reference clock of 10-50MHz (slave) applied to Trig1, bypassing the FPGA and driving the dedicated PLL. With 10MHz reference clock we measured less than 4ps jitter on ADC clock relative to the reference.
The reference clock minimum is limited to 10MHz due to the PLL specs.

This is how I would have wanted it done. The 10-50 MHz span is, possibly inconvenient, but not a huge issue.

I suggest that you include DC ( and AC if pertinent ) parameters for clock sources connected to Trigger1 when using the external clock. It would be nice if you showed how the pin is terminated as well.

No one expects to see the complete schematics for a product like the AD3 but partial snapshots like were done for the previous editions are good. I realize that it might be difficult to do this for the AD3 clocking. Nevertheless, I'm never quite happy with sketches in the manner provided so far for the AD3 clocking.

Yes, please go back to the earlier Analog Discovery hardware reference manual style.

Link to comment
Share on other sites

  • 0

@attila,Thanks for the trigger IO specification. I think that I understand most of what I need to know about the AD3 external clocking. It's been unavailable to me because I'm not going to go through the hassle of obtaining the latest beta version of Waveforms just to understand if a new product is suitable for any of my needs. Is this understandable?

Digilent has always had a problem turning out documentation other than schematics for its products. It's obvious that the chore has always been assigned to an intern or least knowledgeable member of the staff and that sufficient editing and oversight by someone who's technically knowledgeable isn't done. I can see how a small company with limited resources might get caught up in this. It's a shame when it happens. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...