Digilent Analog Discovery 2 - Page 1
Forum section: electronics / testgear

author: xjordanx
author_rank: Contributor
timestamp: October 13, 2016, 08:57:45 pm
content: Hi All,I was at OSHWA summit this year and the Digilent people showed me their Analog Discovery 2.I watched Dave's video on the Red Pitaya and I think it would be interesting to see him do a shootout between Red Pitaya and Analog Discovery 2.What do you think? I've been interested in this kind of programmable / configurable instrumentation for a while, but on one hand I don't like that Red Pitaya is not OSHW, and the other I don't like that Analog Discovery 2 is tied to National Instruments.Is there a third horse in that race?I might just be happy to stick with my Rigol DS1152E....

author: Howardlong
author_rank: Super Contributor
timestamp: October 13, 2016, 10:52:02 pm
content: Quote from: xjordanx on October 13, 2016, 08:57:45 pmI have an AD1, AD2 and a few Red Pitayas (I use the RPs as part of a proprietary SDR solution). The ADs are low end instruments that can be used in the lab for undemanding applications. The Red Pitayas are toys in that regard, I guarantee that you will be hugely disappointed if you replaced your Rigol with an RP. Where the Red Pitayas shine is in application specific vertical markets such as high speed data acquisition and SDR, but you need to get your programming chops out to make it achieve anything remotely useful. As a lab instrument the RP is totally crap.The AD2 is almost identical in terms of performace and features to the AD1, with the newer unit having adjustable power supplies instead of being fixed. As a scope, again you will be disappointed compared to the Rigol, but they're both a damn sight better than the RP. They do offer a few extra features though. For me most useful is that the ADs are super portable, but on the bench I only really use them for arbitrary digital signal generation, which they're really pretty good at thanks mostly to their excellent software application.

author: pascal_sweden
author_rank: Super Contributor
timestamp: October 13, 2016, 11:41:47 pm
content: Is it really only the power supplies that are better in the AD2 compared to the AD1?I read somewhere that the BW is much higher, but probably that was wrong information.My understanding is that the BW is identical between AD1 and AD2.I am also considering to buy an AD for basic lab experiments to complement the scope.If the BW is identical I will probably go for the AD1, as I think it looks more professional,and less shiny than the AD2.

author: rstofer
author_rank: Super Contributor
timestamp: October 13, 2016, 11:54:09 pm
content: Quote from: pascal_sweden on October 13, 2016, 11:41:47 pmThat's my understanding but the power supplies are MUCH better at 2W per output.QuoteDon't do that! I'm thinking about upgrading from my AD1 to an AD2 specifically to get the increased power supply capability. It can be used with an external wall wart and can power much larger experiments.I realize it is probably operator error but I can't get my DS1054Z in X-Y mode to hold a trace (persistence) that takes 6.28 (yes, 2 PI) seconds to generate. It's a walk in the park on the AD1.The AD2 won't replace my DS1054Z but then again, my scope doesn't include 2 AWGs, 16 bits of digital (including use as a logic analyzer) or provide +-5V for my project.I'm a huge fan of the AD and it really is a lab that fits in a backpack along with the laptop or tablet.

author: rolfcaddell
author_rank: Newbie
timestamp: October 14, 2016, 07:03:55 am
content: I have a all three products at home. All of them have some benefits/drawbacks over the other two so you should know what you need.AD2: portable T&M instruments however incomparable with Rigol regarding performance.Red Pitaya: portable open SW source T&M instruments and other applications (SDR). It was a crappy tool when I bought it in 2014 but they have a big community that it is pushing their development ahead. Today they have all the features I need, the system is becoming very stable and the number of available applications is constantly growing. However it is still a toy comparing to Rigol if you are using it only as Oscilloscope.Rigol: very good price performance Oscilloscope. The drawback is that is not portable and not open source.If you are looking for an Oscilloscope I would still recommend you Rigol.

