Silicon Chip0-110dB RF Attenuator - July 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Low-cost UPSes are not worth the risk
  4. Feature: IC Fabrication, Part 2 by Dr David Maddison
  5. Project: Multimeter Calibrator & Checker by Tim Blythman
  6. Review: Anycubic Photon Mono 3D printer by Tim Blythman
  7. Project: VGA PicoMite by Geoff Graham
  8. Project: 0-110dB RF Attenuator by Charles Kosina
  9. Review: Oatley Solar Charge Controller by John Clarke
  10. Project: Secure Remote Mains Switch, Part 1 by John Clarke
  11. Product Showcase
  12. Feature: PAS CO2 Air Quality Sensor by Jim Rowe
  13. Serviceman's Log: Trail camera fun by Dave Thompson
  14. Subscriptions
  15. Vintage Radio: Astor CJ-12 car radio by Dr Hugo Holden
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: MOS Air Quality Sensors, June 2022; Railway Semaphore Signal, April 2022; High Power DC Motor Speed Controller, January & February 2017
  20. Outer Back Cover

This is only a preview of the July 2022 issue of Silicon Chip.

You can view 44 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:
  • IC Fabrication, Part 1 (June 2022)
  • IC Fabrication, Part 1 (June 2022)
  • IC Fabrication, Part 2 (July 2022)
  • IC Fabrication, Part 2 (July 2022)
  • IC Fabrication, Part 3 (August 2022)
  • IC Fabrication, Part 3 (August 2022)
Items relevant to "Multimeter Calibrator & Checker":
  • Multimeter Checker & Calibrator PCB [04107221] (AUD $5.00)
  • PIC16F1459-I/SO programmed for the Multimeter Calibrator/Checker (0410722B.HEX) (Programmed Microcontroller, AUD $10.00)
  • Complete kit for the Multimeter Checker (Component, AUD $45.00)
  • Firmware and source code for the Multimeter Checker/Calibrator [0410722A/B] (Software, Free)
  • Multimeter Checker & Calibrator PCB pattern (PDF download) [04107221] (Free)
Items relevant to "VGA PicoMite":
  • VGA PicoMite PCB [07107221] (AUD $5.00)
  • VGA PicoMite short-form kit (Component, AUD $37.50)
  • VGA PicoMite short-form kit with case (Component, AUD $55.00)
  • Firmware and user manual for the VGA PicoMite (Software, Free)
  • VGA PicoMite PCB pattern (PDF download) [07107221] (Free)
  • Cutting/drilling guides for the VGA PicoMite front & rear panels (Panel Artwork, Free)
Articles in this series:
  • The Raspberry Pi-based PicoMite (January 2022)
  • The Raspberry Pi-based PicoMite (January 2022)
  • VGA PicoMite (July 2022)
  • VGA PicoMite (July 2022)
  • The PicoMite 2 (February 2025)
  • The PicoMite 2 (February 2025)
Items relevant to "0-110dB RF Attenuator":
  • 0-110dB RF Attenuator PCB [CSE211003] (AUD $5.00)
  • ATmega328P programmed with the firmware for the 110dB RF Attenuator [CSE211003.HEX] (Programmed Microcontroller, AUD $10.00)
  • Pulse-type rotary encoder with pushbutton and 18t spline shaft (Component, AUD $3.00)
  • 0.96in cyan OLED with SSD1306 controller (Component, AUD $10.00)
  • Short-form kit for the 0-110dB RF Attenuator (Component, AUD $75.00)
  • Firmware and BASIC source code for the 0-110dB RF Attenuator [Attenuator 3] (Software, Free)
  • 0-110dB RF Attenuator PCB pattern (PDF download) [CSE211003A] (Free)
  • Front panel label and drilling diagram for the 110dB RF Attenuator (Panel Artwork, Free)
