Silicon ChipDual Hybrid Power Supply – Pt1 - February 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Be wary of devices that require apps to work
  4. Subscriptions
  5. Review: Radio Girl by Nicholas Vinen
  6. Feature: All About Batteries – Part 2 by Dr David Maddison
  7. Project: Dual Hybrid Power Supply – Pt1 by Phil Prosser
  8. Feature: Low-noise HF-UHF Amplifiers by Jim Rowe
  9. Project: Fan Controller & Loudspeaker Protector by John Clarke
  10. Product Showcase
  11. Project: Solid-State Tesla Coil by Flavio Spedalieri
  12. Review: TL866II Universal Programmer by Tim Blythman
  13. Project: Remote Gate Controller by Dr Hugo Holden
  14. Serviceman's Log: The accordion job by Dave Thompson
  15. Vintage Radio: Tasma 305 'rat radio' by Fred Lever
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Outer Back Cover

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

You can view 35 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:
  • All About Batteries - Part 1 (January 2022)
  • All About Batteries - Part 1 (January 2022)
  • All About Batteries – Part 2 (February 2022)
  • All About Batteries – Part 2 (February 2022)
  • All About Batteries, part three (March 2022)
  • All About Batteries, part three (March 2022)
Items relevant to "Dual Hybrid Power Supply – Pt1":
  • Intelligent Dual Hybrid Power Supply PCB set (AUD $25.00)
  • Intelligent Dual Hybrid Power Supply regulator PCB [18107211] (AUD $7.50)
  • Intelligent Dual Hybrid Power Supply front panel control PCB [18107212] (AUD $2.50)
  • DSP Crossover CPU PCB [01106193] (AUD $5.00)
  • DSP Crossover LCD Adaptor PCB [01106196] (AUD $2.50)
  • PIC32MZ2048EFH064-250I/PT programmed for the Intelligent Dual Hybrid Power Supply [0110619A.HEX] (Programmed Microcontroller, AUD $30.00)
  • 128x64 Blue LCD screen with KS0108-compatible controller (Component, AUD $30.00)
  • Hard-to-get parts for the Intelligent Dual Hybrid Power Supply regulator board (Component, AUD $100.00)
  • Hard-to-get parts for the Intelligent Dual Hybrid Power Supply CPU board (Component, AUD $60.00)
  • LCD panel bezel for the Dual Intelligent Hybrid Power Supply (PCB, AUD $5.00)
  • Intelligent Dual Hybrid Power Supply firmware [0110619A.HEX] (Software, Free)
  • Intelligent Dual Hybrid Power Supply PCB patterns [18107211/2] (Free)
  • DSP Active Crossover/DDS/Reflow Oven PCB patterns (PDF download) [01106191-6] (Free)
Articles in this series:
  • Dual Hybrid Power Supply – Pt1 (February 2022)
  • Dual Hybrid Power Supply – Pt1 (February 2022)
  • Dual Hybrid Power Supply, part two (March 2022)
  • Dual Hybrid Power Supply, part two (March 2022)
  • Intelligent Dual Hybrid Power Supply, part one (June 2025)
  • Intelligent Dual Hybrid Power Supply, part one (June 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)
Items relevant to "Fan Controller & Loudspeaker Protector":
  • 500W Amplifier Module PCB [01107021 RevD] (AUD $25.00)
  • Hard-to-get parts for the 500W Amplifier (Component, AUD $180.00-200.00)
  • Parts collection for the 500W Amplifier (Component, AUD $235.00-250.00)
  • 500W Amplifier Module PCB pattern (PDF download) [01107021] (Free)
  • Cooling Fan Controller & Loudspeaker Protector PCB [01102221] (AUD $5.00)
  • PIC16F1459-I/P programmed for the Cooling Fan Controller & Loudspeaker Protector [0110222A.HEX] (Programmed Microcontroller, AUD $10.00-15.00)
  • 4-pin PWM fan header (Component, AUD $1.20)
  • Cooling Fan Controller & Loudspeaker Protector firmware [0110222A.HEX] (Software, Free)
  • Cooling Fan Controller & Loudspeaker Protector PCB pattern (PDF download) [01111211] (Free)
Articles in this series:
  • Fan Controller & Loudspeaker Protector (February 2022)
  • Fan Controller & Loudspeaker Protector (February 2022)
  • Amplifier Clipping Indicator (March 2022)
  • Amplifier Clipping Indicator (March 2022)
  • 500W Power Amplifier, Part 1 (April 2022)
  • 500W Power Amplifier, Part 1 (April 2022)
  • 500W Power Amplifier, Part 2 (May 2022)
  • 500W Power Amplifier, Part 2 (May 2022)
  • 500W Power Amplifier, Part 3 (June 2022)
  • 500W Power Amplifier, Part 3 (June 2022)
Items relevant to "Solid-State Tesla Coil":
  • Solid State Tesla Coil driver PCBs [26102221-2] (AUD $7.50)
  • Solid State Tesla Coil driver PCB patterns (PDF download) [26102221-2] (Free)
Items relevant to "Remote Gate Controller":
  • Driveway Gate Controller PCB [11009121] (AUD $20.00)
  • Remote Gate Controller PCB pattern (PDF download) [11009121] (Free)

Purchase a printed copy of this issue for $11.50.