author: Howardlong
author_rank: Super Contributor
timestamp: October 14, 2016, 12:37:13 pm
content: Quote from: pascal_sweden on October 13, 2016, 11:41:47 pmI did a vid comparing them here:In short, the bandwidth is pretty much identical, they have just specified it differently.Practically speaking I have never found a need to use the integrated PSUs, but YMMV of course. I find it's usually the AD1 that ends up getting used, I prefer the foam packaging to the more flimsy cardboard of the AD2.

author: rstofer
author_rank: Super Contributor
timestamp: October 14, 2016, 05:03:43 pm
content: I think the increase ampacity of the V2 power supplies is underappreciated. The V1 supplies are very touchy about capacitive loads (like bulk capacitors on the breadboard) where V2 should have no problems as it can provide power by way of an external wall wart.I have thought these units would be particularly helpful to the very beginner. With the power supply they could build up transistor circuits, feed the input with the AWG and measure the output with the scope. Or, sweep the frequency and plot the magnitude and phase. All that is required other than the AD is a breadboard and some parts. Same deal for 5V (single or dual supply) op amp circuits. The AD2 can also power uC projects if the user doesn't have a USB powered development board.The AD can postpone the issue of buying a scope, power supply and signal generator for quite a while.

author: pascal_sweden
author_rank: Super Contributor
timestamp: October 14, 2016, 05:31:37 pm
content: For the people who want to go for the AD1 anyhow, because of the nice foam packaging,the power to the circuit can be provided through USB. Didn't Dave review some of these USB power devices in one of his Mail bag videos? Or were they not powered by USB? At least they were some small gadgets to put on a breadboard and provide power to your circuit.

author: rstofer
author_rank: Super Contributor
timestamp: October 14, 2016, 08:34:41 pm
content: Yes, the power comes from USB for both AD1 and AD2 with the AD2 having the ability to use an external wall wart.The AD1 power supplies are limited to 50 mA each and that is the instantaneous value as far as I can tell because bulk capacitors on the breadboard WILL trip the overcurrent. In Dave's video, he got a trip with NO load.For the AD2:QuoteThat is a huge difference when using the wall wart. The USB only is the same as the AD1 at 5V output.

author: pascal_sweden
author_rank: Super Contributor
timestamp: October 15, 2016, 12:13:05 pm
content: Thanks for the clarification, but what I meant was an extra USB cable that provides power regulation for your circuit under test.Are there good solutions out there, that provide 3.3V, 5V, 12V?

author: rstofer
author_rank: Super Contributor
timestamp: October 15, 2016, 03:01:23 pm
content: Quote from: pascal_sweden on October 15, 2016, 12:13:05 pmMany uC projects are powered by the USB cable used to program the device. My op amp circuits don't have that feature.Are there good solutions? Yup! Just came out...Each of these modules provides both + and - V:http://store.digilentinc.com/powerbricks-breadboardable-dual-output-usb-power-supplies/

author: Howardlong
author_rank: Super Contributor
timestamp: October 15, 2016, 03:07:31 pm
content: Quote from: pascal_sweden on October 14, 2016, 05:31:37 pmJust to be clear, my usual use case for using the AD is when travelling, and the AD1 is a marginally better option for me in that regard because of the packaging. It's not a big deal though ;-)Digilent do also offer individual USB power modules for breadboarding. I have a selection, thinking I'd find them handy, but I find I just don't use them, most of my development and debugging setups already have power supplies. One further thing, I found the modules very nosiy, I'm not sure about the AD2 in the regard, I never measured that aspect.If you're doing a lot of dual supply analogue stuff though I can see the AD2 power supply being useful: that's not my usual area.

author: pascal_sweden
author_rank: Super Contributor
timestamp: October 15, 2016, 03:43:03 pm
content: Quote from: rstofer on October 15, 2016, 03:01:23 pmThanks for your feedback! This is exactly the product that I was looking for. I forgot the name about it.

author: pascal_sweden
author_rank: Super Contributor
timestamp: October 15, 2016, 03:49:40 pm
content: Quote from: Howardlong on October 15, 2016, 03:07:31 pmCan you elaborate a bit more on the noise? According to the video made by Dave Jones that is available on the Digilent website about the PowerBRICKS, they have gone to the effort of doing a complex design.Unfortunately the ground is not isolated. Isn't that dangerous? What if you short the ground, you can possibly destroy the USB port on your computer, isn't it? But I guess you can solve that with a USB dongle that makes your USB port isolated?

