Silicon ChipEl Cheapo Modules: Class D amplifier modules - May 2019 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: “Crippleware” possibly to blame for two airliner crashes
  4. Feature: Avalon Airshow: from killer drones to spacecraft! by Dr David Maddison
  5. Project: DSP Active Crossover and 8-channel Parametric Equaliser by Phil Prosser and Nicholas Vinen
  6. Feature: El Cheapo Modules: Class D amplifier modules by Allan Linton-Smith
  7. Project: Solar-powered data repeater for 433MHz remotes by John Clarke
  8. Serviceman's Log: Samsunk – or the dishwasher that wouldn’t by Dave Thompson
  9. Project: Bridge adaptor gives four times your amplifier power! by Nicholas Vinen
  10. Review: Microchip’s new “SNAP” debugger/programmer by Tim Blythman
  11. Project: Low-cost 3.5-inch LCDs for Arduino or Micromite by Tim Blythman
  12. Vintage Radio: Admiral 1956 5ACW Clock Radio by Associate Professor Graham Parslow
  13. Product Showcase
  14. PartShop
  15. Market Centre
  16. Advertising Index
  17. Notes & Errata: Multi Diode Curve Plotter, March 2019; DAB+/FM/AM Radio, January-March 2019; 3-Way Adjustable Active Stereo Crossover, September-October 2017
  18. Outer Back Cover: Hare & Forbes Machineryhouse

This is only a preview of the May 2019 issue of Silicon Chip.

You can view 46 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:
  • The Avalon 2013 Air Show (May 2013)
  • The Avalon 2013 Air Show (May 2013)
  • The Australian International Airshow 2015 (May 2015)
  • The Australian International Airshow 2015 (May 2015)
  • Avalon Airshow: from killer drones to spacecraft! (May 2019)
  • Avalon Airshow: from killer drones to spacecraft! (May 2019)
  • Avalon Airshow 2023 (May 2023)
  • Avalon Airshow 2023 (May 2023)
Items relevant to "DSP Active Crossover and 8-channel Parametric Equaliser":
  • DSP Crossover CPU PCB [01106193] (AUD $5.00)
  • DSP Crossover LCD Adaptor PCB [01106196] (AUD $2.50)
  • DSP Crossover front panel control PCB [01106195] (AUD $5.00)
  • DSP Crossover DAC PCB [01106192] (AUD $7.50)
  • DSP Crossover power supply PCB [01106194] (AUD $7.50)
  • DSP Crossover ADC PCB [01106191] (AUD $7.50)
  • DSP Active Crossover complete PCB set (7 boards) [01106191-6] (AUD $40.00)
  • PIC32MZ2048EFH064-250I/PT programmed for the DSP Active Crossover/Equaliser (V8) (Programmed Microcontroller, AUD $30.00)
  • Pulse-type rotary encoder with pushbutton and 18t spline shaft (Component, AUD $3.00)
  • 128x64 Blue LCD screen with KS0108-compatible controller (Component, AUD $30.00)
  • Firmware and source code for the DSP Active Crossover/Equaliser project [0610619A.HEX] (Software, Free)
  • DSP Active Crossover/DDS/Reflow Oven PCB patterns (PDF download) [01106191-6] (Free)
Articles in this series:
  • DSP Active Crossover and 8-channel Parametric Equaliser (May 2019)
  • DSP Active Crossover and 8-channel Parametric Equaliser (May 2019)
  • DSP Active Crossover and 8-channel Parametric Equaliser, part two (June 2019)
  • DSP Active Crossover and 8-channel Parametric Equaliser, part two (June 2019)
  • DSP Active Crossover and 8-channel Parametric Equaliser (July 2019)
  • DSP Active Crossover and 8-channel Parametric Equaliser (July 2019)
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 "Solar-powered data repeater for 433MHz remotes":
  • 433MHz Wireless Data Range Extender PCB [15004191] (AUD $10.00)
  • PIC16F88-I/P programmed for the 433MHz Wireless Data Range Extender [1500419A.HEX] (Programmed Microcontroller, AUD $15.00)
  • 23LCV1024-I/P SRAM and MCP73831T charger IC for the 433MHz UHF Repeater (Component, AUD $12.50)
  • Firmware and source code for the 433MHz Wireless Data Range Extender [1500419A.HEX] (Software, Free)
  • 433MHz Wireless Data Range Extender PCB pattern (PDF download) [15004191] (Free)
  • 433MHz Wireless Data Range Extender lid panel artwork (PDF download) (Free)
