There's a lot of stuff going on in this shield! Lets look at the board and all the pinouts. The amplifier version and non-amplifier version both use the same PCB so the pinouts are the same. We'll talk about just the amplifier separately at the bottom
The Music Maker shield has a bunch of pins required for use. We pre-wire all of them for you but there's still some flexibility in case you want to rewire.
There are three 'totally fixed' pins, the hardware SPI pins:
SPI SCK - connected to Digital #13 (but can be connected to the ISP header with a jumper) - used by both the SD card and VS1053
SPI MISO - connected to Digital #12 (but can be connected to the ISP header with a jumper) - used by both the SD card and VS1053
SPI MOSI - connected to Digital #11 (but can be connected to the ISP header with a jumper) - used by both the SD card and VS1053
There are a couple other pins that are required for talking to the VS1053 to play MP3s and such
MCS - this is the VS1053 chip select pin, connected to Digital #7
DCS - this is the VS1053 data select pin, connected to Digital #6
CCS - this is the SD Card chip select pin, connected to Digital #4
DREQ - this is the VS1053 data request interrupt pin - connected to digital #3
Ther are also a few other pins that are not connected to any Arduino pin but are broken out:
RST - this is the VS1053 reset pin, we connected it to the Arduino reset pin so you don't need to use this unless you really want to.
SPK Off - this disables the amplifier - if you have the amplifier version and want to 'mute' instantly
TX - this is serial data transmit from the VS1053 - its not used for any of our demos
RS - this is serial data into the VS1053 - its used for MIDI synth playing
CD - this is the card detect pin, it is tied to ground when a card is inserted. Use a pullup on a digital pin to detect when a SD card is inserted. We dont use it.
If you're using a Mega or Leonardo Arduino, you'll need to short the jumpers on the top right of the board, and install the 2x3 socket header. This is because those Arduinos use the 2x3 pin header for the hardware-SPI pins and hardware-SPI is required for the high-speed data transfer required by the VS1053 codec. We'll cover that in the Assembly step.
The VS1053 codec chip has 7 'General Purpose Input/Output' pins that you can use to detect button presses and/or light up a small LED. GPIO1 is also used to put it into MIDI mode. By default all these pins are pulled low to ground with 100K resistors. They are 3V logic level so if you want to attach a button, you can connect the two wires between the GPIO pin on the left and the 3V breakout on the right. If you don't want to use these pins just leave them be, they are not required for use!
In order to play MP3, WAV, OGG, etc files, you'll need to store them on a MicroSD card. These are very very common, available in the Adafruit shop or any electronics store. You can use any FAT16/FAT32 formatted card from 64M up to 8G. Chances are its pre-formatted for this so you can just drop files on. This is a push-push socket, push the card in once to seat in, push again to pop out. The chip to the right is the level shifter to make it safe to use with 5V logic like Arduino
For almost all purposes, the Stereo Line Out 3.5mm jack is what you'll want to get audio out of the shield. It's there on both versions of the shield. The two big silver capacitors on the right are DC blocking caps. This means that the audio is AC-coupled and is safe to use with any amplifier, headphone. etc. Line level is up to about 2V peak-to-peak. If you have a system that really needs 0.7Vpp or less, set the volume on the VS1053 in software.
You can also plug in headphones, although it is not a very strong headphone driver, so may not sound loud if its lower than 32Ω impedance
We break out the microphone/line in inputs, for recording audio. Some basic analog filtering is required depending on the electret microphone or amplifier. Check the VS1053 datasheet for how to connect up a mic!
This guide was first published on May 16, 2014. It was last
updated on May 16, 2014.
This page (Pinouts) was last updated on May 04, 2015.
In the bottom left is an amplifier section, this is a stereo 3W amplifier, with bridge-tied load output. It's only meant for driving speakers directly! Do not connect to another amplifier, use the line out for that! Also, you cannot bridge-tie R and L together -
if you need only one speaker, leave the unused one disconnected.For the amplifier, we're using the TS2012 class D chipset, the same used in this amplifier board
On the left are two sets of breakouts for Right and Left. Connect these directly to your 4 or 8Ω speakers. Ideally they are 4Ω 3W speakers or 8Ω 1W speakers. You will get louder audio with 4Ω speakers since the amplifier voltage is maxed out at 5V from the Arduino.
If you have both speakers attached and you're playing loud audio, you may need to power the Arduino from DC power jack instead of USB since USB can only provide 5W (5V @ 1A) max and two 3W speakers = 6W!
The default amplification for the speakers is +6dB. This gives nice unclipped audio from the VS1053 even at highest volume. If by chance you can't amplify the audio (its not normalized right) or there's some other reason to need a higher amplification, you can short the +6dB or +12dB jumpers to increase the gain. Don't do this unless you're really sure!
You can end up with really heavy clipping which sounds bad!