author: rstofer
author_rank: Super Contributor
timestamp: October 15, 2016, 03:51:40 pm
content: I have been looking at the AD as a tool for students. A lot of circuits can be built, powered and analyzed with that gadget. Digilent has an entire curriculum based on the AD:https://learn.digilentinc.com/classroom/realanalog/I should really get involved with that program. It would work as a refresher but I could also be in a better position to recommend it to newcomers. I have watched several of the videos and the material is taught at a pretty high level. Rigorous comes to mind!Here is a short video on using the AD to generate a noisy sine wave and the characteristics of a low pass filter to clean it up. Well worth watching (about 7 minutes) just to see how he generates the signal:

author: MrW0lf
author_rank: Frequent Contributor
timestamp: September 24, 2018, 08:54:45 pm
content: Thought just show off some features I'm playing with that cannot be done on most scopes:Postprocessing FFT trace with script allows fornormalizedFFT plot - compensated for scope analog bw drop (approx -3dB@50Mhz). Cyan trace is Ref. Green trace is Plot on ~20MHz coax stub notch filter. Yellow trace on the right is Plot minus Ref.No need to look at FFT like this anymore:

author: maginnovision
author_rank: Super Contributor
timestamp: September 24, 2018, 09:51:18 pm
content: Cool cat.

author: MrW0lf
author_rank: Frequent Contributor
timestamp: September 30, 2018, 09:08:11 pm
content: AD2/WaveForms does not have built-in phase angle calculation function. Instead following script is offered forCustom Globalmeasurement:Code:var sum1 = 0var sum2 = 0var sum12 = 0var d1 = Scope.Channel1.visibledatavar d2 = Scope.Channel2.visibledatafor(var i = 0; i < d1.length; i++){sum1 += d1*d1sum2 += d2*d2sum12 += d1*d2}sum1 /= d1.lengthsum2 /= d1.lengthsum12 /= d1.lengthacos(sum12/sqrt(sum1*sum2))*180/PIAs can see it is based on integration,principle closely related to average power calculation. Drawbacks: only for sinusoidal signals, unsigned.So I did write new one based on zero-crossing detection. Signal shape is irrelevant now, some additional code for advance/lag detection eg result is signed and range is +-180°.Code:// Phase angle measurement for AD2/WaveForms v0.6// Zero crossing detection based, any wfm shape ok, +-180°// By lab!fyi <info@lab.fyi>// http://lab.fyi/oscilloscope_scripts/phase_shift_measurement/index.htmlvar channel_1 = Scope.Channel1;var channel_2 = Scope.Channel2;var detect_sign = true; // false for harsh conditions, very small anglesvar visible_data_only = false; // false to use full recordvar sign_detection_window = 4; // +-samples around triggervar a1 = (visible_data_only) ? channel_1.visibledata : channel_1.alldata;var a2 = (visible_data_only) ? channel_2.visibledata : channel_2.alldata;var zti = round((visible_data_only)? channel_1.VisibleIndexOfTime(0): channel_1.IndexOfTime(0));var i;var s = 1;var p = 0;if (detect_sign){for (i = zti - sign_detection_window; i < zti + sign_detection_window + 1; i++){if (sign(a1) > sign(a2)) s += 1;if (sign(a1) < sign(a2)) s -= 1;}s = sign(s / (sign_detection_window * 2 + 1));}for (i = 0; i < a1.length; i++){p += sign(a1) * -sign(a2);}p = s * (p + a1.length) * 90 / a1.length;p;As can see below "Phase" (old one) is indeed ok with sines but falls apart with sine vs square. "newPhase" stays in the game in both cases and value is signed.Edit:Updated script to v0.6. Reversed sign because function is rather phase(C1,C2) not phase (C2,C1), also modified sign detection.

