Silicon Chip4-Channel Audio/Video Selector - April 2006 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Coming soon: high definition DVDs
  4. Feature: High-Definition DVDs: Which Format Will Win? by Barrie Smith
  5. Feature: Advances In Diesel Engine Management by Julian Edgar
  6. Feature: The Electronic Camera, Pt.2 by Kevin Poulter
  7. Project: Studio Series Remote Control Module by Peter Smith
  8. Project: 4-Channel Audio/Video Selector by Jim Rowe
  9. Project: Universal High-Energy LED Lighting System by John Clarke & Julian Edgar
  10. Salvage It: Salvaging The Good Bits From Cordless Drills - And Putting Them To Work by Julian Edgar
  11. Project: PICAXE Goes Wireless by Clive Seager
  12. Vintage Radio: The Fisk Radiola 50G battery receiver by Rodney Champness
  13. Project: Microbric Viper: The Sumo Module by Ross Tester
  14. Book Store
  15. Advertising Index

This is only a preview of the April 2006 issue of Silicon Chip.

You can view 36 of the 112 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:
  • Advances In Diesel Engine Management (April 2006)
  • Advances In Diesel Engine Management (April 2006)
  • Advances In Diesel Engine Management, Pt.2 (May 2006)
  • Advances In Diesel Engine Management, Pt.2 (May 2006)
Articles in this series:
  • The Electronic Camera, Pt.1 (March 2006)
  • The Electronic Camera, Pt.1 (March 2006)
  • The Electronic Camera, Pt.2 (April 2006)
  • The Electronic Camera, Pt.2 (April 2006)
Items relevant to "Studio Series Remote Control Module":
  • 4-Output Universal Regulator PCB [18105151] (AUD $5.00)
  • PCB pattern for the Studio Series Preamplifier power supply (PDF download) [01109052] (Free)
  • Studio Series Remote Control Module PCB [01104061] (AUD $12.50)
  • AT90S2313 firmware (HEX) and source code for the Studio Series Remote Control {MPOT.HEX] (Software, Free)
  • PCB pattern for the Studio Series Remote Control Module (PDF download) [01104061] (Free)
Articles in this series:
  • Studio Series Stereo Preamplifier (October 2005)
  • Studio Series Stereo Preamplifier (October 2005)
  • Studio Series Stereo Headphone Amplifier (November 2005)
  • Studio Series Stereo Headphone Amplifier (November 2005)
  • Studio Series Remote Control Module (April 2006)
  • Studio Series Remote Control Module (April 2006)
Items relevant to "4-Channel Audio/Video Selector":
  • PCB pattern for the 4-Channel Audio/Video Selector (PDF download) [02104061] (Free)
  • 4-Channel Audio/Video Selector front panel artwork (PDF download) (Free)
Items relevant to "Universal High-Energy LED Lighting System":
  • PIC16F88-I/P programmed for the Universal High-Energy LED Lighting System [Luxeon.hex] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Universal High-Energy LED Lighting System [Luxeon.HEX] (Software, Free)
  • PCB pattern for the Universal High-Energy LED Lighting System (PDF download) [11004061] (Free)
Articles in this series:
  • Universal High-Energy LED Lighting System (April 2006)
  • Universal High-Energy LED Lighting System (April 2006)
  • Universal High-Energy LED Lighting System, Pt.2 (May 2006)
  • Universal High-Energy LED Lighting System, Pt.2 (May 2006)
Articles in this series:
  • PICAXE Goes Wireless (April 2006)
  • PICAXE Goes Wireless (April 2006)
  • PICAXE Goes Wireless, Pt.2 (May 2006)
  • PICAXE Goes Wireless, Pt.2 (May 2006)
Articles in this series:
  • Adding Infrared To Your Microbric Viper (February 2006)
  • Adding Infrared To Your Microbric Viper (February 2006)
  • A Line Tracker For Your Microbric Viper (March 2006)
  • A Line Tracker For Your Microbric Viper (March 2006)
  • Microbric Viper: The Sumo Module (April 2006)
  • Microbric Viper: The Sumo Module (April 2006)

Purchase a printed copy of this issue for $10.00.

