Class-D amplifier on the Raspberry Pi

The first test setup of the new Class-D amplifier project works. We have a fully digital connection between the Raspberry Pi and the amplifier. With the right driver (we have to work on this first), volume and also sound processing can be controlled directly from the Raspberry Pi.


Note: Don’t try to connect the output of an Class-D amplifier to an oscilloscope unless you know exactly what you’re doing. Many Class-D amplifiers use H-bridge outputs. In this case none of the output connectors is directly connected to ground. Connecting one of these pins to the ground of an oscilloscope can create a short-circuit and destroy your circuit and in worst case even your oscilloscope!

5 thoughts on “Class-D amplifier on the Raspberry Pi

  1. René Knuvers

    Nice setup! I’m currently running a Raspberry pi (through the onboard analog audio output, just yesterday ordered my HiFiBerry DAC) on an ‘eBay’ class D amplifier brand labeled S.M.S.L. and the results are not bad at all. I have Acoustic Energy speakers that cope very well with the overall low impedance of the amp.

    I’m anxious to see what your setup with DAC on board of the Class D amp board will do, performance wise. I think it will be a big challenge combining both low and high power analog and high frequency digital circuits on a single board. Are you planning on a four layer board with separated analog and digital ground circuits?

    1. Daniel Post author

      We won’t use a separate DAC here, but use a fully digital class-D setup with DA conversion after the output stage (with the usualy LC filter).

  2. Manfred Müller-Späth

    And simply add a DSP … and with such a package the perfect hardware for the activation of loudspeakers will be affordable and easy to use. Along with an extreme wide experimental basis for different crossover types up to calibrated or coupled speakers. Would be a great thing …

    Just my thoughts …

  3. Ben

    I would like to know how the connection between the raspi and the amp is made. Which pin gpio, where on the amp, what software you use and such things

  4. Daniel Post author

    Hi Ben,

    this is only the beginning of this project. Therefore I can’t say anything about specific details yet.
    There are at least an I2C and an I2S connection for communications between the Raspberry and the amplifier.

    Best regards


Leave a Reply