Kit Review – adafruit industries waveshield kit

Hello readers

Today we are going introduce another useful kit from adafruit industries – their waveshild Arduino shield kit. The purpose of this shield is to play audio files sourced from a computer, at the request of an Arduino sketch. It is an interesting product in that it meets one of the needs of the original concept of Arduino, that is:

… It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. (arduino.cc)

Yes – yes indeed. For a while I had seen this kit, and though that there wasn’t much point to it. But if you spend a few moments contemplating how the control of sounds or recorded voice could be used, suddenly you have a “light bulb moment” and come up with all sorts of things, both crazy and sensible.  Once again, this kit arrives in typical adafruit packaging, a simple reusable antistatic bag:

bagss

and emptying the contents onto the desk reveals the following:

partsss2

And before anyone asks me, no the parts don’t arrange themselves as they fall out of the bag. If they did, we’d have some much larger problems in the world. At first glance I was worried that not all of the parts had been included, however this is kit version 1.1, and there will be empty spaces on the PCB. Speaking of which, once again it is a nice thick, solder-masked and nicely silk screened PCB.

The pre-assembly checklist, assembly instructions and all other documentation and required software links can be found on the adafruit website. After checking off the included parts against the adafruit bill of materials, it was time to start. You will need a few extra things, for example a speaker if necessary, an SD memory card (up to one gigabyte in size) – and in my case two 8-pin IC sockets. When you live in an area where finding specialised ICs is difficult or just time-consuming, IC sockets are very cheap insurance.

The first item to solder in is the SD card, and this is a surface-mount part. But don’t let that worry you, it ‘clicks’ into the PCB, and you then just hold it down with one hand while holding some solder, and with the other hand heat each pad for two seconds and let some solder flow over the pads:

smd_sdss

And you don’t need to solder in the last three, narrower contacts of the reader – they are not used. Everything else is standard through hole, nothing much to worry about apart from burning yourself while listening to the radio. Except for one resistor, R6 – the one next to IC4. If you solder in the resistor first, even though it sits normally – it is about one millimetre too close to the IC. So if you are going to assemble this, solder in IC4 before R6:

resisprob

However it isn’t anything to panic about, just something to keep an eye out for. Moving forward, everything else went in easily:

gettingtheress

The last basic soldering to take care of is the expansion pins for the shield to able to mate with other shields. The easiest way to solder these in is to first drop the new pins into an existing, matching board – as such:

pinsbeforess

Then drop the waveshield on top of the pins and solder away:

almostfinishedss

And finally, some links from the circuit to the digital pins… Then lo and behold, we’re finished:

finishedss3

During the initial testing and experimenting, I was going to use a set of earphones to listen to the output, however instead ended up installing a small 0.25 watt 8 ohm speaker. The solder pads for the speaker are between the rear of the headphone socket and C9. If you decide to use both headphones and a speaker, the circuit is designed in such a way as the headphone socket will cut off the speaker when headphones are in use. adafruit also sell the waveshield party pack which includes a memory card and speaker to save you shopping around.

Note that this shield will need digital pins 2~5 and 10~13 – as noted in Jon Oxer’s new website – shieldlist.org.

Now that the hardware has been taken care of, let’s get our Arduino talking and grooving. The first thing to do is install the wavehc library into your Arduino IDE software. The library and related buffering use a fair amount of memory, so if you are running an Arduino with the old ‘168 MCU, it’s time to find the $6 and upgrade to the ATmega328.

Next, visit the tronixstuff file repository. Download the waveshieldtest.pde sketch; and also download this audio file onto the SD card. Finally, insert the SD card, upload the sketch, insert your headphones and the board should play the file. Don’t forget to turn the volume up a little, yours may be set to off by default.

Now that we know it is working, it is time to examine how we can control things in more detail. The most important thing is to have your .wav sound files in the correct format. The maximum sampling rate is 22 kHz, depth of 16-bit, and in mono PCM format. You can download an open-source audio editor package to do the conversions for you here. ladyada has also written a good conversion tutorial for you here.

Apart from converting audio files for playback, if you want to get some backchat you will need to find a speech-synthesiser. You can make use of the AT+T Labs Natural Voices (R) Text to Speech demo website for this. Just enter some text, and then you can download the .wav file:

att_speechss

Now let’s have a quick look at how we can play files on demand, to let our own projects make some noise. Please download the sketch waveshieldtest2.pde. Although there is a large amount of code in there, what we’re interested in is just the void loop(); function. To play a .wav file, such as “wisdom.wav”, just use

So you can just mash that sketch and your own code together to get some files playing, however don’t forget your attributions to the original authors. Here is a … longer demonstration of waveshieldtest2.pde:


