I have been too busy at work to do anything on the audio side, but have been able to lash up an Arduino with a few switches, pots etc. to fake inputs. There is a 4 line 20 column LCD display attached, and I've been working on this at home during free moments.
The final assembly will be an Arduino on a carrier PCB containing additional logic, amplifiers and a DC-DC converter.
I use 3 of the analogue inputs to monitor the Left, Right and Sub channel outputs, and a further 2 for monitoring the DC supply rails. 8 digital outputs are used for the data lines to a 4 row, 20 column LCD display and a further 2 are control lines for this.
So, that's 15 inputs and outputs from a maximum possible 20, but I also wanted to have 4 digital inputs and 5 outputs, as well as being able to still use the serial port (which itself takes out another 2).
There were three solutions to this that came to mind.
Use an Arduino Mega - over 50 lines available on that, but massive overkill.
Use a second Arduino for the display - frees up 10 lines but adds complexity.
Matrix some of the lines - support chips needed.
I went for the last option as being cheap, fairly easy to implement, requiring only one programmed plug-in chip, enabling me to take the chip out and breadboard it if I wanted to, and above all... more interesting!
How to go about this?
In the first place the LCD data lines are only needed when the display is being changed. Realistically this can't be very fast as the display is quite slow to visibly respond. I actually update it every 10th of a second (100mS), so when the display is dormant I use just one more precious output to enable an 8 bit digital latch. This reads, then stores whatever is on the data lines at the time the enable is pulsed, so I now have three more outputs than I need - it's always nice to have spares. The chip costs about 50p, and requires no further components.
That leaves me with 2 spare lines, not including the serial ones, but I want 4 more inputs so had to use a different trick. There are shift register chips that can have 8 digital inputs read in at once, then sent out one at a time every time a 'clock' line is pulsed. This is what I used. The line that enables data transfer to the output latch is used to read in the inputs to the shift register at the same time. After this, one of the control lines of the dormant LCD is pulsed very quickly 8 times, and each time, the shift register output is read by another of our dwindling supply of lines. But I now have 4 more inputs than I needed, and still one unused line on the Arduino. Oh, and this chip also costs about 50p and needs no further support.
So much for the hardware, now the control functions I've set up.
The program in the Arduino is continually reading the Left, Right and Sub levels into analogue inputs. It manages a reading speed of just under 3kHz. By using op-amps to create artificial zero points I can read + & - peak levels pretty acurately, as well as long term averaged (just under 1S) DC levels. Every 100mS there is just a brief hiccup in order to read the supply rails into two more analogue inputs and do the processing and display stuff. Although the supplies are only about 32V, I've callibrated the inputs for 40V to give some wiggle room.
I now have a display of the actual supply voltages, and warning messages if they become too low or fail. There are peak level bargraphs of 15 (approx 3dB) steps for the outputs. Also a warning message if any of the outputs develop a DC bias above 0.5V and which way it is going. Finally, a clipping level warning message that takes into account the real rail voltage (not what it's supposed to be) and whether its the + or - one. The clipping waveform could quite possibly be asymetric.
I have software to read switch inputs for Sub, Phones and Mono, then provide the correct operations with appropriate messages. Also, delayed switching of output relays until all voltages are correct, and instant disconnection if any one goes seriously wrong. Finally there is another input monitoring the mains (via a safety isolator), with instant disconnection of outputs at switch-off.
As icing on the cake, I'm considering preventing speaker/phones connection if any channel is already being driven fairly hard by whatever is connected to the inputs at the time the amp is switched on. This is purely to protect my ears! The bargraphs will make it obvious which channels are being driven, along with a warning message. Once the level has been reduced the relays will click over and then the inputs can be driven as hard as wanted.
Some more pictures. Supply assumed to be +-40V. DC inputs were faked, but real audio used for the bargraphs.
All OK, but negative rail lowish
http://www.musically.me.uk/images/Display_OK.JPG
Negative rail low enough to be a problem (less than 25V) making the outputs clip. If it's less than 19V (the point where the amp's DC stability starts to deteriorate) it is shown as 'DEAD' and all relays are opened.
http://www.musically.me.uk/images/Display_Low.JPG
Switched to phones.
http://www.musically.me.uk/images/Display_Phones.JPG
Oh dear, we have a DC offset. This voltage is just on the threshold of making the RH channel shut down.
http://www.musically.me.uk/images/Display_DC.JPG
Running Phones in mono - there's that slightly low negative rail again
http://www.musically.me.uk/images/Display_Mono.JPG
Mains just disappeared or was switched off. Normally there is a 2 second delay at switch on with just the 'Speaker Manager' legend. In this state all relays are open.
http://www.musically.me.uk/images/Display_power.JPG
Hmmm. I don't seem to have a picture with the Sub channel active. That simply shows another bargraph below the right hand one. Labelled 'S'.