Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Implementing built-in speaker

  1. #1

    Implementing built-in speaker

    I'd like to have a built-in speaker in my audio project that can be enabled/disabled so when headphones are plugged in it will turn off and switch.
    The puniest speakers (1W? 0.5W?) is enough

    I also want to know what kind of amp is needed and how, or any suggestions for codecs with built-in speaker amp (like the TLV320AIC3110 but I'd like to have stereo line-in also)

  2. #2
    Senior Member
    Join Date
    Jul 2020
    The normal way to do this is using a headphone socket with a built in switch, the switch
    opens when the headphone plug is inserted, disconnecting the speaker. A series resistor
    is typically used so that the headphone isn't deafeningly loud compared to the speaker.

  3. #3
    Oh... now I think about it...
    I was thinking about switching with the Teensy the whole time, thinking to pull the left channel high and read the sense pin and use an analog multiplexer like 4052 to do the switch...

    I could do the switching like what you said and this site says, but it would also be nice to control the output switching and volume with the Teensy.
    Also the speaker will be mono, how do I combine both channels to the left for the speaker? So after all I might need the Teensy to know if the headphones are connected.

    Is it ok to pull the left channel high and read the sense pin?

    For the amp I think I will use the MAX98306 amp, should be good enough right? To control the MAX98306 volume, is digital pot needed?

    Sorry for the poor questions quality...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts