Silicon ChipEl Cheapo Modules: 3.8GHz Digital Attenuator - October 2021 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: The chip shortage is now a component shortage
  4. Feature: Detecting Gravitational Waves by Dr David Maddddison
  5. Product Showcase
  6. Project: Tele-com – an intercom using analog phones by Greig Sheridan & Ross Herbert
  7. Project: Two- or Three-Way Stereo Active Crossover – Part 1 by Phil Prosser
  8. Feature: El Cheapo Modules: 3.8GHz Digital Attenuator by Jim Rowe
  9. Project: SMD Test Tweezers by Tim Blythman
  10. Review: PicoScope 6426E USB Oscilloscope by Tim Blythman
  11. Project: Touchscreen Digital Preamp with Tone Control – Part 2 by Nicholas Vinen & Tim Blythman
  12. Review: Solder Master ESM-50WL Cordless Iron by Tim Blythman
  13. Serviceman's Log: Life on the 'bleeding edge' by Dave Thompson
  14. Feature: UT-P 2016 MEMS Woofer by Allan Linton-Smith
  15. Vintage Radio: Reinartz 4-valve reaction radio by Fred Lever
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: Tapped Horn Subwoofer, September 2021; Touchscreen Digital Preamplifier, September 2021; Battery Manager, August 2021; Bush VTR103 AM/FM radio, August 2021; Silicon Labs FM/AM/SW Digital Radio, July 2021; 7-Band Stereo Equaliser, April 2020; CLASSiC DAC, February-May 2013
  20. Outer Back Cover

This is only a preview of the October 2021 issue of Silicon Chip.

You can view 47 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.

Items relevant to "Tele-com – an intercom using analog phones":
  • The Tele-com Intercom PCB (aka OzPLAR) [12110211] (AUD $30.00)
  • The Tele-com Intercom PCB pattern (PDF download) [12110211] (Free)
  • Tele-com front & rear panel 3D printing files (Panel Artwork, Free)
Items relevant to "Two- or Three-Way Stereo Active Crossover – Part 1":
  • Two- or Three-Way Stereo Active Crossover PCB [01109211] (AUD $15.00)
  • Two- or Three-Way Active Crossover PCB patterns (PDF download) [01109211] (Free)
Articles in this series:
  • Two- or Three-Way Stereo Active Crossover – Part 1 (October 2021)
  • Two- or Three-Way Stereo Active Crossover – Part 1 (October 2021)
  • Two- or Three-Way Stereo Active Crossover – Part 2 (November 2021)
  • Two- or Three-Way Stereo Active Crossover – Part 2 (November 2021)
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)
Items relevant to "SMD Test Tweezers":
  • SMD Test Tweezers PCB set [04106211+04106212] (AUD $10.00)
  • PIC12F1572-I/SN [0410621A.HEX] or PIC12LF1572-I/SN [0410621C.HEX] programmed for the SMD Test Tweezers (Programmed Microcontroller, AUD $10.00)
  • 64x32 white OLED screen (0.49-inch, 1.25cm diagonal) (Component, AUD $10.00)
  • Improved SMD Test Tweezers kit (Component, AUD $35.00)
  • Firmware for the SMD Test Tweezers [0410621A.HEX] (Software, Free)
  • SMD Test Tweezers PCB patterns (PDF download) [04106211/2] (Free)
Items relevant to "Touchscreen Digital Preamp with Tone Control – Part 2":
  • Touchscreen Digital Preamp PCB [01103191] (AUD $12.50)
  • Touchscreen Digital Preamp ribbon cable/IR adaptor PCB [01103192] (AUD $2.50)
  • PIC32MX170F256B-50I/SP programmed for the Touchscreen Digital Preamp, 2.8in screen version [0110319A.hex] (Programmed Microcontroller, AUD $15.00)
  • PIC32MX170F256B-50I/SP programmed for the Touchscreen Digital Preamp, 3.5in screen version [0110319B.hex] (Programmed Microcontroller, AUD $15.00)
  • Micromite LCD BackPack V3 complete kit (Component, AUD $75.00)
  • Micromite LCD BackPack V2 complete kit (Component, AUD $70.00)
  • Micromite LCD BackPack V1 complete kit (Component, AUD $65.00)
  • Firmware for the Touchscreen Digital Preamp (Software, Free)
  • Touchscreen Digital Preamp PCB patterns (PDF download) [01103191/2] (Free)
Articles in this series:
  • Touchscreen Digital Preamp with Tone Control – Part 1 (September 2021)
  • Touchscreen Digital Preamp with Tone Control – Part 1 (September 2021)
  • Touchscreen Digital Preamp with Tone Control – Part 2 (October 2021)
  • Touchscreen Digital Preamp with Tone Control – Part 2 (October 2021)
Articles in this series:
  • A high-performance MEMS tweeter that’s just 6.7 x 4.7mm! (May 2020)
  • A high-performance MEMS tweeter that’s just 6.7 x 4.7mm! (May 2020)
  • UT-P 2016 MEMS Woofer (October 2021)
  • UT-P 2016 MEMS Woofer (October 2021)