author: MrW0lf
author_rank: Frequent Contributor
timestamp: October 17, 2018, 05:09:53 pm
content: Discovered non-obvious (at least for me) property of AD2. In Min-Max (or Peak Detect etc) mode ADC will run at full 100MSa/s. Eg you can reliably see seldom pulses otherwise out of reach with tiny 2x16kSa memory. In this case it's 33ns pulses at 10Hz. It would require >1GSa of memory to register those at given timebase w/o Min/Max.

author: MrW0lf
author_rank: Frequent Contributor
timestamp: October 17, 2018, 09:18:09 pm
content: AD2 seemed to lack built-in derivation / integration functions. Here they are. It's all quite automatic just run the script and it creates and configures Ref* channels that will display functions. Possible need fiddle Range a little for integration. If wish to reset to auto values just disable Ref* and it will instantly re-enable in default configuration.Attached scriptis provided in demo mode, doesintegral(derivative(x))functional check andintegral(x). UnneededdoMath*()stuff can be commented out inmain()function.If wish for derivative to start from 0 setbDerivativeRetainsDCOffset = false;Tested on: WaveForms version 3.8.10 beta 64-bit Qt5.6.3 Windows 7

author: R_G_B_
author_rank: Frequent Contributor
timestamp: October 17, 2018, 09:46:44 pm
content: Is there a built in functions for trend plotting...say power energy voltage, frequency, pulse width, AC voltage etc....say for example you want to monitor over a much longer time period?

author: MrW0lf
author_rank: Frequent Contributor
timestamp: October 17, 2018, 10:04:10 pm
content: Quote from: R_G_B_ on October 17, 2018, 09:46:44 pmThink yes. Measurements can be accessed from script and periodically logged. This approach:https://forum.digilentinc.com/topic/16310-phase-difference-measurement-in-logging-on-analog-discovery-2/#comment-40719..in conjunction with Script Plot (see FFT example above). Perhaps find ready example if browse their forum.

author: 2N3055
author_rank: Super Contributor
timestamp: October 18, 2018, 06:06:34 am
content: Quote from: R_G_B_ on October 17, 2018, 09:46:44 pmLogger window is standard.

author: MrW0lf
author_rank: Frequent Contributor
timestamp: October 18, 2018, 07:31:08 am
content: Quote from: 2N3055 on October 18, 2018, 06:06:34 amWindows standard is. But quote from forum link "The Logger does not provide Scope measurements. This is intended for slow DC and AC signal monitoring.". Of course with certain type of tasks mixing Scope and long time logging wont work at all eg high speed integration, due to blind time and/or USB 2.0 limitations.

author: 2N3055
author_rank: Super Contributor
timestamp: October 18, 2018, 07:43:20 am
content: Quote from: MrW0lf on October 18, 2018, 07:31:08 amAh sorry, not enough coffee...So like a plot of scope measurements..

author: R_G_B_
author_rank: Frequent Contributor
timestamp: October 18, 2018, 10:01:36 am
content: Capabilities of this are impressive. Because 20 years ago something like this box of tricks would have cost thousands. I think the scripting capabilitiy gives this an edge compared to other oscilloscopes..... Shame about the front end ...still a good bit of kit for the flexibility and portability. Not sure about the impedance analyser add on board i think it just switches in resistor values. Jax bird made a very good hardware version It really did enhance the capabilities of the AD compared to a dedicated network analyser I believe it performed just as well...there was a post in this forum comparing it with a hoki network analyser I think it was. Anyway the scripting capabilities make it very versatile.Instead of Having to use a different instrument for different task which can be frustrating takes up a lot of time and space.

author: exe
author_rank: Unknown
timestamp: October 18, 2018, 07:34:15 pm
content: Quote from: MrW0lf on October 17, 2018, 05:09:53 pmThat's what peak detect is for. Essentially, it helps fighting aliasing. All good oscilloscopes have this mode of operation.

author: MrW0lf
author_rank: Frequent Contributor
timestamp: October 18, 2018, 07:42:48 pm
content: Quote from: exe on October 18, 2018, 07:34:15 pmOf course, it was just non-obvious that this little box with clumsy BNC adapter card would have this. On some scopes peak detect is just Min-Max on normal record and ADC will not run at full speed.