Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
09.02.2010 at 16:44:24
News: Server upgrade went fine, you are now at the new system


Pages: 1 2 
Simplest way to interface with an MP3 player? (Read 5807 times)
rahji aka rob
YaBB Newbies
*
Offline



Posts: 16
massachusetts
Gender: male
Simplest way to interface with an MP3 player?
06.02.2007 at 16:40:51
 
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.... Smiley

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.  Smiley
Back to top
 
 
View Profile   IP Logged
rahji aka rob
YaBB Newbies
*
Offline



Posts: 16
massachusetts
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #1 - 06.02.2007 at 17:29:43
 
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
Back to top
 
 
View Profile   IP Logged
Phooto
YaBB Newbies
*
Offline



Posts: 12

Re: Simplest way to interface with an MP3 player?
Reply #2 - 06.02.2007 at 17:55:57
 
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.
Back to top
 
 
View Profile | WWW | AIM   IP Logged
chris_s
YaBB Newbies
*
Offline



Posts: 11

Re: Simplest way to interface with an MP3 player?
Reply #3 - 06.02.2007 at 18:03:58
 
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/
Back to top
 
 
View Profile   IP Logged
rahji aka rob
YaBB Newbies
*
Offline



Posts: 16
massachusetts
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #4 - 06.02.2007 at 18:19:55
 
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.  Smiley

rob
Back to top
 
 
View Profile   IP Logged
Daniel
Ex Member




Re: Simplest way to interface with an MP3 player?
Reply #5 - 06.02.2007 at 18:43:58
 
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
Back to top
 
 
  IP Logged
rahji aka rob
YaBB Newbies
*
Offline



Posts: 16
massachusetts
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #6 - 07.02.2007 at 00:26:30
 
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.  Smiley
rob
Back to top
 
 
View Profile   IP Logged
karlcswanson
YaBB Newbies
*
Offline



Posts: 36
Chicago IL
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #7 - 07.02.2007 at 17:11:11
 
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.
Back to top
 
 
View Profile   IP Logged
rahji aka rob
YaBB Newbies
*
Offline



Posts: 16
massachusetts
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #8 - 07.02.2007 at 18:59:00
 
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
Back to top
 
 
View Profile   IP Logged
Daniel
Ex Member




Re: Simplest way to interface with an MP3 player?
Reply #9 - 07.02.2007 at 19:40:42
 
rahji aka rob wrote on 07.02.2007 at 18:59:00:
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
Back to top
 
 
  IP Logged
rahji aka rob
YaBB Newbies
*
Offline



Posts: 16
massachusetts
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #10 - 08.02.2007 at 00:00:48
 
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
Back to top
 
 
View Profile   IP Logged
amokan
YaBB Newbies
*
Offline



Posts: 11
Chandler, Arizona, USA
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #11 - 20.02.2007 at 22:47:27
 
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.
Back to top
 
 
View Profile | WWW   IP Logged
Daniel
Ex Member




Re: Simplest way to interface with an MP3 player?
Reply #12 - 21.02.2007 at 00:07:30
 
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 Smiley

Back to top
 
« Last Edit: 21.02.2007 at 05:29:11 by Daniel »  
  IP Logged
Daniel
Ex Member




Re: Simplest way to interface with an MP3 player?
Reply #13 - 21.02.2007 at 00:21:46
 
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
Back to top
 
 
  IP Logged
nick
Full Member
***
Offline



Posts: 108
london
Gender: male
Re: Simplest way to interface with an MP3 player?
Reply #14 - 21.02.2007 at 13:22:38
 
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
Back to top
 
 
View Profile   IP Logged
Pages: 1 2