Adafruit Audio FX User manual

Adafruit Audio FX Sound Board
Created by lady ada
Last updated on 2018-08-22 03:44:12 PM UTC

2
4
6
7
9
10
10
12
12
13
14
14
15
15
16
18
18
18
18
20
22
24
24
24
25
25
25
26
26
26
26
28
28
29
30
31
31
31
32
32
33
33
Guide Contents
Guide Contents
Overview
Amplifier or Headphone out
Trigger Effects
Tour
Headphone Output Type
Stereo Amplifier Type
Pinouts
Power Pins
UART Pins
Volume Trigger pins
Audio Outputs
Trigger Pins
Other Pins
Copying Audio Files
Powering it
USB power pack
Powering with Amplifer
Wiring a battery pack to the Vin + GND pins
Using Vin JST Connector
Using a Lipoly Backpack
Triggering Audio
How many triggers are there?
How long does it take for audio to play once I've triggered the pin?
Trigger Types
Basic trigger - Tnn.WAV or Tnn.OGG
Hold Looping Trigger - TnnHOLDL.WAV or TnnHOLDL.OGG
Latching Loop Trigger - TnnLATCH.WAV or TnnLATCH.OGG
Play Next Trigger - TnnNEXT#.WAV or TnnNEXT#.OGG
Play Random Trigger- TnnRAND#.WAV or TnnRAND#.OGG
Wire up Buttons
Serial Audio Control
Arduino Library
Load Demo Sketch
General Usage
Commands
IDLE mode commands
List Files
Volume up and down
Play track by Number
Play track by name
PLAY mode commands
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 2 of 45

33
33
34
34
36
36
36
36
38
39
39
39
39
39
39
40
41
41
41
42
42
42
42
42
43
45
45
45
45
45
Pause & Unpause
Stopping Playback
Current playback time
File size and remaining
Advanced Triggering
Trigger Order
Basic foreground & background
Advanced Background/Foreground
Creating Audio Files
How Much Music?
Compressed or No?
Stereo or Mono
Bit Rates / Sample Rates
Some examples
Uncompressed WAV
Compressed Ogg Vorbis
Troubleshooting
Doesn't show up as a drive on my computer
I can't get audio to play when I trigger the pins
Downloads
Disk Images
Datasheets & Files
Schematic and Fabrication Print
Headphone Out version
Amplifier Version
F.A.Q.
How come 'looping tracks' like TO1LATCH.WAV dont loop in UART mode?
I am having difficultly triggering GPIO #9 and #10
If I hold down a button in 'play once' Tnn.WAV mode, it will repeat!
I don't have short delays between loops, whats up with that?
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 3 of 45

Overview
Would you like to add audio/sound effects to your next project, without an Arduino+Shield? Or maybe you don't even
know how to use microcontrollers, you just want to make a sound play whenever you press a button. What about
something that has to be small and portable? You are probably feeling a little frustrated: it's been very hard to find a
simple, low cost audio effects trigger that is easy to use and does not require any programming
UNTIL NOW!
Don't get me wrong, I love the MP3 Music Maker shield, and our Wave Shield is a dependable classic. But you still
need to get an Arduino involved. There's all sorts of tricks with ISD chips or recordable greeting cards, but they never
sound any good. So after a lot of engineering and tinkering we've come out with the Adafruit Sound Board, the easiest
way ever to add audio effects to a project!
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 4 of 45

The Sound Board has a lot of amazing features that make it the easiest thing ever:
No Arduino or other microcontroller required! It is completely stand-alone, just needs a 3 to 5.5VDC battery
Small - only 1.9" x 0.85"
Built in storage - yep! you don't even need an SD card, there's 2MB or 16MB of storage on the board itself, so
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 5 of 45

you can store up to 15 minutes of quality compressed audio. Double that if you go with mono instead of stereo
Built in Mass Storage USB - Plug any micro USB cable into the Sound Board and your computer, you can drag
and drop your files right on as if it were a USB key
Compressed or Uncompressed audio - Go with compressed Ogg Vorbis files for longer audio files, or
uncompressed WAV files
High Quality Sound - You want 44.1KHz 16 bit stereo? Not a problem! The decoding hardware can handle any
bit/sample rate and mono or stereo
11 Triggers - Connect up to 11 buttons or switches, each one can trigger audio files to play
Stereo line out - There's a breakout for both left and right channels, at line level, so you can always hook up to
any kind of stereo or powered speaker
Five different trigger effects - by changing the name of the files, you can create five different types of triggers
which will cover a large range of projects
without
any programming
Amplifier or Headphone out
We have two versions, one with a headphone jack so you can connect to a stereo or powered speaker set
And a version with built in class D stereo amplifier, you can have 2 x 2.2W of output audio power, driving 4 or 8 ohm
speakers
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 6 of 45

