DisplayUnit.pdf (24.32KB)
DisplayUnit.pdf (24.32KB)






Display & Remote (Updated march 2018)

The Display unit hardware is straight forward.

There is one 14pin connector (CONN2) that connects the RS232 port of the Pre amplifier MCU to one of the two RS232 ports of the Display unit MCU.
The second RS232 port of the Display MCU connects to the display itself. The Display MCU is a MSP430FR5849 with sufficient memory on board.
The RS232 ports are connected via a quad SPDT switch (U2 TS3A5018) to allow a PC based RS232 interface  access to the display for programming of the macro commands.
Fig.1 shows how the switches are configured. The select pin (IN) of the switch is connected to CONN2 and is pulled high by R1.

When the Pre amplifier is connected this pin is pulled low, connecting the  Pre amplifier MCU with the Display MCU with their respective RX and TX lines.

I designed a small RS232 to USB conversion board that when connected leaves the select pin floating and the switch connects my PC via CONN2 directly to the display.
To receive IR signals from the remote control I used a TSOP1836 IR receiver from Vishay, that is connected to one of the interval timers of the Display MCU.
To dynamically adapt the back lighting I connected an OPT3001 Digital Ambient Light sensor to the I2C port of the MCU. The advantage of this light sensor is that it has a simmilar sensitivity curve as the human eye and is not sensitive for IR light.
Since the display works on a 5V supply, there are two level shifter gates (U5 and U6;SN74LV1T34) to interface the RS232 RX and TX lines to the 3V3 powered micro controller.
A third level shifter is used to feed the so called SBUF signal from the display to the micro controller.
SBUF is an interrupt signal indicating data is ready in the display transmit buffer. Data like: a key pressed or released or a value in case a touch slidebar is implemented.
Transistor T1 is added to drive the reset signal of the display.
The micro controller is "3V3 Always ON" powered from the power supply together with the level shifters, IR receiver and optical sensor.
There is a separate 5V supply for the display from the power supply board.
For conveniende I added a manual power switch, that is in parallel with the power switch on the USB power board and a small LED for diagnostics.

That was the easy part. 

The firmware running in the micro controller is what makes the whole Pre amplifier tick.
I first started by programming the macro commands for the display. Electronic Assembly have a nice tool for that, including a simulator.
I have in total 5 different Display pages set up, or 6 if you include the intro page, showing the Transient Electronics logo for a few seconds.
All these pages can be accessed on the display by touching the left and right cursor keys. 

The IR remote is only active on Page1 (normal use), where the input selector and volume settings are located. Here you see also the status of the SPDIF error, the ADC error, Whether the output is muted and if the 5V is active on a certain input select. There is also an Error FLag indicator. Error flags themselves can be checked on Page4.

Page2 allows to manually set the balance and add an offset to the backlight. Backlight is set automatically but if one finds it too bright or too dark it can be adjusted by means of a touch bargraph.

Page3 allows to make the translation from a Physical input (Phono MM or Phono MC, analog 1-3, optical 1-3 and coax 1-3 inputs) to a Logical input (Phono, HTPC, TVbox, TV, CD, BT, AV, Tuner, Tape, AUX)
The advantage of doing this is that it does not matter whether for instance your TVbox has an analog, optical or coax output, you can route it to the desired logical input.
Any input that is not assigned and you want to accesss will give a warning on the display that the input is not assigned.

Page4 allows the 5V USB power on the backside of the Pre amplifier to be activated when a specific logic input is selected, or to be active for all input selections.
Here I also located all error Flags, more for my convenience during firmware debugging. Whenever one or more flags are set, this shows up on Page1 as an activated Flag.

On Page5 I have located the Logic input volume presets.  Here you can add a positive or negative volume preset value up to +/-20dB , individually for left and right channel in 0.5dB steps for each input.
This preset is convenient if sources have different output levels.

On the left are the graphical representations of the simulator. The Photo gallery shows pictures of the display's different pages.