Items relevant to "Secure Remote Mains Switch, Part 1":
  • Secure Remote Mains Switch receiver PCB [10109211] (AUD $7.50)
  • Secure Remote Mains Switch transmitter PCB [10109212] (AUD $2.50)
  • PIC16F1459-I/P programmed for the Secure Remote Mains Switch receiver (1010921R.HEX) (Programmed Microcontroller, AUD $10.00)
  • PIC16LF15323-I/SL programmed for the Secure Remote Mains Switch transmitter (1010921A.HEX) (Programmed Microcontroller, AUD $10.00)
  • Firmware and ASM source code for the Secure Remote Mains Switch [1010921A/R] (Software, Free)
  • Secure Remote Mains Switch PCB patterns (PDF download) [10109211/2] (Free)
  • Front panel label and drilling diagrams for the Secure Remote Mains Switch (Panel Artwork, Free)
Articles in this series:
  • Secure Remote Mains Switch, Part 1 (July 2022)
  • Secure Remote Mains Switch, Part 1 (July 2022)
  • Secure Remote Mains Switch, Part 2 (August 2022)
  • Secure Remote Mains Switch, Part 2 (August 2022)
  • Secure Remote Switch, Part 1 (December 2024)
  • Secure Remote Switch, Part 1 (December 2024)
  • Secure Remote Mains Switch, part two (January 2025)
  • Secure Remote Mains Switch, part two (January 2025)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)

Purchase a printed copy of this issue for $11.50.

