I am trying to control a TPA2006D1DRBR Class-D Amp with my mcu which does not have an included DAC but has PWM so i figured i could use a RC low-pass filter since it doesnt take up much space, am I correct? I linked a picture of the setup i have.
I dunno... Do you know the PWM frequency? You MIGHT need an LC filter and even that may not be enough filtering. Unfiltered PWM is "full-time full-voltage" (5V or 3.3V) even with "silence" and that's pretty nasty going into an amplifier.
Even filtered I wouldn't feed it into my home theater receiver or any good high-power amplifier.
its not for high power or high quality at all, i just need something with which ill be able to hear speech correctly and other sounds. My mcu can do 5hz to 8mhz as pwm frequency. frequency range of the speaker is 100hz to 20khz but i realistically only need up to 12khz for my application. What do you mean by full-time full voltage?
Unfortunately, Class D amplifiers react very negatively to high frequency noise produced by PWM and even DAC outputs, as they employ high frequency switching in the amplification process. You need an excellent bandpass filter to produce audio without horrible distortion.
For decent voice quality, a 100 Hz to 4 kHz (or at most, 8 kHz) active bandpass filter would be fine.
Are you saying i should take another type of amplifier? ive seen people do with RC low-pass filter and have low ripple with a pwm frequency much higher than the cutoff fequency ( they werent using specifically an amplifier). Is that not true? I'm not used to amplifiers and audio in general.
All amplifiers can be affected by high frequency noise, but class D amps more so than class A, AB, etc.
If the PWM output goes directly to a speaker, with or without with modest filtering, there usually isn't an issue because the speaker doesn't respond to the high frequencies.
thats really intersting, ill definetly buy it! Only thing im not sure with the MAX98357A is wether or not it can take 1.8v on the i2s pins with a vdd of 3.3v. It says at the end of page 6 that Input High Voltage is 1.3v but they mention a lot vddio in the datasheet tho it isnt specified in the pinout.
If the audio source is an MCU with an I2S interface, do you think it will NOT generate the appropriate signals? Take a look at the Adafruit tutorial for that board before making silly assumptions.
im using a mcu which can take a wide range of input voltage, from 2.8v to 4.2v and a seperate vddgpio set to 1.8v. So no I'm not making assumption that the mcu will make 1.8v appear out of thin air, it is the logic high value it is set to. I have looked at the adafruit documentation and it says it can take 3.3v or 5v input but the datasheet says otherwise. i just wanted a second opinion.
Yeah... It's not the end of the world if you burn-up a cheap little amplifier...
That may be OK. Find a filter calculator online and calculate how much attenuation you can get with a simple 12 or 20kHz low-pass RC filter.
[/quote]
PWMconstantly switches between logic zero (about 0V) and logic one (about 3.3V or 5V) except when it's at 0 or 100%. Since audio is AC and it has to go (relatively) negative and positive, silent audio can't rest at zero. Silence is constant 50% PWM, which has an average of half the maximum and will be half of the voltage when low-pass filtered.
Alright, i'll do that if the MAX98357A does not suit my needs, would you be able by any chance to answer the question i previously asked, regarding the 1.8v domain?
The question about wether or not the MAX98357A can take 1.8v. If you want i can link a picture of the circuit but it doesnt specify the voltage of every pin and connection.