Simplest way to interface with an MP3 player?


I'm creating a piece of sculpture that will need to play some audio in response to the viewer interacting with the piece. I might have ~100 different ~30 second clips so I figured the easiest way would be to have an arduino interface with an mp3 player - just being able to cycle through the files in order would be good enough but playing a random track would probably be better. Maybe the files are on the mp3 player (especially if i cop out and use the ipod idea below) or i'd store them on an SD card if it fits into the final solution.

This piece will be installed outdoors and all power is coming from a solar panel -charged 12v battery, so a PC is out. I'm hoping it will be weatherproof but you never know so I'm also trying to find something relatively cheap. I've seen plans for mp3 players and I'm not totally against building something but I just thought that there's probably already some minimal tiny player out there that I can use for this. It also has draw its power from the 12v battery and it needs no LCD display, etc. I suppose I could find an iPod shuffle with a broken screen (for cheapness), a car power adapter to connect it to the 12V battery, and have some kind of solenoid push the buttons... but I know you guys will have a better idea.... :slight_smile:

Thanks for any pointers..

BTW, this same piece will involve people leaving audio messages that will be played back at random times in the future so I'll probably have questions about how I'll get the arduino to talk to one of these:
(to allow both the recording of audio and the random playback like with the mp3 player as above - actually the arduino will be playing random mp3s and interspersing the recorded audio messages in with them). Another thread I guess. :slight_smile:

Actually, this ipod thing doesn’t seem to be such a crazy idea now that i’m looking at this:

Our arduino serial pins are already at TTL level, no? Or do I still have to translate to RS-232?


As long as you don't use the DB9 connector through a level converter, i.e. the SIL connector on the board, like the Arduino NG, then they are at TTL level.

MAKE sells an open-source MP3 Player kit for $115.00 that is fully documented and easy to control from other electronics.

awesome thanks for the TTL info and also for the daisy link. good to know about that player but it’s way out of my budget considering there’s a 10% chance that weather or vandals could keep me from retrieving the parts of this public piece after its 6 month stay outdoors. if i can get an ipod for < USD$20 i wouldn’t cry if i didn’t get it back. :slight_smile:


look in the 'playground'.. there is a tutorial there on using optoisolators and to hack and control an IPOD remote. The downside is you only get volume and next/previous track control.


Thanks, I knew I saw something like that somewhere before. I'm in the process of getting a hold of an ipod and if I come up with a neat library for controlling all of the ipod features via the rx/tx pins in the ipod dock connector port i'll post it. Shouldn't be too hard, even for a complete mc novice like me. :slight_smile:

The ipod is at 3.3 volts as i remember, and the arduino is 5 volts, take this in to consideration before you fry your ipod.

That first link gives the details on the remote control and this one shows the pinout of the dock connector:

(it's in this month's issue of Nuts and Volts also)

As far as I can tell, the serial pins are TTL (that's always 5v right?). Pin 18 is 3.3V, USB power is at 5V and the firewire power is actually 12V.

I'm hoping that I can connect the firewire +12V/GND pins to the 12V battery that's going to be in the sculpture (i'm sure it's not that simple right?). Use the serial pins to communicate from the arduino over the serial pins at TTL levels and finally hijack the audio out lines to go to several speakers on the sculpture. Not sure if I'm making sense but it seems logical to me?

Also, related to the audio out lines going to several speakers - I'm going to try it but maybe you all know already.. I was planning on building simple LM386 amplifiers for that output and I'm wondering if I would split the audio outputs and send that to say 5 separate simple amplifiers for 5 different speakers?


I was planning on building simple LM386 amplifiers for that output and I'm wondering if I would split the audio outputs and send that to say 5 separate simple amplifiers for 5 different speakers?


The LM386 is puny-- enough to reasonable drive perhaps one three-inch speaker. It also has a very high distortion spec.
If you need to drive multiple speakers you'll need multiple small amplifiers, or just one bigger amp with the speakers in some combinaton of series-parallel. If you do use the 386's, make sure you have something like a 500 Uf and .1Uf capacitors located near each chip's power supply pins.


Interesting.. I made an amplifier with the LM386 last week (my first real from-scratch project i guess) and it was pretty loud with a 5" speaker that I used. And that was with the volume pot very low and using the minimum gain! In this case, the speakers will be small so it should definitely work.

I've built some of the LM386 guitar circuits out there and they can often drive a 12" speaker in a guitar cabinet. Aside from lots of distorion, a 386 is surely capable of driving a couple small-midsized speakers.


yes the 386 is pretty versatile… my point was just that while it is cheap, it is a very low grade, high-distortion amplifier that loves to go into self-oscillation. As amplifiers go, it is the bottom of the pile. There are so many better amps for a little more money… like the $7 LM3875 that gets used in the audiophile monoblock amplifiers like this one.

The 386 is not the kind of amp that likes to be involved in a big network or complex load either… yesterday I was helping a friend with matrix of sound samplers built with twenty 386’s, each with its own speaker. Without good bypassing the 386’s were going into self-oscillation. We added about few dozen capacitors to the network of 20 amplifiers and it sounded OK, but still like a vast array of transistor radios!

The 386 is like sort of the “margarine” of the audio amplifiers… looks like the real thing and it’s cheap, but tastes terrible.


Here is the power vs distortion graph for a 386, from the National web site. It’s very fast-- from 0 to 10% distortion in only 350 Milliwatts :slight_smile:

PS on the original topic, I noticed there is an article in the current “Nuts and Volts” on serially interfacing an IPOD. It is not the greatest article, but there might be some info ion it that would be of use to you.


depending on how soon you need it ftdi have something on the way that you might find useful

(I also posted about the data logging capability of this on another post - I won't mention it again, promise)



That's cool - it would be really nice for this project and it looks like it's available now but there's not enough technical info about it yet.. the datasheet just has a diagram of the board. The website says that it uses the VDIF command set (presumably with some extra commands like PLAY or something) but the VDIF docs don't have the VMUSIC1-specific commands in there yet. Someone on the avrfreaks forums said he got one already but now he's finding the same thing - there are no docs.

On the page

there is more documentation including a link to

which has the VMUSIC commands on page 13


its now showing up in their shop

I bought two last week.. haven't gotten them just yet.

It seemed like a better solution than the ipod for this case.
I couldn't find a dirt cheap ipod - everyone wants to buy them to fix em so even ones with cracked screens, broken hold buttons, broken earphone jacks, etc go for more than a VMUSIC1.
Also, it will draw less power and after this piece is taken down, I'll be able to use the VMUSIC for things other than playing music because of its writing capabilities.
Lastly, it's smaller than an ipod and that size difference actually matters for this application.

BTW, there's an article about using the VMUSIC1 to make an mp3 player in NUTS & VOLTS this month.