Trigger Effects
What do we mean by trigger effects? Well, depending on your project you may need to have audio play in different
ways. We thought of the five most common needs and built it into the Sound Board so you just rename the file to get
the effect you want.
1. Basic Trigger - name the file Tnn.WAV or Tnn.OGG to have the audio file play when the matching trigger pin nn
is connected to ground momentarily
2. Hold Looping Trigger - name the file TnnHOLDL.WAV or .OGG to have the audio play only when the trigger pin
is held low, it will loop until the pin is released
3. Latching Loop Trigger - name the file TnnLATCH.WAV or .OGG to have the audio start playing when the button
is pressed momentarily, and repeats until the button is pressed again
4. Play Next Trigger - have up to 10 files play one after the other by naming them TnnNEXT0.WAV thru
TnnNEXT9.OGG. Will start with #0 and each one on every momentary button press until it gets through all of
them, then go back to #0
5. Play Random Trigger - just like the Play Next trigger, but will play up to 10 files in random order (TnnRAND0.OGG
thru TnnRAND9.OGG) every time the button is pressed momentarily
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 7 of 45

The sound board is designed to be simple: it does not have polyphonic ability, can't play MP3's, isn't reprogrammable
or scriptable, and you can't have any other kind of trigger type. However, there's a good chance the project you want
to make will work great.
We designed this board specifically for people who wanted to make props, costumes, toys, and other small portable
projects. Check out the tutorial for all the powering options, you can power from 3-5VDC so a 3xAAA battery
pack (https://adafru.it/dcG) or a LiPoly battery will work well. You can even use our LiPoly backpack to fit on top for an
all-in-one rechargeable effects board (https://adafru.it/e0A)
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 8 of 45

Tour
We'll go over each pin on the board in the next page, right now let's look at the basic elements of the Sound Board so
you have an idea of what each piece does.
Starting from the left is the micro USB jack. You'll need a standard MicroUSB cable to connect this to your computer.
You do need a computer (any will do) in order to save files onto the Sound Board flash storage
This big chip is the audio decoding engine. It has OGG and WAV decoding capability and can listen to the trigger pins
to know when to play each file. It has great audio quality, much better than trying to have a microcontroller generate
the audio on its own.
It cannot decode MP3 files - but that makes it a lot less expensive since MP3 decoding requires a patent license where
as OGG and WAV are free for any kind of use.
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 9 of 45

This is the onboard flash chip. It's basically like a little SD card, but soldered directly onto the PCB. These chips can
store a few megabytes. This doesn't seem like much but for most audio effects, you don't need hours of music. You
can store a couple minute's worth of compressed OGG on a 2M flash chip.
Headphone Output Type
All the way to the right is the headphone jack. This is for connecting to a pair of headphones or into a powered
speaker. It cannot drive an 8 ohm or 4 ohm speaker. Instead, an amplifier will have to be used (basically, just like your
phone or pocket MP3 player needs an external powered/amplified speaker)
The outputs are 'live level' (about 1Vpp) and have DC blocking capacitors so it can be connected to any kind of
amplifier.
Stereo Amplifier Type
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 10 of 45

All the way to the right is the Class D stereo amplifier. This is for connecting to a pair of speaker! The outputs are
bridge-tied-load (BTL) so do not connect R+ to L+ and R- to L- to get more power, it could damage the chip. If you only
need one speaker, simply connect the channel you want.
The amplifier can drive 8 ohm or 4 ohm speaker, up to 2.8W (10% distortion, 4 ohm) and 2.2W (1% distortion, 4 ohm)
4 ohm speakers will be louder than 8 ohm
Powering from 5V will be louder than 3V, so if you need more oomph, you can power from 4 x AA rechargeable
batteries, or 3 x AA Alkaline, or a USB battery pack. It's pretty damn loud tho!
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 11 of 45

Pinouts
The top and bottom pin sets are the same for the headphone and amplifier out version of the sound board, we just use
the headphone version for the photos below
The Sound Board has a lot of pins, but we can group them into chunks, lets go through each kind of group in order to
understand all the stuff you can do.
Power Pins
There's a couple power pins in the top. This is what you'll use to power the Sound Board in your project.
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 12 of 45

Vin - This is the primary 'battery' power input pin. Power with 3-5.5 VDC
GND - there's a couple ground pins but we suggest this one for power input. The others can be used for signal
grounds
BUS - this is the 5V that comes from the USB connector. We break this out in case you want to use it to say
charge a LiPoly battery (See the Powering It page!)
PB - this is the 'Power Button' pin, which we use for testing. Just leave it disconnected for use.
In general, you'll only want to power through the Vin and GND pins. The Vin input pin is polarity protected and can use
3V-5.5V DC input. If you want to use a larger voltage, you'll need another regulator that can bring the voltage down to
3-5V DC
UART Pins
If you want to control the Sound Board over UART Serial, you can do so by using the TX, RX and UG pins.
TX - this is the serial OUT from the board. 3.3V logic
RX - this is the serial INTO the board. We add some level shifting so you can use 3-5V logic.
UG - the UART/GPIO selector pin. Pulled high for default GPIO trigger mode. Tie to ground and reset the board
for UART mode.
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 13 of 45

Volume Trigger pins
These are two extra inputs that can be used to adjust the volume in GPIO trigger mode only. Connect buttons that go
from each pin to ground, when the button is pressed, the volume will decrease or increase
The volume is not stored during power cycling or resets, so it will have to be re-applied after restarts.
Audio Outputs
If you don't want to use the headphone jack, connect your amplifier to the Right, Left and Ground pins. These are line
level outputs for headphones of about 30 ohms, not for big speakers! There are output DC blocking capacitors so you
can safely connect directly to any kind of amplifier
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 14 of 45

Trigger Pins
Finally, we're at the trigger pins! These are the 11 inputs that can be used to trigger audio playing. We'll go over how to
set the file for each pin in a later page.
Each pin has a pullup resistor, use a button/switch to connect to ground when pressed in order to 'trigger' it. The board
has debouncing logic built in.
Other Pins
We have a few other pins you may be curious about
Rst - this is the reset pin, you probably don't need to use this pin but when tied to ground it resets the board.
Act - this is the Activity pin, which goes low when an audio file is played
CS - this is the chip select line for the onboard flash chip, do not connect anything to it! We use it for
programming the chip during manufacture!
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 15 of 45

Copying Audio Files
We'll start by copying some audio files over to the Sound Board. To make it really easy, we have a pack of files ready
for you. They're not terribly interesting (just spoken words) but will help you test the triggers.
Download the zip file here and uncompress it on your computer:
https://adafru.it/e0s
https://adafru.it/e0s
Now plug in the sound board into your computer, it will show up as a new USB key. No drivers are required!
There may already be a file on there, that's from our testing procedure. You can delete or overwrite it.
Copy over all the new files into the new disk drive
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 16 of 45

Then eject the disk properly to make sure the data was completely written
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 17 of 45

Powering it
You won't be able to play audio while the board is connected to USB, so to actually trigger audio you'll need to unplug
the USB cable and power it another way. There's many ways to power the Sound Board, you'll have to go with
whatever it easiest for you.
USB power pack
This is by far the simplest way to power and doesn't even require any soldering! Simply connect the board micro USB
to a USB power pack. Since there's no data lines on a battery pack, it wont try to start up as a USB key. Just connect
with any microUSB cable. These are large but it will power the Sound board + amplifier for a looooong time
The down-side of using these is that some power packs automatically turn off when they don't detect a lot of current
draw immediately. Its impossible to tell ahead of time whether your power pack will work without testing, but if your
project doesn't make music sounds almost immediately, it can be an issue
Powering with Amplifer
The 2x2W amplifier version of the Sound Board is a pretty beefy 2x2W amplifier. If you are using 2 x 4 ohm speakers,
that means you could be seeing as much as 2 Amp spikes of current. (In reality, assume spikes of 1A since audio isn't a
DC load). Power with good charged batteries like AA's or even AAA's. For lipoly batteries, a 500mAh battery is
minimal! Go for 1200mAh or more if you plan on playing it loud
Wiring a battery pack to the Vin + GND pins
You can use a AA or AAA battery pack and wire it up directly to the Vin an GND pins. We recommend 3xAA or 3xAAA
alkaline or rechargeable as ideal. You can use 4xAA or 4xAAA but in that case, make sure you've got rechargeable
batteries, as the higher voltage alkalines may be a bit much for the board.
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 18 of 45

For most battery packs the red wire is the positive wire,
connect that to Vin. The black wire is ground, connect
that to GND.
Solder both wires securely. You cannot just twist the
wires into place!
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 19 of 45

The nicer battery packs have switches, or you can just
remove the batteries when not in use. If the green light
is lit, it's powered up!
Using Vin JST Connector
If you don't want to solder wires directly, you can solder on a JST PH 2-pin connector (http://adafru.it/1769) to the back.
We don't include this on the board because its a bit bulky and if the JST is in place you can snap a battery in or out
easily. The connector is the same as the Vin/GND pins on the side so use one or the other!
All our Lipoly batteries come with a JST (https://adafru.it/e0v), and our 3xAAA on/off pack also
does (https://adafru.it/dYF).
Or, connect your custom battery with a JST cable (http://adafru.it/261)
© Adafruit Industries https://learn.adafruit.com/adafruit-audio-fx-sound-board Page 20 of 45
Table of contents