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

Thread: How to control routing of 1 audio signal to 12 different places?

  1. #1

    How to control routing of 1 audio signal to 12 different places?

    Hey everyone,
    So I want to use my Teensy to control how audio gets routed to 12 different places. The audio is line-level (2Vpp max) and is a single mono signal, and it is going to 12 mono amplifier IC's - the teensy will be switching the audio off/on going to these amps.

    A quick note: I did notice that a lot of amplifier IC chips have a "MUTE" or "SHUTDOWN" pin that would be perfect for interfacing with the Teensy, but unfortunately that's not what is being used here. I only have access to the audio input, so all I can do is switch the audio itself. Any recommendations on the best way to do this?

  2. #2
    Senior Member
    Join Date
    May 2019
    Posts
    114
    You can use 12 switching JFETs like J175. Use 12 GPIO to turn on and off those JFETS.

  3. #3
    Quote Originally Posted by tschrama View Post
    You can use 12 switching JFETs like J175. Use 12 GPIO to turn on and off those JFETS.
    Thank you,

    Is this also the right application for an "Analog Switch" IC? I can't say I've ever used them before.

  4. #4
    Senior Member
    Join Date
    May 2019
    Posts
    114
    Well, I would keep the signal analog and design an analog switch bank. Or were you thinking ADC to teensy routed to serveral DACs?

  5. #5
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    264

  6. #6
    Quote Originally Posted by tschrama View Post
    Well, I would keep the signal analog and design an analog switch bank. Or were you thinking ADC to teensy routed to serveral DACs?
    Thanks tschrama, no the teensy ADC or DAC isn't involved. It's just a single analog audio signal and I want to control which of many amplifiers it goes to. There are 12 amplifiers and I need to be able to do any combination of them.. and I have at least 12 digital pins available on the teensy to do the switching.

    I've looked at a few analog switch IC's and it seems like they only want to pass signals between GND and Vcc. My audio signal is bipolar though.. I do see that some analog IC's can take +/- power supplies though, so maybe that's my best bet. That being said, I'd love to do this with only JLCPCB components so I can have them assemble the prototype boards.

  7. #7
    Senior Member
    Join Date
    May 2019
    Posts
    114
    that is a nice website with examples... You could start with something simple as this: Click image for larger version. 

Name:	analog switch.png 
Views:	19 
Size:	9.1 KB 
ID:	23510

  8. #8
    Senior Member fdaniels's Avatar
    Join Date
    Oct 2020
    Location
    Ostwestfalen, Germany
    Posts
    101

  9. #9
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    518
    The CD4051 is probably OK if you don't need super high audio quality - the distortion is around 0.3% for a 1kHz sine.
    There are better parts available for audio. Check out this informative application note.

    Paul
    Last edited by PaulS; 01-30-2021 at 12:38 PM.

  10. #10
    Quote Originally Posted by fdaniels View Post
    I don't want a multiplexer/demultiplexer. The input isn't being routed to a single output at a time, but any combination. So I suppose I would need 12x 1:1 switches. Also can the 4051 pass a bipolar audio signal? I think it only operates in single-ended mode?

    I did some experimenting with what I have in my parts bin, and it seems like two back to back MOSFETS seem to work for switching the audio signal. I don't really see any distortion either, but I'm only eyeballing it on a scope.

  11. #11
    Senior Member
    Join Date
    Jul 2020
    Posts
    900
    Quote Originally Posted by gatheround View Post
    I've looked at a few analog switch IC's and it seems like they only want to pass signals between GND and Vcc. My audio signal is bipolar though
    Dual supply analog switches for audio exist I believe - however you don't need one, you can use a
    higher voltage part powered with say +/-5V rails and level shift the logic inputs using transistors or
    opto couplers.

    For instance an MC14067B is a 1 to 16 channel mux/demux that can tolerate upto 18V supply. A quad
    opto coupler would be able to translate standard logic level to a different voltage to control it (with added
    benefit of keeping digital noise away from the analog circuitry).

    The downside to opto couplers is their speed, but for this application I don't think its an issue!

Posting Permissions

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