By JIM ROWE 4-Channel A/V Selector Do you have to swap A-V cables at the back of your TV set each time you want to switch between your DVD player, VCR, set-top box and camcorder? Is so, this project will solve that problem. It lets you select any one of four S-video or composite video sources and also switches the accompanying stereo audio or bitstream digital audio. T HERE ARE PLENTY of audiovideo (A-V) source selectors available off-the-shelf but here’s a low-cost unit that you can build yourself. It’s easy to assemble and you will no longer have to muck about swapping A-V cables each time you want to change the video source. The unit provides 4-channel switching for both S-video and composite video sources but why not provide for component video and RGB as well? And why didn’t we allow for switching 5.1-channel or even 7.1-channel audio, instead of settling for just stereo/Pro 62  Silicon Chip consideration to providing for component video/RGB switching. However, this would have required at least four extra relays, five extra video connectors and a larger and more expensive box to house the circuitry. So considering that most of the wide-screen TVs and plasma panel screens which accept component video also have at least two input ports, we decided to draw the line at S-video and composite video switching. Audio switching Logic or digital bitstream audio? There’s a simple one-word answer to these questions: cost. If we had provided those extra options, the circuit complexity would have grown significantly and the parts to build the selector would probably have cost you $150 or more, instead of the $50 or so that this unit will cost. In short, there had to be a compromise between providing all of the features anyone might want and making it attractive to as many people as possible. During the design phase, we did give Similarly, we decided not to worry about switching 5.1 or 7.1-channel analog audio, because in most cases these multiple channels must be decoded from Dolby Digital/AC-3 or DTS digital surround signals – and these are provided in the latter form by most DVD players, set-top boxes and so on. So since the digital decoders are mostly built into surround sound amplifiers anyway (and are usually better than the decoders built into DVD players), there’s no real need to select the decoded and separated analog audio signals. It’s far simpler siliconchip.com.au and more efficient to select the digital bitstream signals instead. In fact, we believe this compromise approach has provided a selector unit which will serve the needs of the vast majority of people. How it works Our Four-Channel A-V Selector is really very simple. Essentially, it’s just a set of four 4-pole switches, with two poles switching the video for each channel and the other two the audio. The only reason we’re not actually using a 4-pole, 4-position mechanical switch is that they’re no longer readily available. So instead we’re using eight mini DPDT relays – four to switch the video signals and four to switch the audio. These relays are driven by separate driver circuits, in turn controlled by a one-of-four selector circuit. Fig.1 shows the circuit details. The signal switching circuitry is at upper left and uses one relay to switch the two audio channels for each A-V source and a second relay to switch the video signal (ie, Y and C for S-video or the single composite video signal). siliconchip.com.au In this case, Relays 1 & 5 switch the signals for Source 1, while Relays 4 & 8 switch the signals for Source 4. The remaining four relays (for Sources 2 & 3) are identically configured but have been omitted from the diagram for clarity. The coils for each pair of relays are connected in parallel and driven together by 2N7000 MOSFETs (Q1-Q4). However, only Q1 & Q4 are shown on the schematic, again for clarity. The rest of the circuit performs the one-of-four selection. It’s based on just two low-cost CMOS ICs: a 4093B quad Schmitt NAND gate (IC1) and a 4017B decade counter (IC2). IC1a is connected as a free-running relaxation oscillator, operating at about 20kHz. Its output pulses are fed to one of the clock inputs (CP0, pin 14) of IC2 via gates IC1b & IC1d, the latter connected as an inverter. This means that the clock pulses from IC1a cannot reach the clock input of IC2 unless pin 5 of IC1b is pulled high (ie, to “open the gate”). Normally, however, this pin is held low by pin 10 of IC1c, as this gate has both of its inputs pulled high – one directly and the other via a 10kW resistor. As a result, when power is first applied to the circuit, IC1a begins oscillating but none of its pulses can reach IC2 to start the counter. Instead, IC2 is merely reset by the 100nF capacitor and 10kW resistor connected to its MR input (pin 15) and then just sits in this state. This in turn means that the only output of IC2 which is at a logic high is its O0 output (pin 3) and so all the relay driver circuits are off. Now consider what happens when one of the four selector pushbuttons (S1-S4) is pressed. Because IC2’s O1O4 outputs are all initially low, pressing any one of these buttons results in pin 9 of IC1c being pulled low as well. As a result, pin 10 of IC1c switches high and pulls pin 5 of IC1b high. IC1b now allows clock pulses from IC1a to pass through to IC2 via IC1d, which means that IC2 immediately begins counting. But it only does so until the output connected to the pressed pushbutton goes high. As soon as this happens, pin 9 of IC1c switches high and its output switches low, thus pulling pin 5 of IC1b low again and preventing any further clock pulses from reaching IC2. Specifications Video Inputs: four channels (four S-video sockets & four RCA composite video sockets). Audio Inputs: four left & right channels (via RCA sockets). Outputs: one video channel (S-video and RCA connectors) plus left and right audio channels (RCA connectors). Switching: via relays, with selection via front panel pushbutton switches and LED indicators Power Supply: 12V DC plugpack (rated at 150mA or more). April 2006  63 Par t s Lis t 1 PC board, code 02104061, 198 x 157mm 1 low-profile ABS instrument case, 225 x 165 x 40mm (Jaycar HB-6972, Altronics H 0474) 5 double RCA sockets, PCmount 5 mini 4-pin DIN sockets, 90° PC-mount 5 panel-mounting RCA sockets, yellow 1 2.5mm concentric DC socket, PC-mount 4 SPST pushbutton switches (Jaycar SP-0700, Altronics S 1084) 8 mini (DIL) 12V DPDT relays 10 6G x 6mm-long self-tapping screws 8 PC board terminal pins, 1mm diameter 1 12V 150mA DC plugpack Semiconductors 1 4093B quad Schmitt NAND (IC1) 1 4017B decade counter (IC2) 1 78L05 5V regulator (REG1) 4 2N7000 Mosfets (Q1-Q4) 4 3mm red LED (LED1-LED4) 1 3mm green LED (LED5) 5 1N4004 diodes (D1-D5) Capacitors 1 2200mF 25V RB electrolytic 1 10mF 16V RB electrolytic 2 100nF multilayer monolithic 1 100nF MKT polyester 1 4.7nF MKT polyester Resistors (0.25W 1%) 1 22kW 1 390W 2 10kW 4 100W 4 1kW As a result, IC2 stops with its O1, O2, O3 or O4 output high (depending on which button was pressed). This high output turns on its associated relay driver transistor, thus activating the relays for that channel and feeding the selected A-V signals through to the output sockets. This same process is repeated if any of the other buttons is pressed, of course. In this case, IC2 is simply re-activated and counts clock pulses until the output connected to the 64  Silicon Chip newly pressed button switches high. IC2 then stops again, with that output now effectively latched high instead of the previously selected output. This counting process happens so quickly that, from the user’s point of view, the new A-V source is selected as soon as its button is pressed. And because of the latching action, the chosen input source remains selected while ever the circuit is supplied with power or until one of the other selection buttons is pressed. Diodes D1-D4 across the relay coils are there to protect transistors Q1-Q4 from transient back-EMF “spikes” when the relays switch off. In addition, a red LED and a series current-limiting resistor are connected across each pair of relay coils, to indicate which channel has been selected. And that’s just about all there is to it – apart from the power supply. Power comes from a 12V DC 150mA plugpack, with diode D5 providing reverse polarity protection. The resulting +12V DC rail is filtered using a 2200mF capacitor and powers the relays and the indicator LEDs. The +12V DC rail also feeds 3-terminal regulator REG1 which provides a +5V rail to power IC1 & IC2. This line also powers LED5 via a 390W current-limiting resistor, to provide power indication. Construction A single-sided PC board measuring 198 x 157mm and coded 02104061 accommodates most of the circuitry. This fits snugly inside a standard low profile plastic instrument box measuring 225 x 165 x 40mm, with all of the audio, video and power connectors accessed from the rear panel. The selector buttons and LEDs are mounted on the front panel. Fig.2 shows the assembly details. Begin by fitting the 11 wire links, then fit the five dual RCA sockets (CON6CON10) to the rear of the board. Make sure that these socket assemblies are pushed all the way down onto the board and that their plastic locating spigots go through their matching holes before soldering the pins. Follow these with the DC input connector (CON11) and the five miniDIN connectors (CON1–CON5). Once again, make sure that these connectors are all properly seated before soldering them. The next step is to fit eight PC board terminal pins which are later used to terminate LEDs1-4. These pins go along the front of the board, in the positions marked “A” & “K” on Fig.2 (ie, on either side of each pushbutton switch). That done, cut four 25mm lengths of tinned copper wire and bend each one into a “U” shape with the arms about 5mm apart. These should then all be fitted in the positions shown for the connections to switches S1-S4. Solder their ends to the pads underneath, then cut each U-shaped loop at its top centre and straighten the ends, to form a pair of wires ready to connect to the switch lugs. Next, cut five 35mm lengths of yellow hookup wire and another five 35mm lengths of black hookup wire and remove 4mm of insulation from both ends of each piece. That done, solder one end of each of these wires to the PC board as shown in Fig.2 – these are later used to connect the composite video connectors (CON12-CON16) to the PC board. The eight mini DIL relays are next on the list, followed by the 12 resistors, the two 100nF multilayer monolithic capacitors (small and usually blue) and the two MKT polyester capacitors. These parts are all non-polarised, so they can be fitted either way around. By contrast, the 2200mF and 10mF electrolytics are polarised, so be sure they go in the right way around. Fit these now, then install diodes D1-D5, again making sure they are correctly orientated. The PC board assembly can now be completed by installing the 78L05 regulator (REG1), transistors Q1-Q4, the two ICs and LED5. Q1-Q4 and REG1 all come in 3-pin TO-92 packages and must be orientated as shown (don’t get them mixed up). Similarly, the two ICs (both CMOS devices) must be correctly orientated. Be sure to observe the usual precautions when handling the CMOS devices – ie, use an earthed soldering iron, make sure you’re not carrying a charge yourself, avoid touching the pins and solder the supply pins to the board first (pins 7 & 14 for IC1 and pins 8 & 16 for IC2). The green LED (LED5) is fitted to the board at full lead length, with its longer anode lead to the left. Once it’s in, bend both leads forwards by 90° about 10mm above the board. This will position the LED so that it will later siliconchip.com.au Fig.1: the circuit uses eight mini DPDT relays – four to switch the video signals and four to switch the audio. These relays are driven by Mosfets Q1-Q4, which are in turn controlled by a one-of-four selector circuit based on quad Schmitt NAND gate IC1 & decade counter IC2. siliconchip.com.au April 2006  65 Fig.2: follow this parts layout and wiring diagram to build the Four-Channel A-V Selector. The assembly is quite straightforward but make sure that all polarised parts are correctly orientated. protrude through a matching hole in the front panel. Final assembly If you’re building this unit from 66  Silicon Chip a kit, the panels will be supplied pre-punched with screened lettering. If not, then you’ll have to use the front and rear panel artworks as drilling templates (or use the drilling diagrams). Just attach copies of the artworks to the panels and drill and ream the holes to suit. These panels are reproduced here and can also be downloaded from the SILICON CHIP siliconchip.com.au This is the view inside the completed prototype. All parts, except for connectors CON12-CON16, switches S1-S4 and the four indicator LEDs, are mounted directly on the PC board. website (as can the PC board artwork) at www.siliconchip.com.au Once the panels have been drilled, you can prepare the dress labels by printing the artworks onto adhesivebacked A4 label paper. The stickers can then be covered with clear packaging tape to protect them, before cutting to size. After that, you just peel off the backing tape, carefully affix each one to its panel and cut out the holes using a sharp hobby knife. The next step is to cut away the three moulded PC board support pillars in the bottom half of the case, near the centre of the rear edge. This is necessary so that they don’t interfere with the solder joints on the connector pins. The plastic is quite soft and it’s easy to cut away the redundant pillars with a pair of sharp side cutters. That done, fit the rear panel over the dual RCA connectors on the PC board and lower the assembly into the case. The PC board can then be secured to the Table 2: Capacitor Codes Value μF Code EIA Code IEC Code 100nF 0.1µF   104 100nF 4.7nF .0047µF   472 4n7 Table 1: Resistor Colour Codes o o o o o o siliconchip.com.au No.   1   2   4   1   4 Value 22kW 10kW 1kW 390W 100W 4-Band Code (1%) red red orange brown brown black orange brown brown black red brown orange white brown brown brown black brown brown 5-Band Code (1%) red red black red brown brown black black red brown brown black black brown brown orange white black black brown brown black black black brown April 2006  67 Fig.3: the full-size front and rear panel artworks are shown directly above, while at right are the drilling details for these panels. 68  Silicon Chip siliconchip.com.au The input and output sockets are all accessed via the rear panel. At left are the four video inputs, with connectors for both composite video (RCA) and S-video. The two video output sockets are immediately to the right, followed by RCA sockets for the four audio input channels and the left and right audio outputs. base using five 6mm long self-tapping screws which go into the integral mounting pillars – see Fig.2. Now use the remaining five 6mm self-tapping screws to fasten the rear panel to the five dual RCA sockets (CON6-CON10). These screws go through the panel and into matching holes in the connector bodies, so the operation is quite straightforward. The five single RCA sockets (CON1-CON5) can then be fitted to the panel (above the mini-DIN sockets), with the supplied earthing lugs under the nuts and orientated upwards. Tighten each nut using a small spanner or pliers, then bend the free part of the lug forwards by about 75°. Finally, solder the yellow wires to the centre terminals of the sockets and the black wires to the earth lugs. Front panel The front panel assembly is even easier – just mount the four pushbutton switches (S1-S4) but don’t overtighten the large plastic nuts provided, as it’s easy to strip their threads if too much force is applied. Note that each switch should be orientated so that its terminals are aligned horizontally, for easy connection of the wires from the PC board. That done, lower the front panel into its slot in the bottom of the box and solder the switch leads to their matching wires. A word of warning here: make each solder joint as quickly as possible, so that you don’t overheat the switch or risk melting the solder siliconchip.com.au at the lower end of each wire. Finally, push the green power LED (LED5) through its matching hole and install the four channel indicator LEDs (LEDs1-4). The latter are simply pushed through their respective front panel holes and their leads soldered to the PC stakes. It’s a good idea to bend each LED’s leads to its approximate shape before trying to fit the LED in position. You do this by first bending the leads outwards by 70° about 8mm from the back of the LED body, then bending them downwards by 90° about 6mm out from the first bends (see photo). Be sure to install them the right way around – the longer anode lead goes to the left PC stake in each case (see Fig.2). The soldered connections should be sufficient to hold the LEDs in place. However, you may also want to apply a small “dab” of epoxy cement to the rear of each LED, to make them a little more secure. Your 4-Channel A-V Selector is now complete and ready for testing. Testing There are no setting-up adjustments to be made, so the test procedure is easy. All you need to do is apply power to CON11 using a 12V DC plugpack (or battery) and check that the unit functions correctly. First, check that the green power LED immediately lights when power is applied. If it does, try pressing one of the pushbuttons. The red LED above that button should immediately light and you should also hear a faint “click” as the two relays for that channel are activated. Now press one of the other buttons. Its LED should now light instead and there should be another faint “click” as that channel’s relays activate and the previously activated relays switch off. Finally, press the remaining two buttons in turn and check that you get the same response. If so, your 4-Channel A-V Selector is working correctly and you can now secure the top half of the case to the bottom using the four M3 x 25mm countersink head screws provided. Troubleshooting There’s not much in this circuit, so there’s very little to go wrong. However, in the unlikely event that problems do occur, they’re most likely to be caused by fitting polarised parts the wrong way around. If the whole project is “dead”, the odds are that you’ve either fitted diode D5 the wrong way around or swapped the connections to the 2.5mm plug on the 12V power lead from the plugpack or battery. Similarly, if the circuit seems to work correctly but one of the five LEDs doesn’t light when it should, its leads have probably been transposed. These are almost the only things that could be wrong, apart from poorly made solder joints or joints you’ve SC forgotten to make! April 2006  69