Attached is some python code for generating Bode plots with the vds1022(i) using the SCPI interface. I have only used the code in python 3.9 running under Windows 10. Since I have no intention of making it nicer I thought I may as well share it as-is. Warning: I am not a good programmer, so don't expect great code. If you improve it, or have a better approach, please share!
The main script is vds1022autoFRAv0.py, which includes a lot of comments to explain how to use it properly. But if something is confusing please ask. It allows the user to select from 3 different signal sources:
1. PC audio (such as the headphone jack) which of course only works for audio frequencies. If you use this approach, please read and heed the warning in the comments.
2. An Arduino-controlled AD9833-based signal generator I posted here
https://www.eevblog.com/forum/projects/simple-2-mhz-sine-generator-python-bode-plotting-script-for-picoscope-2204a/msg4501558/#msg4501558It is usable from about 1 Hz to 5 MHz
3. tinySA spectrum analyzer, which can be used as a sinewave source. It is most useful at frequencies of 100 kHz and above
The remaining four .py files include the interfaces for the scope and the signal sources. Hopefully, reading the FRA script should provide enough examples to understand how to use them.
Attached are the output plots for testing two different devices, as well as a couple of plots comparing the results to what I get with a Picsocope 5244B and the FRA4Picoscope software:
A. simple low-pass filter consisting of a 680 Ohm resistor and a 100 nF capacitor. The phase rising above 100 kHz is consistent with the presence of a non-zero capacitor ESR (or perhaps resistance in solderless breadboard, etc). I don't know why there is a discrepancy in the phase between the 5244B and the vds1022 using the arduino/AD9833 generator; it could be because it does not use the same solderless breadboard setup for the filter, or perhaps is an SNR issue (the 5244B has better sensitivity than the vds1022). EDIT: and now that I think about it, I think I haven't calibrated the probes for either in awhile ...
B. discrete battery-powered headphone amplifier, built before I had any kind of scope so did not realize it had such a large bandwidth. It is driving a 33-Ohm resistive load here.
Hopefully other folks find this useful.
jason
EDIT: by the way, I actually have the Multicomp Pro MP720016, which is a rebranded vds1022.