Physical Computing

Readings

Links

Arduino.cc Links

Class Websites



















(:source lang=arduino_cpp :)[@
image upload pmwiki-2.2.72, 2002072

 edit SideBar
Devices/WaveShield

Adafruit Wave Shield

The Wav Player combines an Arduino with the functionality built into the Wave Shield, with an added audio amp. The Wave Player plays uncompressed 16 bit, mono, 22050 sps, wav files. It's not CD quality but it sounds pretty good if you the played files are formatted correctly. It can change the playback speed, and also replay files very quickly, giving it some elementary special effect and music-making abilities.

Adafruit Wav shield web site
The Wave Shield is a unit that can play audio (specially formatted .wav) files - and it can be controlled by the Arduino.

from the Adafruit website:
"Adding quality audio to an electronic project is surprisingly difficult. Here is a shield for Arduinos that solves this problem. It can play up to 22KHz, 16bit uncompressed audio files of any length. It's low cost, available as an easy-to-make kit. It has an onboard DAC, filter and op-amp for high quality output. Audio files are read off of an SD/MMC card, which are available at nearly any store. Volume can be controlled with the onboard thumbwheel potentiometer."
Note however that this is NOT CD-quality sound, and that there other digital sound players that higher quality sound output.

Building the Board!

Tips

Before you begin building the board, I have a few tips that might avoid heartbreak for some students. These are places in which students have traditionally made mistakes putting together the kit.

  1. There are two eight-pin chips in the kit. They look very similar. If you get them mixed up, your kit is guaranteed not to work.
  2. Likewise all three chips have some kind of marking on them, that is matched up with the notch on the board silkscreen. If you get a chip in, in the wrong direction, the board will not work.
  3. Read the text (instead of just looking at the pictures). This will help you get the resistors in the correct place.
  4. It will save you a bit of work if you use wires from your 140 wire kit for the five-wires shown below:

    Detail of the 5 wires. You may find appropriate wires in the 140 wire kit.


  5. We are making two small changes from the suggested Adafruit build. It will be useful to create the parts you will use for these changes now. In your box you have a strip (1x40) of female headers. Cut off three, two-pin female headers. This will involve sacrificing two pins of your female header. To make a two pin header, with your flush cutters, cut in the middle of the third pin (sacrificing it). Then clean up the edges with flush cutter. As you can see in the photo below the edges don't matter a great deal. Here's a picture:
  6. Insert two, two pin female headers in the places below. Don't do this first - but remember not to put anything in the two holes by the audio jack. Here is a picture of how it will look with headers in place.
  7. At this point, go ahead and build the wave shield, please read the directions as well as look at the pictures. Adafruit's step by step guide to building the Wav Shield.
  8. When you are all done with the Wave Shield, build the Modern Device Audio Amplifier in your kits, in the manner illustrated below. You will use the third female header as shown in the speaker holes.
  9. Here's how it looks all together on the Educato board. Make sure you line up the Ground, and 5V pins when inserting the amp into the shield.


What pins are used by the shield?

  • The Adafruit Wave Shield uses 2,3,4,5,10,11,12,13.
  • This means that pins 6, 7, 8, 9 and A0, A1, A2, A3, A4, A5 are available for your purposes (sensors, switches, pots, LEDs etc).

Do I need any special software libraries in order to make the Wave shield work?


Where do I install the WaveHC library that I downloaded?

While you are at it, you may wish to install the sound files in the wavehc20110919 folder on your SD card.

How do I format for the SD card?

  • Use this official SD card formatter.
    OR
  • Using the Mac 'Applications/Utilities/Disk Utility' program on your Mac
    • Please be careful and make sure you know that you have the SD card selected before proceeding.

Converting Files To The Proper Format and Recording Your Own Material

Required File Format

  • 22050 sample rate max (units may be either hertz or sps (samples per second)
  • mono (NOT STEREO)
  • 16 bit uncompressed .wav file

Converting Files

Is there any special format for the file names of individual sound files?

  • File names have an limit of 8 characters and 3 extension characters e.g. "TRUMPETS.WAV"
    • No non-alphanumeric characters!


Do you have any example wav files that I can use?'''

What is on my SD Card ?


Are there example sketches for using the Adafruit Wave Shield?

  • There are six examples in the WaveHC library that may be accessed via Arduino IDE -> File -> Examples -> WaveHC
  • This page is getting fairly long so all of the Wave Shield sketches have moved to the Code & Tutorials Page


What pins can I use for my sensors and other outputs?

Are there any sensors or actuators that I CANNOT use with the Adafruit Wave Shield?

  • CapSense may require some tweaking as the Wave Shield uses most of the Arduino's processing power and resources.
  • The Arduino Servo library uses the same hardware timer as the Wave Shield, so it won't work. Ask about workarounds for using servos.
  • No PWM on PIN 9. Pin 9's PWM is also generated by the hardware timer (timer 1) that the Wave Shield uses.
  • see the Adafruit Wav shield FAQ for more info

What are my sound output choices for the Adafruit Wav Shield?

  • You can use the built-in headphone jack with headphones or an external amplifier.
  • You can use the audio out pins directly (just behind the audio jack) with a speaker. The volume level is only moderate.
  • You can use a Modern Device audio amplifier for higher volume portable use.


Alternative Build formats:

Edit - History - Recent Changes - Search
Page last modified on December 10, 2016, at 07:08 PM