You can purchase the waveshield kit directly from adafruit industries.  High resolution images are available on flickr.

As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts. Or join our Google Group.

[Note – The kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

The following two tabs change content below.

John Boxall

Founder, owner and managing editor of tronixstuff.com.

11 Responses to “Kit Review – adafruit industries waveshield kit”

  1. Marcel says:

    I’ve had one of these for aaaaages.

    My project s a musc jukebox for my wfe’s toddler group. I put t all together when I frst got the wavesheld kt but came to ground when I realsed that I needed more pns on the Arduno for more selecton buttons — she needs somethng lke 16 buttons so the project got shelved. (well, knda. It actually became an 8 button controller for a jukebox app wrtten n Drector and runnng on an old Mac laptop)

    Untl now! The game s back on snce I’ve been gettng nto shftIN and shftOUT chps that allow me multples of 8 buttons and 8 LEDs off just three Arduno pns! (as you know).

    Presently I’m sourcng buttons. Nce bg buttons wth LEDs bult n cost a fortune so I’m tryng to look for salvage optons. An old Sony vdeo swtcher turned up at our scrap yard yesterday – the buttons are great but there’s only 8 of them plus red and green ones for on/off. I could do a sort of ‘two banks of eght’ arrangement but that’s not as mmedate as 16 ready to go buttons. The search contnues.

    [m]

    • John Boxall says:

      H Marcel
      Good on you for re-usng the old Sony gear. I must admt sometmes t us just easer tp use the Mega when the extra /o s needed, but I feel lke a cheat when thnkng that way!
      Your shftIN/shftOUT soluton s a wnner though. Nce one.
      enjoy the weekend
      john

  2. Tom says:

    H John,

    Good revew. Gettng a WAV fle to play was one of the frst thngs ever dd on a mcrocontroller. Except just hard wred a par of ear plugs to the outputs on the mcroconroller and read straght off an SD card. Used the propeller mcro to get the 44kHz n 16bt stereo. Worked well except t sounded very “raw” and scratchy. But when connected to my home amp t was perfect.

    So I’m wonderng that WAV sheld must smooth the audo slghtly.

    You should also try the VS1002 MP3 chp. That worked very well.

    • John Boxall says:

      H Tom
      Thanks for your comments. The wavsheld s somewhat more basc, I chose t for a talkng clock project I’m slowly makng… t just has to read out the numbers and “Hey, wake up!” etc. You’re rght about the VS1002, I have been thnkng about gettng one of these http://bt.ly/9kZ0g9. The problem s too many thngs to do, not enough tme :)
      cheers
      john

  3. Forrest says:

    I lke Yyour revew! I was wonderng could the arduno be multtasked? I mean, could you use an expanson sheld to control servos whle beng a jukebox? or s that wshful thnkng?

    • John Boxall says:

      Perhaps, t depends on what you need to accomplsh. For example, f your sketch tells the wavesheld to play a tune, the wavesheld wll do so and the arduno sketch can carry on and do other thngs (such as run servos). Some careful programmng should see your dea be a success. Best bet s to try a wavesheld for yourself and experment wth t.
      Cheers
      john

  4. Nicola says:

    I’ve run the wavesheldtest.no sketch (the sketch extenson has changed from pde to no due to the new update) and I get the followng error message:

    Wave test!
    Free RAM: 656
    Card nt. faled!

    SD I/O error: 1, 0

    Ths suggests that t’s stoppng when t get to ths part of the code:

    // f (!card.nt(false)) { //play wth 4 MHz sp f 8MHz sn’t workng for you
    f (!card.nt()) { //play wth 8 MHz sp (default faster!)
    putstrng_nl(“Card nt. faled!”); // Somethng went wrong, lets prnt out why
    sdErrorCheck();
    whle(1); // then ‘halt’ – do nothng!
    }

    I do not understand why as I have formated the SD card to be FAT 16 and used the gven audo fle.

    Can anybody help or shed any lght on ths? and what does card.nt mean?

    • John Boxall says:

      The sketch may be ncompatble wth v1.0… there were many changes made from v23>v1.0. Try t agan n v23. If that fals, ask for help n the adafrut.com support forums.

  5. Justin Things says:

    I bought ths sheld but was not happy to fnd that even the most basc sketch used around 1400 bytes of the ardunos 2k of SRAM.

    Cant get much else done usng ths sheld. A cheaper and better opton would be usng the ‘Rugged’ brand Audo sheld, or the BeatVox sheld by the same company.

    Of course now you could also easly use the VS1053 breakout kt avalable at http://www.adafrut.com/products/1381 . It even costs the same as the now very ancent wave sheld.

Trackbacks/Pingbacks


Leave a Reply

Subscribe via email

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

Für unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: