Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Adafruit VS1053 Headphone FeatherWing: Examples, Pinouts, and Specs

Image of Adafruit VS1053 Headphone FeatherWingDesign with Adafruit VS1053 Headphone FeatherWing in Cirkit Designer

Introduction

The Adafruit VS1053 Headphone FeatherWing is an add-on board designed for the Feather series of development boards by Adafruit. It incorporates the VS1053, a versatile MP3/AAC/WMA MIDI audio codec chip, providing a simple solution for adding audio playback through a standard headphone jack. This component is ideal for creating portable music players, audio notification systems, and for adding sound to embedded projects.

Explore Projects Built with Adafruit VS1053 Headphone FeatherWing

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Based Vibration Feedback System with Quad Alphanumeric Display and ADXL343 Accelerometer: A project utilizing Adafruit VS1053 Headphone FeatherWing in a practical application
ESP32-Based Vibration Feedback System with Quad Alphanumeric Display and ADXL343 Accelerometer

This circuit features an Adafruit HUZZAH32 ESP32 Feather board as the central microcontroller, which is connected to an Adafruit Quad AlphaNumeric Featherwing display and an Adafruit ADXL343 accelerometer via I2C communication (SCL and SDA lines). The ESP32 controls a vibration motor connected to one of its GPIO pins (A5_IO4) and shares a common power supply (3.3V) and ground (GND) with the other components. The purpose of this circuit is likely to read acceleration data, display information on the alphanumeric display, and provide haptic feedback through the vibration motor.

Open Project in Cirkit Designer
Image of Adafruit Feather 32u4 Bluefruit with MPR121 Capacitive Touch Sensor Interface: A project utilizing Adafruit VS1053 Headphone FeatherWing in a practical application
Adafruit Feather 32u4 Bluefruit with MPR121 Capacitive Touch Sensor Interface

This circuit integrates an Adafruit MPR121 capacitive touch sensor with an Adafruit Feather 32u4 Bluefruit microcontroller. The MPR121 is powered by the 3.3V supply from the Feather and communicates with the microcontroller via I2C, with SCL connected to pin 3 and SDA connected to pin 2 of the Feather. This setup allows the Feather to detect touch inputs from the MPR121 for further processing or wireless communication.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Description
GND Ground connection
3V 3.3V power supply from the Feather board
RST Reset pin for the VS1053 chip
MISO Master In Slave Out for SPI communication
MOSI Master Out Slave In for SPI communication
SCK Serial Clock for SPI communication
CS Chip Select for the VS1053 chip
DCS Data/Command Select for the VS1053 chip
DREQ Data Request, indicates when the VS1053 is ready for data

Usage Instructions

How to Use the Component in a Circuit

  1. Mounting: Attach the FeatherWing to the top of a Feather board ensuring all pins align correctly.
  2. Power Supply: Ensure that the Feather board is powered with a 3.3V supply, which is also used by the FeatherWing.
  3. MicroSD Card: Insert a microSD card with audio files into the slot on the FeatherWing.
  4. Headphones: Connect a pair of headphones or a stereo input to the headphone jack.

Important Considerations and Best Practices

Example Code for Arduino UNO

#include <SPI.h>
#include <SD.h>
#include <Adafruit_VS1053.h>

// Define the pins used
#define BREAKOUT_RESET  -1      // VS1053 reset pin (not used!)
#define BREAKOUT_CS      6      // VS1053 chip select pin (output)
#define BREAKOUT_DCS     10     // VS1053 Data/command select pin (output)
// These are the pins used for the music maker shield
#define SHIELD_RESET  -1      // VS1053 reset pin (unused!)
#define SHIELD_CS     7       // VS1053 chip select pin (output)
#define SHIELD_DCS    8       // VS1053 Data/command select pin (output)
// These are common pins between breakout and shield
#define CARDCS 4     // Card chip select pin
// DREQ should be an Int pin, see http://arduino.cc/en/Reference/attachInterrupt
#define DREQ 3       // VS1053 Data request, ideally an Interrupt pin

Adafruit_VS1053_FilePlayer musicPlayer = 
  // create breakout board object!
  Adafruit_VS1053_FilePlayer(BREAKOUT_RESET, BREAKOUT_CS, BREAKOUT_DCS, DREQ, CARDCS);
  // create shield-version object!
  //Adafruit_VS1053_FilePlayer(SHIELD_RESET, SHIELD_CS, SHIELD_DCS, DREQ, CARDCS);

void setup() {
  Serial.begin(9600);
  Serial.println("Adafruit VS1053 Simple Test");

  if (! musicPlayer.begin()) { // initialise the music player
     Serial.println(F("Couldn't find VS1053, do you have the right pins defined?"));
     while (1);
  }
  Serial.println(F("VS1053 found"));

   if (!SD.begin(CARDCS)) {
    Serial.println(F("SD failed, or not present"));
    while (1);  // don't do anything more
  }

  // Set volume for left, right channels. lower numbers == louder volume!
  musicPlayer.setVolume(20,20);

  // Play one file, don't return until complete
  Serial.println(F("Playing track 001"));
  musicPlayer.playFullFile("/track001.mp3");
  // Play another file in the background, REQUIRES interrupts!
  Serial.println(F("Playing track 002"));
  musicPlayer.startPlayingFile("/track002.mp3");
}

void loop() {
  // File is playing in the background
  if (musicPlayer.stopped()) {
    Serial.println("Done playing music");
    while (1) {
      delay(10);  // we're done! do nothing...
    }
  }
  if (Serial.available()) {
    char c = Serial.read();
    // if we get a 'p', pause/unpause!
    if (c == 'p') {
      if (! musicPlayer.paused()) {
        Serial.println("Paused");
        musicPlayer.pausePlaying(true);
      } else { 
        Serial.println("Resumed");
        musicPlayer.pausePlaying(false);
      }
    }
  }
}

Troubleshooting and FAQs

Common Issues Users Might Face

Solutions and Tips for Troubleshooting

FAQs

Q: Can I play audio files other than MP3? A: Yes, the VS1053 chip supports a variety of audio formats including AAC, WMA, and MIDI.

Q: How do I control the volume? A: The volume can be controlled programmatically using the setVolume method in the Adafruit VS1053 library.

Q: Can I use this FeatherWing with other microcontrollers? A: While designed for Feather boards, it can be used with other microcontrollers that support SPI communication, given appropriate voltage levels and pin connections.