MAX9744 turns my sine wave to a square wave, and more

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
carnival7
 
Posts: 12
Joined: Sun Jun 16, 2019 4:51 pm

MAX9744 turns my sine wave to a square wave, and more

Post by carnival7 »

I want to use the MAX9744 in a project and therefore ran what I thought would be a simple test just to confirm that the board is working properly. However, I have been testing it for a week now and observed a few strange artifacts in the output signal from the amp. Firstly, when I play a sine wave, I measure a square wave at the output.

Here is my setup. The other end of audio in is connected to my laptop, which is plugged into the wall. I am supplying 12V power from an adapter (plugged into the same wall), and I confirmed the adapter's output looks good. I am measuring at the + and - of the lefthand speaker, and have two 4.7 Ohm resistors in series to simulate the actual load I will use. The scope I am using to measure is connected to an isolating transformer.
setup-min.jpeg
setup-min.jpeg (642.9 KiB) Viewed 202 times
Here is my audio input signal, measured at the L and GND lines on the board. I am playing a 100Hz sine wave (got it from youtube https://www.youtube.com/watch?v=eDk1bOX-P3w) :
audioIn.jpeg
audioIn.jpeg (611.95 KiB) Viewed 202 times
Here is my audio output signal:
pot100out.jpeg
pot100out.jpeg (456.52 KiB) Viewed 202 times
Last edited by carnival7 on Fri Jul 29, 2022 11:24 am, edited 1 time in total.

User avatar
carnival7
 
Posts: 12
Joined: Sun Jun 16, 2019 4:51 pm

Re: MAX9744 amplifier turns my sine wave to a square wave, p

Post by carnival7 »

Part two:
As you see in the previous post, I had turned the pot fully CW, as this resulted in the most crisp-looking signal. But I also attempted to adjust the pot to see how my output signal changes. I assumed that the full CW position correlates to the loudest volume aka highest amplitude, as the peak of my signal in the previous post was 12V.

So I adjusted the pot to be approximately in the middle value (between full CW and full CCW), as seen in the image below:
pot55.jpeg
pot55.jpeg (28.79 KiB) Viewed 199 times
I thought this would then lead to a lower amplitude output, but instead, the amplitude remained the same, but the shape of the output signal changed. Now it looks more like sine wave, but incredibly noisy:
pot55out.jpeg
pot55out.jpeg (666.83 KiB) Viewed 199 times
This is my first time working with audio equipment. Is this normal behavior for this amplifier? I searched through the forums, but there were few instances where people actually posted images of the output signal, so I am not sure if others have ran into these issues/observations. Looking forward to any insight, thanks!

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX9744 turns my sine wave to a square wave, and more

Post by adafruit_support_bill »

The MAX9744 is a class-D amplifier. The output signal consists of a series of high-frequency pulses. This results in a very efficient amplifier, but it requires a low-pass filter on the output to produce a smooth waveform. In normal operation, that filtering is performed by the speaker.

Your dummy load only simulates the resistive part of the speaker. Speaker coils are inductive also and the inductance acts as a low-pass filter to filter.

https://learn.adafruit.com/adafruit-20w ... ts-2567778
The speakers can be 4 to 8 ohm impedance, 20W maximum power. Since it is a class D amplifier, the signal out of these speaker blocks is a high frequency (~300KHz) PWM square wave. The inductance of the speaker smooths out this signal into audio frequencies of 20-20KHz.

User avatar
carnival7
 
Posts: 12
Joined: Sun Jun 16, 2019 4:51 pm

Re: MAX9744 turns my sine wave to a square wave, and more

Post by carnival7 »

Thanks a lot for the quick response. That makes sense, I completely forgot about the inductive aspect.

What I ultimately intend on doing is to drive a pair of Linear resonant actuators. For that, I wanted to verify the speaker-side voltage output to ensure I don't damage the LRAs, which are rated for 3V. Would you be able to recommend any specific method for that, besides attaching the real actuators?

User avatar
sj_remington
 
Posts: 994
Joined: Mon Jul 27, 2020 4:51 pm

Re: MAX9744 turns my sine wave to a square wave, and more

Post by sj_remington »

This company recommends a sine wave drive at the resonant frequency, for their linear resonant actuators.

https://www.precisionmicrodrives.com/li ... ators-lras

See especially https://www.precisionmicrodrives.com/ab-003
LRAs must be driven at their resonant frequency – even a few hertz off will dramatically reduce performance

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”