Papa Soundie Audio Player Hookup Guide

Introduction

The Papa Soundie is an audio playback device breaking out VLSI’s VS1000D audio codec which decodes ogg vorbis (license free) and wav type files. With an SD card for sound storage and a built-in ATMEGA328P programmed with Arduino you’ll be adding custom sound effects to your project with less hardware and in a familiar programming environment.

Arduino Control

The top section of this board contains the Arduino Controls. We’ve broken out 2 analog input pins and 7 digital pins, which includes 3 PWM pins, SPI and I2C communication pins.

The ATMEGA328P is there to easily trigger the pins on the VS1000D using software. The GPIO (D2-D6) are connected to the trigger pins on the VS1000D with pull-down resistors. Sending those digital pins high triggers the audio. Having a built-in software solution means you can trigger audio with or without external hardware on the Arduino pins.

Using binary-coded playback, an audio file is mapped to a number which is also mapped to a series of pins set high or low. For instance, if you wanted to play file 5 under some specific set of conditions you call the function that would set the first and third IO high while leaving the second, fourth and fifth IO low. This allows triggering more files than available pins on the VS1000D.

IO triggers aside, this is also a paired down Arduino board. It can be used both to control and sense, just like a Redboard or Pro-Mini. You will need an FTDI breakout board to program the Papa Soundie in Arduino.

Arduino Control

Audio Playback

UN and UP are the USB lines you can use if you wish to add USB functionality to the product. There are firmware solutions written by VLSI that allow the VS1000D to be mounted as a mass storage device. Audio files can then be dragged and dropped onto the flash storage. This functionality is not built into the firmware by default.

RX and TX can be used to reprogram the VS1000D, which is done through VLSI’s VSIDE. VLSI is a great resource for researching other software solutions.

Note: Do not hook a speaker directly to the Left and Right audio pins.

Control Pins

Connectors

The connectors highlighted here are the micro-SD card socket and the 3.5mm Jack which is to be used with powered speakers only - not headphones. Headphones won’t break anything but you won’t get any sound either.

Connectors

Audio Files

You can trigger up to 32 files from the SD card. With the extra space on the SD card you use much larger files than on the Little Soundie. For the Papa Soundie to keep track of the audio files they need to be named in a particular way; in a 7.3 format. Of the 7, the first five characters are reserved for the name of file and the last two characters are reserved for the file number. This is how the hardware knows which pin triggers which file. The .3 refers to the file extension, which can be either .ogg or .wav. For instance: file 1 could be AUDIO00.ogg or FILES00.wav. File 32 could be something like CLAPS31.ogg File one will be triggered when D2 is held high.

Quick Note about using WAV: The VS1000 developer library contains a simple WAV decoder, which is included in the firmware on the Papa Soundie. Currently the WAV decoder supports 8-bit ulaw, 8-bit linear PCM, and 16-bit linear PCM formats.

What is OGG Vorbis?

Ogg Vorbis is an audio file format developed by xiph, an open source multi-media company.

Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music at fixed and variable bitrates from 16 to 128 kbps/channel. This places Vorbis in the same competitive class as audio representations such as MPEG-4 (AAC), and similar to, but higher performance than MPEG-½ audio layer 3, MPEG-4 audio (TwinVQ), WMA and PAC.

Information courtesy of xiph.org

There are sites out there that will do the conversion for you without having to open a program, like this one.

Audacity is a great open source resource for all things audio that also has fantastic documentation.

There are several sound effects sites such Zapsplat and Soundbible to grab license free sound bites from and then convert to .OGG or .WAV using the methods listed above.

Binary Coded Playback

To get the most of your device and trigger more sounds than available pins the firmware is set up to trigger pins based on a binary code to associate an audio file with a specific set of pins. On the Papa Soundie you can trigger 32 files. Under the Binary column below the number represents which pins on the Arduino are pulled high and low from D6 to D2.

File No.

Binary/IO Pin State

Audio File

1

00001

AUDIO00.OGG

2

00010

AUDIO01.OGG

3

00011

AUDIO02.OGG

4

00100

AUDIO03.OGG

5

00101

AUDIO04.OGG

...

28

11011

AUDIO27.OGG

29

11100

AUDIO28.OGG

30

11101

AUDIO29.OGG

31

11110

AUDIO30.OGG

32

11111

AUDIO31.OGG

Programming

Preparing your microSD Card

Format your microSD Card. The Papa Soundie works with FAT12, FAT16, and FAT32 disks. Load the files you wish to play using the naming convention shown in the previous section. Once the card is inserted you are almost ready to play.

Arduino Library

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.

Within the Arduino IDE, the set up is the same as for the Pro Mini. Under the Tools menu choose the following for the board:

Board: Arduino Pro or Pro Mini

Processor: ATmega328P (3.3V, 8 MHz)

To get started immediately, use the example code and library files below.

PapaSoundie::playRepeat(int number) - Plays the audio files associated with the number repeatedly.

PapaSoundie::stopRepeat() - Stops playback of repeat function.

Install FTDI Drivers

To upload with an FTDI, make sure the FTDI drivers installed. Depending on your computer’s operating system, you will need to follow specific instructions. Please go to How to Install FTDI Drivers, for more information.

sfx is the constructor to instantiate the PapaSoundie class. You can name this constructor whatever you’d like.

Hardware Example Project: The Gag

I’ve been having too many “customers” coming through my office lately so I thought of creating a deterrent. The project senses when someone walks through my door and plays the quintessential convenient store bell. A counter keeps track of the number of customers and when it reaches 100 a cheering and clapping audio file is played and a bag holding balloons and confetti is untied by a servo motor releasing a party on the unsuspecting coworker.

The Game Plan

For this project you will need the following the parts:

Hardware Hookup

The Fritzing diagram below provides the wiring for the project:

Having a hard time seeing the circuit? Click the image for a closer look.

Solder and wire the circuit together.

When the PIR sensor detects movement, the Papa Soundie plays the respective audio file under the conditions set. When the 100th customer enters, pin 10 is sent HIGH. Pin 10 is attached to the Servo Trigger. The servo is used to pull the loose string which holds the bag holding the balloons and confetti closed. Here’s a picture of the circuit mounted above the door.

It’s not pretty but it works!

Example Sketch

Copy and paste the following code into the Arduino IDE. Hit upload, and see what happens! Make sure to select the correct board and COM port when uploading.

The Coup De Grace

This project was in no way a deterrent to keep people from entering my office; in fact, it was the opposite.

What’s worse, I was left with the mess. On second thought, this would make a great feature to any party.

Troubleshooting

Papa Soundie Not Working?

Try reformatting your SD card, making sure your audio files are in the correct format, and that your Arduino Sketch doesn’t have any issues. If that doesn’t work you can reflash the VS1000D with the firmware provided in the project files and on github using VSIDE.

In 2003, CU student Nate Seidle fried a power supply in his dorm room and, in lieu of a way to order easy replacements, decided to start his own company. Since then, SparkFun has been committed to sustainably helping our world achieve electronics literacy from our headquarters in Boulder, Colorado.

No matter your vision, SparkFun's products and resources are designed to make the world of electronics more accessible. In addition to over 2,000 open source components and widgets, SparkFun offers curriculum, training and online tutorials designed to help demystify the wonderful world of embedded electronics. We're here to help you start something.