Mash-in / AV-Switch

Introduction: Mash-in / AV-Switch

About: Previously sound ingenier. A bit musician. Now technical director for a cultural project on a UNESCO site in the North of France. Maker sometimes. Happy to share.

I have several video game consoles at home, so I needed to make something to connect everything on my TV.

Also as a past sound ingenier, I like to listen to music on a decent setup... and I have an approach that mix objective acoustic analysis and empirism. I'm not really sensitive to tubes fashion, expensive converters, and marketing stuff. I like when it works, whatever the curve displayed on the screen of the gear, or whatever the price you paid for. I think that for personal use, a simple pair of stereo loudspeakers is good enough, and analog make the job correctly. It's easy to manipulate, easy to switch, to sum, etc.

That's why I built a first 16 channels analog audio and composite video switch (+1 stereo audio input which is mixed).

The goal was also to manage the power supplies of the sources (to make the setup more energy saving, and to power on the sources properly first, and then power them off at the end). I made the choice of a Solid State Relay, which was maybe more convenient for old and sensitive audio/video gear, and also maybe more durable.

This first version did not included any remote control, and I was tired to stand-up from my sofa to change the volume or the input. Also, I was obliged to remember what source was plug in every number of each input, and I was a bit bored to push this damned "Select" push button to find where my favorite console was pluged (or my phono, or whatever...).

I was not really happy with the quality of the sound, because the chips I used to switch the audio signal were not really optimized for this. And the audio output was just driven by a dual potentiometer, as passive attenuator. I needed better sound quality.

Also this first version was not developed to be compatible with any new technology, and was basically a full analog product.

So "Mash-in" is evolution of this first version I made few years ago, re-using some part of the first version with some new features :

- The system is not fully analog now, but also mostly driven by an arduino.

- IR remote control.

- 4 rows LCD screen (I2C bus)

- new switching chips for audio (MPC506A from BB). They are maybe not the best for audio in theory, but the datasheet shows that it's good enough concerning distorsion (and way much better than my previous CD4067). After some tests, there were a noise at the switching, but the audio board and the program in the arduino are enough flexible to mute shortly the sound during the switching process, which gives a good result !

- additional chip to drive the output with a more professional approach (PGA2311). It gives a better control with the SPI bus of the Arduino, also to manage the mute function properly, and gives the possibility to program level offsets on each input, which is great.

- an extension port to develop external modules (RS-232 for the TV or HDMI switches, additional audio relays to route the analog signal in the rest of my living room audio setup, etc.)

- better design, with a fancy light inside when the device is on. :)

Step 1: Global Schematic

The global process is :

inputs > [switching section] > [audio board / sum with the additional audio input] > [mute/volume section] > output

The arduino gives :

- a 5 bits binary word on 5 separate outputs to control the switching section (so it can actually manage 16 physical inputs + 16 virtual inputs which can be useful with an extension module, for example).

- a SPI bus to control the PGA 2311 (audio output mute/volume).

- an I2C bus to control the LCD screen.

- inputs for the HUI on the front panel (including an encoder, and 3 push buttons : standby/on, menu/exit, function/enter).

- an input for the IR sensor.

- an output to drive the SSR.

Here are :

- the global schematic

- the Arduino pinout sheet

- the table for the binary words used for the switching section

- the old audio board schematic I re-used on this project

So the audio board is splitted in two separate PCB in my case :

- the summing part

- the volume / mute part

So the analog audio signal leaves the main board after the switching section, to go to the summing PCB (opamp TL074), and then returns to the main board to be processed by the PGA 2311 before going to the output connector on the rear panel.

I think it's not necessary to do that, but it was a way to me to re-use my old part without developing a full new PCB.

Step 2: Power Supply

I did not develop the power supply (AC/DC module). It was cheaper and easier to buy one on Amazon ;)

I needed 3 different types of DC voltages :

One +5V for the logic parts (including the Arduino... Yes I made that bad thing that consist in supply the board to the +5V output... but fact is : it works).

One +12V and one -12V for the audio parts.

Step 3: Arduino Programm and EEPROM Parameters

here are :

- the program of the Arduino

- the parameters managed by the setup in the Arduino, and saved in the EEPROM

Note : I used a standard IR remote, and you can change the codes of each key of the remote in the program.

I used a key as a shortcut in my program, to access quickly to my mediacenter device. The setup menu of "Mash-in" is made to configure which input you chose to assign to this shortcut. This parameter is also stored in the EEPROM of the Arduino.

Step 4: Build It !

here is the Gerber file to make it.

The arduino is direclty inserted up-side-down on the PCB (like a shied).

known issues :

- the CD4067 used for the switch section of composite video is not properly power supplied. The schematic gives a 12V power, but it's driver with 5V logic signals by the Arduino... so the inputs stays on the first anyway (00000).

- It's the same issue with the MPC506 chips, but the logic levels are properly considered by those components, so nothing to change about that.

So you'll have to slightly modify the PCB, but it's manageable if you use IC supports, and add some wires.

Step 5: The Case

Here you will find the draft of the front and rear panel.

All the other 3D files are available here.

I designed everything with Sketchup, so it's pretty easy to adapt things for free, I guess.

All the inside panels are printed on dual layers glued together. Also the inside plate is printed in two steps, with approximately 2 layers of orange (or the color you like), and the rest in white. Like this, it looks like white when the device is in standby, and it goes in orange when it's on (with the light inside).

I used a small LED 230VAC lamp inside. It's less than 1W of power consuption, and it does not heat to much. It's driven by the output of SSR itself.

The SST is mounted on a heater. There is a hole in the side of the case, to make the air recycling possible inside.

By the way, it's a 10A SSR in my case, and I installed a 8A fuse on it, to limit the temperature dissipation inside the case at an acceptable value (the more power you switch, the more heat you have). With the heater, it shouldn't go further 40°C, even if the case is fully closed, which is ok, even for the PLA parts of the case.

Almost ready to print ! ;)

Step 6: Other Integration Details...

here some files to help cabling, and make the job easier.

All the other useful stuff are eventually here ! :)

Audio Challenge 2020

Participated in the
Audio Challenge 2020

Be the First to Share


    • Crayons Challenge

      Crayons Challenge
    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge
    • Microcontroller Contest

      Microcontroller Contest


    Penolopy Bulnick
    Penolopy Bulnick

    2 years ago

    Nice job on your tutorial! Thanks for sharing :)