So I'm using MAX98357A, which is a filterless class D audio amplifier. I'm running it using Vcc = 5 V. Looking at the page 28 of the datasheet, I see the folliwing formula for output voltage:
Output (dBV) = input (dBFS) + 2.1 dB + Gain (dB), where 0 dBFS is referenced to 0 dBV.

My Gain variable is set to 12 dB. If I set the volume of the input audio to maximum, I'd get signal with following output voltage:
Output (dbV) = 2.1 dB + 0 dBFS + 12 dB = 14.1 dBV.
Converting this to linear units, gives me 5.06 V.

Now, I could be suffering from critical datasheet reading failure, but I couldn't find anywhere the actual limits for the output voltage compared to input voltage.

Therefore, I'd like to see somehow if my output is actually clipping or not.

Unfortunately, I'm not sure how to do this, since the amplifier relies on speakers mechanical inertia to act as a low-pass filer.

  • 4
    \$\begingroup\$ Output a sine, record it, FFT it \$\endgroup\$
    – PlasmaHH
    Apr 5 '18 at 13:57
  • 1
    \$\begingroup\$ @PlasmaHH Why don't you post that as an answer? I personally, would like to avoid that option, since I don't have a scope that's easily remotely controllable at the moment (will come later perhaps), but it could definitely help others. \$\endgroup\$
    – AndrejaKo
    Apr 5 '18 at 14:15
  • \$\begingroup\$ I don't mean with a scope, I mean with a microphone \$\endgroup\$
    – PlasmaHH
    Apr 5 '18 at 14:18
  • 1
    \$\begingroup\$ @PlasmaHH That's a reason more to provide answer! In any case, this also introduces extra variables, such as was microphone saturated and is the source of unwanted spectral features, or are they really there in the signal. Still, microphone doesn't seem as a bad idea, since they're commonly available. \$\endgroup\$
    – AndrejaKo
    Apr 5 '18 at 14:36

In the end, what you want to know is if the movement of the loudspeakers membrane is according to the voltage waveform you put into your amplifier.

While you surely could do that with a mirror, a laser and some detector, the intended product of the membranes movement is of good use here too: The sound.

Since your goal isn't to verify a flat bode plot or anything, and you just want to see if there is any clipping or other distortion, all you need to do is basically some THD measurement.

Start with a low amplitude 1kHz waveform, record it with a somewhat nice microphone and audio equipment (no need to be too fancy) and put it into whatever software you like to observe the FFT. The harmonics you see there should be your baseline in THD (if your software is fancy enough it will take the harmonics and calculate a single THD figure for you).

If you want you can do the same for a well known good pure 1kHz audio source as a baseline so you know how good or bad your amplifier is already at small amplitudes.

Now increase the amplitude until you see the ratio between the frequency of interest and the harmonics getting worse, i.e. harmonics start to get higher. This is the point where you start getting distortion which is a bit before what people would call is clipping.

  • \$\begingroup\$ Check out a website klippel.de for some possibly useful information on testing audio systems. \$\endgroup\$ Apr 17 '18 at 19:27

You could just tee-off from the speaker connections through a low pass filter of 30 kHz (probably a 2nd order filter will do) and view the waveform on your oscilloscope.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.