By Charles Kosina Features & Specifications Usable frequency range: DC to 100MHz Input & output impedance: 50W Attenuation range: 0dB to -110dB in 1dB steps up to 2MHz; reduced maximum attenuation at higher frequencies (see Fig.2) Attenuation error: typically ≤0.5dB (see Fig.1) Power supply: 5V/100mA Fits in the same diecast case as the AM/FM Signal Generator from last month 0-110dB RF Attenuator for Signal Generators This Attenuator was designed to accompany my recently published AM/FM Signal Generator design (May 2022; siliconchip.au/Article/15306). However, you could combine it with just about any signal generator to provide easy output level adjustment over a wide range. W e often need a very low amplitude RF signal to test, align or adjust a radio. Unless you buy an expensive signal generator, the chances are that your generator’s output level is far too high for such a task. My recent AM/FM Signal Generator design has an output near 0dBm, which translates to about 220mV into a 50W load. To reduce this to 1µV RMS (eg, for testing a radio’s sensitivity), we need 107dB of attenuation. The simplest way to achieve this is to buy off-the-shelf fixed attenuators. These are available from 1dB to 40dB and cost about $5 each. They have SMA connectors on either end, and you screw them together to give the required attenuation. Variable digital attenuators are also available, as reviewed by Silicon Chip last year (October & November 2021; siliconchip.com.au/Article/15067 & siliconchip.com.au/Article/15100). These have a maximum attenuation of about 30dB and can be adjusted in small steps, eg, 1dB or 0.5dB. Combining one of these with a few fixed 62 Silicon Chip attenuators is one possible solution. However, I decided to design my own attenuator as it is pretty straightforward; it’s basically just a string of fixed attenuators, each consisting of three resistors, selected in combinations using relays. This works fine at low frequencies, eg, below 2MHz, but once we get much higher than that, the signal will sneak through by various paths to make a 1µV output difficult to achieve. Does this Attenuator achieve such a task? Yes and no. At 2MHz and below, the maximum attenuation is 110dB, but once we get to 75MHz, the attenuation is only 81dB. So for a 0dBm input, the lowest output level is 20µV RMS. However, adding one fixed 30dB attenuator to its output lets us get to 110dB and still gives quite a bit of adjustment range, so I consider that reasonably good. This is because, at higher frequencies, stray capacitance and inductance become more significant. In addition, circuit board tracks act as antennas and radiate energy that is picked up further Australia's electronics magazine downstream in the attenuator string. Professional signal generators with attenuators use extensive internal shielding to reduce such effects. For home-built equipment, this is somewhat impractical. That is why I did not build the Attenuator into the Signal Generator but rather in a separate diecast aluminium enclosure. There is far too much RF floating around in the signal generator which would make it difficult to isolate the attenuator section. Fig.3 shows the attenuator circuit. The signal is fed in via CON4 then passes through ten switched attenuator sections using DPDT relays RLY1 to RLY10 before reaching output connector CON5. These sections attenuate by 1dB, 2dB, 3dB, 5dB, 10dB (twice) and 20dB (four instances). The ideal resistance values for these attenuators are not in the standard range, so I have chosen the closest standard values, resulting in slight inaccuracies. With a relay de-energised, the signal just passes through the normally-closed siliconchip.com.au Parts List – 110dB RF Attenuator 1 double-sided plated-through PCB coded CSE211003, 76 x 95.5mm 1 diecast aluminium enclosure, 119 x 93.5 x 34mm [Jaycar HB5067 or Altronics H0454] 1 5V 100mA+ regulated DC power supply (eg, USB charger with adaptor cable) 1 0.96in OLED screen module with I2C interface and SSD1306 controller (OLED1) 1 mechanical rotary encoder with integrated pushbutton switch and 20mm total height (RE1) [eg, Bourns PEC11R-4215F-S0024] 10 EC2-5NU DPDT 5V coil relays (RLY1-RLY10) 1 10μH axial RF inductor (L1) 1 28-pin DIL IC socket (optional, for IC1) 1 PCB-mount DC barrel socket with 2.1mm or 2.5mm inner pin diameter (CON1) 1 2-pin, 2.54mm pitch polarised header and matching plug with pins (CON2) 1 3-pin, 2.54mm pitch polarised header (CON3) ● 2 SMA edge connectors (CON4, CON5) 2 2x3-pin header (CON6; optional, for programming IC1) 1 4-way female header socket (CON7; for OLED1) 1 large knob to suit EN1 4 12mm-long M3 tapped metal spacers 2 10mm untapped spacers sets of contacts. If it is energised, the signal instead passes through the resistive attenuator section. A rotary encoder is used to adjust the amount of attenuation required, in either 1dB or 5dB steps, toggled by pressing the encoder’s integral pushbutton switch. The firmware in the ATMega168 or ATMega328 microcontroller translates the attenuation to switch in the appropriate set of relays. For example, to select 35dB, relays 3, 6 and 7 would be energised. To prevent relays chattering while the shaft encoder is turned, there is a short delay after the number is selected before the appropriate relays are turned on and off. Each relay’s coil is switched using a small signal Mosfet. You might have noticed that there are no diodes to absorb the backEMF of the relay coils at switch-off at Fig.1: the attenuation settings are very accurate at low frequencies down to about 90dB, with a maximum error of only 1dB. The +0.5dB blip between 6dB and 8dB could be due to measurement error. siliconchip.com.au 4 M3 x 6mm panhead machine screws 4 M3 x 8mm countersunk head machine screws 2 M2 x 16mm or M2.5 x 16mm panhead machine screws and nuts (to match OLED mounting holes) 4 M3 flat washers Semiconductors 1 ATmega168 or ATmega328 8-bit microcontroller programmed with CSE211003.hex, DIP-28 (IC1) 1 LP2950-3.3 or similar 3.3V LDO regulator, TO-92 (REG1) 10 PMV15UNEA, PMV19XNEA or similar avalancherated N-channel Mosfets, SOT-23 (Q1-10) [Mouser Cat 771-PMV15UNEAR or element14 Cat 3268027] 2 2N7000 N-channel Mosfets, SOT-23 (Q11-Q12) ● Capacitors (SMD 0805 6.3V+ X7R ceramic unless stated) 1 10μF M3216/1206-size 1 1μF 4 100nF 3 10nF Resistors (all SMD M2012/0805 1% thick film) 5 18kW 2 4.7kW 1 1kW ● 2 820W 2 470W 2 270W 4 220W 2 180W 4 100W 2 68W 8 56W 1 33W 1 18W 1 12W 1 5.6W ● omit if the debugging interface is not needed SC6420 kit ($75): a short form kit is available that includes most parts. See page 106 for more details. switch-off. This is a bit unusual, but it does cut back on the number of components. This only works if the Mosfets are rugged enough to withstand the voltage spikes caused by the relay coil magnetic fields dissipating. See the section below on “Avalanche-rated Mosfets” for more details on this. As with my other designs, I have added a simplified RS-232 interface for debugging using Mosfets Q11 and Fig.2: the actual attenuation for a selected value of 110dB between 2MHz and 75MHz. As the signal frequency increases, parasitic capacitances on the circuit board result in more of the input signal leaking through to the output. Australia's electronics magazine July 2022  63 Q12. These may be omitted unless you plan to use that interface. The Attenuator is powered from a standard 5V DC mobile phone charger (or other USB power source). While this could be obtained from an output socket on the Signal Generator, I decided to use a separate supply to reduce potential RF leakage. You will note that the photos show an additional DC socket. This is for powering 64 Silicon Chip an external amplifier that was used for measurement. Inductor L1 is in series with the incoming supply to further reduce any outside RF. This seems to be effective as powering it from a battery of three AA cells made no measurable difference in readings. The same 0.96in SSD1306-based OLED screen is used to display the attenuation value as in the Signal Australia's electronics magazine Generator. A 3.3V regulator generates the OLED supply rail. The I2C interface requires pull-up resistors to +3.3V. As the SDA and SCL outputs on PC4 and PC5 of IC1 are open drain, there is no problem with the 5V-powered micro interfacing with the OLED. I chose NEC EC2-5NU relays. They are DPDT types with 5V DC rated coils. These are readily available and have good isolation. The measured siliconchip.com.au capacitance between open contacts is 1pF, which does not sound like much. Still, the reactance at 75MHz is -j × 2122W, which is effectively in parallel with the 220W resistor in the 20dB sections, slightly reducing the attenuation. The measured attenuation tracks the set attenuation fairly closely at 2MHz and below, as is shown in Fig.1. I took these readings with the tinySA spectrum analyser. The noise floor of the tinySA is about -90dBm, so I used a 30dB low-noise amplifier (LNA) to measure down to -110dBm. The measured value varied slightly on each pass, so I averaged several readings. Once the frequency gets above 2MHz, the accuracy drops off, and Fig.2 shows the maximum attenuation achievable up to 75MHz. To get a lower signal level at the higher frequencies, Fig.3: the entire circuit of the 110dB Attenuator. The main section consists of 10 switched attenuators, each made from three resistors, one relay (RLY110) and one Mosfet (Q1-Q10) to drive the relay. The transistors are driven by microcontroller IC1, which also monitors the rotary encoder and pushbutton, and communicates with the OLED to show the current attenuation setting. you will need to put a fixed 30dB attenuator on the unit’s output. Avalanche-rated Mosfets Avalanche-rated Mosfets (such as those specified in the parts list) must be used to ensure longevity. This is easy to check by searching the device data sheet for the avalanche energy rating (usually expressed in mJ). When a Mosfet’s drain-source rating voltage is exceeded, it can enter avalanche breakdown, similar to a zener diode. In this mode, the channel conducts current until the voltage drops. The problem with this is that a typical Mosfet is made of many (usually thousands of) cells, and there’s no guarantee that each cell will break down at the same voltage. That means the energy may pass through a very small proportion of the Mosfet area, causing intense local heating and possibly failure. Also, the avalanche current is not conducted through the normal channel but rather through a ‘parasitic bipolar transistor’ formed by two semiconductor junctions within the Mosfet. This also has the effect of concentrating the current into a smaller area than usual. Avalanche-rated Mosfets solve this by two methods. Firstly, they are designed and manufactured in such a way to minimise the variation in breakdown voltages between individual cells so that the current is spread out. Secondly, after being manufactured, they are tested by being forced into avalanche breakdown with a pulse of energy at least as high as specified in the data sheet. Any ‘weak’ devices that cannot handle this fail and are discarded. Only the survivors go on to be sold. We’ve calculated the energy pulse from the relay coils in this design at around 1mJ. The Mosfets we have specified have single-pulse ratings of around 15mJ. They only need to handle one pulse every few seconds, so this should be well within their capabilities. If substituting Mosfets, choose types with a minimum avalanche rating of 10mJ. For more information about this topic, see the excellent PDF from Infineon at siliconchip.com.au/link/ abdb Construction The unit is built into a standard aluminium diecast box, available from siliconchip.com.au Australia's electronics magazine July 2022  65 Fig.4: the front panel label for the Attenuator. The number and size of cutouts have been minimised to prevent RF leakage into or out of the case. Fig.5: luckily, there aren’t too many holes that need to be cut in the diecast case. They can all be drilled, except for the rectangular OLED hole. There are various ways to make that; just be sure to do it slowly to avoid it becoming jagged or oversized. 66 Silicon Chip Australia's electronics magazine Jaycar and Altronics (the same one used for the recently-described AM/ FM Signal Generator). It’s best to prepare this before assembling the PCB. I sprayed mine black to improve its appearance. I printed the label (Fig.4) on photographic paper and added a 1.5mm-thick protective clear polycarbonate sheet on top, cut to the same size as the label. You can download this artwork from siliconchip.com.au/ Shop/11/6419 The PCB attaches to the inside of the case using 12mm threaded spacers. If you can’t get these, use 10mm threaded spacers with an added nut to extend them to 12mm. I also sprayed the screws through the front panel black to improve the overall appearance. The required cutouts in the enclosure are shown in Fig.5. For best accuracy, locate the reference point in the bottom left and drill this to 3mm diameter. Then attach the blank PCB to use as a template. Square it up, drill the opposite corner and secure it with another screw. Now drill the other mounting holes. The encoder location on the PCB has a small hole in the centre on the PCB. Drill the panel through this using a 1.5mm diameter drill bit, then drill holes in the case corresponding to the four OLED mounting holes to 2.5mm. Remove the PCB and enlarge the hole for the shaft encoder to 14mm siliconchip.com.au diameter. It needs to be that large so that the PCB can be manoeuvred into position. Increase the size of the OLED mounting holes to 4mm and use the outside of these to mark the cutout needed. How you make the cutout depends on the equipment and skills that you have. Perhaps the simplest approach is to drill a series of reasonably small (say 3-4mm) holes around the inside of the perimeter. Join these with a file until the centre part drops out, then use a larger flat file to smooth the edges until they are straight and the hole is just large enough. Finally, drill two 7mm holes for the SMA connectors on the front and a hole for the DC connector on the back. There is not much room for this connector; it should be 7mm up from the bottom of the case. I also placed a small toggle switch next to the DC connector for the power, but that is optional. PCB assembly Most of the components mount on a double-sided PCB coded CSE211003 that measures 76 x 95.5mm. Fig.6 shows where the parts go. The resistors and capacitors are mostly SMD M2012/0805 or M3216/1206 size, while the transistors are in SOT-23 packages. Solder all the SMDs first, followed by the throughhole components, then the SMA connectors, and the rotary encoder last. siliconchip.com.au Fig.6: the resistors, capacitors and Mosfets all come in SMD packages but are pretty easy to solder. The micro, regulator, relays, headers and rotary encoder are through-hole parts. Fit all the SMDs first, then the through-hole parts from lowest profile to tallest, with the edge connectors last. Be careful to orientate the microcontroller and regulator as shown. There are options for other 3.3V regulators if the LP2950-3.3 regulator is not available. Some have different pinouts, so check this if substituting. If your replacement regulator has a reversed pinout, you can mount it on the opposite side of the board. The OLED screen plugs into a 4-pin socket strip. Although four mounting holes are provided, attaching it with two screws and two 10mm spacers is adequate. The holes in the OLED may be either 2mm or 2.5mm, so use either Australia's electronics magazine M2 x 16mm or M2.5 x 16mm machine screws and nuts. Using it It’s about as easy as it gets. Simply power the unit up, use the rotary encoder to dial in the amount of attenuation required while checking the screen display, then ensure your input and output cables are connected to the correct sockets. Remember that pushing down on the rotary encoder knob switches between adjustment steps of 1dB and 5dB. SC July 2022  67