Search This Blog

Thursday, August 2, 2018

Audio sw - Stand-in daughtercard

Projects / Audio Switching  Original post:08/19/2016

Relay switching is loud and I haven't fine tuned delays etc., but the automatic switching concept works! Actually the loud pop and relay noises let you know when the switching happen.

Left side: TV, right side: PC on youtube. (replaced video - last one was too loud. fixed)


If either PC or TV audio is active, the switch select that audio source. The PC side is given priority so that you can interrupt mundane TV by watching video/play music/games etc.

The noise relay problems should be eliminated when the proper audio switch daughtercard shows up.

Been watching TV, youtube video, playing games etc for the last few hours automatically switching the input to the amplifier doing what I expect it to do. :)

One thing I found is that if the PC video has a lot of silence pauses (without background noise/music) which exceeds the time-out parameter and switch back to the TV. The easy fix is to mute the TV with the remote. That is not too much of an inconvenience.

The daughter card PCB won't be here for another 2+ weeks due to on-going shipping issues out of my control. Here is a big mess of wire version of the daughtercard implemented with mechanical relays. A 2N2222 transistor is used to drive the relays. One of the relays switches the ground while the other one switches the L/R channels.



Relay contacts bounce during switching and inject noise into the audio. That's why I didn't use them for my design.  This project (google translate) uses a mute signal to suppress the switching noise.

Glitchless audio switching

Original post date:08/24/2016

While I am waiting for the PCB to show up, I have been thinking about how to implement glitchless switching.

To minimize glitches during switching, the input voltages of both pairs of audio sources can be switched when they are within a threshold.

STM32F030's analog watchdog cannot be used here as it can only cause an IRQ when the ADC values are outside a range and not inside. The switching can be done in firmware inside the ADC DMA IRQ after it collects a sample of all the analog channels. IRQ rate is every 25us which is well within what the STM32F030 can handle. An analog MUX is used for switching the source as it switches with minimum delay (~50ns) and without any contact bounces.

Editorial note: It turns out that this level of control is not required.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.