The SparkFun Audio Codec Breakout - WM8960 is a low power, high quality stereo codec with 1W Stereo Class D speaker drivers and headphone drivers. The WM8960 acts as a stereo audio ADC and DAC, and communicates using I2S, a standard audio data protocol (not to be confused with I2C). This audio codec is chock full of features some of which includes advanced on-chip digital signal processing for automatic level control (ALC) for the line or microphone input, programmable gain amplifier (PGA), pop and click suppression, and its ability to configure I2S settings and analog audio path through software via I2C.
The SparkFun WM8960 Audio Codec Breakout with Headers is a low-power, high-quality stereo codec with 1W Stereo speaker driverā¦
$18.50
Required Materials
To follow along with this tutorial, you will need the following materials at a minimum. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary. Note that the wishlist does not include any microphones or speakers.
Note: For users interested in just the wireless speaker and example 9, check out the SparkFun Qwiic Wireless Speaker Kit below! The kit includes a TRRS breakout with headers instead of the TRS breakout. RING2 of the TRRS connector also connects to the TRS cable's sleeve. When wiring your circuit up, we recommend connecting to the sleeve in case you have a headphone with a TRRS connector. The kit also includes a mini amplified speaker.
The SparkFun Qwiic Wireless Speaker Kit provides you with everything you need to make a wireless audio speaker.
Retired
Arduino Microcontroller
You will need an Arduino microcontroller to configure the WM8960. We recommend the Espressif's ESP32 WROOM. For the scope of this tutorial, we will be using the IoT RedBoard ESP32 - Development Board since it already includes female headers on the board to connect jumper wires to the WM8960.
The IoT RedBoard is an ESP32 WROOM-equipped development board that has everything you need in an Arduino Uno with extra perksā¦
$29.95
Differential Microphone Input
Below is a differential microphone from the catalog that you can connect as a differential microphone input. Note that you will need a resistor and the MICBIAS pin to connect to the eletret microphone.
The SparkFun Analog MEMS Microphone Breakout makes it easy to work with the InvenSense ICS-40180 analog microphone.
$6.95
Differential Speaker Output
Below are a few speakers from the catalog that you could use as an output. You will want to choose differential speakers like the following listed below (not to be confused by the piezo buzzers). Note that some speakers may perform better than others at certain frequencies while others operate around a certain frequency range. Make sure to check out the speaker's datasheet when choosing a speaker.
This through-hole speaker is great for projects where you need something that sounds better than a piezo buzzer but don't havā¦
$2.10
Note that some speakers may be rated as a higher wattage (more than what the Audio Codec's speaker driver can output). Higher wattage speakers will still play sound but they won't be fully powered.
This speaker is an excellent choice for compact applications requiring high fidelity music, or high intelligibility voice/comā¦
$11.95$6.95
Note: Amplified speakers that have a 3.5mm TRS audio connector can also be used. However, you will not be using the speaker output channels. Users can connect the headphone output to amplified speakers with a TRS audio connector as well. The hamburger mini speaker could be one option.
Simple breakout board for the 3.5mm audio jack. Use this breakout (shipped bare) to allow breadboard or SIP access to the supā¦
$1.05
You can also use a TRRS breakout instead of the TRS breakout listed above. RING2 of the TRRS connector also connects to the TRS cable's sleeve. When wiring your circuit up, we recommend connecting to the sleeve in case you have a headphone with a TRRS connector.
This is your basic tube of unleaded (Pb-free) solder with a no clean, water soluble resin core. 0.031" gauge and 15 grams
$3.95
Prototyping Accessories
Depending on your setup, you may want to use IC hooks for a temporary connection. However, you will want to solder header pins to connect devices to the plated through holes for a secure connection. Note that you will need to breakaway the male header pins or cut the female header pins down to fit the two rows of 1x16 PTH on the breakout. Of course, you could also solder wire as well.
This is a 500mm long 4-conductor cable with 1mm JST termination. Itās designed to connect Qwiic enabled components togetherā¦
Retired
You Will Also Need
Depending on your setup, you will also need some sort of audio source. This can be from your smartphone or computer. Most of the examples listed in this tutorial will output the audio through the headphones. You will also need to have a pair of headphones with a 3.5mm TRS audio jack on the end.
Audio Source
MP3 Player
Bluetooth Ā® Audio Device (e.g. smartphone, computer, transmitter)
Headphones with 3.5mm TRS Audio Jack
Suggested Reading
If you aren't familiar with the MicroMod ecosystem, we recommend reading here for an overview if you decide to take advantage of the Qwiic connector.
If you arenāt familiar with the following concepts, we also recommend checking out a few of these tutorials before continuing. Make sure to check the respective hookup guides for your microcontroller to ensure that you are installing the correct USB-to-serial converter. You may also need to follow additional instructions that are not outlined in this tutorial to install the appropriate software.
SparkFun Serial Basic Breakout takes advantage of USB-C and is an easy-to-use USB-to-Serial adapter based on the CH340C IC from WCH. With USB-C you can get up to three times the power delivery over the previous USB generation and has the convenient feature of being reversable.
How do I install a custom Arduino board/core? It's easy! This tutorial will go over how to install an Arduino board definition using the Arduino Board Manager. We will also go over manually installing third-party cores, such as the board definitions required for many of the SparkFun development boards.