Go Down

Topic: Simplest way to interface with an MP3 player? (Read 3307 times) previous topic - next topic

Hi,

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.... :)

Thanks for any pointers..
Rob

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: http://tinyurl.com/2evqal
(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.  :)

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

http://www.ipodlinux.org/Serial_Port

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

Thanks,
Rob

Phooto

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.

chris_s

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

http://www.makezine.com/daisy/

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.  :)

rob

Daniel

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.

D

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.  :)
rob

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:

http://www.ipodlinux.org/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?

Rob

Daniel

#9
Feb 07, 2007, 07:40 pm Last Edit: Feb 07, 2007, 07:44 pm by Daniel Reason: 1
Quote
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?


hi

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.

D

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.  
rob

adammokan

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.
flannel enthusiast, software developer, audio mangler, electronics geek, gangplank anchor, and father of two boys

Daniel

#12
Feb 21, 2007, 12:07 am Last Edit: Feb 21, 2007, 05:29 am by Daniel Reason: 1
Hi

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.  

D

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 :)


Daniel

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.

D

nick

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

http://www.vinculum.com/prd_vmusic1.html

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

HTH

Nick

Go Up