getting a 386 amp speaker to play with a button press

Hey, so I'm doing my final project for one of my courses, and I'm trying to integrate arduino button presses into a two simple 386 amp speakers I built. The idea is that the 386 amp speakers will be hooked up to an MP3 or phone or something playing a song on loop, but I only want them to play the song when the button is pushed, using the Arduino to keep the audio on for a limited time, and then turning off till the button is pushed again. I'm figuring you can use the button LED exercise and modify it a little to work its way into this, but I'm not exactly sure how. Uh, also, for some reason my button has only two wires, as opposed to four, and I'm wondering how this will affect the project. Please answer soon, my project is due monday.

Are you wanting to control the MP3 player or simply turn the amp output on or off?

If the latter, simply use a relay in series with the audio path.

Weedpharma

also, for some reason my button has only two wires, as opposed to four

Push buttons only have two wires. Those with four connections have one wire connected to two of the connections, it is just for mechanical stability.

Please answer soon, my project is due monday.

Are you sure? A weekend is not normal for a final project, mabe you had it a long time and only just started now?

weedpharma: Are you wanting to control the MP3 player or simply turn the amp output on or off?

If the latter, simply use a relay in series with the audio path.

Weedpharma

I only want to control the amp output. The MP3 will be working constantly, but will only be heard when the button is pushed.

Grumpy_Mike: Push buttons only have two wires. Those with four connections have one wire connected to two of the connections, it is just for mechanical stability. Are you sure? A weekend is not normal for a final project, mabe you had it a long time and only just started now?

We had two weeks, in which I built the amp/speakers, built mounts, painted those mounts, composed the song on the MP3 player, and made an animation to go with the song. This is the final part of the project, and I am running out of time. Thanks for mentioning the push button information, I was confused about that.

but I only want them to play the song when the button is pushed,

Do you want the song to start from the beginning when the button is pushed? For that you will need an MP3 shield. Otherwise the simple way to do it is just to pass the input signal through a relay that the arduino energises for a short time. There will probably be clicks when this happens.

Grumpy_Mike: Do you want the song to start from the beginning when the button is pushed? For that you will need an MP3 shield. Otherwise the simple way to do it is just to pass the input signal through a relay that the arduino energises for a short time. There will probably be clicks when this happens.

I just want it to play, I don't need it to play from the beginning. I actually based this piece specifically on not needing the shield, because there was no way I would be able to order that solder that together and still have time for everything else. I'm still not sure about connecting the relay to the speakers though. Is there a pin on the 386 I'd need to connect it to?

The relay contacts you need are NO, and Common. NO means normally open. You connect the audio output of your MP3 player to NO and the input of the amplifier to Common. So normally no sound will be output. Note you still need the ground connected through. Then you connect the relay coil to a transistor and the transistor's base through a1K resistor to the arduino output. Google for an arduino relay circuit, yes you need that diode.

Then turn on the relay as you would an LED.

Okay, actually, I think that makes sense. I'll come back here if I have any more questions.

Thanks for all your help!