Purchase a printed copy of this issue for $10.00.

Using Cheap Asian Electronic Modules By Jim Rowe Self-Contained 3.8GHz Digital Attenuator This digitally programmable RF attenuator module can attenuate RF signals from 1MHz to 3.8GHz by 0-31dB in 1dB steps. It doesn’t need to be controlled by an external microcontroller; it has one built in. You control it using four small pushbutton switches, while a tiny OLED screen shows the current setting. I reviewed one of the simpler digitally programmable RF attenuator modules back in the June 2018 issue (siliconchip.com.au/Article/11090). It could be configured either by a separate microcontroller unit (MCU) like a Micromite or Arduino, or a six-way DIP switch. It was based on the Peregrine Semiconductor PE4302 attenuator IC, mounted in the centre of a 33 x 24.5mm PCB without any shielding. Despite that, it turned out to have quite respectable performance up to about 1.5GHz. Above that, attenuation errors tended to grow, but the module was still quite practical for many applications. I recently noticed this new digitally programmed step attenuator for sale. It is only a little larger, but has a built-in MCU with a tiny OLED and some small pushbutton switches for easy attenuation adjustment. I ordered one from Banggood (ID number 1769385; siliconchip.com.au/link/ab8p). At the time of writing, it is priced at about $30.00 plus $6.70 for shipping siliconchip.com.au to Australia. I haven’t been able to find any information regarding its manufacturer, but like most of these modules, it is almost certainly made in China. This module measures 42 x 32 x 22mm overall, not counting the SMA connectors at each end for RF input and output. The digital attenuator section is on a 33 x 22.5mm PCB inside a 42 x 32 x 10mm CNC machined aluminium block which forms the ‘case’. Most of the control section is mounted on a second PCB measuring 42 x 32mm, which forms the top of the case. The 26mm diagonal (38 x 12.5mm) OLED is mounted on top of the second PCB. The PE4302 digital attenuator chip used in the earlier attenuator module was made obsolete in 2018 and is no longer available. This new module uses the HMC472 from Hittite Microwave Corporation, a company acquired by Analog Devices in 2014. The HMC472 is similar to the PE4302 in many ways. It is described as a 6-bit digital step attenuator using Australia’s electronics magazine GaAs MMIC technology, and can provide attenuation from 0dB to 31.5dB in 0.5dB steps for DC to 3.8GHz signals. It comes in a 24-lead Lead Frame SMD package measuring 4 x 4mm. Unlike the PE4302, it runs from 5V DC rather than 3.3V. The insertion loss at the 0dB setting is rated at 1.1-1.2dB below 350MHz, 1.5dB at 2GHz and 1.9dB at 4GHz. I wasn’t able to find a complete circuit for the new module, but I worked out a basic block diagram for it, shown in Fig.1. The HMC472’s RF1 input pin is coupled to the SMA connector via a 1nF capacitor, with its RF2 output pin configured similarly. Apart from various bypass capacitors, that is the whole attenuator section. The control section is based on an STM32F103C8T6 microcontroller. You may have noticed that it controls only five of the six programming lines of the HMC472: V1 to V5. The unused V6 line is the one that controls the 0.5dB attenuator stage inside the HMC472, which explains why this module only provides 1dB steps. October 2021  61 Fig.1: block diagram for the programmable RF attenuator. This module, like many of the others we’ve discussed recently, is controlled by a popular STM32 ARM microcontroller. Presumably, the module designers decided that given the attenuation error rating of the HMC472, ±(0.35dB + 5%), and the difficulty in avoiding further frequency-related errors due to PCB layout etc, there wasn’t much point in providing 0.5dB steps. The user determines the attenuation setting using the three small pushbutton switches (S1-S3), and the current attenuation setting is shown on the OLED module. The MCU drives this via a standard I2C serial interface. When power is first applied, the MCU sets the attenuation to 0dB. To increase the attenuation, you first press S2 (the OK button) and then press S1 (+) until the display shows the attenuation setting you want. Then if you press S2 again, this will be the new setting. To reduce the attenuation, you press S2 once more, then press S3 (-) until the OLED shows the new setting you want, and then press S2 again. It’s pretty straightforward, although the tiny pushbuttons used for S1-S3 do have a small amount of contact bounce. This can sometimes force you to press the + or - button again to correct any accidental ‘overshoot’ before pressing S2 to finalise the change. The CH340E USB-serial interface chip shown in Fig.1 has been provided to allow the attenuation setting to be programmed from a computer. So the mini USB socket is not just for feeding power to the module (controlled by power switch S4), but also to allow external control. Fig.2: a graph of the module’s performance at an attenuation setting of 0dB. This was measured between 100kHz and 4.4GHz, using Signal Hound’s Spike software with a USB-SA44B spectrum analyser and a matching USB-TG44A tracking generator. 62 Silicon Chip Australia’s electronics magazine There’s not a great deal of information provided on external control, but I found a very brief explanation in the “Customer Q&As” section of the Banggood info on the module: The protocol is simple 9600 Baud serial: “wvXXYYn” sets the attenuator to XX.YYdB. “rn” returns the model number. Search GitHub using ATT6000 or emptemp for python code (https://github.com/emptemp/ att6000_control). I tried this, but I didn’t get very far. Using the serial terminal app Tera Term (V4.105) with the virtual com port driver set for 9600 baud, I tried all of the possibilities I could think of to try and get the attenuator module to ‘listen’ to a command like “wv1300n”. I tried sending the command in uppercase instead of lowercase, with and without the “n” at the end, followed by an LF or a CR or a CR-LF, using 8-bit coding or 7-bit coding and so on. But there was no response or reaction from the module, whatever I tried. It stayed stubbornly set for 0dB of attenuation. So I’m not sure about how to control the module from a PC or MCU. Checking it out I measured the performance of the new attenuator module using my Signal Hound USB-SA44B HF-UHF spectrum analyser and its matching USB-TG44A tracking generator, both controlled by the latest version of Signal Hound’s Spike software (V3.5.15) in its SNA (scalar network analysis) mode. I checked the performance of the module at a number of different attenuation settings: 0dB (to see its insertion loss), -5dB, -10dB, -15dB, -20dB, -25dB and -30dB, to get an idea of the module’s overall performance. After examining the results I then checked the response at three further settings: -1dB, -18dB and -31dB. During each of these tests, I saved an image of Spike’s plot of the test results. The first of these (the one for a setting of 0dB) is shown in Fig.2. Spike cannot combine multiple results into a single composite plot, so I assembled one by importing them into CorelDraw and tracing each plot. The result is shown in Fig.3. The uppermost 0dB plot shows the insertion loss of the module over the entire frequency range. It is less than 2dB (as claimed) up to about 1.5GHz, but then wobbles around a bit until it siliconchip.com.au reaches about -2.5dB at 2.64GHz and then -3.5dB at around 2.95GHz. Essentially, the insertion loss remains under 2.0dB over much of the frequency range, apart from some deviations between 1.5GHz and 3.8GHz. Most of the lower plots in Fig.3 have a shape almost identical to that of the top 0dB plot, just separated by the chosen attenuation setting. This is also true for the uppermost blue line, with the attenuator set at -1dB. But notice that above about 2.2GHz, the higher attenuation plots (-20dB and greater) develop a small number of minor bumps and dips. These are very apparent in the -30dB plot, for example, and also in the blue -31dB plot just below it. I suspect that many of these minor variations are due to small resonances inside the HMC472 chip and its surrounding tracks on the attenuator PCB. There might also be standing waves inside the attenuator box at specific frequencies. These plots reveal that the attenuator’s performance relative to its insertion loss is quite respectable, at least for frequencies up to about 1.5GHz and settings up to around -20dB. But the errors increase above 1.5GHz and with levels above -20dB. This attenuator would still have many practical uses above 1.5GHz and settings over -20dB, either if the exact amount of attenuation at a given frequency is not critical, or if you use the plots of Fig.3 to correct for the errors. The middle blue plot in Fig.3, for a setting of -18dB, was to see if setting the attenuator to -18dB would give an actual attenuation of -20dB over as much of the frequency range as possible. This worked for frequencies around 880MHz and 3.8GHz, but the overall shape of the plot was unchanged and still gave significant deviations both less than and greater than the desired -20dB figure. The side view of the attenuator module shows the control switches, and the very tight spacing between the RF and USB power connectors on the right. This photo is shown at approximately 150% scale for clarity. Another is that the RF output SMA connector and the mini USB power connector are too close together, so you have to unplug the USB cable to connect or disconnect an SMA cable to the RF output just below it. You also have to adjust the SMA connector’s outer hex sleeve so that a flat is uppermost; otherwise, you won’t be able to reconnect the USB cable. Before I finished writing this review, I went onto the Banggood website to check on the price of this module. I was surprised to see that a larger and apparently better module had become available (ID 1648810; siliconchip. com.au/link/ab8r). This newer attenuator module is advertised as having a frequency range of LF to 6GHz, an attenuation range of 0-31.75dB in steps of 0.25dB and an insertion loss of less than 1.5dB (but with the qualification that “it will be a little larger” at the high-frequency end). Currently, they are advertising it for $51.80, plus $6.70 for postage to Australia. So it costs nearly double that of the module I’ve reviewed here, but it might turn out to be worth it. I suspect it is based on the Analog Devices HMC1119, which has a range of 100MHz to 6.0GHz, seven control bits to give a setting range from 0 to 31.75dB in 0.25dB steps and a specified insertion loss of 1.3dB at 2.0GHz. I am planning to order one of these and SC write it up when it arrives. Conclusions Overall, this new attenuator module is reasonably good value for money. It is suitable for a fairly wide range of applications, especially if you use the curves of Fig.3 to correct for the inevitable attenuation errors. But it does have a few shortcomings. For example, the module might not be controllable from a PC, Arduino or Micromite. siliconchip.com.au Fig.3: following on from Fig.2, this is the combined plot of testing the module at various attenuation settings from 0dB to -30dB in 5dB steps, and then three extra tests at -1dB, -18dB and -31dB. Australia’s electronics magazine October 2021  63