This is only a preview of the June 2025 issue of Practical Electronics. You can view 0 of the 80 pages in the full issue. Articles in this series:
Items relevant to "Intelligent Dual Hybrid Power Supply, part one":
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Items relevant to "Skill Tester 9000, Part 2":
Articles in this series:
|
Constructional Project
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 singleended supply.
This design uses a hybrid switch
mode/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 2020) and hooking them together
to make a dual supply.
You certainly could do that, but
this supply is a much more compact
20
and lower cost solution. It adds valuable 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
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
Practical Electronics | June | 2025
Intelligent Dual Hybrid Supply part 1
of the more expensive parts, like the
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-today: 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.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.
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.
Hybrid design
This supply uses both switchmode
and linear regulators.A few quick
sums show that a purely linear power
supply delivering ±25V and 5A would
Practical Electronics | June | 2025
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.
21
Constructional Project
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. Only one of these needs to be
installed and enabled.
22
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.
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 side-byside in the proposed case.
The main heatsink runs across the
back of the regulator module(s). Attached to it are two linear regulators,
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 LM1084IT-3.3 linear regulator
from Texas Instruments handles
a maximum input-output voltage
differential of 25V, although, in this application, the differential will typically
be about 5V. The exception is when
the current limit kicks in, and while
Practical Electronics | June | 2025
Intelligent Dual Hybrid Supply part 1
This is what the
finished project
looks like when
mounted in its case.
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 as an integrator, reacting slowly
to establish the overall output voltPractical Electronics | June | 2025
age. 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
Bench Supply project from October
2020 (p20). 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’ (stepdown) 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
inductor, as is required because there
23
Constructional Project
24
Practical Electronics | June | 2025
Intelligent Dual Hybrid Supply part 1
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.
Practical Electronics | June | 2025
25
Constructional Project
Parts List – Dual Hybrid Power Supply
1 metal instrument case, minimum 305 x 280 x 88mm
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, Farnell 1675089]
1 chassis-mount 10-13A IEC mains input socket
1 10A-rated safety 3AG panel-mount fuseholder
1 10A fast-blow 3AG fuse
1 300 x 75 x 46mm diecast aluminium heatsink
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
5 10-way IDC line sockets
1 4-way 17.5A mains-rated terminal block
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)
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)
26
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)
[Mouser 858-EN11-VSM1BQ20]
2 right-angle PCB-mount sub-miniature momentary
pushbutton switches (S1,S2)
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)
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)
Semiconductors
1 INA282AIDR bidirectional current shunt monitor, SOIC-8
(IC2) #
1 LM358 dual single-supply op amp, DIP-8 (IC3)
Practical Electronics | June | 2025
Intelligent Dual Hybrid Supply part 1
1 MCP4922-E/P dual 12-bit digital-to-analog converter,
DIP-14 (IC4) #
1 MCP3202-BI/P dual 12-bit analog-to-digital converter,
DIP-8 (IC5) #
2 MAX14930EASE+ 4-channel isolators, SOIC-16
(IC6,IC7) #
2 LM317 1.5A adjustable linear regulators, TO-220
(REG1,REG2)
1 LM2575T-5.0V 5V 1A buck regulator, TO-220-5 (REG3)
(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)
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
3 1000µF 50V low-ESR electrolytic
1 1000µF 50V electrolytic ≤13mm diameter
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
2 100nF 50V X7R SMD ceramic, M2012/0805-size
1 1nF 50V X7R multi-layer ceramic
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)
# [Available from Mouser, DigiKey, Farnell etc]
Practical Electronics | June | 2025
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 baseemitter 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,
27
Constructional Project
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 preregulator 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 which.
Table 1 – control connector pinout
Pin
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
28
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.
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 a neg-
Table 2: resistor colour codes
Either from micro or supplied to micro – see text
Practical Electronics | June | 2025
Intelligent Dual Hybrid Supply part 1
ative 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 lowESR 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 switch-mode
regulator is used here to allow the
control interface to draw several
hundred milliamps without creating much extra heat.
Transformer selection
The ideal transformer is a 300VA
unit with two independent 25V AC
Practical Electronics | June | 2025
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;
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.
Farnell has a couple of transformers that look like they would fit the
bill nicely. The Multicomp Pro VTX146-300-125 transformer is £41 at the
time of writing and it has a 230V AC
primary that would suit the UK/European mains supply.
They also sell the Multicomp Pro
MCTA300/25 for £52.58. It is the same
size, with a dual primary, configurable
for 115/230V AC. Still, if your mains
supply is 220-240V AC, you might as
well stick with the slightly cheaper
option.
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.
Control circuit
This control circuit has been used in
several previous projects, starting with
the DSP Active Crossover & 8-channel
Parametric Equaliser. That series was
published in the January, February &
March 2020 issues of Practical Electronics. 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 multipin 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
29
Constructional Project
A partial kit is available
Silicon Chip has a partial kit
available for this design along with
the PCBs (you can also get those
from us) – see pages 77 & 78.
30
Practical Electronics | June | 2025
Intelligent Dual Hybrid Supply part 1
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.
Practical Electronics | June | 2025
31
Constructional Project
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
PE
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.
32
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.
Practical Electronics | June | 2025
|