# Adafruit STEMMA Speaker

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/081/906/medium800/adafruit_products_STEMMA_Speaker_Top.jpg?1570046099)

Hey, have you heard the good news? With Adafruit STEMMA boards, you can easily and safely plug sensors and devices together, like this **Adafruit STEMMA Speaker - Plug and Play Audio Amplifier**. Like the name implies, it's got a class D audio amplifier on board, and our favorite little 1 Watt 8 ohm speaker.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/905/medium800/adafruit_products_STEMMA_Speaker_Back.jpg?1570046074)

Connecting it up is easy - you only need ground, 3 to 5V power, and audio signal. The audio signal does not need to be AC coupled, we do that for you, and can range up to the power pin voltage (3 or 5V peak-to-peak). You can use either the 3-pin JST socket or the alligator/sew-pads for this slim and portable package. The sound quality is good enough for music, tones, speech, whatever you like and volume can be adjusted with a small screwdriver.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/903/medium800/adafruit_products_STEMMA_Speaker_Angle_Top.jpg?1570046040)

For use with a CircuitPlayground or micro:bit, this [JST to alligator-clip cable](https://www.adafruit.com/product/4030) works best. Red is power, ground is black and signal is white.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/904/medium800/adafruit_products_STEMMA_Speaker_Angle_Bottom.jpg?1570046051)

For use with a breadboard, try one of the following cables:

1. JST PH 3-Pin to Male Header Cable - 200mm
2. JST PH 3-Pin to Female Socket Cable - 200mm

![adafruit_products_STEMMA_Speaker_Male_Pin_JST.jpg](https://cdn-learn.adafruit.com/assets/assets/000/082/022/medium640/adafruit_products_STEMMA_Speaker_Male_Pin_JST.jpg?1570201688)

![adafruit_products_STEMMA_Speaker_Female_Pin_JST.jpg](https://cdn-learn.adafruit.com/assets/assets/000/082/023/medium640/adafruit_products_STEMMA_Speaker_Female_Pin_JST.jpg?1570201774)

# Adafruit STEMMA Speaker

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/081/911/medium800/adafruit_products_STEMMA_Speaker_Pinouts.png?1570049452)

Let's take a look at what comes on the Adafruit STEMMA Speaker plug and play audio amplifier!

## Speaker and Connector
Located in the center of the board is the **1 watt 8 ohm speaker** connected to the board via a **Molex PicoBlade connector**.

![adafruit_products_STEMMA_Speaker_Pinouts_Speaker_and_Connector.png](https://cdn-learn.adafruit.com/assets/assets/000/081/916/medium640/adafruit_products_STEMMA_Speaker_Pinouts_Speaker_and_Connector.png?1570050369)

## JST Connector
The easiest way to connect the STEMMA speaker to your project is the **3-pin JST connector** at the base of the board. There are 3-pin JST to various connectors available, including [to alligator clip](https://www.adafruit.com/product/4030) and [breadboard pin](https://www.adafruit.com/product/3893) options, to make it super easy to connect it to any kind of project.

- **White Signal (SIG)** This is 0-3V signal input, we decouple this signal so it can be AC or DC coupled.
- **Red Power (+)** This is 3-5V DC power
- **Black Ground (-)** Signal/power ground

![adafruit_products_STEMMA_Speaker_Pinouts_JST.png](https://cdn-learn.adafruit.com/assets/assets/000/081/913/medium640/adafruit_products_STEMMA_Speaker_Pinouts_JST.png?1570049662)

## Alligator Clips
The STEMMA speaker comes with **three alligator clips pads** to use with alligator clips. In the image to the left, they are top to bottom:

- **Signal (SIG)** This is 0-3V signal input, we decouple this signal so it can be AC or DC coupled.
- **Power (+)** This is 3-5V DC power  
- **Ground (-)** Signal/power ground

![adafruit_products_STEMMA_Speaker_Pinouts_Alligator_Clips.png](https://cdn-learn.adafruit.com/assets/assets/000/081/912/medium640/adafruit_products_STEMMA_Speaker_Pinouts_Alligator_Clips.png?1570049536)

## Volume
You can change the volume using a small screwdriver to rotate the **volume trim pot**.

![adafruit_products_STEMMA_Speaker_Pinouts_Volume_Pot.png](https://cdn-learn.adafruit.com/assets/assets/000/081/915/medium640/adafruit_products_STEMMA_Speaker_Pinouts_Volume_Pot.png?1570050260)

## Amplifier
The board includes a **class D amplifier** located above the JST connector.

![adafruit_products_STEMMA_Speaker_Pinouts_Amplifier.png](https://cdn-learn.adafruit.com/assets/assets/000/081/917/medium640/adafruit_products_STEMMA_Speaker_Pinouts_Amplifier.png?1570050651)

# Adafruit STEMMA Speaker

## Usage

Using the Adafruit STEMMA speaker is as simple as connecting it to your project. Existing audio code works the same way but will use the STEMMA speaker instead. Let's take a look at an example using Circuit Playground Express.

Info: 

## Circuit Playground Express Wiring
First, wire up the STEMMA speaker to a Circuit Playground Express as shown. We suggest using a [3-pin JST to alligator clip cable](https://www.adafruit.com/product/4030) with the 3-pin JST connector on the STEMMA Speaker.

- Plug the **3-pin JST to alligator clip cable** into the **3-pin JST connector** on the STEMMA Speaker
- Connect the **black alligator clip** to a **GND** pad on the CPX
- Connect the **white alligator clip** to the **A0** pad
- Connect the **red alligator clip** to the **VOUT** pad

![adafruit_products_STEMMA_Speaker_CPX.png](https://cdn-learn.adafruit.com/assets/assets/000/081/929/medium640/adafruit_products_STEMMA_Speaker_CPX.png?1570120369)

## Circuit Playground Express Example Code

This example uses CircuitPython. If you're not already using CircuitPython, check out [this quick-start](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart) to get it going.

The first example plays a different tone for each button on the Circuit Playground Express.

Copy the following code to a **code.py** file on your **CIRCUITPY** drive:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Adafruit_STEMMA_Speaker/STEMMA_Speaker_CPX_play_tone/code.py

Press each button to play a different tone through your STEMMA speaker.

The second example plays a different wav file for each button on the Circuit Playground Express.

Click the buttons below to download the two wav files and copy them to your **CIRCUITPY** drive.

[Download dip.wav](https://github.com/adafruit/Adafruit_Learning_System_Guides/raw/main/Adafruit_STEMMA_Speaker/dip.wav)
[Download rise.wav](https://github.com/adafruit/Adafruit_Learning_System_Guides/raw/main/Adafruit_STEMMA_Speaker/rise.wav)
Then, copy the following code to a **code.py** file on your **CIRCUITPY** drive:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Adafruit_STEMMA_Speaker/STEMMA_Speaker_CPX_play_file/code.py

Press each button on the Circuit Playground Express to play each file through your STEMMA Speaker.

That's all there is to using your STEMMA Speaker with Circuit Playground Express and CircuitPython!

## Further Information

For more information on using the STEMMA Speaker with MakeCode, check out the [Music and Sound in MakeCode page of the Make It Sound guide](https://learn.adafruit.com/make-it-sound/music-and-sound-in-makecode).

For more information on using the STEMMA Speaker with CircuitPython, check out the [Music and Sound in CircuitPython page of the Make It Sound guide](https://learn.adafruit.com/make-it-sound/music-and-sound-in-makecode-2).

# Adafruit STEMMA Speaker

## Downloads

## Files

- [PAM8302A class D amplifier datasheet](https://cdn-shop.adafruit.com/datasheets/PAM8302A.pdf)
- [EagleCAD files on GitHub](https://github.com/adafruit/Adafruit-STEMMA-Speaker-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20Circuit%20Playground%20TFT%20Gizmo.fzpz)

## Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/081/942/medium800/adafruit_products_STEMMA_Speaker_Fab_Print.png?1570133708)

## Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/081/920/medium800/adafruit_products_STEMMA_Speaker_Schematic.png?1570051996)


## Primary Products

### Adafruit STEMMA Speaker - Plug and Play Audio Amplifier

[Adafruit STEMMA Speaker - Plug and Play Audio Amplifier](https://www.adafruit.com/product/3885)
Hey, have you heard the good news? With Adafruit STEMMA boards you can easily and safely plug sensors and devices together, like this **Adafruit STEMMA Speaker - Plug and Play Audio Amplifier**. Like the name implies, it's got a class D audio amplifier on board, and our...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3885)
[Related Guides to the Product](https://learn.adafruit.com/products/3885/guides)

## Featured Products

### JST PH 2mm 3-pin Plug to Color Coded Alligator Clips Cable

[JST PH 2mm 3-pin Plug to Color Coded Alligator Clips Cable](https://www.adafruit.com/product/4030)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with grippy mini alligator clips. We're carrying these to match up with any of our boards or breakouts with 3-pin 'STEMMA' connectors on them such as the&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4030)
[Related Guides to the Product](https://learn.adafruit.com/products/4030/guides)
### STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm](https://www.adafruit.com/product/3893)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" male header plugs on the end. We're carrying these to match up with our Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3893)
[Related Guides to the Product](https://learn.adafruit.com/products/3893/guides)
### STEMMA JST PH 2mm 3-Pin to Female Socket Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Female Socket Cable - 200mm](https://www.adafruit.com/product/3894)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" female header sockets on the end. We're carrying these to match up with our Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/3894)
[Related Guides to the Product](https://learn.adafruit.com/products/3894/guides)

## Related Guides

- [Musical Walking Stick with Circuit Playground](https://learn.adafruit.com/musical-cane-walking-stick.md)
- [Circuit Playground Bluefruit Pumpkin with Lights and Sounds ](https://learn.adafruit.com/pumpkin-with-circuit-playground-bluefruit.md)
- [BLE Synth with the Feather nRF52840 and Circuit Playground Bluefruit](https://learn.adafruit.com/ble-synth-with-the-feather-nrf52840-and-circuit-playground-bluefruit.md)
- [Blahaj Alarm and Lamp](https://learn.adafruit.com/blahaj-alarm.md)
- [LEGO Head Lamp with Audio](https://learn.adafruit.com/lego-head-lamp-with-audio.md)
- [RGB Matrix Dreidel Game](https://learn.adafruit.com/rgb-matrix-dreidel-game.md)
- [LED Matrix Scoreboard](https://learn.adafruit.com/led-matrix-scoreboard.md)
- [CLUE Text Telephone Transmitter](https://learn.adafruit.com/clue-teletype-transmitter.md)
- [DIY Quiz Show Controller System](https://learn.adafruit.com/quiz-show-controller-keyboard-bluetooth.md)
- [Glowing Bottle Castle and Capacitive Touch Piano](https://learn.adafruit.com/glowing-bottle-castle-and-capacitive-touch-piano.md)
- [NXP Precision 9DoF Breakout](https://learn.adafruit.com/nxp-precision-9dof-breakout.md)
- [MIDI Breath Controller](https://learn.adafruit.com/midi-breath-controller.md)
- [Adafruit LTR390 UV Sensor](https://learn.adafruit.com/adafruit-ltr390-uv-sensor.md)
- [Adafruit PiCowbell Proto for Pico](https://learn.adafruit.com/picowbell-proto.md)
- [Adafruit MPRLS Ported Pressure Sensor Breakout](https://learn.adafruit.com/adafruit-mprls-ported-pressure-sensor-breakout.md)
