Codec Shield

The Open Music Labs Codec Shield gives your Arduino (or Maple) development board access to the all of the audio processing power of the Wolfson WM8731 codec. The WM8731 is a low-power stereo audio codec with stereo 24-bit multi-bit sigma delta ADCs and DACs which are used with oversampling digital interpolation and decimation filters. Thanks to the variable sampling frequency of the codec, even the relatively slow Arduino can grab and alter audio in real-time.

The Codec Shield breaks out all of the useful pins on the WM8731 including the mic, line-in and out, headphone, and midrail bias voltage pin. It also has 1/8" stereo input and headphone out jacks as well as a pair of potentiometers for modulating parameters in your code.

The shield uses SPI to communicate with the WM8731 so it won't work directly with the Arduino Mega, but getting started on an Arduino-UNO style board or LeafLabs Maple is easy! Just download the library and example code, hook up and audio source and start tweaking.

Obviously you don't have much time to execute code between audio samples, so your code will need to stay pretty slim, but the example code gives a great framework for how your code should flow. Open Music Labs claims a performance increase of 4x when running the shield on a Maple (thanks to the higher clock speed).

  • Wolfson WM8731 Codec
  • On-board 5V to 3.3V Level Translator
  • Mic, Line-in and out, Headphone, and Midrail Bias Voltage Pins Broken Out
  • 1/8" Stereo In and Out Jacks
  • Single Pole Analog Input Aliasing Filter
  • 2 Potentiometers On-board for Modulating Code
  • Stereo 24-bit Multi-bit Sigma Delta ADCs and DACs
  • Arduino and Maple Libraries and Code Available!

Codec Shield Product Help and Resources

Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

3 Programming

Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • chipaudette / about 12 years ago * / 5

    I have used this board. It's great. I've used it as an audio interface, as a DC-coupled analog signal interface, and as a home-brew keyboard synthesizer (using the Sparkfun Midi shield to connect to my actual keyboard). This codec shield is pretty sweet. A couple of notes, however:

    1) The arduino doesn't have much horsepower for processing audio in real-time. I didn't realize how slow it was until I started trying to process audio. Wow. If you're thinking of doing anything remotely complex with the audio signals, you'll be stuck running this shield at the lowest sample rate (~2kHz) because the Arduino just can't keep up. Yes, the demo code runs nicely at higher sample rates on the Arduino, but anything complex will likely be too much for the Arduino...you'll have to run the codec slower. Sure, many of you are probably more efficient coders than I am, but for the everyday mortal out there, don't expect the Arduino to become a pristine studio-grade audio processor running 24-bit at 44 kHz. You'll need to step up to the Maple to do anything serious.

    2) The maple works great with this shield except that you need to disable the USB serial stream. In my opinion, this is a very serious and important thing to know before you jump in. Thankfully, the example code includes the proper disable command (which is great), so the device does work properly directly out-of-the-box. But, without the USB serial link, how do you send messages to the PC to debug your code!?! You won't be able to do that here. Apparently, there's some sort incompatibility on with the Maple itself. So, if you're using the Maple, be aware that you'll lose your USB serial. That's painful. A work-around is to use one of the Maple's regular (non USB) serial streams to talk to a 2nd Maple (or to talk to an Arduino) and then to have that 2nd device echo your text to the PC over its USB link.

    As long as you're aware of the two issues above, the Audio Code shield is a really great product. And I think that the price is fantastic.

    • Member #149642 / about 9 years ago / 1

      I tried to compile the example for arduino due but the file just wont compile it just gets stuck in the compilation and keep compiling for ever.Can you tell me whats wrong and how do I compile the examples for arduino due?

    • Member #202238 / about 12 years ago / 1

      Once a sketch has been uploaded to the Maple that disables the USB like this, do you know how to recover the Maple from this so it can talk over USB again? Every time I plug in my Maple now, it immediately loads this codec shield program - and putting the maple into eternal bootloader mode doesn't seem to work (just makes it appear as a libusb device, but doesn't create a COM port).

  • Member #134947 / about 10 years ago / 2

    just a heads up, if you're trying to do anything with audio sampling/delay type effects without much effort/extra circuitry you should check out the audio hacker shield from nootropic design. The audio quality is lower, but not unusably so. The Maple (which this has libraries for) is also very difficult to use on Windows. I guess the bottomline is to research before you purchase either.

  • Member #394014 / about 11 years ago / 2

    Will a DUE play audio beautifully through this? its 12 bit audio isn't good enough fro me I think, I need 16+

  • AdrianFreed / about 12 years ago / 2

    If you are using a smaller Arduino so you don't need the shield format you can buy the MIKROE-506 from Mouser for $20 with the same chip WM8731

  • thetoymaker / about 12 years ago / 2

    I was wondering if i could use this shield to do some real time processing on human voices recorded through a mic ? Like amplifying specefic frequency ranges ...

  • Member #149642 / about 9 years ago / 1

    I tried to compile the example for arduino due but the file just wont compile it just gets stuck in the compilation and keep compiling for ever.Can some one tell me whats wrong and how do I compile the examples for arduino due?

  • Member #608935 / about 10 years ago / 1

    What is the lowest data rate coming out of this codec on this board? Thanks!

  • Member #305593 / about 10 years ago / 1

    Can it be utilesed for midi interface?

  • Member #305593 / about 10 years ago / 1

    Can it be utilesed for midi interface?

  • Member #30085 / about 11 years ago / 1

    In the text above, you say "The shield uses SPI to communicate with the WM8731 so it won't work directly with the Arduino Mega..." Could you explain? The Mega can do SPI.

    • MikeGrusin / about 11 years ago / 1

      The Mega's SPI pins are in a different location than the Uno and other 368-based Arduinos.

  • joesugar / about 12 years ago / 1

    I'd like to use this as the front end ADC for a software-defined receiver and noticed the low pass filter on the line-in. Looks like it has a 3dB point of around 17 kHz. If I were to remove C3/C4, anyone have any idea what the input bandwidth on this would be?

  • But will it work with ATRAC3? If it can work with that, you better get more in stock

  • EvilTwin / about 12 years ago / 1

    If you need to do anything more ambitous with this kind of sound processing then the arduino or even the maple can handle, this is when you would consider an fpga platform.

Customer Reviews

No reviews yet.