Initial Plans

This page describes some of the initial plans and research that finally culminated in the project documented in this section. As you can see, the plans changed many times over the years, but with hindsite, I'm glad I didn't rush ahead with some of these ideas!

The original 2-channel plan

Back in 1998, I came up with the 'first draft'. For reasons that I can't recall now, I wanted something in a small, half-width shoebox format. There would be a simple row of buttons under a display window, with a motorised potentiometer for volume. No writing would appear on the unit until you switched it on from standby, and then the switch legends would be illuminated in the display window. Here's what I had in mind:

Animation of the display window (5KB)

The LEDs are 2mm flat-top devices - I've since used the samples I bought in the lead-acid battery-monitor mini-project. The animation demonstrates the planned interface - the buttons flashing green are meant to represent them being pressed. You see the unit being switched on from standby to listen to the tuner, followed by setting the record-out to CD. After that, TV is selected, followed by CD... Nice and simple.

This would have been remote controlled - I'd been incorrectly supplied with the wrong remote control for an old Philips satellite reciever I had at the time, and trying to send it back to CPC would have been far too complicated! The remote is a standard Philips RC5 device that has a nice range of buttons and being a satellite remote, it seems unlikely that I'd have any problems with interferrence from other remotes... Indeed, this is the remote that I use with the completed preamp today. As I couldn't programme PICs at the time, I was trying to find an SAA3049, which is a RC5 decoder IC. This, combined with some CMOS logic would have formed the control system (see the NICAM tuner for details of a similar project). Unfortunately, this IC has been obsolute for a long time now.

I even got as far as making a box, as shown here - obviously, the aluminium lid (salvaged from the works skip) needs a re-spray! The dimensions are 22cm, 5cm, 29cm (width, height, depth). The sides of the box are formed by some lengths of aluminium extrusion, and the remaining panels are 2.5mm aluminium.

The old preamp enclosure (18KB)

The internal layout would have been rather tight, but I'd more-or-less worked out how to fit everything in. This picture shows roughly how:

View inside the old preamp enclosure (16KB)

From left to right, the PCB layouts are for the RIAA preamp, the relay panel which selects inputs and record-outputs, and the power supply. These PCBs are essentially complete and ready to etch. You can see the motorised Alps 'Blue-Velvet' potentiometer at the front of the case. I'd planned to add some partitions to keep the power-supply and control sections separate. The control/logic panel would have fitted behind the front panel, and the line amplifier would fit between that and the relay panel.

Note the BNC connections - these are the outputs. I hated the idea of using phono plugs here as accidental disconnection can be quite damaging if the power-amp is on at the time. With phono plugs, the earth connection normally gets broken first.

However, had this simple unit been completed, it would have quickly become obsolete. Although I was reluctant to accept it, six-channel surround sound seemed inevitable...

Home Theatre...

Given that I didn't want to have to buy a compromised A/V receiver some years down the line, I had to future-proof at this point by having a 6-channel input for TV/AV. The 5.1 decoding can be done externally by a DVD player and potentially a separate unit can deal with video processing. I wanted to keep video signals well away from the audio stages...

This brings about new challenges. As you've seen, I had enough trouble fitting the sockets on the back of the original case, and there is no chance of fitting another 8. Internally, the case was tight enough as a simple stereo unit. So, all my hard work is destined to be used for another project, just as soon as I've decided what!

Leaving aside the space requirements, another problem is controlling the level of 6 audio channels while maintaining fidelity. I tried to source a 6-channel motorised pot, but failed miserably, meaning that an electronic control and careful compromise-management is required!

The 'new' User Interface

Mainly because of the non-availability of the SAA3049, stage one was to get started with PIC programming, actually something I had been meaning to try for some time. And almost inevitably, I decided to use an LCD display in addition to LEDs. Partly because I could, of course, but I felt that this would make things better operationally. The first efforts were to produce reliable routines to decode the Philips RC5 remote-control protocol, thus replacing the functionality of the SAA3049, and then to write some code to drive the display. Here's my rough impression of the display window:

View of the LCD display window (4KB)

