The MAX98357A is an I2S amplifier - it does not use analog inputs, it only has digital audio input support! Don't confuse I2S with I2C, I2S is a sound protocol whereas I2C is for small amounts of data.
This amplifier is designed to drive moving coil loudpeakers only. Speaker impedence must be 4Ω or more. The output signal is a 330KHz PWM square wave with a duty cycle proportional to the audio signal. The inductance of the speaker coil serves as a low-pass filter to average out the high-frequency components. Do not try to use this as a pre-amplifier.
The outputs of each channel are "Bridge-Tied" with no connection to ground. This means that for each channels, the + and - alternate polarity to create a single channel amplifier with twice the available power.
Connect your speakers using the 3.5mm screw-terminal blocks.
- 5V into 4Ω @ 10% THD - 3W max
- 5V into 4Ω @ 1% THD - 2.5W max
- 3.3V into 4Ω @ 10% THD - 1.3W max
- 3.3V into 4Ω @ 1% THD - 1.0W max
- 5V into 8Ω @ 10% THD - 1.8W max
- 5V into 8Ω @ 1% THD - 1.4W max
- 3.3V into 8Ω @ 10% THD - 0.8W max
- 3.3V into 8Ω @ 1% THD - 0.6W max
This is the power for the amplifier and logic of the amplifier. You can provide 2.5V up to 5.5V. Note that at 5V you can end up putting up to 2.8W into your speaker, so make sure your power supply can easily handle up to 650mA and we recommend a power supply spec'd for at least 800mA to give yourself some 'room'
If you have a 3.3V logic device, you can still power the amp from 5V, and that's recommended to get the most power output!
Three pins are used to receive audio data. These can be 3.3-5V logic
- LRC (Left/Right Clock) - this is the pin that tells the amplifier when the data is for the left channel and when its for the right channel
- BCLK (Bit Clock) - This is the pin that tells the amplifier when to read data on the data pin.
- DIN (Data In) - This is the pin that has the actual data coming in, both left and right data are sent on this pin, the LRC pin indicates when left or right is being transmitted
Note that this amplifier does not require an MCLK pin, if you have an MCLK output, you can leave it disconnected!
The other settings are handled by GAIN and SD
GAIN is, well, the gain setting. You can have a gain of 3dB, 6dB, 9dB, 12dB or 15dB.
- 15dB if a 100K resistor is connected between GAIN and GND
- 12dB if GAIN is connected directly to GND
- 9dB if GAIN is not connected to anything (this is the default)
- 6dB if GAIN is connected directly to Vin
- 3dB if a 100K resistor is connected between GAIN and Vin
This way, the default gain is 9dB but you can easily change it by tweaking the connection to the GAIN pin. Note you may need to perform a power reset to adjust the gain.
This pin is used for shutdown mode but is also used for setting which channel is output. It's a little confusing but essentially:
- If SD is connected to ground directly (voltage is under 0.16V) then the amp is shut down
- If the voltage on SD is between 0.16V and 0.77V then the output is (Left + Right)/2, that is the stereo average.
- If the voltage on SD is between 0.77V and 1.4V then the output is just the Right channel
- If the voltage on SD is higher than 1.4V then the output is the Left channel.
This is compounded by an internal 100K pulldown resistor on SD so you need to use a pullup resistor on SD to balance out the 100K internal pulldown.
For the breakout board, there's a 1Mohm resistor from SD to Vin which, when powering from 5V will give you the 'stereo average' output. If you want left or right channel only, or if you are powering from non-5V power, you may need to experiment with different resistors to get the desired voltage on SD