Silicon ChipUltra-low-distortion Preamplifier with Tone Controls Part 3 - June 2020 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions: PicoLog Cloud
  5. Publisher's Letter: Publisher's Statement
  6. Publisher's Letter
  7. Feature: Techno Talk by Mark Nelson
  8. Feature: Net Work by Alan Winstanley
  9. Back Issues: Net Work by Alan Winstanley
  10. Project: AM/FM/CW Scanning HF/VHF RF Signal Generator by Andrew Woodfield
  11. Project: A low-cost 3.5-inch touchscreen for the Arduino or Micromite by Tim Blythman
  12. Project: Ultra-low-distortion Preamplifier with Tone Controls Part 3 by John Clarke
  13. Feature: Circuit Surgery by Ian Bell
  14. Feature: Practically Speaking by Mike Hibbett
  15. Feature: Make it with Micromite by Phil Boyce
  16. Feature: AUDIO OUT by Jake Rothman
  17. Feature: Max’s Cool Beans by Max the Magnificent
  18. PCB Order Form
  19. Advertising Index

This is only a preview of the June 2020 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • Techno Talk (June 2020)
  • Techno Talk (June 2020)
  • Techno Talk (July 2020)
  • Techno Talk (July 2020)
  • Techno Talk (August 2020)
  • Techno Talk (August 2020)
  • Techno Talk (September 2020)
  • Techno Talk (September 2020)
  • Techno Talk (October 2020)
  • Techno Talk (October 2020)
  • (November 2020)
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
  • Techno Talk (June 2025)
  • Techno Talk (July 2025)
  • Techno Talk (July 2025)
