VS1053B breakout board

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
arnom
 
Posts: 26
Joined: Fri Nov 15, 2013 1:40 pm

VS1053B breakout board

Post by arnom »

Hi,

For a project of mine I want to playback an audio stream as well as recording an audio stream.
So I figured the VS1053B would be a perfect solution.
A friend of mine had a (non-Adafruit) VS1053B breakout available (he hasn't used it himself yet), so I figured I'd give that one a try before ordering a few from Adafruit.

After a bit of online searching, I found this product information page of the exact module I got from my friend.
It also includes a schematic of the breakout board.

So I figured, since it contains the exact same IC as the Adafruit breakout, that it would be possible to use the Adafruit_VS1053B Arduino library.
I used the tutorial on the Adafruit Learning System as a reference and hooked up the breakout to an Arduino Leonardo like this:

Code: Select all

Leo   Breakout
==============
5V    5V
GND   GND
GND   GND
D13   SCLK
D12   SO
D11   SI
D10   XCS
D09   XRES
D08   XDCS
D03   DREQ
I used the following Arduino sketch to check if it would be able to find the VS1053B:

Code: Select all

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

// define the pins used
#define RESET 9      // VS1053 reset pin (output)
#define CS 10        // VS1053 chip select pin (output)
#define DCS 8        // VS1053 Data/command select pin (output)
#define DREQ 3       // VS1053 Data request pin (into Arduino)

Adafruit_VS1053 audio = Adafruit_VS1053(RESET, CS, DCS, DREQ);

void setup() {
  Serial.begin(57600);
  while(!Serial){ delay(1); /* needed for Leonardo */ }
  Serial.println("VS1053 test");

  while(!audio.begin()) {
    Serial.println("VS1053 not found");
    audio.dumpRegs();
    delay(5000);
  }

  audio.dumpRegs();
  audio.sineTest(0x44, 500);
}

void loop() {  

}
When plugging in an headphone into the module I can hear a "pop" whenever the audio.begin() is called, so I'm guessing it does reset the codec.
Any idea what could be the problem, or any suggestions on what I should check?

PS: The Adafruit_VS1053B library requires that I include the SD library, even if I'm not using the musicplayer, which seems a bit odd to me.

Kind regards,
Arno

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: VS1053B breakout board

Post by adafruit_support_mike »

The mdfly schematic shows a DC connection between the analog GND line and the output (R14 and R18, lower right corner), and a zero-ohm connection between AGND and GND (3.3v regulator circuit, lower left).

That would work for an audio circuit with a split power supply (one where the AC output swings around 0v). For a single-supply circuit (one where the AC output swings around VCC/2), it gives you a DC offset between the quiescent voltage at the output connection (0v) and the zero-volume output (VCC/2).

The pop you're hearing probably happens when the VS1053B takes its output pins from GND up to their zero-volume output voltage.

The Adafruit schematic (http://learn.adafruit.com/system/assets ... 1380122647) doesn't have any resistors on the output side of the capacitors (upper left), so your headphones won't see that DC jump.

You can probably get rid of the pop by putting a couple of 1-10uF capacitors between the mdfly board's output jacks and your headphones. Those will block the DC offset without having too much effect on the audio signals.

User avatar
arnom
 
Posts: 26
Joined: Fri Nov 15, 2013 1:40 pm

Re: VS1053B breakout board

Post by arnom »

Thanks for that info.
When I re-read my post, I noticed that I totally forgot to state the real problem I'm having: the Arduino does not "see" the VS1053B.
I keep getting the "VS1053 not found" message (in other words audio.begin() fails).

User avatar
arnom
 
Posts: 26
Joined: Fri Nov 15, 2013 1:40 pm

Re: VS1053B breakout board

Post by arnom »

Hm.. looks like the issue is caused by my Leonardo board.
I just connected everything to an Arduino Duemilanove clone and it seems to work just fine.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: VS1053B breakout board

Post by adafruit_support_mike »

Ah.. well, glad to hear you have a setup that's working for you. ;-)

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”