Pages: [1]   Go Down
Author Topic: Speaker and headphone question  (Read 1757 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am a bit of a noob, so I have a very basic question  smiley-red

I am putting together an Arduino project that is using a small 0.4 amp 8 oHm speaker and a Mono Audio Amp Breakout - TPA2005D1 board from Sparkfun https://www.sparkfun.com/products/11044. I have a 10k potentiometer on the Amp board to adjust the volume. It is working very well. What I was wondering is, is it possible to add a headphone jack for the sound that when the headphones are plugged in, redirects the sound from the speaker's pin to the headphone jack automatically?

Thanks  smiley
« Last Edit: February 03, 2013, 06:45:23 pm by arduinokov » Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1268
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to get a headphone jack that switches when the plug is inserted. These are readily available. Internal contacts allow the circuit to go to the speaker when there is no plug; when the plug is inserted the speakers are disconnected and the headphones connected.
« Last Edit: February 03, 2013, 08:48:08 pm by marco_c » Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply. I didn't realize it was so easy. Is that something that is available from Digikey or similar? I've searched but I'm not sure what terms to use.

 smiley-red
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One like this should work assuming we are talking mono speaker, mono headphone.

http://www.taydaelectronics.com/hardware/3-5mm-plugs-jacks/3-5mm-mono-enclosed-socket.html

http://www.taydaelectronics.com/hugo/A-865.jpg

Lefty
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Yes, mono. Thanks so much for the help smiley-grin
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Could someone point me to a simple circuit for how to use the closed circuit 3.5mm jack to interrupt a speaker?  smiley-red

Thanks
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 618
Posts: 33943
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Think about it.

There is a ground on the socket so that goes to one side of the speaker.
There are two other connections on the socket. With no jack in they are shorted together with the jack in one connects to the jack and the other is disconnected from the jack. It is this connection that goes to your speaker, the other one goes to your source.
If you don't know which connector is which then get a meter and find out.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks so much for the help, you explained it extremely well. I'll give it a try.

 smiley-lol
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the help, it it working very well testing with just a speaker and the jack. IF you would have time for one more question, I would appreciate it.

For the actual project I am working on, I am using a breakout board from Sparkfun to amplify my speaker https://www.sparkfun.com/products/11044. It's a great little board and it is working wonderfully. I am using a little 0.4W 8oHm speaker and the breakout board for amplification as I have a very confined space to fit my project into.

Would it be possible to introduce the headphone jack into the circuit before the amplification board? Obliviously, I don't want to amplify the headphones, just the speaker.

Your help is very much appreciated.

smiley
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 618
Posts: 33943
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not rearly the arduino does not have enough drive to power headphones. These tend to need a seriese resistor to protect the arduino and that might mess up the input to the amplifier.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, thanks very much for the help smiley
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking that a switch and a bit of code might work. I could use another pin for the headphone sound and use a switch to choose which pin I use for audio. In "speaker mode", it would go through the amplifier, in "headphone mode", I would use go through a 10k resistor to a headphone jack.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 618
Posts: 33943
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I would use go through a 10k resistor to a headphone jack.
If you want to drive an earphone direct from an arduino pin then you only need a 120R seriese resistor to limit the current to a safe level.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, thanks  smiley
Logged

Pages: [1]   Go Up
Jump to: