Using the Digilent Analog Discovery 2 to automatically test audio frequency response
An Analog Discovery 2 (AD2) signal generator is configured to generate a sine wave through a range of frequencies. The sine wave is fed into the Unit Under Test (UUT) and an AD2 oscilloscope channel is used to sample the UUT’s output. A Python script automates the whole thing and produces a .csv file and graphical plot of the results. Python script details are here.
The AD2 mounts conveniently on a standard die cast aluminium enclosure (e.g. Hammond 10758). The enclosure houses connectors to route the signals and a switch and LED to select jack or XLR inputs.
Scope channel 1 connects to either a 6.35mm jack or the positive pin of a balanced XLR, selected with the switch. Channel 2 connects to the negative pin of the XLR.
The signal generator is fed to the UUT and directly back into channel 2 of the oscilloscope so the phase delay between channel 1 and channel 2 can be calculated, for the phase response measurements.
The first thing to do is connect the signal generator output directly back into the ‘scope input, as shown in the photo above, in order to check the frequency response of the tester. The test script produces the following plot:
The plot is reassuringly flat from 10Hz to 200kHz, with a negligible but consistent gain offset of around 0.2dB throughout.