Audio source switching

Status
Not open for further replies.

Frank B

Senior Member
Good morning!
I discovered yesterday the PT2258.

2020-12-20 10_07_06-Start.png

Since I do not know so much about analog electronics I just ask here.
My use case would be the following:
I have many sound sources in the living room, which I want to switch automatically (prioritized).
So several (stereo) inputs, 1 stereo output.
The PT2258 seems to me to be suitable for this. I could use a Teensy 3.2.
However, I want the Teensy to scan all audio sources and then switch on the one with the highest priority.
So I thought to use two PT2258.
One to switch the audio, the second would switch all 6 sources in sequence to the Teensy's analog inputs every few ms to determine the one with the highest input level. Of course I only need the level there.

My question is how to connect the outputs of the second PT2258 to the Teensy:

a) Do I use 10uF there as well?
b) Do I use a low pass?
c) Do I need resistors to raise the "zero line" to about 1.6V? (or a potentiometer?)
d).. or what would be the best way? :)


I want to use this example from the datasheet for the switch:

2020-12-20 09_24_29-Start.png
e) Can I connect the outputs of the first PT2258 together (after the capacitors) (To get only one (stereo) output)
The example-schematic above is not clear to me, for the outputs.

Datasheet:

https://www.electrokit.com/uploads/productfile/41011/PT2258.pdf


Thanks a lot :)
p.s. I'll use 6 stereo inputs, so all the above 2x.
 
Last edited:
mixer.jpg
For the "mixing" like this? I have not added the buffer.. is it needed?
The "scanning part" would look very similar - but outputs connected to the Teensy (2 analog pins)

Edit: Oh, I see the chips have the same I2C-address, and REF is not connected. I'll fix that.
 
Last edited:
The voltage levels for the chip's I2C bus look to be for 5V logic, not necessarily reliable at 3.3V, note - this
must be an old design...

Don't forget the input bleeder resistors. I'd add RF filtering on the inputs too, a small value ceramic cap to ground to
short out RF interference, 100pF to 500pF range is probably good enough. In these days of ubiquitous mobile phones
you always have to watch out for RFI like this on analog audio.

The output impedance is 600 ohms or so, suggesting summing via resistors an order of magnitude larger, such as 4k7.
If the outputs are summed together this way you only need one bleeder resistor per output channel - its job is only to
prevent loud cracks and thumps when plugging in the output connector.

When you say connect the outputs to the Teensy, do you mean to a microcontroller pin or to
the audio board? The latter already has AC coupling, the Teensy itself is DC coupled only, and you need to
ensure the applied voltage is strictly within the supply range or you'll fry it. I'd suggest using more 4k7
resistors as current-limiters for this for protection against over-voltage. If the PT2258 supply is higher than
the teensy supply, you'll definitely need series resistor protection.
 
The voltage levels for the chip's I2C bus look to be for 5V logic, not necessarily reliable at 3.3V, note - this
must be an old design...

Don't forget the input bleeder resistors. I'd add RF filtering on the inputs too, a small value ceramic cap to ground to
short out RF interference, 100pF to 500pF range is probably good enough. In these days of ubiquitous mobile phones
you always have to watch out for RFI like this on analog audio.

The output impedance is 600 ohms or so, suggesting summing via resistors an order of magnitude larger, such as 4k7.
If the outputs are summed together this way you only need one bleeder resistor per output channel - its job is only to
prevent loud cracks and thumps when plugging in the output connector.

When you say connect the outputs to the Teensy, do you mean to a microcontroller pin or to
the audio board? The latter already has AC coupling, the Teensy itself is DC coupled only, and you need to
ensure the applied voltage is strictly within the supply range or you'll fry it. I'd suggest using more 4k7
resistors as current-limiters for this for protection against over-voltage. If the PT2258 supply is higher than
the teensy supply, you'll definitely need series resistor protection.

Thank you for your hints. Great!

2020-12-20 21_29_48-Start.png

The table says, for I2C 3.0 Volt "typical". Hm this is on the upper, you're right. I'll add level-shifters.

I want to connect the outputs of the 2nd pair of PT2258 to the Teensy-Pins directly. The PT2258 supply is 9V.
The table says, the outputs are 2.8Vrms max - not sure what that means for the Teensy-Pins? Do they need protection? I'll add the output-capacitors there, too.

Another question: Over the years, I've seen values from 100nf to 100uF for audio inputs and outputs. How does it come that the values are that different? What is the reason for this, what do I miss?
Has this to do with the impendance?
I like a good bass - are 10uF OK for the in&output capacitors? Should I uses electrolytic capacitors there, or are SMD parts ok?

I try to implement your tips and will post a new schematic in the next days.
 
Status
Not open for further replies.
Back
Top