Offline
Full Member
Karma: 0
Posts: 152
|
 |
« on: February 03, 2013, 06:39:53 pm » |
I am a bit of a noob, so I have a very basic question  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 
|
|
|
|
« Last Edit: February 03, 2013, 06:45:23 pm by arduinokov »
|
Logged
|
|
|
|
|
Sydney
Offline
God Member
Karma: 14
Posts: 716
Big things come in large packages
|
 |
« Reply #1 on: February 03, 2013, 07:44:47 pm » |
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
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #2 on: February 03, 2013, 08:22:09 pm » |
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. 
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15320
Measurement changes behavior
|
 |
« Reply #3 on: February 03, 2013, 08:32:04 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #4 on: February 03, 2013, 08:40:45 pm » |
Hi, Yes, mono. Thanks so much for the help 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #5 on: February 04, 2013, 07:31:55 am » |
Hi, Could someone point me to a simple circuit for how to use the closed circuit 3.5mm jack to interrupt a speaker?  Thanks
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #6 on: February 04, 2013, 08:59:50 am » |
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
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #7 on: February 04, 2013, 09:40:39 am » |
Thanks so much for the help, you explained it extremely well. I'll give it a try. 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #8 on: February 04, 2013, 03:22:08 pm » |
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. 
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #9 on: February 04, 2013, 03:55:53 pm » |
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
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #10 on: February 04, 2013, 04:12:59 pm » |
OK, thanks very much for the help 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #11 on: February 04, 2013, 05:17:14 pm » |
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
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #12 on: February 04, 2013, 06:04:43 pm » |
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
Full Member
Karma: 0
Posts: 152
|
 |
« Reply #13 on: February 04, 2013, 06:43:18 pm » |
OK, thanks 
|
|
|
|
|
Logged
|
|
|
|
|
|