Kramer VS-1616A Remote Control System

in Blog

14 June 2016

The design and build of a remote control panel system for a Kramer VS-1616A audio matrix.

As part of refitting a community radio station, I installed a Kramer VS-1616A remote controllable matrix so that different feeds from around the station and externally can be routed to the FM transmission rack without having to access the conventional analog patch bay that otherwise handles all of the routing in the station. The patch bay, matrix and all of the audio and computer equipment is located in a server rack that is not accessible by regular users of the station. I therefore needed to design, build and install several matrix control panels throughout the building.


Kramer VS-1616A

The bespoke control panels allow users to switch the broadcast feed from within studio 1, studio 2, the office, or online (by VNC-ing a local computer running a custom software application). LEDs independently update according to the current setting in the matrix.

The Kramer VS-1616A can connect any of its 16 audio outputs to one of its 16 audio inputs. Inputs are connected to outputs from studio 1, studio 2, the 24/7 playback machine, the IRN satellite receiver and an incoming audio signal from a Barix box (to route outside broadcasts directly to the FM transmission rack). Outputs connect to the transmission rack, studio 1, studio 2 and a local headphone amplifier. As well as switching the feed to the transmission rack, the matrix also allows signals to be routed between studios allowing conversations between the studios during a handover on the hour.

The VS-1616A has an RS232 port and an RS485 port for connecting one or more remote controls, and/or for daisy-chaining several units together. Only the RS232 or the RS485 port can be used, they cannot be mixed and matched (e.g. you should not connect a computer to the RS232 port and a control panel to the RS485 port – both should use the same port). The RS485 port was ideal for our purposes as it allows us to connect several control panels in series using CAT5 cable. We can even power the control panels centrally from a PSU located in the equipment rack by sending 12V down spare pairs of the CAT5 cable.

Hardware


PCB design in Diptrace


Etching the PCB in ferric chloride


Drilling the PCB

The control panels have 4 push buttons and 4 LEDs to switch and indicate the current feed to the transmission rack.

I chose to use a Microchip PIC18F25K22 clocked by a 20 MHz crystal. It has enough pins and I have used the K22 family of PICs a lot so it was quick and easy to get up and running.

I used the Maxim MAX483 RS485 transceiver as I have good experience of using them in the past. The A and B data lines are optionally pulled high and low respectively, each via a jumper, and a 120 ohm termination resistor can be switched in via another jumper.


Populated PCB

Each PCB has at least two 4-way screw terminals (RS485 and power from the previous control panel, RS485 and power out to the next control panel). Connections are GND, 12V, RS485-A and RS485-B. 5V power for the PIC and MAX483 is derived from the incoming 12V using a 7805 voltage regulator. This ensures a stable 5V even if there is some voltage drop below 12V due to the long cables (I measured 0.2V voltage drop over 150m of CAT5 cable.)

For reliability, known brand named components were used throughout – PIC microcontroller, Maxim transceiver, STMicroelectronics voltage regulator, CamdenBoss connectors, Kingbright LEDs, SCI push buttons, Eddystone enclosure etc. Most components were available from Rapid Electronics.

I designed the 80mm x 50mm single sided PCB using Diptrace because as far as I know it is the simplest and quickest to use. I manufactured the PCBs using the standard photo etch method that I find much more reliable than the toner transfer method. I used Mega Electronics FPC 16 (2) Pre-sensitised Economy Board because it is cheap, and easy to cut with a sharp craft knife.

Firmware

The PIC firmware is very simple:

  1. Each control panel PIC is always listening for acknowledge data packets from the matrix that reveal the matrix input that is connected to matrix output 1, and lights an LED accordingly. Acknowledge data packets are sent no matter how the matrix was switched – if it was switched from the front panel, from a PC or from a control panel. All control panels therefore update when the matrix is somehow switched.
  2. When no data is incoming, each control panel PIC checks to see if a button was pressed since it last checked. If so, send a data packet to connect matrix output 1 to the corresponding input, depending on which button was pressed. Go back to 1. and check for incoming data packets again.


Excerpt from firmware written using PICBASIC PRO 3

Two data protocols can be selected in the front panel menu of the VS1616A – HEX (otherwise known as Protocol 2000) or ASCII. ASCII is much easier to work with, but Kramer’s own K-Router PC software uses the HEX protocol so I used that ensure that it and the control panels could coexist on the one RS485 bus.

Protocol 2000 is simple and well documented. It runs at the standard 9600 BAUD on the RS485 (or RS232) bus.

On the PIC, I could have used interrupts to buffer incoming data packets in the background, and used interrupt-on-change for the buttons. This would have allowed the PIC to go into low power sleep mode and use less power when not active. However, in this simple application, they use very little power anyway, so I kept the code as simple to read as possible.

I used the excellent PICBASIC PRO 3 compiler because I’ve been using it for years and find it the quickest of all the PIC compilers to work with, without sacrificing any flexibility or performance. I highly recommend it – it is a very professional tool with brilliant documentation.

The PIC was programmed in-circuit using the Microchip MPLAB IPE programming software, with an Olimex PIC-KIT3 programmer, which works very well.

Software

The VS-1616A can be controlled over the RS485 bus using Kramers own K Router software. This provides the familiar matrix grid that gives full access to all inputs and outputs. This could be controlled over the Internet using VNC software. However, I do not want users to have so much freedom to edit the patching since it is critical to the operation of the studio.

I therefore designed my own software that displays only what is needed.


Bespoke software control of Kramer VS-1616A matrix

The station uses Myriad software for audio play out and scheduling. It plays the local news from a sound file every hour. Preceding the local news, national news from an IRN satellite receiver needs to be switched in and then out. This is done by having Myriad execute Windows Batch files that transmit a relevant HEX command to the RS485 bus. The execution commands are scheduled in Myriad in a similar way to audio files. The Myriad PC connects to the RS485 bus using an FTDI USB-RS485 cable.


Switching the matrix with a Windows Batch file

Construction


Front panel attaches to main PCB with IDC cables


Heatstrink provides strain relief for the otherwise delicate soldered connections

I decided to house the control panels in Eddystone diecast aluminium enclosures from Hammond Manufacturing as they are very high quality and nice to work with (maybe even a bit nicer than Hammond-branded enclosures). By mounting the buttons and LEDs on the lid, the main part of the enclosure can be screwed to a wall after the PCB has been installed. The LEDs and buttons are then easily connected using IDC connectors. The button and LED ‘panel’ is screwed to the enclosure. The CAT5 cables are fed through cable glands that provide good strain relief and stop the cables from pulling out.

Testing


Three daisy-chained units being tested with 150 meters of CAT5 cable

The matrix and control panels are critical to the functioning of the station and were thoroughly tested before installation. The cable run from the matrix to the furthest control panel is about 30m. The control panels were tested with 150m cable and the system was left turned on for a few days.

Finished result

Further control panels can be added in a daisy-chain fashion. They wouldn’t even need to be the same design but should conform to the RS485 standard with additional 12V powering over CAT5 cabling.

Back to Blog