Items relevant to "Bridge adaptor gives four times your amplifier power!":
  • Amplifier Bridge Adaptor PCB [01105191] (AUD $5.00)
  • Amplifier Bridge Adaptor PCB pattern (PDF download) [01105191] (Free)
  • Panel artwork for the Bridge-mode Audio Amplifier Adaptor (Free)
Items relevant to "Low-cost 3.5-inch LCDs for Arduino or Micromite":
  • Low-cost 3.5-inch LCD Adaptor PCB for Arduino R3 [24111181] (AUD $5.00)
  • 3.5-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $35.00)
  • Sample software and source code for low-cost 3.5-inch LCDs for Arduino and Micromite (Free)
  • Low-cost 3.5-inch LCDs Adaptor for Arduino R3 boards PCB pattern (PDF download) [24111181] (Free)

Purchase a printed copy of this issue for $10.00.

Bargain Subwo         The old saying says that “if it sounds too good to be PCB size is true, it probably is”. 100 x 70mm. So if we told you that you could get an assembled 3 x 50W amplifier module for under $US6, you would probably be thinking that it would be a load of junk. But in this case, that isn’t the case! This one works almost (!) as well as advertised – and most of its shortcomings can easily be addressed. T he Class-D 3 x 50W amplifier module (stereo plus subwoofer) shown above can be purchased (at time of going to press) for about $US6 from eBay or AliExpress. For a bit more money, you can get the 5x50W amplifier module with built-in Bluetooth support shown opposite. Both run from 5-27V DC, provide decent performance and appear to be very good value for money. The XD172700 module The module above uses the latest power IC from Texas Instruments, the TPA3116D2 IC (2017 revision G), who describe it as a “15W, 30W, 50W FilterFree Class-D Stereo Amplifier Family With AM Avoidance”. The chip measures just 11mm x 6.2mm. Two are used on the first board: one is used in stereo mode for the left and right channels and the other in mono (bridged) mode for driving a subwoofer. 38 Silicon Chip These amplifier chips are fed audio by two NE5532 ICs used as preamplifiers and to provide the subwoofer low-pass filter. You don’t have to worry about soldering the SMD TPA3116D2 chips because this has all been done for you! Our suggested modifications require a little bit of soldering. We paid sixteen dollars (Australian) including postage – and are feeling miffed at that, having since found them much cheaper! The board comes with everything, even the kitchen sink, err, heatsink, which is shared by both amplifier ICs. It even came with a set of standoffs, nuts and bolts for mounting it in a chassis, plus a nice set of shiny knobs for the pots! All you need to do then is wire up the power supply, audio input and speaker output terminals. The board has two audio input options: you can use either the 3.5mm stereo jack socket or a three-pin JST Australia’s electronics magazine header. And there are two options for power supply; either a PCB screw terminal or a 5.5mm DC barrel socket for a plugpack or inline power supply. The board requires a simple DC supply, and this simplifies things significantly because you can use just about any supply that produces 5-24V DC such as an old laptop supply or any other high current source, including a car battery, electric drill battery etc. You could even use a 5V USB charger. But to get the full output power, you need around 24V at 6-7A. Note that to get the full power output you will also need 4Ω speakers. Higher impedance speakers cannot be driven to quite as high power levels. For example, if you use 8Ω speakers, with the appropriate power supply, you will get around 30W maximum from the left and right channels. The amplifier ICs have a high power supply rejection ratio (PSRR), so you don’t need a super smooth DC supply. siliconchip.com.au Class-D Stereo + oofer Amplifier        Modules By Allan Linton-Smith It will reject 70dB of ripple, meaning you can have up to 200mV peakto-peak ripple before you’re likely to notice any buzz or hum creeping into the audio outputs. For testing, we used a 24V 7A DC plugpack which cost $33 including postage. 24V x 7A = 168W so with a 90% claimed peak amplifier efficiency, we should get a total theoretical output of around 150W RMS, ie, around 2 x 38W into 4Ω for the left and right channels and about 75W into a 2Ω subwoofer. The efficiency of the device varies significantly with supply voltage and output power (see Fig.1). It is typically 40-70% at low power levels, ie, below 5W. If you only require power levels up to 10W into 4Ω speakers you are better off with a 6-12V DC supply because this will give you 70-90% efficiency and it won’t cause any overheating problems (see Fig.1). So your best approach is to decide what power output you need and then choose your power supply to deliver this with the highest efficiency. Otherwise, the device may overheat and automatically shut down during use. This is no doubt due to poor design of the subwoofer section; we suspect that the IC has not been correctly configured for mono operation. It may be possible to fix this by changing some of the passive components connected to the subwoofer amplifier IC, but we haven’t tried that. So basically, you can expect to get about the same amount of power from the subwoofer channel as you can from the left and right channels, taking into account the possibility that your sub may have a different impedance from the other speakers. Frequency response The quoted frequency response by the supplier is 20Hz to 20kHz with no plus/minus decibel   figure, which is quite common to see but also a pretty-much useless statement. So we decided to measure the frequency response accurately. First, we did a listening test which exposed a lack of treble with cymbals, triangles and slightly muffled brass. The measured response, as shown in Fig.2, confirms our subjective impression. There is a significant drop-off in the output above 1kHz. We did this test at 1W and 5W output levels, using a 12V DC supply for convenience. So the out-of-the-box response is poor, and you can clearly hear the lack of treble. It’s down by 8dB by 20kHz. PCB size is 167 x 116mm. Power output figures The measured power for this module is good but not quite up to the claim of 2 x 50W + 100W. During testing, we did manage to get 2 x 50W into 4Ω and 2 x 30W into 8Ω as expected. But we were not able to get the full 100W into 2Ω from the subwoofer output because the device protection circuit sent the output into high impedance and it cut out. We were only able to get about 50W into the sub. siliconchip.com.au The Bluetooth module is supplied already attached to the main board. Australia’s electronics magazine Even if you don’t need the two extra outputs, as long as you can live with the extra size (and cost), this module has two benefits: no need for mods, and built-in Bluetooth support. If you’re clever, and you only need two or three channels, you’ll take the left output from one chip and the right output from the other chip to spread out the heat load between all the devices. May 2019  39 100 90 80 Power Efficiency (%) 70 60 50 40 30 20 0 PVCC = 6V PVCC = 12V PVCC = 24V Gain = 26dB TA = 25°C RL = 4Ω 10 0 5 10 15 20 25 30 35 Output Power (W) 40 45 50 Fig.1: sample efficiency curves from Power Efficiency (BTL) vs Output Power the Texas Instruments TPA3116D2 data sheet. Efficiency is higher with lower supply voltage but of course, maximum power is also lower in those cases. Efficiency also increases with output power; in other words, device dissipation does not increase much as the output power rises. G018 A glance at the Texas Instruments data sheet (www.ti.com/lit/ds/symlink/tpa3116d2.pdf) indicates that when properly implemented, the IC’s frequency response should be almost ruler flat to about 40kHz. The data sheet also recommends that the LC filter after the output stage, if fitted, should have a 10µH inductor and 680nF capacitor on each output pin. However, we measured the supplied LC filter at 55µH and 1µF, which would +10 Amplifier Frequency Response XD172700 Class-D amplifier features and specifications • • • • • • • • • • • • 3 x 50W RMS into 4Ω (21V DC supply) 3 x 30W RMS into 8Ω (24V DC supply) Supply voltage: 4.5-27V DC THD+N: typically around 0.05% at 1kHz, 1W Frequency response: 20Hz-20kHz, +3,-0dB (after modifications) Efficiency: up to 90% (only needs a small heatsink) Switching frequency: 400kHz ±3kHz Self protection circuits: over-voltage, under-voltage, over-temperature, DC offset, over-current and short-circuit protection. Input connectors: 3.5mm stereo jack socket or 3-pin JST header Output connectors: 3 x 2-way terminal blocks Power connectors: 2-way terminal block and DC barrel socket Module size: 100 x 70 x 30mm them all with the same orientation to reduce problematic magnetic field interactions. While you should ideally replace the 1µF capacitors with 680nF capacitors as per the data sheet, in practice, it doesn’t make that much difference. You can see the revised frequency respone (after changing the inductor values) as the blue trace in Fig.2 With the 10µH inductors and 1µF 17/12/18 15:39:09 Subwoofer output Left/right pre mods Left/right post mods +5 Relative Amplitude (dBr) explain the drastic reduction in highfrequency response. We tried reducing the output inductor values to 10µH, which considerably flattened the frequency response. As per the data sheet, high-current ferrite beads can be used in place of the inductors, if the capacitors are also changed to 1nF. This will not be as effective at reducing radiated emissions, however, and doing this will require quite a bit of soldering which may damage the dual-layer PCB. Changing the inductor values has another benefit besides flattening the frequency response; we found that they got hot during use because the wire used is too thin. Audio inductors should be air-core types to avoid non-linearity in the core material. We published instructions for winding 10µH inductors using 30.5 turns of 1mm diameter enamelled copper wire on standard bobbins available from Jaycar and Altronics. This was in the August 2011 issue, on page 67 (siliconchip.com.au/ Article/1129). It was intended for use in the Ultra-LD Mk.3 amplifier module but is certainly applicable to this one, too. You then just need to remove the existing inductors and solder the improved ones into place. Keep them as close to the PCB as possible and mount +0 -5 -10 -15 -20 -25 -30 20 50 100 200 500 1k 2k Frequency (Hz) 5k 10k 20k Fig.2: frequency response of the 2+1 channel amplifier module before and after we modified it. The mauve curve shows the subwoofer output, which purposefully rolls off at around 100Hz, the left/right response as supplied is in red, and post-mods is in blue. It’s now much flatter above 1kHz, and it sounds a lot less muffled! 40 Silicon Chip Fig.3: spectrum analysis of the output waveform shows that the main peak at 403kHz, representing what’s left of the switching waveform after filtering, is 40dB below the audio signal while its first harmonic at 806kHz (in the AM broadcast band) is at -57dB, so the amplifier should not cause too much AM interference. Still, we’d keep the speaker leads as short as possible! Australia’s electronics magazine siliconchip.com.au Yuanjing Class-D amplifier features and specifications • Inputs: 3 separate channels (left, right, subwoofer) • Outputs: 5 x 50W RMS into 4Ω (21V DC supply) or 5 x 30W RMS into 8Ω (24V DC supply) • Supply voltage: 4.5-27V DC • THD+N: typically around 0.05% at 1kHz, 1W • Frequency response: 20Hz-20kHz, ±1dB • Efficiency: up to 90% (comes with small heatsinks fitted) • Switching frequency: 400kHz ±3kHz • Self protection circuits: over-voltage, under-voltage, over-temperature, DC offset, over-current and short-circuit protection. • Input connectors: 3-way pin header or Bluetooth wireless • Output connectors: 5 x 2-way terminal blocks • Power connector: solder pads • Module size: 165 x 115 x 25mm capacitors, it shows a slight lift at 20kHz, continuing to rise to 30kHz, then dropping sharply to -60dB at 1MHz. Naturally, after doing that, the unit sounded much better, with an excellent high-frequency response; very different from our first listening test! The subwoofer response is also shown in Fig.2. It has a peak at 28Hz 1 and is -20dB at 250Hz, which is close to ideal. The subwoofer amplifier can put out significant power and the IC is supposed to handle 2Ω speakers, but we found that 4Ω is the minimum for this particular module. You won’t find many 2Ω drivers (outside of cars), anyway. By the way, you may notice that after this modification, the module has a slight (2dB) rise at the low-frequency end, close to 20Hz. This is probably due to crosstalk with the subwoofer section and the design of the PCB, but it should not be a problem because most loudspeakers will not respond to such low frequencies. A small amount of low-end boost will generally improve the response of most loudspeakers anyway. AM radio frequency avoidance The TPA3116D2 has advanced oscillator/PLL circuitry which employs multiple switching frequency options to avoid AM interference. These options cover 15 different frequencies, ranging from 376kHz to 1278kHz, so it can be set to avoid the AM band in most countries. Our module was pre-set at 400kHz (403.5kHz measured) so that only the first harmonic will fall into our local AM band. We also checked the output with a Amplifier THD vs Frequency, 1kHz, 1W 21/12/18 20:12:07 +60 Relative Amplitude (dBr) Total Harmonic Distortion (%) 0.1 0.05 The unit is quoted as having a THD+N figure of 0.1% at 1kHz with a 25W output. We decided to verify this with some measurements. The maximum power into an 8Ω load is 40W RMS and the THD+N reading was 1% when clipping started to be noticeable at this level. The high THD+N at very low power levels is merely noise. As expected, the module will deliver 50W into 4Ω loads. Fig.5 shows a plot of THD+N vs frequency for the module. These figures are the best that we were able to achieve after changing the output inductors. The distortion above 10kHz may be higher than indicated because we used a 20kHz “brick wall” filter 21/12/18 18:33:27 Left channel (undriven) Right channel (driven) +40 0.2 Distortion and noise (THD+N) Amplifier Left/Right Channel Crosstalk +50 0.5 spectrum analyser and found that the first harmonic (807kHz) was 57dB lower than the audio output signal level, so there should be very little interference with AM radio receivers (see Fig.3). If you are going to use the module in other places where 400kHz radiation could be a problem, you could modify the unit according to the data sheet, but that would be quite tricky. So we suggest that you instead try to keep the speaker leads short – less than 1m if possible – so they make for poor transmitting aerials. The spectrum from 500Hz to 40MHz is otherwise very clean. +30 +20 +10 +0 -10 -20 -30 -40 0.02 -50 0.01 20 50 100 200 500 1k 2k Frequency (Hz) 5k 10k 20k Fig.4: the measured distortion performance of the left/right channels on our sample module (after fixing the output filters), into an 8resistive load. While not quite as good as the amplifier designs we publish, it’s below 0.1% THD+N up to about 3.5kHz (with a 20kHz bandwidth) which is not too bad. It certainly sounds acceptable. We must use a 20kHz filter to remove the switching residuals, hence the drop-off in readings above about 6kHz, above which the main harmonics are filtered out. siliconchip.com.au -60 20 50 100 200 500 1k 2k Frequency (Hz) 5k 10k 20k Fig.5: crosstalk figures for this amplifier are not particularly great, with less than 20dB separation between channels. This is probably due to the close proximity of the output filter inductors for each channel. This generally isn’t a problem when playing regular music recordings, but if it bothers you, you have the option of using two separate modules, one for each stereo channel. Australia’s electronics magazine May 2019  41 Fig.6: the self-protection features of the TPA3116D2 IC. to eliminate subharmonics from the 400kHz switching frequency, which otherwise would have affected the measurements. The 80kHz bandwidth measurements we usually take with linear amplifiers cannot be made with Class-D amplifiers. Therefore, we took some intermodulation distortion (IMD) measurements to clarify the level of distortion at higher frequencies. The IMD measurements were taken by injecting the SMPTE-standard frequencies of 500Hz & 2kHz (2:1) and the resultant spectrum shows acceptably low noise up to 24kHz. The average level is 0.11% which verifies the THD+N measurements; this is not bad for a Class-D amplifier. Crosstalk We checked out the crosstalk of the amplifier module (Fig.5) and the re+20 Protection features The TPA3116D2 is a well-protected device and has self-protection for overvoltage and under-voltage conditions as well as an output DC fault, shortcircuit, overload and over-temperature Yuanjing Amplifier Frequency Response 22/12/18 12:27:15 Total Harmonic Distortion (%) -10 -20 -30 -40 50 100 200 500 1k 2k Frequency (Hz) 5k 10k 20k Fig.7: the frequency response of the Yuanjing-brand 4.1 channel amp is fine out-of-the-box, unlike the other one we tried. Note how its subwoofer low-pass filter is far less aggressive than the other board’s, with significant amounts of low bass making it through, up to a few hundred hertz. 42 Silicon Chip No point changing the op amps As mentioned earlier, the unit we obtained came with two NE5532 op amps in sockets. Most dual op amps in DIP-8 packages have the same pinout, so it’s easy to swap them – but there isn’t much point! Firstly, while the NE5532 is an old design, it has stood the test of time and even by today’s standards still has outstanding performance. And secondly, the distortion and noise in this amplifier is dominated by the amplifier ICs themselves and not the op amp-based preamplifiers. We tried replacing the NE5532 with newer OPA1642s (soldered to SOIC- Yuanjing THD vs Frequency, 1kHz, 1W 22/12/18 13:39:53 0.2 0.1 0.05 0.02 -50 20 conditions. When an over-current, short-circuit, over-temperature or DC offset fault is detected, the module switches itself off and you need to cycle power to restore its function. 0.5 +0 -60 1 Subwoofer output Left/right outputs +10 Relative Amplitude (dBr) sults were as not as good as specified, probably because of the design of the PCB and the interaction of the output inductors, which cause feedback into the opposite stereo channel. There is not a lot you can do about this; it may be possible to re-locate the inductors or substitute ferrite beads, but if you want really good crosstalk performance, given its low cost, you could simply use a separate module for the left and right channels. While we were working on this article, similar modules have appeared on eBay for around $5. So it’s hardly worth arguing about! 0.01 20 50 100 Line in Bluetooth 200 500 1k 2k Frequency (Hz) 5k 10k 20k Fig.8: distortion performance is similar to the cheaper one; slightly worse at lower frequencies (probably due to the use of less-linear coupling capacitors), and slightly better at higher frequencies. Its performance is significantly better when using the line input pin header compared to Bluetooth, likely to due to digital artefacts and noise in the output of the Bluetooth module. Australia’s electronics magazine siliconchip.com.au to-DIP adaptors) but the improvement in performance was so minor as to be insignificant. If you must change the op amps, don’t forget to fit them in the right orientation! Getting one There are many similar modules available with a different size, layout, components, connectors and so on. You may want to look for one that’s visually identical to ours, since it is at least a known quantity. There are many possible sources but here is one to get you started: www.aliexpress. com/item//32810347968.html The Yuanjing module Since we noticed so many other similar modules were available, we decided to try a second one, specifically, one with built-in Bluetooth support. The one we’ve chosen has no obvious model number but since it has “Yuanjing” written in copper tracks in the corner near the Bluetooth module, and this is presumably the manufacturer, that’s how we’re referring to it. You can find this module for sale at prices from about $US28 to $US50 on eBay and AliExpress, although the latter has a better selection. Search for “tpa3116 4.1” and look for a blue PCB matching the one shown in this article. This one appears to be the best deal at the time of writing: www.aliexpress. com/item//32799510099.html +60 Yuanjing Left/Right Channel Crosstalk 22/12/18 13:52:01 Left channel (undriven) Right channel (driven) +50 +40 Relative Amplitude (dBr) We’re guessing that this module is designed for motor vehicles given that it has two pairs of essentially identical left/right outputs – these could be used to drive front and rear car speakers. The four pots along the front control overall volume, subwoofer volume and front and rear volume independently. Even if you don’t need the extra channels, there are two big advantages to this module. One, we didn’t need to make any modifications to get good performance out of it; it appears to have the correct output filter components from the factory. And two, the built-in Bluetooth audio receiver is very handy for wirelessly playing audio from a mobile phone or tablet. It works seamlessly. When a Bluetooth device is connected, it switches a relay to divert the Bluetooth audio to the amplifier chips. With no Bluetooth connected, audio comes in via a three-way pin header. The subwoofer signal is generated by mixing the left and right channel signals and then feeding it through a low-pass filter. Like the XD172700, the subwoofer output on this module does not appear capable of the claimed 100W. We think that in both cases, they simply have not wired up the IC correctly for BTL operation. It’s merely using one of the two available channels and so is only capable of driven 4-8Ω loads to the same power levels as the left and right channels. +30 But still, overall, the performance isn’t bad, especially considering the price and the convenience of running off a single, relatively low voltage DC supply rail! Figs.7-9 show how the performance of the Yuanjing module compares. It’s certainly usable as-is and is comparable to, or better than the XD172700 module in most areas. Just one point to note: while this module comes with the appropriate pot nuts and washers (as seen in the photo) it doesn’t include the stand-offs nor the cute knobs which the other one has. Oh well – can’t win ‘em all! Conclusion These fully built and ready-to-go modules are very flexible and would have many useful applications such as in cars, TV soundbars, computer sound systems, amplifiers for smartphones etc. They should be very reliable due to their comprehensive protection against short-circuits and importantly, against overheating. The fact that they only require a single DC supply and can run from 5V to nearly 30V makes them even more flexible. You can even get a few watts of audio output using a small USB charger! The distortion, frequency response and crosstalk could all be improved but for the price, we didn’t expect super hifi performance. These modules can easily be mounted inside a cheap Jiffy box or metal amplifier chassis. It’s so straightforward, we aren’t even bothering to give any instructions. Just mount them in the chassis, wire them up and away SC you go. +20 +10 +0 -10 -20 -30 -40 -50 -60 20 50 100 200 500 1k 2k Frequency (Hz) 5k 10k 20k As noted in the article, the inductors on the 172700 unit had Fig.9: crosstalk for the Yuanjing amplifier isn’t exactly great but it’s significantly better than the cheaper one. You’re not likely to notice this coupling when listening to ordinary program material with stereo speakers. siliconchip.com.au way too high a value to give a good frequency response. Not wanting to spend any money on new inductors (they would cost more than we paid for the whole module!) we tried partially unwinding some of them. That worked, but it was a lot of work. So for the remainder, we shorted out 15 turns by soldering thin wires in place (after scraping off the enamel insulation from the wire), as seen here. This dropped their inductance down into roughly the right value. Australia’s electronics magazine May 2019  43