The centrally mounted backlit LCD module is a 16x2 unit, which offers plenty of space for a basic interface. The four buttons have bi-colour LED illumination (available from Farnell - details in the Pre-Amp FAQ), and as you can see, Mute is currently selected (the 'Mute' text on the LCD disappears after a couple of seconds, and any other text on the bottom line is re-drawn). On the left side of this window would be a rotary encoder for input selection and there would have been a 6-channel potentiometer on the right (if I'd managed to source one!).

Turning the rotary encoder allows you to choose from CD, Tuner, Phono, TV/AV, Aux, MiniDisk and Tape. Once you've chosen the required source and not touched the encoder for a short delay, the input is selected. Or, you can use the remote which has left and right keys - the same logic applies. Obviously, this isn't as quick as simply hitting a key (as with the design above), so the first 7 number keys on the remote will instantly select the source...

For the sake of consistency, there's a few buttons that always perform their function, irrespective of the display/menu mode you're currently in. The number keys are an example of that, as well as Mute, Volume up/down and Standby. Pressing 'View' allows you to step through 5 menus, as shown in these screenshots:

Menu 1 - Record out (4KB)

CD, Tuner, Phono, TV/AV, Aux, Off

Menu 2 - Dubbing mode (4KB)

Off, Minidisc to Tape, Tape to MiniDisc

Menu 3 - Display brightness (4KB)

Auto, Low, Medium, High

Menu 4 - LCD contrast (4KB)

Variable slider - 0-12

Menu 5 - Display illumination mode (4KB)

On, Auto-off

(Bold=Default option. The '49' is the RC-5 code for 'View' - the command is currently shown on-screen as a debugging aid. Also, the number on the top-left of the display shows the current value of 'mode', also for debugging reasons. Both of these would have been removed eventually.

To make a choice, you use the encoder, or left/right on the remote. To store the choice (and throw the relays in the case of Record-Out or Dubbing) you must press 'Store'. If you just press 'View' again to get to the next mode or do nothing for 10 seconds (which 'times-out' the menus and returns the unit to its normal state) or press 'Standby' (a good 'panic' option!), the original value is reinstated... Although as you'd expect, when adjusting the display brightness or contrast, the changes are reflected as you turn the encoder...

Option 5 lets you choose to have the LCD backlight switch off after a short delay - it'll light up again when you press a button. Just like a mobile phone. The time delay depends on the mode - if you are in a menu, the display remains lit until the menu times-out after 10 seconds, whereas normally the delay is 2.5 seconds. That's a neat detail that works well...

I wanted to provide plenty of scope to make the LCD display unobtrusive - in a dark room it gives out a lot of light! The auto-brightness option uses an LDR to regulate the light output, affecting all LEDs (including the switches and the switch legend illumination). Also, on the remote control, there's a bright-green button to which I couldn't resist giving a 'display-on/off' function; pressing it turns off the display until the next keypress (except volume up/down - another nice detail, as you wouldn't want a bright flash of green every time you adjust the level).

The software was almost finished. I've ironed out most bugs and operational 'quirks', and I think I've provided enough features. The interface seems logical and well-planned to me, at least!

The Hardware based around a PIC16F84. To drive the source-select relays, various LEDs and other functions (like a simple R-2R DAC for the LCD contrast), I'm using latched shift-registers. When I decided to do that, I thought that I'd come up with a really good idea for expanding ports. Until I discovered that this was one of the oldest tricks in the book! Oh well... Still, I've discovered an excellent IC from Allegro (UCN5821A) that combines an 8-bit shift register with a hex Darlington driver output stage in a 16 pin package. Two of these will drive all the relays in the unit. Here's the Veroboard mock-up:

16F84 control prototype (41KB)

The LEDs on the far-right will be the source-select relays in the final product. You can see the four buttons with their bi-colour LEDs (as above, Mute is currently selected). There are two rotary encoders - the one with the silver knob is made by Bourns and the other is Alps. I don't think I fully managed to make the software completely reliable with these; being contacting encoders, they suffer from a degree of contact "bounce". Most of the control hardware has been tried and tested - this board holds the PIC, an IR receiver, four 8-bit latching shift registers (2 are standard 74HC595 ICs, the others are the UCN5821), a dual 2-4 line decoder and a hex Schmitt inverter. Additionally, there's a 7805, a 741-based voltage regulator for controlling the LED brightness, the transistors for changing LED colour, and a transistor to switch the LCD backlight off (for menu-function 5).

Display choice

LCD comparison (8KB)One thing I wasn't sure about is the choice of LCD display - you don't tend to see these on domestic gear, where custom VFDs rule the day. These don't have the viewing-angle restrictions of an LCD unit. Another issue is resolution and character size. The unit in the picture above has a 5 by 7 font, and a character height of 5.5mm. This looks quite nice close-up, and is quite readable up to about 8 feet, but the hi-fi is about 12 feet away, and I'm viewing the display from a 45 degree angle. A further issue is that this display is designed to be viewed from 90 degrees or less vertically. In other words, the unit should really be mounted on a shelf at eye-level or above. Hi-fi kit tends to be positioned lower than that, so I can't see the display clearly when I stand up!

I brought a large-character display, expecting that to have a 5 by 10 font, but the unit was still 5 by 7. Fine from a distance, but close-up it looks ridiculous - the pixels are enormous! Oh well - I'm sure I can build that into something else... There didn't seem to be much middle-ground, but as you've probably already seen, I decided to use a VFD. The LCD compatable alpha-numeric models have similar character sizes, but they are much more readable because of the better contrast and freedom from changes with viewing angle. In the end, I ended up using a graphic display model so I could choose the font size.