Intelligent Dual Hybrid Power Supply PART 1: BY PHIL PROSSER This power supply has two separate outputs, each capable of delivering up to 25V DC at 5A.They can be connected in series and ganged up to form a dual tracking supply, and both outputs are controlled and monitored using a graphical LCD screen, two rotary encoder knobs and two pushbuttons. B oth outputs are powered by a single transformer, and they can be used independently or ganged up to form a dual-tracking (positive and negative) or higher current single-ended supply. This design uses a hybrid switchmode/linear approach for decent efficiency and low output ripple and noise. Due to its high efficiency, it doesn’t need fans, so there is no fan noise or associated dust buildup. Much audio and analog work demands a bench power supply with decent voltage and current capability, plus dual tracking outputs, so this supply fits the bill. We received some questions on the practicality of building a pair of our 45V, 8A linear supplies (October & November 2019; siliconchip.com.au/ Series/339) and hooking them together. You certainly could do that, but this supply is a much more compact and lower cost solution. It adds valuable 24 Silicon Chip features like monitoring the voltages and currents on one screen, and switching off or reducing the voltage of both outputs if either current limit is exceeded. The slightly lower voltage and current capabilities (25V instead of 45V and 5A instead of 8A) will still suit most applications. For example, while this supply won’t allow you to test a 100W power amplifier module at full power, it would be good enough to test it at lower power levels, to verify that it works before hooking up its normal power supply. And when you aren’t using it as a tracking supply, you can make the two outputs completely independent and control them separately. Another advantage of the digital controls is that the internal wiring for this supply is quite straightforward and neat, consisting mainly of some ribbon cables that carry control Australia's electronics magazine signals, plus a handful of wires that carry DC power. Using a microcontroller to control the power supply and drive the user interface allows us to be smart in how we control the limits. It can work out voltage and current limits based on the transformer’s VA rating and secondary voltage. This allows a wide variety of transformers to be used. Dig through your parts bin and recycle! The supply uses two alike regulator boards for dual rails. It can be built with a single board if you only need one rail – the user interface can handle single-/ dual-rail implementations. If you’re dead set against using a microcontroller, the regulator board has been designed so that it can operate with just two pots. You would need to organise your own voltage and current monitoring, but you can build it that way, and leave out quite a few of the more expensive parts, like the siliconchip.com.au Fig.1: the blue trace shows a 2A load step with the supply set to deliver 15V. The yellow trace is a close-up of the output voltage, showing how it varies. The vertical scale is 50mV/ div, and the output voltage only varies by a small amount when the load changes. analog/digital conversion chips, isolators, CPU and display. The microcontroller interface is simple to use, though. There are just two controls you will use day-to-day: the output voltage and current limit. If you need it, there is more detail accessible in setup menus, including calibration and configuration screens. The interface is controlled using two rotary encoders with integrated pushbuttons, plus two extra pushbuttons. The encoders adjust the voltage and current limits, while pressing either swaps between controlling the two outputs. One of the extra switches lets you go into setup mode, while the second button is an ‘emergency stop’ button that shuts down the power supply output immediately. This is useful if the magic smoke starts leaking from something! Pressing it again restores the output. Fig.2: this is a similar view to Fig.1 but with a much faster timebase (100μs per division). The initial 100mV step is characteristic of the LM1084. The LM1084 and the overall loop feedback response brings the output back to 15V within 100μs. Performance When measured using an oscilloscope, mains-related hum and buzz is not detectable (see Fig.1), nor is switchmode noise. Output noise is typically less than 20mV peak-to-peak, and less than 5mV RMS. This is pretty much constant across the full range of load variations. The response of the power supply to load change is good. Figs.2 & 3 show that the output voltage recoves within 100μs with a 5A load step, with a maximum offset of just 200mV over 40μs. Fig.4 shows how the unit behaves when it goes into and out of current limiting, with the current limit set to 5A. In response to a short circuit on the output, the voltage falls to achieve the programmed current limit almost immediately, and remains stable. Recovery takes around 5-10ms and has very little overshoot. The supply has no thermal problems when short circuited. With both channels delivering 5A continuous into a short circuit, the heatsink will get quite hot to touch, but settles at about 60°C. Fig.3: the same scenario as in Fig. 2 except this time, the output voltage has been set to 18V and the load step is 4A. The change in output voltage is slightly greater at 200mV peak drop, recovering within 100μs. On the trailing edge, the output changes by 75mV and it recovers within 2ms. This peak is small for such a large load step with minimal output capacitance. Fig.4: this shows how the unit behaves going into and out of current limiting. Ideally, its reaction should be swift and with little overshoot. In response to a short circuit, the output voltage is rapidly reduced. When the short is removed, the output voltage recovers in about 20ms, with no overshoot visible. Hybrid design This supply uses both switchmode and linear regulators, like our Switchmode/Linear Bench Power Supply (April-June 2014; siliconchip.com. au/Series/241) and the more recent Hybrid Lab Power Supply with WiFi (May & June 2021; siliconchip.com. au/Series/364). siliconchip.com.au Australia's electronics magazine February 2022  25 A few quick sums show that a purely linear power supply delivering ±25V and 5A would demand a huge heatsink, dissipating over 125W per rail or 250W total. This is greatly reduced by using a switchmode pre-regulator, which generates just a little more voltage than the linear regulator needs at its input. We aimed for about 5V of headroom in this design. If we can achieve this, then the linear regulator dissipation is a maximum of 5V × 5A = 25W for regular operation per rail, totalling 50W in the worst case. That is still a reasonable amount of heat to dissipate, but eminently doable. The pre-regulator and bridge rectifier dissipate some power too, which will add in the region of 10W. The downside is that switchmode power supplies have a reputation of being hard to design, and because of how they work, a bad rap for introducing noise into circuits. Our goal was a product that could be built from standard components, which would ‘just work’. We tried and rejected two alternative pre-regulator designs before settling on the one presented here. The result meets the above design brief, and neatly fits two independent regulators in the same case. It can deliver 5A over the range of 2-25V continuously per rail, without the need for fans and cutouts. Implementation The Intelligent Power Supply comprises four main parts: the main transformer, one or two regulator modules and a controller, as shown in Fig.5. This allows either single or dual rail power supplies to be built. We expect that most constructors will build the power supply as a dual unit. Each regulator module can operate independently, and its outputs are floating with respect to the other. So for a dual-tracking power supply, you connect the “+” of the negative rail to the “-” of the positive rail and select “Dual Tracking” in the setup. You can also set the mode to “independent” in the user interface, and independently set voltage and current limits for each rail. To keep construction simple, we have built a +5V DC power supply for the control interface into the regulator modules. So, the control microcontroller can be powered without the need for separate boards or transformers. 26 Silicon Chip Fig.5: the basic arrangement of the Intelligent PSU. Two separate secondaries on the transformer power the two regulator modules. One of these also provides 5V to the control interface, which uses a serial peripheral interface (SPI) bus to control and monitor both regulator boards. Fig.6: here is how each regulator module is arranged. The incoming AC is rectified, filtered and regulated to provide three supply rails for the rest of the circuitry on the regulator board. The raw DC is also fed to a switchmode pre-regulator which provides 5V more than the selected output voltage to the LM1084-based final linear regulator stage. The output voltage and current are set by a dual-channel DAC, and monitored via a dual-channel ADC. Only one of these needs to be installed and enabled. Refer to Fig.6, the functional block diagram of the regulator module. The regulator takes a nominal 24-25V AC input and control input, and produces regulated DC as commanded. Our software controls one or two of the regulator modules via a single 10-pin header on each. You could theoretically build more than two, provided you modified our code or wrote your own user interface. We’ll explain how to do that later. As shown in the photos, the module’s size (built on a 116 x 133mm PCB) is quite modest for a power supply of this sort. Two of these modules fit sideby-side in the proposed case. The main heatsink runs across the back of the regulator module(s). Attached to it are two linear regulators, Australia's electronics magazine the bridge rectifier and switchmode pre-regulator. Circuit description Let’s start at the output and work backwards. The complete circuit of one regulator module is shown in Fig.7, and the output regulators are just to the right of the diagram’s centre. The output stage is based on one or two LM1084IT-3.3 regulators. This is a 3.3V low-dropout linear regulator in a TO-220 package. At 5A load, it has a dropout of 1.5V. This low dropout voltage is required to allow the small pre-regulation difference, and get 25V DC from this unit when using a 24-25V AC transformer. The Texas Instruments LM1084IT-3.3 handles a maximum input-output voltage differential of 25V, although, in this application, the differential will siliconchip.com.au This is what the finished project looks like when mounted in its case. typically be about 5V. The exception is when the current limit kicks in, and while the pre-regulator capacitors discharge, the LM1084 will see an increased input voltage. We have specified two LM1084IT-3.3 devices in parallel, with 0.05W current-sharing resistors, to ensure that there are no limitations on the output current and to optimise the thermal design. The output voltage is set with the help of LM358 op amps IC3a & IC3b. IC3b monitors the output voltage, divided by the 15kW and 1kW resistors, and compares this to the voltage from pin 14 of IC4, a digital-to-analog converter (DAC), labelled Vset. If the output falls below Vset, it turns off NPN transistor Q6, which allows the voltage at the “GND” pin of the LM1084s (not connected to GND…) to increase. The opposite occurs if the output voltage is too high. This operational amplifier operates siliconchip.com.au as an integrator, reacting slowly to establish the overall output voltage. The high-speed aspect of regulation is dealt with by the LM1084 regulators. Current control is implemented in the same manner, but instead of monitoring the output voltage, we monitor the output of the INA282 current sense amplifier and compare this to the Iset DAC output (from pin 10 of IC4). If the measured current exceeds the set current limit, NPN transistor Q5 is switched on, pulling the “GND” pin of the LM1084s down. How do we achieve a 0V output given the minimum voltage an LM1084IT-3.3 can output is 3.3V? This design connects the op amp negative rail and emitters of transistors Q5 & Q6 to a -4.5V rail, allowing the GND pins of the LM1084IT-3.3s to be pulled negative. As a result, the output voltage goes down to 0V. This part of the circuit is very similar to that published in the 45V Linear Australia's electronics magazine Bench Supply project from November 2019. As in the original article, we have a constant current source comprising two NPN transistors to ensure a minimum load on the LM1084s. The pre-regulator We have selected the MC34167 chip as the pre-regulator. This is a switchmode ‘buck regulator’ (step-down) which operates at about 72kHz. A buck regulator switches the input voltage (pin 4) through to the output inductor (pin 2) on and off rapidly. There are two distinct phases of operation in a buck regulator: When the regulator switch is on, current flows from the input rail (34V DC), building up the inductor current and charging the output capacitor. The inductor stores energy in its magnetic field as a function of the current passing through it. When the regulator switch is off, current continues to flow through the February 2022  27 28 Silicon Chip Australia's electronics magazine siliconchip.com.au Fig.7: this shows the entire regulator module circuit. The rectifier, filter and regulators that provide the +12V, +5V & -4.5V rails are at upper left. The ADC, DAC, and isolating circuitry are at lower left. The switchmode pre-regulator is at upper right, and the final linear regulator stage and current monitoring circuitry are at middle/lower right. siliconchip.com.au Australia's electronics magazine February 2022  29 Parts List – Dual Hybrid Power Supply 1 metal instrument case, minimum 305 x 280 x 88mm [eg, Jaycar HB5556] 1 CPU board assembly (see below) 1 LCD assembly (see below) 1 front panel interface assembly (see below) 2 regulator assemblies (see below) 1 230V AC to 24-0-24 or 25-0-25 160-300VA toroidal transformer (T1) [eg, Altronics M5325C or M5525C] 1 chassis-mount 10A IEC mains input socket [eg, Altronics P8320B] 1 10A-rated safety 3AG panel-mount fuseholder [eg, Altronics S6000] 1 10A fast-blow 3AG fuse 1 300 x 75 x 46mm diecast aluminium heatsink [Altronics H0545] 24 M3 x 16mm panhead machine screws 16 M3 x 6mm panhead machine screws 14 M3 hex nuts 12 flat washers, ~3.2mm ID (to suit M3 screws) 22 shakeproof washers, ~3.2mm ID (to suit M3 screws) 12 fibre or Nylon washers, ~3.2mm ID (to suit M3 screws) 3 ~3.2mm inner diameter solder lugs (to suit M3 screws) 2 20-way IDC line sockets [eg, Altronics P5320] 5 10-way IDC line sockets [eg, Altronics P5310] 1 4-way 17.5A mains-rated terminal block [eg, cut from Altronics P2135A] 2 100nF 63V MKT capacitors 2 10nF 63V MKT capacitors Wire, cable etc 1 2m length of red 7.5A hookup wire 1 1m length of black 7.5A hookup wire 1 1m length of yellow 7.5A mains-rated hookup wire 1 1m length of green/yellow striped 7.5A mains-rated hookup wire ★ 1 1m length of brown 7.5A mains-rated hookup wire ★ 1 1m length of light blue 7.5A mains-rated hookup wire ★ 1 200mm length of 20-way ribbon cable 1 600mm length of 10-way ribbon cable 1 45 x 50mm sheet Presspahn or similar insulating material 1 40 x 45mm sheet of aluminium, 1.5-2.5mm thick 2 10 x 20mm sheets of aluminium, 1.5-2.5mm thick 1 90 x 70mm x 3mm thick sheet of clear acrylic/Perspex ★ all can be stripped from a 1m length of mains flex or a discarded mains cord Parts list for CPU assembly 1 double-sided PCB coded 01106193, 60.5 x 62.5mm 1 2-way mini terminal block, 5.08mm spacing (CON5; optional) 2 5x2 pin headers (CON7,CON9-CON11,CON23) 1 10x2 pin header (CON8) 2 3-pin headers (LK1,LK2) 1 2-pin header (JP5) 3 shorting blocks (LK1,LK2,JP5) 1 ferrite bead (FB12) 1 miniature 8MHz crystal (X2) OR 1 standard 8MHz crystal with insulating washer (X2) 1 10kW vertical trimpot (VR1) Semiconductors 1 PIC32MZ2048EFH064-250I/PT 32-bit microcontroller programmed with 0110619A.HEX, TQFP-64 (IC11) 30 Silicon Chip 1 25AA128-I/SN I2C EEPROM, SOIC-8 (IC12) # 1 LD1117V adjustable 800mA low-dropout regulator, TO-220 (REG2) # 1 LM317T adjustable 1A regulator, TO-220 (REG3) 1 blue SMD LED, SMA or SMB (LED2) 3 SGL41-40/BTM13-40 or similar 1A schottky diodes, MELF (MLB) (D14-D16) Capacitors 1 470µF 10V electrolytic 5 10µF 50V electrolytic 11 100nF SMD 2012/0805 50V X7R 4 20pF SMD 2012/0805 50V C0G/NP0 Resistors (all SMD 2012/0805 1%) 1 10kW 1 1.2kW 2 1kW 1 560W 2 470W 1 390W 2 330W 1 100W 3 47W Parts list for LCD assembly 1 128 x 64 pixel graphical LCD with a KS0107/KS0108 controller and 20-pin connector 1 double-sided PCB, coded 01106196, 51 x 13mm 1 10x2 pin header 1 20-pin header Parts list for front panel interface 1 double-sided PCB coded 18107212, 74.5 x 23mm 2 right-angle PCB-mount rotary encoders with inbuilt pushbuttons (RE1,RE2) [Altronics S3352 or Mouser 858-EN11-VSM1BQ20] 2 right-angle PCB-mount sub-miniature momentary pushbutton switches (S1,S2) [Altronics S1498] 1 5x2-pin IDC box header (CON1) 7 22nF 50V ceramic capacitors 2 10kW 1/4W 1% thin film axial resistors Parts list for one regulator assembly (double the quantities for two) 1 double-sided PCB coded 18107211, 116 x 133mm 1 220μH 5A ferrite-cored toroidal inductor (L1) 1 10μH 6.6A ferrite-cored toroidal inductor (L2) [Bourns 2000-100-V-RC] 1 330μH 3A ferrite-cored toroidal inductor (L3) (only needed for one module) 1 10A slow-blow M205 fuse (F1) 2 M205 PCB-mount fuse clips (for F1) 3 2-way screw terminals, 5.08mm pitch (CON1,CON2,CON4) 1 5x2-pin vertical header (CON3) 2 3-pin vertical polarised headers with matching plugs housings and pins (optional – for manual control) (CON5,CON6) 1 2-way vertical polarised header (CON7) 2 3-way pin headers with jumper shunts (JP1,JP2) 2 micro-U flag heatsinks (for REG1 & REG2) [eg, Altronics H0627] 6 TO-220 silicone insulating kits (washers and bushes) 4 15mm-long M3-tapped Nylon spacers 9 M3 x 16mm panhead machine screws 4 M3 x 6mm panhead machine screws 9 M3 hex nuts 13 flat washers, ~3.2mm ID (to suit M3 screws) 13 shakeproof washers, ~3.2mm ID (to suit M3 screws) Australia's electronics magazine siliconchip.com.au Semiconductors 1 INA282AIDR bidirectional current shunt monitor, SOIC-8 (IC2) # 1 LM358 dual single-supply op amp, DIP-8 (IC3) 1 MCP4922-E/P dual 12-bit DAC, DIP-14 (IC4) # 1 MCP3202-BI/P dual 12-bit ADC, DIP-8 (IC5) # 2 MAX14930EASE+ 4-channel isolators, SOIC-16 (IC6,IC7) # 2 LM317 1.5A adjustable regulators, TO-220 (REG1,REG2) 1 LM2575T-5.0V 5V 1A buck regulator, TO-220-5 (REG3) [Altronics Z0587] (only needed for one module) 1 LM337 1.5A adjustable negative regulator, TO-220 (REG4) 1 MC34167TV 0-40V 5A integrated buck regulator, TO-220-5 (REG5) # 2 LM1084IT-3.3 5A low-dropout regulators, TO-220 (REG6,REG7) # 2 BD139 80V 1A NPN transistors, TO-126 (Q3,Q10) 7 BC546 80V 100mA NPN transistors, TO-92 (Q4-Q8,Q11,Q13) 2 BC556 80V 100mA PNP transistors, TO-92 (Q9,Q12) 1 400V 10A bridge rectifier with metal base (BR1) [eg, Compchip MP1004G-G] # 9 1N4004 400V 1A diodes (D1,D2,D5,D6,D9,D10,D13,D17,D19) 1 6TQ045-M3 45V 6A schottky diode, TO-220AC (D3) # 1 P600K (or -M) 6A 800V diode (D8) [Altronics Z0121] 1 1N5819 40V 1A schottky diode (D12) 1 1N4148 signal diode (D14) 1 6.8V 400mW zener diode (ZD2) [eg, 1N754] Capacitors 3 4700µF 50V 105°C electrolytic, 10mm pitch, ≤20mm diameter [eg, Nichicon UVZ1H472MRD] 1 3300µF 50V electrolytic [Altronics R4917] 3 1000µF 50V low-ESR electrolytic 1 1000µF 50V electrolytic ≤13mm dia [Altronics R4887] 1 470µF 25V low-ESR electrolytic 2 220µF 50V low-ESR electrolytic 5 100µF 50V low-ESR electrolytic 2 15µF 50V solid tantalum, SMD E-case [eg, Mouser 581-TPSE156M050H0250 or 80-T495X156M50ATE200] 7 10µF 50V 105°C electrolytic 1 1µF 63V MKT 3 470nF 50V X7R SMD ceramic, M3216/1206-size 12 100nF 63V MKT 10 100nF 50V X7R multi-layer ceramic [Altronics R2931] 2 100nF 50V X7R SMD ceramic, M2012/0805-size 1 1nF 50V X7R multi-layer ceramic [eg, Altronics R2900A] Resistors (1/4W 1% thin film axial unless otherwise stated) 2 180kΩ 5 1.8kΩ 1 15kW 1 1.2kΩ 1 12kΩ 3 1kΩ 12 10kΩ 2 680Ω 1 6.8kΩ 2 220Ω 1 4.7kΩ 1 100Ω 2 3.3kΩ 2 68Ω 2 0.05Ω (50mΩ) 1% 1W shunts [TT Electronics OAR1R050FLF] # 1 0.01Ω (10mΩ) 1% 1W shunt [TT Electronics OAR1R010JLF] # 2 0Ω resistors or lengths of 0.7mm diameter tinned copper wire (LK1,LK2) (only needed for one module) # [Mouser, Digi-Key etc] siliconchip.com.au inductor, as is required because there is energy stored in the inductor. The ‘input side’ of the inductor, the node where the MC34167 output connects to it, still has current flowing into it. But the MC34167 switch is off. As a result, this node tries to go negative. The ‘catch’ diode (D3) clamps this to about -0.5V as it is a schottky type. During this phase, current continues to flow into the output capacitor, but the energy is supplied from the inductor’s collapsing magnetic field. There are a few important things to keep in mind when designing a buck regulator: • The switching nodes (input, output, diode, input capacitors and ground traces between these) all see current switching at 72kHz. These pulses have very fast rise and fall times, which means we need to be conscious of induced voltages across pins and tracks and the potential for these pulses being coupled into other parts of the circuit and indeed itself. • The switchmode regulator’s output pin is switching between the full input rail and -0.5V very rapidly and is a significant source of EMI. • The catch diode carries substantial current; the duty cycle depends on the output voltage and current. The worst case is with a low output voltage and high current, where this device carries much of the load. • The output ripple is heavily influenced by the inductor and capacitor values. The principal losses in a switchmode regulator of this sort are in the switch. The MC34167 has a maximum voltage drop of 1.5V at full current. The catch diode will drop 0.5V when it is conducting, and there are resistive and core losses in the inductor. These losses add to a few watts, representing more than 70% efficiency in the worst case, and closer to 90% for higher currents. So the pre-regulator’s function in this circuit is to efficiently drop the unregulated input voltage, ensuring that the linear regulators only ever need to drop about 5V. This way, we can draw 5A from the power supply without excessive dissipation in the final regulator stage. The circuit around the pre-regulator (REG4) is very similar to an ON Semiconductor (OnSemi) application note, but with a couple of important differences. The output voltage of the MC34167 is set by the feedback pin (pin 1). If this is below 5V, the device’s duty cycle increases to drive the output voltage up. Conversely, if this is above 5V, the duty cycle decreases. We have used 6.8kW and 1.2kW resistors in the feedback divider, which would normally set the output to 33V. (5.05V × [6.8kW + 1.2kW] ÷ 1.2kW). This is more than we need, and we need to drop this to keep it 5V above the linear regulator output. This is done by Q9, a BC556 PNP transistor across the 6.8kW feedback resistor, in conjunction with the 4.7kW and 1kW resistors providing feedback from the overall power supply output. The 4.7kW and 1kW resistors divide the voltage difference between the pre-regulator and linear regulator, and this voltage drives the BC556 transistor to act as a feedback amplifier. When the pre-regulator’s output is too low, the base-emitter voltage on the BC556 is less than 0.6V. The current source turns off, and the feedback to the MC34167 is reduced. When the pre-regulator’s output is too high, Australia's electronics magazine February 2022  31 the base-emitter voltage of the BC556 is more than 0.6V, and the current source turns on, generating 5V across the 1.2kW resistor and increasing feedback to the MC34167. The 68W resistor sets the maximum current from this current source, limiting the current we inject into the MC34167 sense pin, so that under fault conditions, we do not damage it. Note how we are using the 0.6V typical Vbe of the BC556 as the voltage reference to achieve a nominal 5V drop for the output regulator. This does vary a little with temperature and overall output voltage, but that does not matter. The pre-regulator will always deliver about 5V more than the linear regulator. The MC34167 is well within spec being fed from rectified 25V AC (about 33V after BR1) with margin for an unloaded transformer and mains voltage variation, without asking the device to work beyond its specified range. A bonus of using a switchmode pre-regulator is that at lower output voltages, the system will be able to deliver more current than it demands at its input. Our software allows for this. Control and monitoring Control and monitoring of the Intelligent PSU are via an SPI serial interface to each board. This allows access to the optically-isolated DAC and ADC chips. These are both two-channel devices that allow programming of the output voltage and output current limit (via the DAC), and monitoring of the actual output voltage and current (via the ADC). These digital signals are carried over a 10-wire interface back to the control board, with the pinout shown in Table 1. To increase versatility for situations where microprocessor control is not required, we have made provision for external potentiometers to set the voltage and current limit (via CON5 & CON6). If you choose to use this, simply leave off all components in the optically isolated section and also leave off the ADC and DAC chips. The protocol for this interface is straightforward. Digital values are written to the DAC to set the voltage and current output and limits, and digital values are read from the ADC. If “rolling your own” interface, the panel opposite will be helpful. ADC and DAC The dual 12-bit ADC and dual 12-bit DAC are Microchip MCP4922 and MCP3202 devices respectively. Their very simple digital interfaces are described in their data sheets. Calibration is required to convert the digital values, to and from voltages and currents. Our supplied control code handles this. The isolation devices allow one microcontroller module to control and monitor multiple independent regulator modules, which could have their grounds connected to different potentials (via the output connectors). There are two links, LK1 & LK2, that allow power to be fed back from one of the regulator modules to the control interface. If you are using the recommended microcontroller, then you install these on one, and only one, regulator module. It does not matter Table 1 – control connector pinout Function Comment 1 DAC #1 chip select Active Low 2 SPI SDO (to micro) Also known as MISO 3 ADC #1 chip select Active Low 4 SPI SDI (from micro) Also known as MOSI 5 DAC #2 chip select Active Low 6 SPI SCK (from micro) Micro is SPI master 7 ADC #2 chip select Active Low 8 SPARE 9 GND 10 Vdd Silicon Chip The remainder of the circuit The AC from the transformer is rectified by 10A bridge rectifier BR1. Above 3A, this will need heatsinking, so it is mounted on the heatsink via flying leads. There is the provision to mount it on the PCB for lower-current applications. There is also a negative rail generator comprising diodes D5 & D6 and two capacitors, 3300μF & 1000μF. Using these values avoids output transients after switch-off. This generates Table 2: resistor colour codes Pin 32 which. This allows the LM2575 regulator on that board to power the micro. It also connects the microcontroller to the ground of this regulator module, but that is fine, as both will float together, but separately from the other regulator module. The 12-bit devices have 4096 voltage steps. The linear output regulator compares the DAC voltage to the output voltage divided by 16 (15kW ÷ 1kW + 1). This means that the output voltage is controlled in 19.5mV steps (5.0V × 16 ÷ 4095). The INA282 IC which monitors the output current through the 10mW resistor includes 50 times amplification. So the full-scale output of the INA282 is 2.5V (5A × 0.01W × 50), and this translates into an ADC measurement resolution of 2.4mA (1A × 0.01W × 50 × [5V ÷ 2.5V] ÷ 4095). For setting the current limit, the DAC will have the same notional current per bit. The user interface software includes calibration for all these settings and measurements, so you do not need to install precision parts when building this. Either from micro or supplied to micro – see text Australia's electronics magazine siliconchip.com.au a negative rail for the op amps, so that the output voltage can go down to 0V, as described earlier. That negative rail is then fed to REG4 to produce the regulated -4.5V supply. There are three 4700μF 50V capacitors for bulk storage, close to the switch-mode regulator. This is required to support the expected ripple current and to provide a very low-impedance supply to that regulator. Lower value capacitors can be used, but the maximum output voltage will be reduced. There are two 15μF surface-mount tantalum capacitors on the top side of the board, and 470nF and 100nF SMD ceramics on the underside. These are located near the power and ground pins of the MC34167, to ensure that the MC34167 supply has a low source impedance at high frequencies. This minimises the chance of voltage spikes being induced in the power supply tracks. The 50V ratings on these parts are for a good reason; as we’ve written previously, ceramic capacitors with higher voltage ratings perform better even when charged to lower voltages. We have three 1000μF 50V low-ESR electrolytic capacitors in the output filter, in parallel with 470nF ceramic capacitors; these must handle the ripple current at 5A output. The output voltage is filtered again with a 10μH inductor & a 100μF low-ESR capacitor. There are four other ancillary regulators on the board, none of which are configured unusually: • +12V (11.5V actual) rail generated by REG1 (LM317), for the op amps. • +5V (5.1V actual) rail, generated by REG2 (LM317) from the +12V rail, for the ADC and DAC chips. • -4.5V (-4.5V actual) rail, generated by REG4 (LM337), for the op amps. • +5V rail generated by REG3 (LM2575-5), a second switchmode regulator which supplies the control interface, and optionally the microcontroller/user interface. An efficient switchmode regulator is used here to allow the control interface to draw several hundred milliamps without creating much extra heat. secondary windings. We used the Altronics M5525C, a 25+25V AC, 300VA transformer. This design is very versatile and will happily operate from anything above 15V. The only essential feature is that the secondary windings are not internally joined. Note that the Altronics transformer is wound for 240V AC mains. Our lab sees 230V AC most of the time, in line with current Australian mains standards. So the output voltage is about a volt lower than spec under ‘normal’ conditions. As a result, at very high currents (above 4.7A), the power supply loses regulation at 24.5V. If you want to avoid this you can wind a few extra turns on the transformer to boost the output a volt or so, or choose a different transformer. For most uses, this limitation will never affect you. We have set a current limit for the power supply at 5A per rail and a maximum output voltage of 25V DC. It is important that when you set up the controller that you enter the correct VA rating for the transformer, and its nominal AC voltage. These are used to calculate current limits that are used to protect the transformer from being overloaded. Transformer selection Control circuit The ideal transformer is a 300VA unit with two independent 25V AC This control circuit has been used in several previous projects, starting siliconchip.com.au Controlling the Regulator Module via SPI A DAC write is used to set the output voltage (channel 1) and the current limit (channel 2). First, drive chip select (CS) low for the selected DAC. Then write 0x7000 (28,672 decimal) + 0x0 to 0xFFF (4095 decimal) as the DAC value for the desired voltage. Or write 0x9000 + 0x0 to 0xFFF to set the current limit. After the write, bring CS high again. For example, to set the output to 5.1V: drive the DAC’s CS low, send 601 to channel 1 (so write 0x7259), then take CS high again. Remember that many microcontrollers require you to read the SPI buffer after you write an SPI word. To read the actual voltage and current for each channel, you need to query the ADC. Keep write speeds reasonable; we have used 100kHz, which allows good accuracy on the ADC, and provides easy setup and hold times. Drive CS low for the selected ADC, then send the read command byte: 0x01. Make sure you wait until the whole SPI byte has been sent from your micro to the ADC, then read a byte and discard it. Next, send the read command 0xA0 for voltage, or 0xE0 for current. Make sure you wait until the whole SPI byte has been sent from your micro to the ADC, then read and store the next byte. Write 0x00 to the ADC, wait until the whole SPI byte has been from your micro to the ADC, then read another byte. The last byte read contains the lower 8 bits of the result, while the upper 4 bits of the 12-bit result are in the lower 4 bits of the previous byte read. So, for example, in the C language you can compute the read value as: unsigned short value = (byte1 & 0x0F)*256 + byte2; Australia's electronics magazine with the DSP Active Crossover & 8-channel Parametric Equaliser (MayJuly 2019 issues; siliconchip.com.au/ Series/335). As in that project, the interface is displayed on a monochrome graphical LCD. That LCD, the front panel control board and the regulator boards are wired back to the control board via ribbon cables and multi-pin headers. The control circuit is reproduced here; see Fig.8. Microcontroller IC11 is a PIC32MZ2048 32-bit processor with 2MB flash and 512KB RAM, which can run up to 252MHz. It has a USB interface brought out to a micro type-B socket, CON6, although we haven’t used it in this project – it’s there ‘just in case’ for other projects. The PIC is also fitted with an 8MHz crystal for its primary clock signal (X2). Provision is made on the PCB (and shown in the circuit) for a 32.768kHz crystal for possible future expansion, but it is not used in this project and can be left out. There is also a serial EEPROM which is used to store the calibration values, voltage and current settings. This must be fitted. The front panel controls are wired back to 10-pin header CON11 (and on to PORT E of the micro). The regulator board(s) connect to 10-pin header CON7. The other headers and connectors are unused in this project. 5V February 2022  33 A partial kit will be available Despite the current component shortages, we will be offering a partial kit for this design along with the PCBs – see page 101 for details. 34 Silicon Chip Australia's electronics magazine siliconchip.com.au Fig.8: this CPU control circuit has been used in several projects. It includes a powerful 32-bit PIC32MZ processor, an 8MHz core crystal, an optional 32768Hz timekeeping crystal, 5V & 3.3V regulators, an SPI EEPROM, plus numerous connectors. The timekeeping crystal and 5V regulator are not needed for this project. CON7 connects to the regulator boards, CON11 to the front panel control board and CON12 to the LCD; the other connectors are unused. siliconchip.com.au Australia's electronics magazine February 2022  35 power for this board is applied across pins 10 & 9 of CON7 from one of the regulator boards. The user interface is displayed on a graphical LCD, wired up to CON8 on the micro board via a ribbon cable. This provides a reasonably standard 8-bit parallel LCD drive interface. The eight LCD data lines (DB0-DB7) are driven from a contiguous set of digital outputs of IC11 (RB8-RB15). This allows a byte of data to be transferred to the display with just a few lines of code and minimal delay. The other LCD control lines are driven by digital outputs RB4, RB5, RB6, RD5, RF4 and RF5 and the screen is powered from the 5V rail, with the backlight brightness set with a 47W resistor. The LCD contrast is adjusted using trimpot VR1, which connects to CON8 via LK2. CON23 is a somewhat unusual in-circuit serial programming (ICSP) header. It has a similar pinout to a PICkit 3/4 but not directly compatible; it’s designed to work over a longer cable. Since each signal line has at least one ground wire between it, signal integrity should be better. Jumper leads could be used to make a quick connection to a PICkit to program the microcontroller the first time. Or you could attach a 10-pin IDC connector to the end of a ribbon cable and then solder the appropriate wires at the other end of the cable to a 5-way SIL header as a more permanent programming adaptor for development use. There are two regulators on the board, but REG3 is not needed in this case because the 5V rail is generated on the regulator board. REG2 is required, though, to produce a +3.3V rail from the 5V rail via schottky diode D15, powering microcontroller IC11. LED2 is connected from LCD data line LCD0 to ground, with a 330W current limiting resistor, so it will flash when the LCD screen is being updated. The front panel for this power supply (shown enlarged for clarity) is built on a PCB measuring 74.5 x 23mm and is populated with passive components, plus two rotary encoders and two buttons. All these switch contacts have 22nF debouncing capacitors across them; there might not appear to be one across switch integrated into RE2, but it is in parallel with the other one, so they share one debouncing cap. The Gray code outputs of rotary encoder RE2 have pull-up resistors, while those of RE1 do not, because the micro can provide pull-up currents on those pins. All the switch contacts are wired either between a micro pin and GND, or a micro pin and the +3.3V rail, depending on what’s most convenient for the software to deal with. Those connections go back to the micro pins via CON1. Next month We have finished describing how the Intelligent PSU operates. Next month, we will present the details of the three main PCBs, describe how to assemble them, mount them in the case, and wire up and test the unit. We’ll also show you how to use the device and control it via the LCD graphical interface and front panel SC controls. Front panel board Fig.9 shows the circuit of the front panel board specific to this project, and there isn’t a whole lot to it. Rotary encoders RE1 & RE2 generate “Gray codes” by closing switch contacts between pins 1 & 3 and pin 2 (common). They also have integrated pushbutton switches that connect pins 4 & 5 when pressed, plus there are two separate momentary pushbutton switches, S1 & S2. 36 Silicon Chip Fig.9: the front panel circuit includes two rotary encoders with integrated pushbutton switches, plus two extra buttons and a handful of debouncing capacitors. 10-pin header CON1 on this board is wired back to CON11 (in Fig.8), so the micro can sense when the encoders are rotated and buttons are pressed. Australia's electronics magazine siliconchip.com.au