Adafruit 20W Stereo Audio Amplifier - MAX9744 Created by lady ada Last updated on 2018-03-05 11:06:49 PM UTC
Guide Contents Guide Contents Overview Pinouts Power connections Audio Inputs Speaker outputs Breakouts Assembly Power capacitor Speaker Terminals Power and Line In Terminal Blocks Basic Test Analog Control Preparation Arduino Digital Control Assembling Breakout Headers Connecting up to an Arduino Run code Changing the I2C address Connecting to a Raspberry Pi or BeagleBone Black CircuitPython Control Usage Downloads Datasheets & Files Schematic Layout Dimensions © Adafruit Industries https://learn.
Overview Pump up the volume with this 20W stereo amplifier! This slim little board has a class D amplifier onboard that can drive 2 channels of 4-8 ohm impedance speakers at 20W each. Power it with 5-12VDC using the onboard DC power jack and plug stereo line level into the 3.5mm stereo headphone jack and jam out with ease. Since it's class D, its completely cool-running, no heat sinks are required and it's extremely efficient - up to 93% efficiency makes it great for portable or battery powered rigs.
We like the MAX9744 amplifier at the heart of this board because its very easy to use, but it also has both analog and digital volume control capability. Use a single 1KΩ pot (we include one) to adjust volume analog-style. Or hook it up to your favorite microcontroller and send I2C commands to set 64-steps of volume amplification. Some great stats about the MAX9744 Power from 4.5V-14V DC voltage Up to 93% efficient (88-93% typical) 20mA quiescent current (or put into shutdown for 1uA quiescent) Up to 29.
Each order comes with one MAX9744 breakout board with all surface-mount parts fully assembled and tested. We also include 3 x 2pin and 1 x 3pin terminal blocks, a 470uF power filter capacitor and 1KΩ trim pot. To use this board, a little soldering is required to attach the terminal blocks and other components, but its fairly easy and expect it should take less than 15 minutes. © Adafruit Industries https://learn.adafruit.
Pinouts Power connections The MAX9744 amplifier can use between 5-14VDC power. The higher the voltage, the more gain you can get. So if you want 20W per channel, you'll need to supply 12VDC. The amplifier is a Class D - so it only draws current when its playing audio, but the voltage requirement is still pretty important. If you pick a voltage too low, you'll hear distortion on the speakers because the output is 'clipping' © Adafruit Industries https://learn.adafruit.
There's two ways to get power into this board, either by the 2.1mm DC jack (on the left) or the 3.5mm terminal block breakout (in the middle). Both are connected up together so use whichever you like. The 2.1mm DC jack is a 'standard' 2.1mm/5.5mm barrel jack, with center positive connection. The terminal block has markings showing which pin is positive and which is negative. If powering from a wall adapter, use the DC Jack, the terminal block is best for battery packs with wires coming out of them.
Oops, on the first rev of the PCB we made a mistake with the breakout labeling, swapping the two channels. The top pin is LEFT and the bottom pin is RIGHT. The middle pin is still GND The headphone jack is a classic 3.5mm as seen in just about every audio device. You can connect this directly to any audio output. The terminal blocks are for if you have some direct-wiring project and you want a more permanent connection.
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. The outputs are Bridge-Tied-Load which means you can only connect speakers up directly. Don't connect the outputs to another amplifier! And you can't "parallel" the two BTL outputs for one 40W load either.
Starting from the left, here are what each pinout connects to: RIN - this is a duplicate of the audio input terminal block, right channel LIN - this is a duplicate of the audio input terminal block, left channel AGND - analog reference ground, the 'quieter' ground for audio signal referencing SDA - i2c digital signal data, if using Digital Mode to control volume over i2c SCL - i2c digital signal clock, if using Digital Mode to control volume over i2c Vi2c - the i2c voltage reference for logic.
Assembly Begin by placing the amplifier board in a vise so you can easily work on it. Heat up your soldering iron to 650-700 degrees F and get some solder and hand tools ready! Power capacitor We'll start with the power supply capacitor. This cap isn't required if you're powering off of batteries or a good quality supply, but if you're using wall adapter, this might give you just a little cleaner power especially with high amplification levels © Adafruit Industries https://learn.adafruit.
Capacitors are polarized, they have to be placed in the right way! The longer lead goes into the pad marked + Place the capacitor against the PCB and bend the two leads out so that it sits flat. Flip over the board so you can solder the two pads © Adafruit Industries https://learn.adafruit.
Solder in both pads, heating the pad and pins at the same time with the edge of the soldering iron and dipping a little solder in. The ground (-) pin may be a little tough to solder since the ground plane acts like a large heat sink © Adafruit Industries https://learn.adafruit.
Clip down both of the long leads using diagonal cutters so they are nice and neat Speaker Terminals You'll want to do this step, where we add the terminal blocks for the speaker outputs. Otherwise you'd have to solder wires directly to the board which isn't suggested. Place two of the 2-pin blue terminal blocks so that the holes point outward © Adafruit Industries https://learn.adafruit.
These don't have long leads to bend, so some tape can keep them in place while you solder © Adafruit Industries https://learn.adafruit.
Flip over the board again and solder in all 4 pads. © Adafruit Industries https://learn.adafruit.
You don't need to clip them because they are already quite short Remove the tape once you've checked your work Power and Line In Terminal Blocks There's also terminal blocks for Power and line-in. These are optional, you can use the DC jack and headphone jack but if you want to hard-wire in, use these instead of soldering directly to the board! Place the 2-pin and 3-pin terminal blocks so the holes point out © Adafruit Industries https://learn.adafruit.
Tape can help here, to keep the blocks in place while you solder. © Adafruit Industries https://learn.adafruit.
Solder in all the connections Check your work before moving onto the Basic Test procedure © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
Basic Test Before you decide whether you want to use Analog control mode or Digital control mode, you should test your amplifier. By default, it will start up with about 6dB of gain, definitely loud enough to be heard! Begin by connecting two speakers to the BTL speaker outputs of the amplifer Don't forget to gently yank on each wire after clamping it into the terminal block, it should be a solid connection, not possible to yank out of place.
Starting with low audio volume, slowly turn up the volume on your mp3 player/computer/etc until you hear audio come out. 20W is pretty loud so don't put the speaker next to your ear! © Adafruit Industries https://learn.adafruit.
Analog Control Analog control is the easiest way to get going with the amplifier board. No microcontrollers are required. Just wire up a single 1Kohm potentiometer to select the volume. The potentiometer sets the volume for both channels. There is no way to control channels individually. Before you begin, perform the Basic Test, to make sure that the amplifier is overall working! Then you can add volume control Preparation By default, the amplifier breakout is in digital mode.
Finally, solder closed the Analog jumper on the left side. When finished, your amp should look like this, with all three jumpers closed. When you power up the amplifier and feed in audio you won't hear anything! This is normal! If the potentiometer is not installed, it will default to lowest volume. Now place the potentiometer that came with your kit into the three holes labeled Pot Vol - don't solder them in yet, try to just touch the pads to the pins so that you can adjust the volume.
down Once you have that working, you can solder wires to the Pot Vol pads, so you can place the volume adjustment pot elsewhere (say mounted to the outside of a box) If you want a potentiometer that will fit exactly in the slot, check out this side-adjustment pot http://www.digikey.com/product-detail/en/bourns-inc/3362M-1-103LF/3362M-103LF-ND/1088401 For mounting onto a box or panel check out https://www.adafruit.com/products/562 © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
Arduino Digital Control Digital control allows you to set the volume of the amplifier using a microcontroller via I2C protocol. The I2C data pins are connected on a breakout at the bottom of the board. Assembling Breakout Headers You can solder wires directly to the breakout pads but its easier to prototype if there are headers attached. Follow along to attach headers! The easiest way to attach headers to the breakout board is to take advantage of a solderless breadboard you may have.
This will keep it in place when you put the audio amplifier on top! Put the breakout board onto the short header pins so they stick out thru the breakout pads © Adafruit Industries https://learn.adafruit.
Solder in all of the header pins to the breakout board. Connecting up to an Arduino We'll be using an Arduino to test the digital control, but really the I2C protocol is so simple, you can easily port the code to any microcontroller you like. © Adafruit Industries https://learn.adafruit.
First, though, we'll have to wire up the digital data pins. Connect the following header pins: GND from the MAX9744 connects to the common ground connection on your Arduino Vi2c from the MAX9744 connects to the logic level voltage of your board. For most Arduinos, 5V works well. If you have a 3V microcontroller, use 3.3V Connect the SDA pin to the I2C data SDA pin on your Arduino.
Upload this sketch to your Arduino, and keep it connected to your computer. Don't forget to power the MAX9744 with 5-12VDC separately via the DC jack! #include // 0x4B is the default i2c address #define MAX9744_I2CADDR 0x4B // We'll track the volume level in this variable. int8_t thevol = 31; void setup() { Serial.begin(9600); Serial.println("MAX9744 demo"); Wire.begin(); if (! setvolume(thevol)) { Serial.
return; if (thevol > 63) thevol = 63; if (thevol < 0) thevol = 0; setvolume(thevol); } Run the sketch and open up your Arduino Serial console. If there's a problem you'll get a failure to set the volume initially If it's OK, you can send multiple +'s and -'s to increase or decrease the volume. The volume can go down to 0 or up to 63 (which is 29dB of gain) © Adafruit Industries https://learn.adafruit.
Changing the I2C address if you need to change the address from the 0x4B default to something else, you can close the AD1 or AD2 jumpers but not both to change the address to 0x4A (AD1 closed or tied to ground) or 0x49 (AD2 closed or tied to ground) Connecting to a Raspberry Pi or BeagleBone Black If you'd like to control the MAX9744 from a Raspberry Pi or BeagleBone Black then check out this Adafruit MAX9744 Python library.
CircuitPython Control It's easy to use the MAX9744 amplifier with CircuitPython and the Adafruit CircuitPython MAX9744 module. This module allows you to easily write Python code that controls the volume of the amplifier over its I2C connection. First wire up a MAX9744 to your board exactly as shown on the previous pages for Arduino using an I2C connection.
Usage To demonstrate the usage of the amplifier we'll initialize it and control the volume from the board's Python REPL. Run the following code to import the necessary modules and initialize the I2C connection with the amplifier: import board import busio import adafruit_max9744 i2c = busio.I2C(board.SCL, board.SDA) amp = adafruit_max9744.
# Simple demo of the MAX9744 20W class D amplifier I2C control. # This show how to set the volume of the amplifier. # Author: Tony DiCola import board import busio import adafruit_max9744 # Initialize I2C bus. i2c = busio.I2C(board.SCL, board.SDA) # Initialize amplifier. amp = adafruit_max9744.MAX9744(i2c) # Optionally you can specify a different addres if you override the AD1, AD2 # pins to change the address. #amp = adafruit_max9744.
Downloads Datasheets & Files Datasheet for the MAX9744 Fritzing object in Adafruit Fritzing library EagleCAD PCB files on GitHub Schematic Layout Dimensions © Adafruit Industries Last Updated: 2018-03-05 11:06:48 PM UTC Page 37 of 37