Skip to main content

Building an Amplifier Test Set with Analog Discovery 2 and Raspberry Pi 4 Part 1: Introduction

Analog Discovery 2 and Raspberry Pi 4 to create a standalone programmable audio amplifier test set

Using the multifunction instrument together with a Raspberry Pi 4 to create a standalone programmable audio amplifier test set.

Professional audio analysers, combine functions of signal generation and measurement, with interfaces for remote control and allow for automation. However, they typically come with a serious price tag attached, even when sold as used equipment that is perhaps a decade or more old.

We have a Digilent Analog Discovery 2 module that had been sitting on the shelf for some time and given that the provided software support includes a feature-rich SDK that can be used to create custom applications, it was decided it would make an excellent base for an audio amplifier test set.

The other main components are a Raspberry Pi 4 plus a Raspberry Pi Touch Screen, which will be used for control, data logging and processing. Since we are interested in particular, in testing audio amplifiers, it was decided that an integrated dummy load would also be a highly useful feature.

In this post, we’ll take a look at the theory of operation and its main components. Subsequent posts will cover the hardware build with a suitable enclosure etc. and software configuration.

Basic operation

It should be noted that the aim is to create a solution that will be used mostly when repairing and servicing audio amplifiers, rather than carrying out the sort of measurements needed for lab characterisation of new designs. Hence, we don’t need to worry too much about things like proper calibration and can afford to cut a few corners if need be.

The fundamental objective is fairly simple. This is to be able to generate and make reasonably simple measurements of audio frequency signals, whereby all the functionality is integrated into a single box for convenience. This includes a dummy load for the amplifier output, in order that we might get repeatable results, without inadvertently measuring the behaviour of a loudspeaker also — and perhaps most importantly, in blissful silence!

On the software side, we’ll have the ability to use scripting languages to create applications that automate a particular task, simultaneously setting up a signal generation for the audio amplifier input and data logging or analysis of its output.

Analog Discovery 2

Analog Discovery 2

The Analog Discovery 2 (134-6480) combines the functions of a 2-channel oscilloscope with 14-bit resolution, differential inputs and a bandwidth of up to 30MHz, with a 2-channel 14-bit resolution arbitrary waveform generator that has a bandwidth of up to 12MHz. It can also be used as a 16-channel logic analyser and digital pattern generator, with additional features including network analyser, voltmeter and spectrum analyser.

Support for the above functionality is provided out-of-the-box via the WaveForms virtual instrument suite, software which is available for Windows, Mac and Linux. This includes a script editor which may be used to automate tasks within the WaveForms application. However, there is also a WaveForms SDK and this provides support for writing applications in C/C++, C#, Python and Visual Basic. Which makes it possible to fully custom user interfaces that are task-oriented and which might for example indicate simple pass/fail test results.

Interfacing with a host computer through a USB.

Raspberry Pi 4 + Touch Screen

Raspberry Pi 4 + Touch Screen

In more typical use, such as in learning environments, the Analog Discovery 2 would likely be used with a laptop or desktop computer. Since we’d like to construct an eminently compact solution and something which is much more of an “appliance”, we’ll be using a Raspberry Pi 4 4GB (182-2096) and the official Raspberry Pi Touch Screen (899-7466) . We may also add some physical controls, such as push buttons and rotary encoders, which would be connected to the Pi GPIO pins.

Dummy Load

Components for the Dummy Load

2R non-inductive 100W resistors (862-5723) will be used to make up the dummy load, with a DP6T rotary switch (032-7585) used to select the required impedance. At this stage, the thought is to have 2, 4, 6 and 8 ohm selectable. It was considered whether to have electronic switching under software control, but decided there are benefits to having a large front panel switch that is manually operated; some amplifiers may not respond well to a particularly low impedance load across their output.

Next steps

There remain quite a few details of the physical build to work out and this includes things like the enclosure, buttons and any other controls, connectors, dummy load heatsink and cooling. On the software side, it is likely that to start with, we’ll use the WaveForms application itself and perhaps the integrated scripting for some level of automation. We’ll probably also look at creating a simple custom application in Python, which uses the SDK to implement some basic function. The idea is to then subsequently develop new features as and when they are required.

Andrew Back

Open source (hardware and software!) advocate, Treasurer and Director of the Free and Open Source Silicon Foundation, organiser of Wuthering Bytes technology festival and founder of the Open Source Hardware User Group.
DesignSpark Electrical Logolinkedin