# A question about switching between a speaker and headphones

**URL:** <https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365>\
**Category:** General Guidance\
**Created:** [August 29, 2020, 9:14pm UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365 "2020-08-29T21:14:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![arduinokov](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@arduinokov](https://forum.arduino.cc/u/arduinokov)\
**Post date:** [August 29, 2020, 9:14pm UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/1 "2020-08-29T21:14:58Z")

</div>

Hello,

I am working on a small project using sound from an Arduino Pro Mini, through a Sparkfun Mono Audio Amplifier Breakout ([https://www.sparkfun.com/products/11044](https://www.sparkfun.com/products/11044)) to a small speaker.

It works just fine.

What I would like to do is add a mono headphone jack and have a choice of choosing, via a switch(?), whether the sound from the audio output of the amp board goes to the headphone jack or the speaker.

Any suggestions would be greatly appreciated. 🙂

---

<div class="post-metadata">

**Author:** ![LarryD](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/larryd/32/215550_2.png) [@LarryD](https://forum.arduino.cc/u/LarryD)\
**Post date:** [August 29, 2020, 9:22pm UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/2 "2020-08-29T21:22:45Z")

</div>

Use a SPDT switch.

Example of use:  
 ![](https://europe1.discourse-cdn.com/arduino/original/4X/c/6/9/c697a7d51c3ada8cc24164554631339ab88598e8.png)

---

<div class="post-metadata">

**Author:** ![arduinokov](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@arduinokov](https://forum.arduino.cc/u/arduinokov)\
**Post date:** [August 29, 2020, 9:46pm UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/3 "2020-08-29T21:46:19Z")

</div>

Hi,

Thank you for taking the time to reply to this super-Newbie question.

I do have an SPDT switch on hand but I am a bit confused with the hookup.

The Audio Amp Breakout has OUT + and - wires which are easy when it is just a speaker being hooked up, + and - go to each of the speaker wires. My confusion is with addition of the headphone jack and switch.

May I ask how you would suggest hooking it all up? I am still in the breadboard stage.

Cheers! 🙂

---

<div class="post-metadata">

**Author:** ![DVDdoug](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dvddoug/32/671533_2.png) [@DVDdoug](https://forum.arduino.cc/u/DVDdoug)\
**Post date:** [August 29, 2020, 11:23pm UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/4 "2020-08-29T23:23:50Z")

</div>

The (-) connection is the common ground connection that's connected to the speaker and headphone.

FYI - There is something called a "closed circuit" jack. It has a built-in switch that cuts-off the speaker when you plug-in the headphones.

---

<div class="post-metadata">

**Author:** ![arduinokov](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@arduinokov](https://forum.arduino.cc/u/arduinokov)\
**Post date:** [August 29, 2020, 11:55pm UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/5 "2020-08-29T23:55:59Z")

</div>

Hello,

Thanks for your reply. I looked up the closed circuit jack, it is a great solution but I am trying to use what I have on hand.

Cheers 🙂

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [August 30, 2020, 12:48am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/6 "2020-08-30T00:48:06Z")

</div>

Don't forget to put a 100-200 ohm resistor in series with the headphone output. Otherwise the level will be way too loud for a given speaker volume.

---

<div class="post-metadata">

**Author:** ![arduinokov](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@arduinokov](https://forum.arduino.cc/u/arduinokov)\
**Post date:** [August 30, 2020, 1:15am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/7 "2020-08-30T01:15:57Z")

</div>

> aarg:  
> Don't forget to put a 100-200 ohm resistor in series with the headphone output. Otherwise the level will be way too loud for a given speaker volume.

Thanks for the tip, a 220 ohm resistor for the headphone output is giving me just the right volume. 🙂

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [August 30, 2020, 2:10am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/8 "2020-08-30T02:10:35Z")

</div>

> arduinokov:  
> Thanks for your reply. I looked up the closed circuit jack, it is a great solution but I am trying to use what I have on hand.

It would be rather unusual to have a jack - at least a panel mounted or PCB jack - that does **not** have the closed circuit pin.  
[![](https://europe1.discourse-cdn.com/arduino/original/4X/c/a/c/cac1e553c8cdc7301ce41c182a7afcadbd13a864.jpeg)](https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fcdn.shopify.com%2Fs%2Ffiles%2F1%2F1490%2F5112%2Fproducts%2F02740249_00_grande.jpg%3Fv%3D1478044755&f=1&nofb=1)  
Note the three pins.

---

<div class="post-metadata">

**Author:** ![arduinokov](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@arduinokov](https://forum.arduino.cc/u/arduinokov)\
**Post date:** [August 30, 2020, 3:15am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/9 "2020-08-30T03:15:22Z")

</div>

> Paul\_\_B:  
> It would be rather unusual to have a jack - at least a panel mounted or PCB jack - that does **not** have the closed circuit pin.

Thank you Paul for your reply. So I really don't need a switch. I've got a few of these jacks on hand. How would this be wired? I assume it goes between the Audio input and the speaker?

Cheers!

---

<div class="post-metadata">

**Author:** ![LarryD](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/larryd/32/215550_2.png) [@LarryD](https://forum.arduino.cc/u/LarryD)\
**Post date:** [August 30, 2020, 3:48am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/10 "2020-08-30T03:48:33Z")

</div>

![EarPhoneJack.jpg](https://europe1.discourse-cdn.com/arduino/original/4X/9/f/4/9f4e04ff078d89fba18b17f73f229e662dd8caff.jpeg)

 ![EarPhoneJack.jpg](https://europe1.discourse-cdn.com/arduino/original/4X/9/f/4/9f4e04ff078d89fba18b17f73f229e662dd8caff.jpeg)

---

<div class="post-metadata">

**Author:** ![arduinokov](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@arduinokov](https://forum.arduino.cc/u/arduinokov)\
**Post date:** [August 30, 2020, 3:56am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/11 "2020-08-30T03:56:29Z")

</div>

Thank you for the diagram and many thanks to everyone that helped out, this is the last part of my project that was keeping me from finishing.

Cheers! 🙂

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [August 30, 2020, 4:17am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/12 "2020-08-30T04:17:10Z")

</div>

> larryd:
> 
> ![EarPhoneJack.jpg](https://europe1.discourse-cdn.com/arduino/original/4X/9/f/4/9f4e04ff078d89fba18b17f73f229e662dd8caff.jpeg)

What circuit sketching software is that?

---

<div class="post-metadata">

**Author:** ![LarryD](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/larryd/32/215550_2.png) [@LarryD](https://forum.arduino.cc/u/LarryD)\
**Post date:** [August 30, 2020, 4:21am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/13 "2020-08-30T04:21:55Z")

</div>

WinQcad

Not supported any more but there are a few sites where it can still been downloaded.

---

<div class="post-metadata">

**Author:** ![arduinokov](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@arduinokov](https://forum.arduino.cc/u/arduinokov)\
**Post date:** [August 30, 2020, 4:55am UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/14 "2020-08-30T04:55:53Z")

</div>

Last piece of the project in place, everything is working! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 7:19pm UTC](https://forum.arduino.cc/t/a-question-about-switching-between-a-speaker-and-headphones/672365/15 "2021-05-05T19:19:01Z")

</div>

Closed on May 5, 2021, 7:19pm UTC