Ultra-low-distortion Preamplifier with Tone Controls Part 3 This high-performance Audio Selector can expand the number of inputs to the Ultra-low-distortion Preamplifier. It can also be used to ‘upgrade’ just about any piece of audio equipment with stereo line level inputs or simply operate as a stand-alone device. Here we discuss both options. by John Clarke Six-input Stereo Audio Selector – no more swapping cables every time you want to change audio sources! I f you’re one of those people who enjoys listening to music from a variety of sources, you’ll know just how much of a pain unplugging and replugging cables can be. For example, you might want to listen to CDs or DVDs one day, an MP3 player another, and a turntable on another. Other times there’s the audio from your TV... but most of the time it’s a DAB, FM or AM tuner. That’s five but there are many more. Our current Preamplifier project was designed to switch between three stereo sources, using either a remote control or front panel pushbuttons. And while three inputs are enough for many people, inevitably, some need more! This Preamplifier is a very high-performance stereo unit, with vanishingly low noise and distortion. It has remotecontrolled volume and input switching, with stereo and bass tone controls. 32 While it is possible to add an external input switcher to expand the number of available inputs (eg, our January 2013 Three Input Switcher), that’s an unsatisfying solution. After all, who wants an extra box and an extra remote control? This project expands the number of stereo inputs to the Preamplifier (or indeed any other preamp or all-in-one) to six, which should satisfy most people. Yes, we know that there will be people who need seven or eight, but you have to stop somewhere! It’s an easy upgrade. Simply build the two new boards, wire them up to the existing Preamplifier main board and reprogram the Preamplifier’s microcontroller and you’ll have more inputs! You can still use the same remote control to adjust the volume and switch between the six input pairs. So that you can use it with other preamp designs, or other equipment entirely, we have designed it so that it can be used as a standalone unit. All you need to do is build the boards, put them in a box and connect a small 9-15V DC power supply and you have a remotecontrolled Six-input Selector with front panel pushbuttons and LED indicators. You can control it with just about any universal remote. Overall design The Audio Selector consists of two PCBs. The main one has the six stereo inputs, one pair of stereo output sockets and the relays used for switching between the inputs. The control PCB has the six pushbutton switches to select each input, with integral LEDs and mounts on the front panel of the unit. The two PCBs are connected by a 14way ribbon cable with IDC connectors at each end. When used as a standalone unit without the Preamplifier, an infrared receiver can be included on the Practical Electronics | June | 2020 control PCB. The main PCB also has a 5V regulator to power the whole circuit from a 9-15V DC source. When used with the Preamplifier, the Audio Selector is connected to the main Preamplifier board via a 10-way ribbon cable with IDC connectors. In this case, the Audio Selector is powered from the Preamplifier over this cable. The infrared receiver on the Preamplifier is then used to control the Audio Selector as well as adjusting the volume on the Preamplifier. This requires revised firmware to be loaded onto the Preamplifier microcontroller. If you have a PIC programmer, you can download the software from the June 2020 page of the PE website and reprogram the chip yourself. If you are buying your Preamplifier parts as a kit from Altronics (code K5171) then the microcontroller will be supplied ready for the Six-input Audio Selecctor – no reprogramming needed. Circuit description Fig.17 shows the circuit of the main (switching) board, while Fig.18 is the circuit diagram of the front panel control board. Let’s start with the main circuit, Fig.17. It’s based around microcontroller IC1, which drives the DPDT input selection relays (RLY1-RLY6) via NPN transistors Q1-Q6 and monitors the switches and infrared receiver via CON10. When the circuit is powered up, the coil of one of six relays RLY1-RLY6 is energised at any given time. Each relay’s pair of COM terminals is connected to its corresponding pair of RCA input sockets, CON1-CON6. So when its coil is energised, those signals are fed through a pair of 100Ω series resistors and ferrite beads FB1 and FB2 to the output sockets, CON7 and CON8. The series resistors, ferrite bead and 470pF capacitors heavily attenuate any ultrasonic signals which may be picked up by the Preamplifier inputs and wiring. Such signals often come from electromagnetic emissions from nearby equipment or broadcast radio stations (the wires act like antennas). However, we only want to feed audio (20Hz-20kHz) signals to the following equipment. One end of each relay coil is permanently connected to the +5V supply, Features n Six stereo inputs n Input selection via pushbutton or infrared remote control n LED indicators to show currently selected channel n Remembers currently selected input even when powered off n Build as a standalone unit or incorporated into one of two high-performance preamplifiers n No mains wiring required; can run off low-voltage DC n Retrofit to suitable existing preamplifiers Constructors – please see note n Negligible noise and distortion in the April 2020 issue Parts List n Easy construction before purchasing components. n Uses common parts while the other end is connected to ground by one of six NPN transistors, Q1-Q6. Each of these transistors has a 2.2kΩ base-current limiting resistor, which is driven by one of the digital outputs of IC1; RA2 (pin 1) for Q1, RA3 (pin 2) for Q2 etc. So when one of these outputs goes high, the base-emitter junction of the corresponding transistor is forward biased, switching on that transistor and pulling current through the connected relay coil, energising it. When that output goes low, the transistor switches off and the connected diode (one of D1-D6) prevents the coil from generating a high-voltage spike as its magnetic field collapses, which could damage the connected transistor. When used as a standalone unit, an external source of DC power is applied to terminal block CON11, and this is regulated to 5V by REG1 to power the relays and IC1. Diode D7 provides reverse polarity protection while 100µF capacitors are used for input bypassing and output filtering of REG1. JP1 is fitted in the upper position. When used as part of a Preamplifier, 5V power comes from pins 7 and 8 of CON9, with the ground connection made at pins 9 and 10. In this case, JP1 is fitted in the lower position. IC1 has a 100nF bypass capacitor and 10kΩ reset pull-up resistor to ensure correct operation. Control board circuitry As shown, CON10 on the main board connects to CON12 on the control board (Fig.18). This allows microcontroller IC1 to detect when one of the front panel pushbuttons is pressed and also illuminate the LED in one of the buttons, to indicate the currently selected input. Looking at the rear of the input PCB with its six stereo RCA sockets, hiding the low-profile relays behind. At left foreground is the connector which has the cable connecting to the Preamplifier board. Practical Electronics | June | 2020 LED1-LED6 are housed within pushbuttons S1-S6. Their cathodes are joined together and to a 2.2kΩ resistor to ground, setting the maximum LED current to around 0.8mA ([5V − 3.3V] ÷ 2.2kΩ). One LED anode is driven to +5V to light it up and the others are left low at 0V, turning off the other LEDs. This is done via pins 5, 7, 9, 11, 13 and 14 of CON12, which connect back to the same pins on IC1 as are used to drive the relays via the six transistors (see Fig.17). Hence, whenever a relay is activated by that output going high, the corresponding LED on the front panel lights up. The pushbutton switches are connected in a ‘matrix’ manner to pins 3, 4, 6, 8 and 10 of CON12. This reduces the number of pins needed to sense a press of one of the six buttons by one (to five). Pins 3 and 4 of CON12/CON10 connect to the RB3 and RB4 outputs of IC1, while pins 6, 8 and 10 of these connectors go to the RB5, RB6 and RB7 inputs of IC1. These inputs are typically held at 5V via pull-up currents which are internal to IC1. Switches S1, S3 and S5 have one side connected to the RB4 output, while switches S2, S4 and S6 have one side connected to the RB3 output. The other sides of the switches are monitored by the RB5, RB6 and RB7 inputs. Periodically, outputs RB3 and RB4 are briefly brought low in turn, and if one of the three inputs (RB5, RB6 or RB7) goes low at the same time, that means one of the three switches connected to that output has been pressed. The micro figures out which one has been pressed based on which combination of these five pins is low and switches to the selected input. The current input can also be changed by infrared remote control. Infrared receiver IRD1 is a complete infrared detector and processor; its 5V supply is filtered by a 100Ω resistor and 100µF capacitor. It receives the 38kHz signal from the remote control, amplifies, filters and demodulates it. The result is a serial data burst at its pin 1 output. This is fed 33 Reproduced by arrangement with SILICON CHIP magazine 2020. www.siliconchip.com.au Six-input Stereo Audio Switcher Fig.17: the circuit of the main Audio Selector board. Microcontroller IC1 switches on one of the six relays, to connect the appropriate pair of input sockets to the output, using NPN transistors Q1-Q6. It connects to the front panel pushbutton/LED board via CON10. That front panel board also hosts the infrared receiver, if built as a standalone unit. If part of a Preamplifier, the IR receiver is on the Preamplifier board, which is connected via CON9. to the RA6 digital input of IC1via pin 12 of CON12. Software within IC1 determines whether the received code is valid and if so, which button on the remote control 34 has been pressed and whether that corresponds to one of the six inputs. If it does, it switches to the new input. Regardless of which method is used to select an input, as well as changing over the relays as needed, IC1 stores the current input selection in its permanent EEPROM memory so that the same input will be selected the next time the unit is powered up. Practical Electronics | June | 2020 Six-input Stereo Audio Switcher Fig.18: the circuit of the front panel control board is quite simple; it mainly hosts pushbuttons S1-S6, which have integral LEDs, plus the infrared receiver and its supply filter, which are only fitted if building the Audio Selector as a standalone unit. Otherwise, these parts will already exist on the Preamplifier board. If the Audio Selector circuit is built as part of the Preamplifier, IRD1 and its supply filter components are not fitted. The infrared receiver on the preamplifier board is used instead. This controls the volume on the Preamplifier directly. If an input change is required, the Preamplifier board sends a coded signal over pins 1-6 of CON9. These signals are fed to the RA1, RA0 and RA7 inputs of IC1 (pins 18, 17 and 16). The signals carry serial data indicating which input has been selected. If you built the 3-input Preamplifier and you are now upgrading to the 6-input version, the microcontroller on the Preamplifier must be reprogrammed to send these signals, as the earlier designs did not have this capability. (The revised firmware, coded 0111111M.HEX, can be downloaded from the June 2020 page of the PE website.) Once IC1 receives valid serial data from that micro, it switches inputs as required. Construction The components for the circuit shown in Fig.17 are fitted to a double-sided PCB coded 01110191, and measurPractical Electronics | June | 2020 ing 165 × 85mm. The separate control section components are mounted on a double-sided PCB, coded 01110192, and measuring 106 × 36mm. Both boards are available from the PE PCB Service.The overlay diagrams for these boards, which indicate where the components go, are shown in Fig.19 and Fig.20. Start by building the main board. Fit the resistors first, and be sure to check values with a DMM set to measure resistance. Follow with diodes D1 to D6, and install D7 if building the standalone unit. Ensure that their cathode stripes face as shown, then feed resistor lead off-cuts through the ferrite beads and solder them in place. We recommend that IC1 is installed using a socket. Make sure its pin 1 dot/ notch faces toward CON9, as shown. Fit the two 470pF MKT/MKP/ceramic capacitors next. Any of these types can be used, but if you use ceramics, they must use the NP0 or COG dielectrics for excellent low-distortion performance. If building the standalone version, you can now bend REG1’s leads to fit the pads, attach it to the board using the specified machine screw and nut and solder and trim its three leads. Mount the remaining capacitors such as the 100nF MKT polyester or ceramic and the 100µF electrolytic capacitors. Electrolytic capacitors are polarised so the longer positive leads must go through the holes marked ‘+’. Note that only one 100µF capacitor is needed when the Audio Selector is used as part of a Preamplifier. Fit the six transistors next. You may need to gently bend their leads out (eg, using small pliers) to fit the PCB footprints. Ensure the flat sides face as shown. Construction continues with the installation of the 3-way pin header for JP1 and the 10-way and 14-way box headers, CON9 and CON10. These sockets must be installed with their slotted keyways oriented as shown. Remember that you don’t need CON9 for the standalone version, but you do need CON11, so now is a good time to fit it. Finally, complete the assembly by installing the six relays, the stereo RCA input sockets and the two vertical RCA output sockets. The red vertical RCA socket goes on the left and the white socket on the right. These colours then match those for the CON1-CON6 stereo sockets. Once you’ve finished soldering the parts to the board, plug the programmed microcontroller (IC1) into its socket, ensuring that it is oriented correctly. Front panel control board assembly There are only a few parts on the control board but be careful to install the parts on the correct side of the PCB. The component footprints are screen printed on the side they should be installed. Pushbutton switches S1-S6 and IRD1 are on one side (the underside, as shown in Fig.20), and the 14-way IDC header CON12, the resistors and 100µF capacitor are on the other (top side). IRD1, the 100µF capacitor and 100Ω resistor are not required when the Audio Selector is part of a Preamplifier. Fit the pushbuttons first but note that they must be installed the right way around. These have kinked pins at each corner plus two straight pins for the integral blue LED. The anode pin is the longer of the two, and this must go in the hole marked ‘A’ on the PCB (towards CON12). Once the pins are in, push the buttons all the way down so that they sit flush against the PCB before soldering their leads. IDC header CON12 can then be installed on the other side of the board, with its keyway notch towards the bottom. IRD1, the 100Ω resistor and the 100µF capacitor should now be fitted, if building the standalone version. The 35 Parts list – Six Input Audio Selector Main board and Control board 1 double-sided PCB, code 01110191, 165 x 85mm 1 double-sided PCB, code 01110192, 106 x 36mm Both PCBs are available from the PE PCB Servce 6 PCB-mounting DPDT relays with 5V DC coil (RLY1-RLY6) [Altronics S4147] 6 PCB-mounting dual vertical RCA sockets (CON1-CON6) [Altronics P0212] 1 white vertical PCB-mount RCA socket (CON7) [Altronics P0131] 1 red vertical PCB-mount RCA socket (CON8) [Altronics P0132] 2 14-pin PCB-mount vertical IDC headers (CON10,CON12) [Altronics P5014] 6 PCB-mount pushbutton switches with blue LEDs (S1-S6) [Jaycar SP0622, Altronics S1173] 2 ferrite beads (FB1,FB2) [Jaycar LF1250, Altronics L5250A] 1 3-way pin header, 2.54mm spacing (JP1) 1 jumper shunt/shorting block (JP1) 1 18-pin DIL IC socket (for IC1) 4 M3 x 12mm nylon tapped spacers 4 M3 x 6.3mm nylon tapped spacers 16 M3 x 6mm panhead machine screws 2 14-pin IDC line sockets [Altronics P5314] 1 350mm length of 14-way ribbon cable Semiconductors 1 PIC16F88-I/P microcontroller programmed with 0111019A. HEX (IC1) 6 BC337 NPN transistors (Q1-Q6) 6 1N4004 1A diodes (D1-D6) Capacitors 1 100µF 16V PC electrolytic 1 100nF MKT polyester or multi-layer ceramic 2 470pF NP0/C0G ceramic or MKT polyester or MKP polypropylene [eg, element14 Cat 1005988] Resistors (all 0.25W, 1% metal film) 1 10kΩ 6 2.2kΩ 12 100Ω Extra parts for standalone version 1 3-pin infrared receiver; eg TSOP4138, TSOP4136 (IRD1) 1 7805 5V regulator (REG1) 1 1N4004 1A diode (D7) 3 100µF 16V PC electrolytic capacitors 1 2.2kΩ 0.25W 1% resistor 1 100Ω 0.25W 1% resistor 1 2-way screw terminal, 5.08mm spacing (CON11) 1 M3 x 6mm panhead machine screw and hex nut (for REG1) Extra parts for connecting to Preamplifier 1 PIC16F88-I/P microcontroller programmed with 0111111M. HEX* 1 10-pin PCB-mount vertical IDC header (CON9) [Jaycar PP1100, Altronics P5010] 2 10-pin IDC line sockets [Jaycar PS0984, Altronics P5310]** 1 250mm length of 10-way ribbon cable** * replaces IC5 in the Preamp described in April and May 2020 ** not required if already part of pre-existing preamp You will also need a ‘Universal’ Remote Control (see text) – eg Altronics A012 or Jaycar AR1954 or AR1955 36 100Ω resistor and 100µF capacitor are mounted on the same side as CON12, while IRD1 is mounted on the pushbutton side, with its lens in line with the switches. The leads are bent at right angles, and it is mounted so that IRD1 is at the same height as the buttons. Making the cables You need to make the interconnecting cables before you can test the Audio Selector. If you’re building a standalone unit, you only need to make the 14-way cable which connects the two boards, shown at the bottom of Fig.21. Otherwise, make both the cables, including the 10-way cable that will connect back to the Preamplifier board. If you’re building this unit as an upgrade to an existing Preamplifier which already has the three-way input switcher, you should already have those cables. Pin 1 is indicated on each socket by a small triangle moulded into the plastic, while wire 1 in each section of ribbon cable should be red. The red stripe of the cable must go to pin 1. The best way to crimp the IDC connectors onto the cables is by using a dedicated IDC crimping tool, such as the Altronics T1540. Alternatively, you can crimp them in a vice or using large pliers that have jaw protectors, or a woodworker’s screw-adjust G clamp with the IDC connector sandwiched between two strips of timber. Don’t forget to fit the locking bars to the headers after crimping, to secure the cable in place. Having completed the cables, it’s a good idea to check that they have been correctly terminated. The best way to do this is to plug them into the matching sockets on the PCB assemblies and then check for continuity between the corresponding pins at either end using a multimeter. When complete, plug the 14-way cable into CON10 and CON12. The 10-way IDC cable (if used) connects between CON9 of the 6-Input Audio Selector and CON7 on the Preamplifier. Now place the shorting block on JP1 in the correct position, ie, to the left if you are building this as part of a Preamplifier, or to the right if it is a standalone unit. Initial testing Before programming the remote, it’s worthwhile to power the unit up and check that the pushbutton, relays and LED indicators work as expected. If you’re building it as a standalone unit, this is easily done by feeding 9-15V DC into CON11. Otherwise, you will need to plug the unit into the Preamplifier board and power it in the usual way. You can run the Preamplifier off an AC plugpack for testing, if you have one, via a rectifier and regulator board (see the last issue for options). You can switch to using a mainsbased power supply once testing is complete. Apply power and check that one LED lights up and you should hear a relay click on when power is applied. Press all the buttons and verify that you hear a click and that the LED in that button lights up, with all the others off. If you want, you can feed an audio signal into each input in turn and check that it’s only fed through to the output connectors when that input is selected. Setting up the remote control The remote control functions can now be tested using a suitable universal remote, as described below. By default, the Audio Selector expects remote control codes for a Philips TV. If this conflicts with any other equipment in your possession, you can switch it to use SAT1 or SAT2 instead. If you have built the Audio Selector as a standalone unit, all you need to do to change modes is to press and hold S1 Practical Electronics | June | 2020 Fig.19: follow this diagram and the photo below to build the main Audio Selector PCB. Make sure that the header sockets are correctly oriented, as well as IC1, the diodes and electrolytic capacitors. Note that CON1, D7, the two 100µF capacitors and REG1 are only installed if you are building it as a standalone unit. on the pushbutton board during powerup to switch to using the SAT1 code, or S2 for SAT2. Pressing and holding S3 at power-up reverts to the default TV mode. It’s a bit more tricky if you’re building this as part of a Preamplifier because the Preamplifier board has no way of reading the switch states. So in this case, you have to unplug the 10way cable from CON7 on the Preamplifier board and then use a femalefemale jumper lead to temporarily Practical Electronics | June | 2020 short pins 1 and 9. Apply power, and wait a few seconds, then switch off, remove the jumper cable and plug the ribbon cable back in. That selects the SAT1 mode. If you need to select SAT2 mode, bridge pins 3 and 9 instead. To go back to the TV code, bridge pins 5 and 9. Pin 1 is the one in the upper righthand corner of CON7, nearest to the microcontroller, while pin 9 is in the upper left-hand corner. Pin 3 is immediately to the left of pin 1, and so on. Programming the remote itself Once you’ve chosen the mode, the correct code must be programmed into the remote control. This involves selecting TV, SAT1 or SAT2 on the remote (to agree with the microcontroller setup) and then programming in a three or four-digit number to tell the remote control to send the codes that the unit is expecting to receive. Most universal remote controls can be used, such as the Altronics A1012 and the Jaycar AR1955 or AR1954. For the Altronics A1012, use a code of 023 or 089 for TV mode, 242 for SAT1 or 245 for SAT2. Similarly, for the Jaycar 37 Fig.20: the six pushbutton switches and infrared receiver IRD1 (for the standalone version) are mounted on the back of the pushbutton board (which faces towards the front of the unit when installed) while the header socket, resistors and capacitor go on the top (with CON12’s keyway towards S3 and S4). Make sure that the longer straight lead of each pushbutton goes to the pad marked ‘A’. remotes, use code 1506 for TV, 0200 for SAT1 or 1100 for SAT2. In the case of other universal remotes, it’s just a matter of testing the various codes until you find one that works. Start with Philips devices as these are the most likely to work. There are usually no more than 15 codes (and usually fewer) listed for each Philips device, so it shouldn’t take long to find the correct one. Note that some codes may only partially work, eg, they might control the volume on the Preamplifier but not the input selection. In that case, try a different code. Also, some remotes may only work in one mode (eg, TV but not SAT). Once you have set up the remote control, you can power the unit up and complete the testing process by pressing the buttons 1-6 in sequence and verifying that the corresponding LED lights up and the relays click over. Troubleshooting If you run into any problems, the most likely causes are improperly crimped or wired cables, mixed up or reversed components, bad solder joints or unprogrammed/incorrectly programmed microcontrollers. These problems can all cause similar faults, so if it doesn’t work the first time, go over the boards and compare 38 them to Fig.19 and Fig.20. Ensure that all components have been installed correctly, then carefully inspect the solder joints to make sure you haven’t missed any, you have used sufficient solder and there are no dry joints or solder bridges. Presumably, you checked the continuity of your cables earlier, but if not, do so now. It’s common to have problems with an IDC ribbon cable because the crimp has not been done with sufficient force for all the blades to cut through the insulation and make good contact with the copper inside. If the unit responds to the 1, 2, 3, 4, 5 and 6 buttons on the remote, but the button switches don’t work, check that the IDC ribbon cable to the pushbutton board has been plugged into the line sockets properly. Similarly, if the Preamplifier remote volume function works but not the remote input selection, check the cable from the Preamplifier board to the input selector board. Since the cable from the Preamplifier board also supplies power to the other two boards, it’s worthwhile checking that there is 5V between pins 5 and 14 of IC1 on the Audio Selector board. Also, check that JP1 is in the correct position. If everything works except the remote control, check that it has fresh batteries. If it does, most likely it is not programmed for the code that the unit is expecting. Re-check that you have set up the Audio Selector board to the right code, and programmed the remote control with the correct corresponding code. Mounting it in the case If building a standalone unit, you will need to choose a case large enough to mount both boards; ie, at least 200mm wide and 150mm deep. If powering it from a plugpack, fit a chassis-mount concentric DC socket and wire it up to CON11. The 12mm tapped spacers can be used to mount the main board in the bottom of the box, while the 6.3mm tapped spacers are used to mount the front panel board after drilling six 9mm-diameter holes spaced 15.1mm apart for S1-S6. Once you’ve made those holes, you can temporarily fit the front panel board and mark out the locations of the four mounting holes, then drill them to 3mm. You may want to use black machine screws to attach the front panel board to the front of the case if using a black case, so they are not so visible, and possibly even use countersink head screws. It would also be a good idea to attach some rubber feet to the bottom of the case. Fig.21: this shows how to make the two ribbon cables. Only the bottom one is required if building the standalone unit. If upgrading an existing Preamplifier which already had a 3-input switcher, you should already have both cables. Practical Electronics | June | 2020