Sounding Off Part 3
Building an MP3 Sound-Making Robot
by Gordon McComb
Discuss this article in the SERVO Magazine
forums at http://forum.servomagazine.com.
Ever notice how the robots in movies
like to make noise? Sound helps them
to connect with their human
counterparts — cheery advise,
warnings, whatever. Audible feedback
makes them more interesting. Who
can forget the tweeps and braaps of
R2-D2, the incessant warnings to Will
Robinson by the robot in Lost in
MIDI synthesizer board. This month, you’ll learn how to add
recorded effects to your robot using MP3 digital audio files.
In this installment, I’ll show you how to build the
Musicbot shown in Figure 1. It uses an Arduino and
SparkFun MP3 player shield to play MP3 digital audio files.
The shield contains an MP3 decoder, plus a micro-SD card
slot for storing all your tunes and effects.
There are numerous digital audio formats; I chose MP3
because it’s well-known and easy to work with. MP3 audio
files are compressed, so not only do they take up less space
on the storage medium, they reduce the amount of data
the Arduino must shuttle every second. That means the
Arduino has more time for robotic tasks, like motivating
motors or sensing sensors.
Space, or the nasal-sounding
A Quick Overview of MP3
jabberings of those countless Daleks?
For the last several months, we’ve been talking about ways to add sound to your robot creations. Simple
sounds can be made using just a microcontroller and small
speaker; songs and sound effects are easy using a low cost
First, some basics: MP3 is an audio compression
standard originally created for the MPEG-1 format of low
resolution video. The technical name for the standard is
MPEG-1 Audio Layer III. MP3 was later expanded for use in
MPEG- 2 video which supports higher resolution images.
• Encoding transforms the original digital sound to
a highly compressed form. A number of methods
are used to achieve this compression, including
something referred to as perceptual coding. The
technique leverages a science known as
psychoacoustics which deals with the way the
human ear receives and processes sound. For
example, certain frequencies of sound cannot
(normally) be discerned when accompanied by
FIGURE 1. The Musicbot uses an ArdBotII robot chassis,
Arduino Uno (or compatible) development board, and
SparkFun MP3 player shield.
38 SERVO 05.2012