• 0

Analog Discovery 2 Impedance Measurement


Freakymaker1
Share

    Question

    Hello there,

    I am a student and have recently purchased the Analog Discovery 2 for my bachelors-thesis. I have been using scripts to take measurements with the Impedance Analyzer Tool for some time now but I cannot get the desired amount of impedance samples per second.

    I would like to ask any competent member of this board how I can achieve a higher sampling rate regarding the Impedance. Simply put, what would you do to get as many samples of Impedance per second.

    This is what I have tried so far:

    -Switching between the different buffer sizes upon initialization of the AD2 <---- This doubled the sampling rate in some cases but is far from what I need.

    -Reducing the averaging rate to zero <---- As expected, it improved the sampling rate but still doesn't get me the one I need.

    Thanks in advance to anyone that helps =).

    Link to comment
    Share on other sites

    5 answers to this question

    Recommended Posts

    • 1

    Hi@Freakymaker1

    The IA uses Wavegen channel to generate stimulus signal and Scope inputs to capture the signal on DUT and Reference resistor.
    The captured data is converted using Goertzel (FFT) algorithm to complex values.
    测量是考虑在再保险ference resistor value, scope probe impedance and open/short compensations.

    This method requires multiple cycles of stimulus signal and the capture transfer takes 2-3ms, ~400Hz.
    With this method it is impossible to achieve 1MS/s, you want.
    I suppose with all methods the signal frequency should be considerably higher than the measurement frequency.

    Here you can see 100kHz signal, captured 1M samples at 1MHz.
    M1 measures the amplitude and M2 the input phase.
    Further math is needed to calculate the DUT impedance and phase.

    image.thumb.png.4db54aba250d5e4f22c2b18ad5cb87d3.png

    Link to comment
    Share on other sites

    • 1

    Hi@Freakymaker1

    If you are using the Analyzer mode, you can reduce the number of Samples.
    In Meter mode use higher frequency.
    Under Options:
    - you can reduce the "Min. Periods", this could affect the precision, specially below 4
    - you can reduce the Settle time, this could bring error in analysis of resonant circuits due to frequency step

    One measurement/step takes about = max(Averaging , Min.Periods/Frequency + Settle + data-transfer-and-processing)

    It would be good if you could post some screenshots and script to have a better overlook on the situation.

    Link to comment
    Share on other sites

    • 0

    Hello@attila

    First of all thank you for the fast response.

    我用计量模式的代码low this text. Simply put, what I want to achieve is to record the impedance over a certain period of time(or certain amount of samples) as fast as possible and export it to a csv file. The coding works fine and I am able to export the values I need without a problem. I have added a screenshot of my settings down below.

    Regarding the formula for the measurement/step time ----> max(Averaging , Min.Periods/Frequency + Settle + data-transfer-and-processing). Is there any way to find out what the time value of "data transfer and processing"?

    I have already tried to reduce the minimum periods/frequency to 2 and reducing the settle time to 0 seconds. I have gotten the following results by changing these values:

    2 periods/frequency & 0ms settle time------------------>453ms for 100 Values or approx. 220 Samples/s

    16 periods/frequency & 20ms settle time-------------->2289ms for 100 Values or approx. 2,2 Samples/s

    The question now is if it is possible to increase the Samples per second even further than 220Samples/s. If for example the data transfer and processing are a bottleneck for the Sample/second rate would it be possible to separate the acquisition somehow and evaluate the data afterwards. I am saying this because the nature of what I am working with does not require me to evaluate the impedance immediately. The resolution is the more important part so to speak.

    Thanks in advance for Your help.

    CODE BEGINNING:----------------------------------

    clear()

    if(!('Impedance1' in this)) throw "Please open an Impedance instrument";

    Impedance1.run();

    Impedance1.Frequency.Frequency.value = 200000;

    Impedance1.Wavegen.Amplitude.value = 2;

    var zeit1 = Date.now();

    File("File Location").appendLine("Impedanz"+" "+"Phase "+"Zeit_in_ms "+"Datum:"+" "+zeit1);

    for(var i = 0; i < 100; i++){

    if(!Impedance1.wait()) throw "Stopped";

    var jetzt = Math.abs(Date.now()-zeit1);

    var Phase = Impedance1.Traces.Trace.getData("Phase");

    var Z = Impedance1.Traces.Trace.getData("Impedance");

    File("File Location").appendLine(Z +" "+ Phase +" "+ jetzt);

    }

    var zeit2 = Date.now();

    var diff = Math.abs(zeit2-zeit1);

    print(diff);

    Impedance.stop();

    CODE END----------------------------------

    Impedance Analyzer Settings.png

    Link to comment
    Share on other sites

    • 0

    Hi@Freakymaker1

    It takes for me the same time, about 4-5ms/step.

    In the next software release this corner use-case (no averaging, constant frequency, amplitude...) will be improved to 2-3ms

    PS: The Analyzer can be used with constant frequency, start=stop

    image.png.6ed0ce64a493955d1814b2c80451a656.png

    image.png.03eb900d880cec18a7e6d1d43c6eda02.png

    Next software version:

    image.png.b90275eb38112efdf6bf68d49c41f710.png

    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
    Share