Silicon ChipUltra-LD Stereo Preamplifier & Input Selector, Pt.1 - November 2011 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Mains surge suppressors are not a condition of electronic product warranties
  4. Feature: Power Your Pedal Pushie (Or Building An eBike) by Ross Tester
  5. Feature: Steadicam: Taking The Bumps Out Of Movies, Pt.1 by Barrie Smith
  6. Project: Build A G-Force Meter by Andrew Levido & Nicholas Vinen
  7. Project: The MiniMaximite Computer by Geoff Graham
  8. Project: Ultra-LD Stereo Preamplifier & Input Selector, Pt.1 by John Clarke & Greg Swain
  9. Review: Tektronix MDO4104-3 Mixed Domain Oscilloscope by Nicholas Vinen
  10. Project: 2.2-100V Zener Diode Tester by John Clarke
  11. Vintage Radio: The Astor P7G 8-Transistor AM Portable Radio by Rodney Champness
  12. Book Store
  13. Advertising Index
  14. Outer Back Cover

This is only a preview of the November 2011 issue of Silicon Chip.

You can view 26 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Steadicam: Taking The Bumps Out Of Movies, Pt.1 (November 2011)
  • Steadicam: Taking The Bumps Out Of Movies, Pt.1 (November 2011)
  • Steadicam: Taking The Bumps Out Of Movies, Pt.2 (December 2011)
  • Steadicam: Taking The Bumps Out Of Movies, Pt.2 (December 2011)
Items relevant to "Build A G-Force Meter":
  • Digital Spirit Level/Inclinometer or G-Force Meter PCB [04108111] (AUD $10.00)
  • PIC18LF14K22-I/P programmed for the G-Force Meter [0410811C.HEX] (Programmed Microcontroller, AUD $15.00)
  • Firmware (HEX file) and C source code for the G-Force Meter (Software, Free)
  • Digital Spirit Level/Inclinometer/G-Force Meter PCB pattern (PDF download) [04108111] (Free)
  • G-Force Meter panel artwork (PDF download) (Free)
Items relevant to "The MiniMaximite Computer":
  • miniMaximite Microcomputer PCB [07111111] (AUD $10.00)
  • PIC32MX695F512H-80I/PT programmed for the Maximite/miniMaximite (V2.7) (Programmed Microcontroller, AUD $30.00)
  • MaxiMite Firmware v4.1, documentation, libraries, sample software, serial port driver and sprint/font editor (Free)
  • miniMaxiMite PCB pattern (PDF download) [07111111] (Free)
Items relevant to "Ultra-LD Stereo Preamplifier & Input Selector, Pt.1":
  • Input Switching Module PCB for the Low Noise Preamplifier [01111112] (AUD $15.00)
  • Input Selection Pushbutton PCB for the Low Noise Preamplifier [01111113] (AUD $5.00)
  • Preamp & Remote Volume Control PCB for the Ultra-LD Mk3 [01111111] (AUD $30.00)
  • PIC16F88-I/P programmed for the Low-Noise Stereo Preamp [0111111B.HEX] (previously 0111111A.HEX) (Programmed Microcontroller, AUD $15.00)
  • Firmware and source code for the Low-Noise Stereo Preamplifier [0111111B.HEX] (previously 0111111A.HEX) (Software, Free)
  • Low-Noise Stereo Preamplifier Input Switcher PCB pattern (PDF download) [01111112] (Free)
  • Low-Noise Stereo Preamplifier Input Selector Pushbutton PCB pattern (PDF download) [01111113] (Free)
  • Low-Noise Stereo Preamplifier Main PCB pattern (PDF download) [01111111] (Free)
Articles in this series:
  • Ultra-LD Stereo Preamplifier & Input Selector, Pt.1 (November 2011)
  • Ultra-LD Stereo Preamplifier & Input Selector, Pt.1 (November 2011)
  • Ultra-LD Stereo Preamplifier & Input Selector, Pt.2 (December 2011)
  • Ultra-LD Stereo Preamplifier & Input Selector, Pt.2 (December 2011)
Items relevant to "2.2-100V Zener Diode Tester":
  • Zener Diode Tester PCB [04111111] (AUD $10.00)
  • Zener Diode Tester PCB pattern (PDF download) [04111111] (Free)
  • Zener Diode Tester panel artwork (PDF download) (Free)
