# Arduino and sound playback



## jjm2958 (Jul 11, 2009)

So, here's the deal-io. I'm working on a project using an arduino board. The objectives are to use an arduino board connected to a "regular" mp3 player with its audio out/headphone jack connected to speakers. 

1. The idea would be for the arduino to trigger a connection which would complete the circuit between the headphone jack and the speaker (the mp3 player theoretically would be playing a looped sound, but you wouldn't hear it because the connection between the headphone jack and speaker is open.). I don't want to have to hack the mp3 player if at all possible - which is why I mentioned using the audio out connector.

Any thoughts on how to accomplish this? Someone had mentioned a MUX to switch off the speaker, but they didn't elaborate much so I'm a bit lost.

OR

2. Still centering around an arduino but not using an MP3 player, is there way to build a (very) simple circuit from standard component parts that would interface with the arduino and play back a sound file (either from on board flash or better yet, an SD card)?

Ideally, I like 2. if there is a pretty simple circuit that could be made.

Any takers?


----------



## Mr_Chicken (Nov 26, 2008)

there is a sound board available for the arduino. I haven't used it, but I imagine it would make this much simpler


----------



## jjm2958 (Jul 11, 2009)

Mr_Chicken said:


> there is a sound board available for the arduino. I haven't used it, but I imagine it would make this much simpler


Hey Mr. Chicken - yes, I've seen a few external boards available and agree that it would be eaiser to buy one. I was just trying to see if it would be possible (and relatively easy) to create something with basic component parts or get the audio out to speaker thing working...either way.


----------



## DarkLore (Jan 25, 2009)

If I understand this thread correctly - you want to trigger a circuit which will close the audio loop to make a sound play. The linked thread, Trigger, details a very cheap sensor circuit used to close a circuit loop. It acts as a switch....I don't see why it wouldn't close the loop on audio. I don't know if that helps but I think you are looking for something similar.


----------



## jjm2958 (Jul 11, 2009)

DarkLore said:


> If I understand this thread correctly - you want to trigger a circuit which will close the audio loop to make a sound play. The linked thread, Trigger, details a very cheap sensor circuit used to close a circuit loop. It acts as a switch....I don't see why it wouldn't close the loop on audio. I don't know if that helps but I think you are looking for something similar.


Cool, thanks! I'll check it out...


----------



## HomeyDaClown (Oct 3, 2009)

Two things come to mind,

First if you've got a standard Arduino board, use a an audio shield like this:
http://www.ladyada.net/make/waveshield/ Lot's of people using these so there's lot's of support.

Second, just drive a simple relay from any Digital Out pin setting the pin high or low in your sketch. You can do as you say "switch the audio line on and off" or use the relay to control power to PC speakers. Schematic is here: http://www.arduino.cc/playground/uploads/Learning/relays.pdf


----------



## JeffHaas (Sep 7, 2010)

I've built the Adafruit WaveShield, it does lots of stuff. You can have a whole list of sound files on the flash card and depending on what sensors get tripped or buttons get pushed, the Arduino can play whatever sound you need.

There's also a stand-alone sound board that Sparkfun came out with a few months back:
http://www.sparkfun.com/commerce/product_info.php?products_id=9715
Their "MP3 Trigger" has a TON of functions you can use.


----------



## jjm2958 (Jul 11, 2009)

Cool - got a few things on order. Thanks for all of the suggestions


----------