A bit more details on the firmware running on the Display MCU.
Both RS232 ports, the IR receiver interval timer, the I2C port and a number of system timers operate under interrupt, where the respective interrupt handlers dump their data in individual circular receive buffers or trigger periodic events, like ADC,SPDIF, Flag and Mute indicator updates.
When data is loaded in a receive buffer, the micro controller is woken up from its sleep mode and starts processing that data by reading from the respective receive buffers.
Each resource (Display, Pre amplifier or Slave , IR receiver and System) has its own command handler that manages the appropriate  receive and transmit buffers.
Before a command resulting from data in one of the receive buffers can be executed by one of the handlers a previous command has to be completed to prevent overruns. A task completion is indicated by an Acknowledge from that specific resource being the Slave MCU or Display. Then the next command can be executed.

As long as there are commands in the circular buffers, the processor keeps executing them, untill all work is done and the processor gets back to sleep.
This allows to stack up a number of commands in a transmit buffer. For instance at Pre amplifier startup, the IR handler detected a power on command. The IR handler instructs the Slave handler to do a Pre amplifier MCU power on reset and send its status of volume, balance, input select and presets to the Display MCU.
The IR handler also instructs the Display handler to wake up, switch to Page 1 and display the correct volume, input and flag settings.
These commands are executed sequentially each time the Slave and Display have sent Acknowledges back that the current command was completed.  

It took a while before I had it all working flawlessly but with this software framework I can buld any other piece of equipment that is controlled by a touch screen display and communicates to slaves.


The Remote Control

As said before was the firmware for the IR transmitter developed earlier on a MSP430FR2311 Launchpad with IR boosterpack.
A small change in coding to operate the keypad from different IO port pins was all it took.
The boosterpack uses a simple transistor to drive the IR transmit LED.  I decided to drive the LED, a TSAL6200 from Vishay, with a constant current source so that when the battery voltage dropped it still would run at the same constant intensity. Another effect is that the 36KHz base frequency pulses are much better defined.
The output of Voltage reference U2 is divided by resistors R4 and R6 and fed into the + input of opamp U3 that maintains the same voltage over resistor R8 via T1. This is a typical constant current source topology.
By switching the enable of U3 on and off, the LED is modulated with the RC5 coded data.
The output of voltage reference U2 is also divided by R2 and R3 and fed into a MSP430FR2311 comparator input.
When the battery voltage gets too low so that the constant current source cannot maintains it nominal current, a small red LED blinks when a key is pressed, indicating the batteries are at their end of life.
The MCU goes back to a sleep mode when no key is pressed to conserve maximum battery power. The complete circuit draws then some 10uA.
To reduce idle current further I added a slider switch in the power line to the battery.
The slide show shows the pictures of the Boosterpack, Remote control PCB and housing.

After I had my Pre amplifier finished I started the programming of the Logitech remote. Logitech claims that you can learn the hub custom IR commands but in practice is the Hub comparing your custom commands against a database of existing device commands and if it can't find a matching code it tends to ignore it. Picking a random pre amplifier is also not easy if you have no predefined name and brand so I had to browse the internet for a Pre amplifier that is operated with an RC5 based remote. I finally found the Arcam Pre amplifier that had almost the same codes in use. Adding that Pre amplifier in the Logitech Hub solved most of my remote key entries. I only needed to add commands 7-0 as input selections.  That proved another obstacle for the Logitech Hub. I had some interactions with the Logitech helpdesk, that were not able to program additional codes correctly. After repeating each code in the Hub's learning modes for several minutes they were finally accepted and I could operate the Logitech remote to control my Pre amplifier, TV, TV box and CD player.  One month after everything worked fine, Logitech decided to remove the RC5 Arcam codes from their database and my remote was dead.

After some browsing I found a German Pre amplifier manufacturer called Abacus that still used RC5 codes and again I had to manually learn the Logitech Hub additional input selection codes. Lets pray that Logitech is not throwing these codes out of their database. All your Logitech Hub / Remote settings are Cloud based and lost if Logitech decides to upgrade.  For me Logitech is  a nessesary evil when it comes to universal remotes.