Ultra-LD Mk.3 Stereo Amplifier . . . Pt.1: By JOHN CLARKE & GREG SWAIN Low-Noise Stereo Preamp With Motorised Volume Control & Input Selector Designed for use with the Ultra-LD Mk.3 amplifier modules, this high-quality stereo preamplifier features a motorised volume control potentiometer. It is teamed with a 3-Input Selector board and both are controlled by the same infrared remote. B Y NOW, most readers will have realised that we intend describing a complete stereo amplifier in coming months, based on two Ultra-LD Mk.3 120W power amplifier modules. As well as the amplifier and power supply modules (July-September, 2011), we’ve also described the Loudspeaker Protector module (October 2011) and this month we are presenting the Pre­ amplifier/Volume Control and Input Selector modules. The preamplifier is a slightly modified (and improved) version of the cir62  Silicon Chip cuit described in the August 2007 issue for our 20W Stereo Class-A Amplifier. It’s a minimalist design delivering ultra-low noise and distortion. The basic configuration was originally used our Studio Series Stereo Preamplifier described in October 2005. It employs a dual op amp IC in each channel, the first stage providing the gain and the second stage acting as a buffer for the volume control, to present a low output impedance to the power amplifier modules. In addition, the preamplifier PCB carries an infra- red receiver, a PIC microcontroller and the motorised potentiometer to provide the remote volume control feature. The PIC micro on the preamp PCB also provides the necessary decoding for the input selection. The resulting control signals are fed to a header socket and are coupled to a matching header socket on the Input Selector board via a 10-way IDC cable. Also on the selector board are three stereo RCA input socket pairs, three relays to switch the inputs and a pair of siliconchip.com.au The IR receiver & microcontroller used for remote volume control on the preamp board (left) are also used to control the 3-Input Selector board at right. internal RCA output sockets. The latter connect to matching input sockets on the preamp. Performance We have tweaked the already excellent August 2007 design for even lower THD+N (total harmonic distortion and noise) by making a few simple changes. Actually, while the changes are simple, the process of arriving at those changes was anything but simple and it took a a great deal of laborious testing of a number of prototypes as we gradually honed in on the final circuit configuration. The improvements in performance are mainly in the frequencies above 5kHz Fig.7 plots the THD+N for bandwidths of 20Hz-80kHz and 20Hz30kHz. As can be seen, the THD+N for 20Hz-30kHz (blue line) is generally less than 0.0007% all the way up to 9kHz and is still less than 0.0008% at 20kHz. And for 20-80kHz bandwidth (red), it’s less than 0.0008% all the way up to about 16kHz, with just a very slight rise after that. Those curves look excellent but that’s not the whole story. As with the Class-A Stereo Amplifier described in 2007, we are limited by the residual distortion in our test set-up. The green line plots the THD+N of the sinewave generator in our Audio Precision test gear and it’s only slightly below the THD+N plots for the preamplifier. For us to make an accurate distortion siliconchip.com.au measurement, the residual distortion in the Audio Precision gear would have be -10dB (about one third) below that of the equipment to be measured. So we really don’t know how good the preamplifier is. It’s so good that we cannot accurately measure it. Note that while the above measurements may appear slightly worse than the 0.0005% quoted for the August 2007 design, the two sets of measurements were taken under different conditions. The original measurements were taken at full volume, while the latest measurements were taken at quarter volume which is more realistic given that CD & DVD players have a high output signal level. This also affects the signal-to-noise ratio and the separation between channels. By any measure, this new design outperforms the original when it comes to THD+N and the other specifications are equally as good. The signal-to-noise ratio is better than -115dB, the channel separation is better than -87dB at 1kHz and the frequency response is virtually ruler flat from 20-20kHz. The accompanying specifications panel and the graphs show the details. The circuit changes made to the original design and the resulting performance improvements are detailed in a separate panel. As well as these circuit changes, we also substituted vertical RCA sockets in place of the screw terminal blocks for the audio input and output connections. And of course, the preamplifier PCB now carries a header socket (in the remote control section) to interface with the Input Selector module. Remote volume control The remote volume control operation is straightforward. Press the “Volume Up” and “Volume Down” buttons on the remote and the pot rotates clockwise and anticlockwise. It takes about nine seconds for the pot to travel from one end to the other using these controls. For finer adjustment, the “Channel Up” and “Channel Down” buttons on the remote can be used instead. These cause the pot shaft to rotate about 1° each time one of these buttons is briefly pressed. Alternatively, holding one of these buttons down rotates the pot from one end to the other in about 28 seconds. If any of the buttons is held down when the pot reaches an end stop, a clutch in the motor’s gearbox slips so that no damage is done. Automatic muting is another handy feature. Press the “Mute” button on the remote and the volume control pot automatically rotates to its minimum position and the motor stops. Hit the button again and it returns to its original position. Don’t want the pot to return all the way to its original setting? Easy – just hit one of the volume control buttons when the volume reaches the desired level. November 2011  63 Features & Performance Main Features • • • High performance design – very low noise and distortion Preamplifier module designed for the Ultra-LD Mk.3 Stereo Amplifier but can also be used in the Class-A Stereo Amplifier and with other power amplifier modules Remote input selection (three inputs) plus remote volume control (with muting) using a motorised potentiometer Measured Performance Frequency response................. flat from 10Hz to 20kHz, -1.25dB <at> 100kHz Input impedance...................................................................................~22kW Output impedance..................................................................................100W THD+N.................................. <0.001% 20Hz-20kHz BW (typically 0.0004%) Signal-to-noise ratio............................................................................-115dB Channel separation................................................ >87dB (>70dB <at> 10kHz) Preamplifier Gain...................................................................................... 0-2 Output signal level.................................................................... up to 8V RMS Note: All measurements made at 1kHz, 2V RMS input & 1V RMS output, and 20-80kHz bandwidth A couple of LED indicators – “Ack” and “Mute” – are used to indicate the status of the Remote Volume Control. The orange “Ack” (acknowledge) LED flashes whenever an infrared signal is being received from the remote, while the yellow “Mute” LED flashes while the muting operation is in progress and then remains on when the pot reaches its minimum setting. So how does the unit remember its original setting during muting? The answer is that the microcontroller actually measures the time it takes for the pot to reach its minimum setting. When the Mute button is subsequently pressed again to restore the volume, power is applied to the motor drive for the same amount of time. The input selection is controlled by pressing the “1”, “2” & “3” buttons on the remote (for input 1, input 2 & input 3, respectively). Alternatively, the inputs can be selected by pressing the three buttons on a separate small Switch Board. An integral blue LED in each button lights to indicate the selected input. The Switch Board connects to the Input Selector Board via a 14-way IDC cable and matching header sockets. So the Input Selector Board has two header sockets – one to accept the signals from the Switch Board and one to 64  Silicon Chip accept the remote control signals from the Preamplifier Board. Preamplifier circuit Fig.1 shows the preamplifier circuit details but only the left channel is shown for clarity. The audio signal from the Selector Input board is AC-coupled to the input of the first op amp (IC1a) via a 22μF capacitor and 100Ω resistor, while a 22kΩ resistor to ground provides input termination. In addition, the 100Ω resistor, a ferrite bead and a 470pF capacitor form a low-pass filter. This attenuates radio frequencies (RF) ahead of the op amp input. IC1a operates with a voltage gain of 2 (+6dB) by virtue of the two 2.2kΩ feedback resistors. The 2.2kΩ resistor and 470pF capacitor combination roll off the top-end frequency response, with a -3dB point at about 150kHz. This gives a flat response over the audio spectrum while eliminating the possibility of high-frequency instability. IC1a’s pin 1 output is fed to the top of volume control potentiometer VR1a (20kΩ log) via a 22µF non-polarised capacitor. The signal on its wiper is then AC-coupled to the pin 5 input of IC1b via a 4.7µF non-polarised capacitor. The resistance of the pot affects the noise and distortion performance of the preamplifier and ideally a 5kΩ (or 10kΩ) pot would be used. However, a 20kΩ motorised pot is all that’s readily available for now, so we’ve lowered the source impedance seen by the following stage (IC1b) by connecting a 4.7kΩ resistor between the pot’s wiper and ground. The compromise is that the response curve of the volume control is slightly altered. Fig.10 shows the simulated response curve of a shunted pot (red) compared to an ideal log pot (blue). As can be seen, the volume doesn’t increase quite as quickly as it otherwise would for much of the pot’s travel and then increases more rapidly right towards the end. This isn’t particularly noticeable in practice and just means that the pot has to be set slightly higher than normal for the same output level. The effect of the shunt resistance on the noise and distortion (THD+N) is illustrated in Fig.11. As shown, the THD+N is reduced from about 0.001% to less than 0.0006% at 1kHz and from just over 0.003% to about 0.001% at 20kHz. IC1b operates as a unity-gain buffer and provides a constant low-impedance output regardless of the volume control setting. Its pin 7 output is fed to output socket CON2 via a 22μF non-polarised capacitor and a 100Ω resistor to ensure stability. This resistor, together with the ferrite bead in series with the output, also attenuates any RF noise. Power for the circuit is derived directly from the ±15V regulated outputs on the Power Supply board (described in September 2011). These ±15V rails are filtered using 220µF filter capacitors. Remote control circuit Now let’s take a look at the Remote Control circuitry which is also shown on Fig.1. Signals from the remote are picked up by infrared receiver IRD1 and the resulting data fed to RB0 (pin 6) of a PIC16F88-I/P microcontroller (IC3). IC3 then decodes this data and, depending on the button pressed on the remote, either drives the volume control motor (via an external transistor circuit) or sends its RB6, RB7 or RB5 output low to select a new input. Fig.2 shows IRD1’s internal details. It has just three leads but is a complete infrared detector and processor. siliconchip.com.au LEFT IN (CON3) CON1 22 F NP 100 IC1a (IC2a) 2 1 –15V 2.2k 4.7 F NP VR1a (VR1b) 20k LOG LOW-PASS FILTER 470pF 2.2k 100nF 22 F NP 3 470pF 22k +15V IC1, IC2: LM833N FERRITE BEAD 100 4.7k* 6 100k IC1b (IC2b) 7 4 AMPLIFIER GAIN = 2 FERRITE BEAD 22 F NP 8 5 (CON4) CON2 100 LEFT OUT 100k BUFFER * DELETE IF 4.7k POT IS FITTED –15V CON6 (NOTE: ONLY LEFT CHANNEL SHOWN; LABELS IN BRACKETS REFER TO RIGHT CHANNEL) +15V +15V 220 F 25V 0V LM833N 220 F 25V 4 8 1 REG3 7805 22 IN 10 F 16V +5V LK3 IRD1 LK3: MUTE RETURN LK4: NO MUTE RTN 3 LK4 1 6 RB4 RB0 RA0 CON7 1 2 3 4 5 6 7 8 9 10 '1' 12 '2' 13 '3' 11 RB1 RB6 RB7 RB2 RB5 +5V 15 X1 4MHz 22pF 1k 9 B B C 22pF 16 AN3 OSC2 RA1 RA2 OSC1 Vss 5 E C 100nF CON8 17 MOTOR – 1k 7 1k 8 Q2 BC337 2 1 A A  MUTE  LED3 K K A ENDSTOP ADJUST VR2 1k 18k C E 10 100nF B 1 C 7805 IRD1 BC327, BC337 E B Q4 BC337 E 330 ACK LED2 10nF C B 18 330 K SC Q3 BC327 E 1k 10 LEDS 2011 Q1 BC327 K Vdd RA4 POWER  LED1 IC3 PIC16F88-I/P 2 TO INPUT BOARD A 14 MCLR 100 F 16V 2.7k 100nF 10k RB3 100 F 16V  100nF 4 100 3 –15V +5V OUT GND 100 F 25V –15V + +15V 0V 2 3 GND IN GND OUT STEREO PREAMPLIFIER & REMOTE VOLUME CONTROL Fig.1: each channel of the preamp stage (top) is based on a low-distortion LM833N dual op amp (left channel only shown). IC1a has a gain of two while IC1b functions as a unity gain buffer to provide a constant low-impedance output. The remote volume control section (immediately above) is based on a PIC16F88-I/P microcontroller (IC3). This processes the signal from infrared detector IRD1 and controls a motorised pot via H-bridge transistors Q1-Q4. siliconchip.com.au November 2011  65 Parts List Preamp & Remote Volume Control Module 1 PCB, code 01111111, 201 x 63mm 1 Alpha dual-ganged 20kW log motorised pot (VR1) (Altronics Cat. R2000) 1 1kW horizontal trimpot (VR2) 1 10-pin PC-mount IDC header socket (Altronics P5010) 1 18-pin DIP nachined IC socket 2 8-pin DIP machined IC sockets 2 vertical PC-mount RCA sockets, white (Altronics P0131) 2 vertical PC-mount RCA sockets, red (Altronics P0132) 1 3-way PC-mount screw terminal block, 5.08mm pitch (Altronics P2035A – do not substitute) 1 4MHz crystal (X1) 4 ferrite beads (Altronics L5250A) 1 3-way SIL pin header 1 2-way SIL pin header 1 jumper links to suit header 1 6.35mm chassis or PCB-mount single-ended spade connector (eg, Altronics H2094) 2 100mm cable ties 4 M3 x 25mm tapped metal spacers 4 M3 x 6mm screws 1 M4 x 10mm screw 1 M4 nut 1 M4 flat washer 1 M4 star washer 250mm 0.8mm tinned copper wire 180mm light-duty red hook-up wire 180mm light-duty black hook-up wire Semiconductors 2 LM833 op amps (IC1, IC2) 1 PIC16F88-I/P programmed with “0111111A.hex” (lC3) It picks up the 38kHz infrared pulse signal from the remote and amplifies this to a constant level. This is then fed to a 38kHz bandpass filter and then demodulated to produce a serial data burst at IRD1’s pin 1 output. IC1 decodes the signals from IRD1 according to the RC5 code sent by the remote (RC5 is a Philips remote control protocol). There are three different remote control “modes” (or devices) to choose from – either TV, SAT1 or 66  Silicon Chip 1 infrared receiver module (IRD1) (Altronics Z1611A, Jaycar ZD1952) 1 7805 5V regulator (REG3) 2 BC327 PNP transistors (Q1,Q3) 2 BC337 NPN transistors (Q2,Q4) 1 3mm blue LED (LED1) 1 3mm orange LED (LED2) 1 3mm yellow LED (LED3) Capacitors 2 220mF 25V PC electrolytic 1 100mF 25V PC electrolytic 2 100mF 16V PC electrolytic 6 22mF NP electrolytic 1 10mF 16V PC electrolytic 2 4.7mF NP electrolytic 6 100nF MKT polyester 1 10nF MKT polyester 4 470pF MKT polyester or MKP polypropylene (do not use ceramic) 2 22pF ceramic Resistors (0.25W, 1%) 4 100kW 4 2.2kW 2 22kW 4 1kW 1 18kW 2 330W 1 10kW 7 100W 2 4.7kW 1 22W 1 2.7kW 1 10W Input Switching Module 1 PCB, code 01111112, 109.5 x 84.5mm 3 DPDT 5V relays, PC-mount (Altronics S4147) 3 PC-mount gold-plated dual RCA sockets (Altronics P0212) 4 M3 x 10mm tapped spacers 1 10-pin PC-mount IDC header socket (Altronics P5010) 1 14-pin PC-mount IDC header socket (Altronics P5014) 1 8-pin DIP machined IC socket SAT2 – and you must also program the remote with the correct code (see panel next month). The default mode is TV but SAT1 can be selected by pressing button S1 (on the Switch Board) during power up, while SAT2 can be selected by pressing S2 during power up. Pressing S3 at power up reverts to TV mode. Motor drive IC1’s RB1-RB4 outputs drive the 1 vertical PC-mount RCA socket, white (Altronics P0131) 1 vertical PC-mount RCA socket, red (Altronics P0132) 2 ferrite beads (Altronics L5250A, Jaycar LF1250) 4 M3 x 6mm machine screws Semiconductors 1 LM393 comparator (IC4) 3 BC327 PNP transistors (Q5-Q7) 1 BC337 NPN transistor (Q8) 3 1N4004 diodes (D1-D3) Capacitors 2 10μF 16V electrolytic 2 100nF MKT polyester 2 470pF MKT polyester or MKP polypropylene (do not use ceramic) Resistors 3 100kW 2 10kW 11 2.2kW 6 100W Switch Module 1 PCB, code 01111113, 66 x 24.5mm 1 14-pin PC-mount IDC header socket (Altronics P5014) 3 PC-mount pushbutton switches with blue LEDs (Altronics S1173, Jaycar SP0622) Test Cables 2 14-pin IDC line sockets 2 10-pin IDC line sockets 1 350mm length 14-way IDC cable 1 250mm length 10-way IDC cable Note: 470pF MKP or MKT capacitors are available from Element14 (1413947 or 1005988) and from Rockby Electronics (35065 or 34463). bases of transistors Q1-Q4 via 1kΩ resistors. These transistors are arranged in an H-bridge configuration and control the motor. The motor is off when RB1-RB4 are all high. In that state, RB3 & RB4 turn PNP transistors Q1 & Q3 off, while RB1 & RB2 turn NPN transistors Q2 & Q4 on. As a result, both terminals of the motor are pulled low and so the motor is off. Note that the emitters of Q2 & Q4 both connect to ground via siliconchip.com.au a common 10Ω resistor (more on this shortly). The transistors operate in pairs so that the motor can be driven in either direction (to increase or decrease the volume). To drive the motor clockwise, RB2 goes low and turns off transistor Q2, while RB3 goes low and turns on Q1. When that happens, the lefthand terminal of the motor is pulled to +5V via Q1, while the righthand terminal is pulled low via Q4. As a result, current flows through Q1, through the motor and then via Q4 and the 10Ω resistor to ground. Conversely, to turn the motor in the other direction, Q1 & Q4 are switched off and Q2 & Q3 are switched on (RB2 & RB4 high). As a result, the righthand motor terminal is now pulled to +5V via Q3, while the lefthand terminal is pulled low via Q2. The voltage across the motor depends on the voltage across the common 10Ω emitter resistor and that in turn depends on the current. Typically, the motor draws about 40mA when driving the potentiometer but this rises to over 50mA when the clutch is slipping. As a result, the motor voltage is around 4.5-4.6V due to the 0.4-0.5V drop across the 10Ω resistor (the rated motor voltage is 4.5V). Current sensing & muting Once the pot’s wiper reaches its fully clockwise or anti-clockwise position, a clutch in the gearbox begins to slip. This prevents the motor from stalling and possibly overheating if the button on the remote continued to be held down. The clutch mechanism also allows the user to manually rotate the pot shaft if necessary. The muting function operates by using the microcontroller to detect when the wiper reaches its anti-clockwise limit. It does this by indirectly detecting the increase in the motor current when the limit is reached and that’s done by sampling the voltage across the 10Ω resistor using trimpot VR2. The sampled voltage at VR2’s wiper is filtered using an 18kΩ resistor and a 100nF capacitor (to remove the commutator hash from the motor) and applied to IC3’s analog AN3 input (pin 2). IC3 then measures the voltage on AN3 to a resolution of 10-bits, or about 5mV. Provided this input is below 200mV, the PIC microcontroller allows the motor to run. However, as soon as the voltage rises above this 200mV limit, siliconchip.com.au How We Tweaked The Preamplifier As stated in the article, the circuit and PCB for the preamplifier/remote volume control are based directly on the preamplifier designed for the Class-A Stereo Amplifier and published in August 2007. While we were adding the input switching functions, we sought to improve the performance at the same time. The changes were as follows: (1) The 4.7μF non-polarised capacitors at the input of each channel were increased to 22μF. This slightly (but measurably) reduces harmonic distortion, especially at low frequencies, and also slightly reduces noise. The reason for this is that the non-linearities of electrolytic capacitors become significant as the signal frequency is reduced and their resulting impedance rises to become comparable with the surrounding circuit impedances. By using larger values, we reduce the capacitors’ impedance and therefore their distortion contribution. The noise reduction at low frequencies is also due to the larger capacitor’s lower impedance, which is part of the source impedance for the non-inverting inputs of IC1a & IC2a (pin 3). We also increased the 1µF non-polarised capacitors at the wipers of the potentiometer to 4.7µF for the same reason. This results in a further measurable reduction in THD+N (total harmonic distortion and noise). (2) The feedback resistors for IC1a & IC2a have been reduced from 4.7kΩ to 2.2kΩ. At the same time, the feedback capacitor has been increased to 470pF to keep the frequency response the same. As before, this is done to lower the source impedance seen by op amps IC1a & IC2a, this time for the inverting input (pin 2). Lower value resistors also produce less Johnson-Nyquist (thermal) voltage noise. The resulting improvement is again small but measurable. (3) The four ceramic capacitors have been changed to metal-film types, either MKT polyester or MKP polypropylene. These includes the aforementioned 470pF feedback capacitors as well as the two RF filter capacitors, which were 560pF but have been changed to the more common value of 470pF. MKT polyester or MKP polypropylene types have now been specified because regular ceramic capacitors exhibit significant non-linearity. NP0/C0G ceramic capacitors have better linearity than the more common types (X7R, Y5V, etc) but are still not quite as good as metallised dielectric capacitors (eg, MKP, MKT). This change is responsible for a large reduction in distortion above 1kHz – see Fig.12. For the same reason, we are also specifying metal-film types for the RF filter capacitors on the new Input Selector board. The final result is a THD+N which is virtually flat with frequency (see Fig.12). (4) LM833 dual low-noise op amps are now specified instead of the newer LM4562 types used previously. While the LM4562 is better on paper, the Audio Precision System One generally reports lower distortion when we substitute an LM833 or NE5532 (the LM833 has slightly lower noise). In this particular case, the LM833 gives about a 6dB improvement in the signal-to-noise ratio, even though its noise voltage is supposedly higher. We have some theories to explain this but they’re quite involved and we don’t have room to go into them here. Since the LM833 is easier to get, substantially cheaper and performs better in this circuit, it’s the obvious choice. (5) We have added 4.7kΩ resistors between the pot wipers and ground. This has two benefits. First, it effectively lowers the source impedance seen by the following op amp stage in each channel, lowering the noise floor. And second, it also lowers the high-frequency distortion by reducing the coupling between tracks, due to the lower impedance signal path (we’re starting to sound like a broken record but low impedance really is critical). This results in a fairly substantial improvement in the THD+N performance when the volume control is at an intermediate setting and the improvement is greatest at its -6dB setting (see Fig.11). This does cause a slight deviation from the log-law of the pot. Having said that, most log pots only have an approximate logarithmic relationship anyway. The effect of a shunt resistor on a theoretical pot with an ideal log law is shown in Fig.10. The most noticeable difference in volume control progressiveness is that it doesn’t increase as rapidly as the pot is advanced but then increases more rapidly towards the end. In practice, with a motorised volume control being used, the effect will not be noticeable. Of course, we would be better off using a lower value pot (say 4.7kΩ) but a 20kΩ log motorised pot is all that’s readily available for now. If a 4.7kΩ log motorised pot does become available, it can be directly substituted and the 4.7kΩ shunt resistors left out. Nicholas Vinen November 2011  67 Fig.2: the IR receiver contains a lot more than just a photodiode. Also included are an amplifier plus AGC, bandpass filtering and demodulation circuits, all in the 3-pin package. After the 38kHz carrier is removed, the data appears on pin 1, ready to be processed by the microcontroller. the motor is stopped. When the motor is running normally, the current through it is about 40mA, which produces 0.4V across the 10Ω resistor. VR2 attenuates this voltage and is adjusted so that the voltage at AN3 is slightly below the 200mV limit. When the pot reaches its end stop, the extra load imposed by the slipping clutch increases the current and so the voltage applied to AN3 suddenly rises above 200mV. This is detected by IC3 during muting and it then switches the H-bridge transistors (Q1-Q4) to immediately stop the motor. Note that AN3 is monitored only during the muting operation (ie, when the Mute button on the remote is pressed). At other times, when the volume is being set by the Up or Down buttons on the remote, the voltage at AN3 is not monitored. As a result, the clutch in the motor’s gearbox assembly simply slips when the potentiometer reaches its clockwise or anticlockwise limits. Pressing the Mute button on the remote again after muting returns the volume control to its original setting. This “mute return” feature is enabled by installing link LK3 to pull RA4 (pin 3) to +5V. Conversely, removing LK3 and installing LK4 to pull RA4 to ground disables mute return. Indicator LEDs LEDs 1-3 indicate the status of the circuit. The blue Power LED (LED1) lights whenever power is applied to the circuit. The other two LEDs – Ack (acknowledge) and Mute – light when their respective RA2 and RA1 outputs are 68  Silicon Chip pulled high (ie, to +5V). As indicated previously, the Ack LED (orange) flashes whenever RB0 receives an infrared signal from the remote, while the Mute LED (yellow) flashes during the Mute operation and then stays lit while the volume remains muted. Input selector control Ports RB6, RB7 & RB5 of IC3 control the relays on the Input Selector Board. These ports go low when their corresponding 1, 2 & 3 buttons on the remote are pressed and are opencircuit (O/C) at other times. As shown, RB6, RB7 & RB5 are connected to pins 1-6 of 10-way header socket CON7 (each output is connected to two pins in parallel). In addition, pins 7 & 8 of CON7 are connected to the +5V rail, while pins 9 & 10 go to ground. As previously indicated, CON7 is connected to a matching header socket on the Input Selector Board via an IDC cable. This provides both the input selection signals and the supply rails to power this module. Crystal oscillator Pins 15 & 16 of IC3 are the oscillator pins for 4MHz crystal X1 which is used to provide the clock signal. This oscillator runs when the circuit is first powered up for about 1.5 seconds. It also runs when ever an infrared signal is received at RB0 or when a button on the switch board is pressed and then for a further 1.5 seconds after the signal ceases. The oscillator then shuts down and the processor goes into sleep mode. This ensures that no noise is radiated into the sensitive audio circuitry when the remote control circuit is not being used (ie, if the volume is not being altered or input selection is not taking place). Note that shut-down does not occur if a Muting operation is still in process. In addition, the motor is enclosed by a metal shield which reduces radiated electrical hash from the commutator brushes. A 10nF capacitor connected directly across the motor terminals also prevents commutator hash from being transmitted along the supply leads, while further filtering is provided by a 100nF capacitor located at the motor output terminals on the PCB. Power for the remote control circuit is derived from the +15V supply to the preamplifier. This is fed via a 22Ω resistor to regulator REG3 to derive a +5V supply rail to power IC3, IRD1 and the H-bridge driver stage for the motor. A 100µF capacitor filters the input to REG3, while 10µF and 100nF capacitors decouple the output. In addition, the supply to IRD1 is filtered using a 100Ω resistor and a 100µF capacitor to prevent it from false triggering due to “hash” on the 5V rail. Input Selector circuit The Input Selector circuit (see Fig.3) uses three 5V DPDT relays (RLY1RLY3) to select one of three stereo inputs: Input 1, Input 2 or Input 3. The relays are controlled by PNP transistors Q5-Q7, depending on the signals from the PIC16F88-I/P microcontroller in the Remote Control circuit (and fed through from CON7 to CON8). As shown, the incoming stereo linelevel inputs are connected to the NO (normally open) contacts of each relay. When a relay turns on, its common (C) contacts connect to its NO contacts and the stereo signals are fed through to the left and right outputs via 100Ω resistors and ferrite beads. The resistors isolate the outputs from the audio cable capacitance, while the beads and their associated 470pF capacitors filter any RF signals that may be present. When button 1 is pressed on the remote, pins 1 & 2 on CON8 are pulled low (via RB6 of IC3 in the Remote Control circuit). This pulls the base of transistor Q5 low via a 2.2kΩ resistor and so Q5 turns on and switches on RLY1 to select Input 1 (CON11). Similarly, RLY2 & RLY3 are switched on via Q6 & Q7 respectively when buttons 2 and 3 are pressed on the remote. Only one relay can be on at any siliconchip.com.au CON11 FERRITE BEAD 100 CON14 L OUT L1 IN 470pF 100 R1 IN CON12 L2 IN FERRITE BEAD 100 RELAY 1 CON15 R OUT 470pF 100 R2 IN 100 RELAY 2 CON13 L3 IN 100 R3 IN RELAY 3 Q5 BC327 E B C 1 2.2k 3 2.2k RELAY 1 K 2 D1 2.2k A 4 C Q6 BC327 K D2 A Q7 BC327 K 10 F D3 A 2.2k 2.2k 2.2k 2.2k CON8 8 1 2.2k 9 10 11 2 3 4 5 6 7 2.2k 8 9 10 12 3x 100k 13 14 10k 2.2k 2 1 K  4 A LED2 LED1  A K  LED3 A 3 K 5 6 7 8 9 10 11 12 13 S1 S2 S3 6 100nF 10k 8 IC4 5 100nF 2 TO CON9 ON INPUT SELECTOR BOARD FRONT PANEL SWITCH BOARD TO CON7 ON PREAMP 7 CON10 SC C 5 6 3 2011 E B RELAY 2 CON9 TO CON10 ON FRONT PANEL SWITCH BOARD E RELAY 3 B 2.2k 1 C Q8 BC337 10 F E 4 IC4: LM393 D1–D3: 1N4004 A 14 B K LED1–LED4 K A BC327, BC337 B E C ULTRA-LD AMPLIFIER INPUT SELECTOR Fig.3: the Input Selector circuit uses relays RLY1-RLY3 to select one of three stereo inputs: Input 1, Input 2 or Input 3. These relays are switched by transistors Q5-Q7, depending on the signals from the PIC16F88-I/P microcontroller on the preamp board. Alternatively, switches S1-S3 on the switch board can also be used to select the inputs. time. Pressing an input button (either on the remote or the switch board) turns the currently-activated relay off before the newly-selected relay turns siliconchip.com.au on. If the input button corresponds to the currently-selected input, then no changes takes place. The last input selected is restored at power up. Also shown on Fig.4 is the circuitry for the front panel Switch Board. This consists of three momentary contact pushbuttons with integral blue LEDs November 2011  69 100 F 16V LED3 VOLUME Fig.4: follow this parts layout diagram to build the Preamplifier & Remote Volume Control board. Be sure to use the correct part at each location and make sure that all polarised components are correctly orientated. The leads from the motor are strapped to the underside of the PCB using cable ties and are soldered to two header pins which protrude down through the board near IC3. 22 F NP BEAD 100k GEARING AND CLUTCH 470pF 2.2k 2.2k (MOTOR) 100 470pF 22k 10nF 4.7k* 100k 22 F NP 4.7 F NP 100 BEAD TO CHASSIS * DELETE IF 4.7k VOLUME CONTROL POT IS FITTED 100 IC1 LM833 22 F NP 22 F NP BEAD 2.2k 2.2k 100nF 470pF 100k 22k 22 F NP 100 470pF 100k LEFT OUTPUT CON2 4.7 F NP 100 BEAD LEFT INPUT CON1 Q1,Q3: BC327 Q2,Q4: BC337 100 IC2 LM833 RIGHT INPUT RIGHT OUTPUT CON4 CON3 22 F NP 100nF –15V 4.7k* VR1a/b 0V CABLE TIES SECURE MOTOR LEADS UNDER BOARD MUTE 10 F 16V 100 F 25V 220 F 220 F CON6 +15V 70  Silicon Chip IRD1 100 REG3 7805 22pF 22pF 330 1 2 9 10 CON7 22 (LEDs1-3) plus a 14-way header socket (CON10) which is connected to CON9 via an IDC cable. One side of each switch is connected to ground, while the tops of S1-S3 are respectively connected back to the RB6, RB7 & RB5 ports of IC3 ACKNOWLEDGE POWER LED1 18k 330 LK4 10k LK3 1k + 100nF _ Q1 16V Q3 1k 100nF X1 100 F IC3 PIC16F88-I/P Q4 Q2 1k 1k FROM AMPLIFIER POWER SUPPLY LED2 1k 10 100nF 100nF SOLDER MOTOR LEADS TO HEADER PINS (UNDER BOARD) VR2 2.7k 01111111 PREAMPLIFIER LOW NOISE STEREO in the Remote Control circuit. When a switch is pressed, it pulls its corresponding port low and this wakes the microcontroller up which then turns on the corresponding relay and promptly goes back to sleep again (ie, the port remains low). IRD1 4mm BOARD 3mm 6mm LEDS1–3 4mm BOARD 10mm Fig.5: bend the leads for IRD1 and the three LEDs as shown here before installing them on the preamp PCB. The centre line of each lens must be 4mm above the board surface. M4 SCREW SPADE LUG PCB FLAT WASHER M4 NUT STAR LOCKWASHER Fig.6: the spade connector lug is mounted on the PCB as shown here. Alternatively, the board can accept a solder-type connector. The anodes of LEDs1-3 are connected to +5V, while their cathodes are respectively connected to the RB6, RB7 & RB5 ports via 2.2kΩ current limiting resistors. As a result, when one of these ports switches low to select a new input, it lights the corresponding switch LED as well. This occurs whether the input was selected using the remote control or pressing a switch button. At the same time, the cathodes of the other LEDs are held high via 2.2kΩ siliconchip.com.au This view shows how the leads and the 10nF capacitor are connected to the pot motor terminals. Make sure that the motorised pot is correctly seated against the PCB before soldering its terminals, otherwise its shaft won’t line up with the front panel clearance hole later on. pull-up resistors to the +5V rail and are off. Preventing switch conflicts IC4 and Q8 prevent more than one relay from turning on if two or more input switches – either on the remote or the switch board – are pressed sim­ ultaneously. This circuit also ensures that the currently-activated relay is switched off if a different input button is pressed (ie, before the newlyselected relay is turned on). IC4 is an LM393 comparator and is wired so that its non-inverting input (pin 3) monitors the three switch lines via 100kΩ resistors. These resistors function as a simple DAC (digital-toanalog converter). If one switch line is low, the voltage on pin 3 of IC1 is 3.3V; if two are low (eg, if two switches are pressed simultaneously), pin 3 is at 1.67V; and if all three lines are low, pin 3 is at 0V. This pin 3 voltage is compared to a 2.5V reference on IC1’s inverting input (pin 2). Its pin 1 output is high only when one switch line is low and this turns on Q8 which switches the bottom of the relay coils to ground. This allows the selected relay to turn on. However, if two or more switch lines are low, IC4’s output will be low and so Q8 and all the relays turn off. Similarly, if one switch line is already low and another input is selected (pulling siliconchip.com.au its line low), IC4’s output will briefly go low to switch off all the relays before going high again (ie, when the micro toggles its RB5-RB7 outputs) to allow the new relay to turn on. IC4’s 2.5V reference is derived from a voltage divider consisting of two 10kΩ resistors connected across the 5V supply rail. Construction Fig.4 shows the assembly details for the Preamplifier & Remote Volume Control module (the 3-Input Selector module and the Switch Board assemblies will be described next month). All the parts for the preamplifier are installed on a PCB coded 01111111 and measuring 201 x 63mm. The external connections to the power supply are run via insulated screw terminal blocks while the audio signals are fed in via vertical RCA sockets. Begin by checking that the motorised pot and the various connectors fit correctly. That done, start the assembly by installing the 10 wire links. You can straighten the link wire by securing one end in a vice and then pulling on the other end using a pair of pliers, to stretch it slightly. Note that four of the links are used to replace several parts that were necessary for the Class-A Amplifier, ie, diodes D1 & D2 and regulators REG1 & REG2. These parts are still shown on Infrared receiver IRD1 and the three LEDs are installed as shown in this photo and Fig.5. the screened overlay on the PCB but are not installed if you are powering the board using the Ultra-LD Mk.3 Power Supply board (since that board supplies the necessary regulated ±15V supply rails). In addition, the two 220µF electrolytic capacitors previously installed across the regulator inputs are omitted, while the 100µF capacitors on the output side are now 220µF. It’s just a matter of ignoring the screened overlay and installing the parts and the links exactly as shown in Fig.4. Note the different arrangements used to link out REG1 & REG2. REG1 is bypassed by linking its two outside pads while REG2 is bypassed by linking its middle and righthand pads. The resistors can go in next (use your DMM to check the values), followed by the four ferrite beads. Each bead is installed by feeding some 0.7mm tinned copper wire through it and then bending the leads down through 90° on either side to fit through their holes in the PCB. Push each bead all the way November 2011  71 THD+N vs Frequency, 2V RMS in, 1V RMS out 0.01 0.005 Channel Separation vs Frequency, 20Hz-22kHz BW Right to left Left to right -65 -70 0.002 0.001 0.0005 -75 -80 -85 -90 0.0002 -95 0.0001 20 50 100 200 500 1k Frequency (Hertz) 2k 5k 10k -100 20k 20 50 200 500 1k 2k 5k 10k 20k Frequency Response, 20Hz-22kHz BW, Zin=60 Fig.8: the channel separation vs frequency. It’s typically better than 87dB up to 1kHz and is still around 70dB or better at 10kHz. 09/16/11 11:48:26 Simulation of ideal log pot vs log pot with shunt resistor from wiper to GND +1.0 0 Left channel Ideal log pot Shunted log pot Right channel +0.5 -5 0 -10 -0.5 -15 Actual Level (dB) Amplitude Variation (dBr) 100 Frequency (Hz) Fig.7: the THD+N for bandwidths of 20Hz-80kHz and 20Hz-30kHz and a gain of 0.5. It’s typically 0.0007% or less for a 20Hz-30kHz bandwidth. -1.0 -1.5 -20 -25 -2.0 -30 -2.5 -35 -3.0 10 50 20 100 200 500 1k 2k Frequency (Hz) 5k 10k 20k -40 -40 50k 100k Fig.9: the frequency response is virtually ruler flat from 10Hz to 20kHz and then rolls off gently above that to be about -1.25dB down at about 100kHz. THD+N vs Frequency, 20Hz-80kHz BW, 1.5V in/out 09/15/11 11:41:02 -30 -25 -20 -15 Pot Level Setting (dB) -10 0 -5 THD+N vs Frequency, 20Hz-80kHz BW, 1V in, 2V out 09/15/11 11:41:02 0.01 With 4.7k shunt resistor Without 4.7k shunt resistor 470pF Ceramic 470pF MKT Polyester 0.005 Total Harmonic Distortion + Noise (%) 0.005 0.002 0.001 0.0005 0.0002 0.0001 20 -35 Fig.10: this graph shows the simulated response curve of a 20kΩ pot with a 4.7kΩ shunt resistor from wiper to ground (red) compared to an ideal log pot (blue). 0.01 Total Harmonic Distortion + Noise (%) 09/16/11 10:59:08 -60 Crosstalk (dBr) Total Harmonic Distortion + Noise (%) 09/15/11 10:49:27 20Hz-80kHz BW 20Hz-30kHz BW GenMon (80kHz) 0.002 0.001 0.0005 0.0002 50 100 200 500 1k Frequency (Hertz) 2k 5k 10k 20k Fig.11: the effect on THD+N with and without the 4.7k# shunt resistor across the pot. The shunt resistor gives a worthwile reduction above about 3kHz. 72  Silicon Chip 0.0001 20 50 100 200 500 1k Frequency (Hertz) 2k 5k 10k 20k Fig.12: using a 470pF MKT polyester feedback capacitor instead of a ceramic type also gives a big reduction in THD+N at the high-frequency end. siliconchip.com.au Resistor Colour Codes o o o o o o o o o o o o o No. 4 2 1 1 2 1 4 4 2 7 1 1 Value 100kΩ 22kΩ 18kΩ 10kΩ 4.7kΩ 2.7kΩ 2.2kΩ 1kΩ 330Ω 100Ω 22Ω 10Ω down so that it sits flush against the PCB before soldering its leads. That done, install machined-pin DIL sockets for the three ICs. Make sure that each socket is seated flush against the PCB and that it is orientated correctly (IC3 faces in the opposite direction to ICs 1 & 2). It’s best to solder two diagonally opposite pins of a socket first and then check that it sits flush with the board before soldering the remaining pins. The MKT and ceramic capacitors can now go in, followed by the nonpolarised capacitors and the polarised electrolytics. Note that the 100µF capacitor to the left of LED3 must be rated at 25V. Be sure to use MKT (or polypropylene) capacitors for the 470pF feedback capacitors in the preamplifier (ie, between pins 1 & 2 of IC1a & IC2a). Using ceramic capacitors in these positions will degrade the distortion performance (see panel). The same goes for the 470pF RF bypass capacitors at the inputs of IC1a & IC2a. Once again, be sure to use MKT types. The next step is to install the four transistors (Q1-Q4) in the remote control section. Be sure to use the correct type at each location. Q1 & Q3 and both BC327s, while Q2 & Q4 are BC337s. It will be necessary to crank their leads with a pair of needle-nose pliers, so that they fit down onto the board properly. The 3-way DIL (dual-in-line) pin header for LK3 & LK4 can now be installed, followed by a 2-way pin header to terminate the motor leads (just to the right of Q1 & Q3). To install the 2-pin header, first push its pins down so that their ends are flush with the top siliconchip.com.au 4-Band Code (1%) brown black yellow brown red red orange brown brown grey orange brown brown black orange brown yellow violet red brown red violet red brown red red red brown brown black red brown orange orange brown brown brown black brown brown red red black brown brown black black brown of the plastic, then install the header from the component side and solder the pins underneath. This will give about 7mm pin lengths on the track side of the PCB to terminate the leads from the motor. As shown in Fig.4, these leads are run underneath the PCB. Crystal X1, trimpot VR2, the 3-way screw terminal block (CON6) and the four vertical RCA sockets (CON1CON4) can now all be installed. Use white RCA sockets for the left channel input and output positions and red for the right channel positions. Mounting the motorised pot It’s absolutely critical to seat the motorised pot (VR1) correctly against the PCB before soldering its leads, If this is not done, it won’t line up correctly with its clearance hole in the amplifier’s front panel later on. In particular, note that the two lugs at the rear of the gearbox cover go through slotted holes in the PCB. Use a small jeweller’s file to enlarge these if necessary. Once the pot fits correctly, solder two diagonally opposite pot terminals and check that everything is correct before soldering the rest. The two gearbox cover lugs can then be soldered. That done, connect the motor terminals to the 2-pin header using light-duty hook-up cable. These leads are twisted together and pass through a hole in the board immediately behind the motor. They are then secured to the underside of the PCB using cable ties and soldered to the header pins. Be sure to connect the motor’s positive terminal to the positive header pin. Once the cable is in place, solder 5-Band Code (1%) brown black black orange brown red red black red brown brown grey black red brown brown black black red brown yellow violet black brown brown red violet black brown brown red red black brown brown brown black black brown brown orange orange black black brown brown black black black brown red red black gold brown brown black black gold brown Capacitor Codes Value 100nF 10nF 470pF 22pF µF Value 0.1µF 0.01µF NA NA IEC Code 100n 10n 470p 22p EIA Code 104 103 471 22 the 10nF capacitor directly across the motor terminals. Mounting the LEDs Fig.5 shows how infrared receiver IRD1 and the LEDs are mounted. Note that the details shown for IRD1 are for the Altronics Z1611A device. The Jaycar ZD1952 is slightly different – just be sure to install it with its lens 4mm above the PCB. It’s a good idea to cut 3mm-wide and 6mm-wide templates from thick cardboard and bend IRD’s leads around these. Similarly, for the LEDs, you will need 10mm-wide and 4mm-wide templates. The 4mm template is used as a spacer when mounting the LEDs. The assembly can now be completed by installing the spade connector to the left of the motorised pot. This connector can either be a vertically-mounted solder type or a screw-mounted type. If you have the latter, it’s secured using an M4 screw, a flat washer, a shakeproof washer and a nut (see Fig.6). Leave the three ICs out of their sockets for now. They are installed later, after the power supply checks have been completed. Next month, we’ll describe the Input Selector module and Switch Board assemblies and detail the test procedure. We’ll also describe how the remote SC control is set up. November 2011  73