The ZL2PD Compact Lightweight Variable Voltage Power Supply
A fixed output switchmode 'wall wart' power supply is modified into a small lightweight variable power supply ideal for a variety of applications
Complete with output voltage metering, this lightweight variable power supply is ideal for a variety of uses around the workshop as well as on the road
Introduction
Most of my projects are powered by their own internal power supply. Of course, I also have a couple of variable power supplies on my workshop testbench for the design, build and test phase of my new projects. But, with this ever-present need for power supplies, whenever some piece of equipment is heading for the rubbish bin, be it a defunct cordless phone, an electronic toy, a superceded celphone or a dead VCR, I immediately grab the power supply from the equipment and toss into a big cardboard box reserved for such items. My intention is to try to reuse these in my new designs.
The latest series of power supply modifications began when I started traveling extensively again in connection with my work. Being away from home for a while, I wanted to spend some of my spare time working on a couple of my projects. To make that possible, I needed a lightweight compact variable power supply.

The variable power supplies I normally use around the workshop are both physically large and very heavy, thanks to their bulky transformers. They were completely unsuitable for this role. To be really useful, the new power supply would need to be as small as possible, and ideally cover a range of voltages from 3 to 15 V. It would need to be fitted with a small meter to allow the output voltage to be set reasonably accurately without the need to attach my multimeter. The output current need not exceed ½ A at 5V and perhaps 300mA at 12V. After all, I wasn't aiming to power a 100W HF SSB transceiver. I just needed a little variable power supply with a rating of about 5W.
Selecting Suitable Power Supply Candidates for Modification
Looking into the cardboard box, I quickly discovered several potentially suitable wall-type switchmode power supplies. (These three have been analysed in more detail elsewhere on this website) Each was no larger than a couple of matchboxes, and all were fairly similar in weight. They looked ideal! But, rather than the fixed voltage these supplied, this application required a variable output voltage.

There are several ways to achieve a variable output voltage. I could modify one of these power supplies to give, perhaps, 16VDC and add a low voltage drop linear regulator circuit. This is by far the simplest approach. The output voltage is also free of noise and ripple which is often a feature of the output of switchmode power supplies under load.

However, there are several important limitations presented by a linear regulator. Such regulators frequently require a large heatsink to get rid of excess heat caused by the combination of the voltage drop across the linear regulator and the output current.
Three of at least six  possible power supply candidates in the ZL2PD cardboard box of surplus power supplies available for modification in this project.
For example, with 16V into the linear regulator and, say, 5V going to my circuit, at perhaps 200 mA, there would be more than 2 watts to be dissipated by the regulator's heatsink. While the heatsink would not need to be very large, it would add to the size and weight of the power supply. The worst heatsink scenario would be with, say, 16V into a linear regulator with an output voltage of just 1.5V at 300mA. That's more than 4W to dissipate, so the heatsink for that would definitely be a bit of a nuisance.

For example, I could mount the power supply in a 50 x 50 x 50 mm metal box and use the case as the heatsink, but the total weight will be almost double that of the original plastic wall-wart power supply.

The output of a power supply with such a linear regulator would also be limited to the maximum current possible at the input voltage to the regulator. If the power pack was rated at 5W, the maximum current at any voltage output would be about 300mA. That output current is OK, but not wonderful.

The alternate approach would be to modify the switchmode power supply circuit, changing it from a fixed output voltage supply to one offering a variable voltage. The benefit of this approach is that the switchmode power supply maintains a reasonably good efficiency across the range of outputs required. This would likely mean I would not need to worry about adding an extra heatsink. That would keep the power supply size and weight to a minimum.

It is important to establish that the basic power supply is suitable for the modification. The key requirements are:

   1.  Adequate power rating
   2.  Good construction quality
   3.  Secondary-side voltage reference
   4.  Optocoupler and transformer isolation
   5.  Current limiting - Some older chargers were designed to deliver a constant current with poor voltage regulation, and these should be avoided.
Power Supply Types
There are three basic types of compact wall-type switchmode power supplies that I have encountered. The first type use a small transformer but control voltage regulation using feedback via a primary-side winding. I've not worked on any of those because the ones I've experimented with seemed to have relatively poor output voltage regulation.

The other two types of switchmode regulators both use an optocoupler for regulation feedback control to the primary switching device. The first of these two groups most often use a TL431 or similar three terminal shunt voltage regulator as a detector on the secondary side, while the second group use a single zener diode, sometimes with a couple of transistors for current limiting, to manage the voltage regulation and feedback control in combination with the optocoupler. These latter two are the ones used in these designs.

With power supplies using a fixed zener diode, it's possible  get a pseudo-variable voltage output by using a series of, say, ten zener diodes to give a variety of fixed voltages across the desired range. However, this is not a very nice arrangement to use in practice. A continuously variable output voltage is much better. At first glance therefore, power supplies which use the TL431 shunt regulator might be easier to use. The two or three fixed resistors used to set the output voltage with this device can be replaced with a variable resistor to give a continuously variable output voltage. However, there is a limitation with this approach as we'll see.
First Attempt
The first power supply I tried to modify used a TL431 as part of the output voltage feedback system. By replacing one of the two fixed resistors around the TL431 which are used to set the required fixed output voltage with a variable resistor, I could achieve a variable output voltage.

The modification was simplicity itself. I swapped out the fixed resistors in the output voltage divider chain with a variable resistor and a fixed resistor combination, shown in the photo opposite. The fixed resistor prevented the output voltage rising about 14.5V to protect the 16V electrolytic smoothing capacitor from over-voltage.

The output of the TL431 shunt regulator varied from 2.5V to 14.5V, almost exactly the voltage range desired. However, the overall power supply output voltage could not be reduced below about 4V. This more limited output voltage range occurs due to the series combination of the feedback loop's optocoupler LED, with a forward voltage of about 1.5 to 1.6V, and the lower voltage limit of the TL431 of 2.5V. The problem, therefore, with the TL431 method is the inability of the power supply to reach the desired 3V output voltage.
The first tests simply replaced the fixed output sense resistors with a fixed resistor and a variable potentiometer
Alternative Approach and Results
Searching for alternatives, particularly for modifying power supplies using just a single zener diode, I found the solution in a small circuit in an old 'Elektor' magazine (See: Elektor, July/August 1983, page 7-88). This described a 'variable zener', exactly what I was after. The circuit diagram is shown lower left.

I built this circuit roughly on the back of one of the switchmode power supplies, connecting it in place of the single zener diode used originally on a Chinese-made unit, branded 'East' on the PSU PCB. This prototype can be seen below, to the right.

While this circuit does not yield a perfect zener, when I tested it in isolation with a series resistor (4k7) with an input of 20VDC, it produced a useful output range of 1.5 to 16.5V. Almost as close to my requirements as I could have desired. (A 1.5V shunt regulator voltage plus a 1.5V drop across the optoisolator LED should yield a lower voltage output close to 3V)

Replacing the fixed zener in the East brand SMPS gave an output of 3 to 16VDC without any trouble. I tested the revised circuit with a suitable load, a 22 ohm 5W resistor, with the power supply adjusted to about 10V (i.e a load current of about 500mA) With no load, the output voltage was 10.38V, and with the load, the voltage dropped by just over 60mV to 10.31V. Ripple was less than 10mV in both cases.
The circuit was quickly prototyped by soldering the various components directly to the PCB
A pair of transistors and a few resistors can be used to make a simple variable zener diode
Building the Power Supply
Once tested was completed, I rebuilt the variable zener circuit on a scrap of veroboard. The layout is shown opposite, and the prototype can be seen in the photo below. It was small enough to be mounted directly on the power supply PCB where the original zener had been located, with a dab of hot glue to hold it firmly in position.
The final version of the variable sener was built on a scrap of Veroboard with a pair of wires arranged to allow the new module to be soldered directly in place of the original zener in the switchmode power supply
Here's the detailed layout of this little module just in case you want to try to build one too
The remainder of the modification involved building the modified power supply into a suitable enclosure along with a small meter. (Why is it that this part always takes ages longer than the interesting design or prototyping stages?) The meter was modified too. I carefully pulled the meter apart and replaced the old scale, a mix of coloured bars and lines, with a calibrated meter label printed on my laser printer.

I also took the opportunity to replace the piece of thin plastic used as the end cover in the power supply case. This is used to mount the AC connector on one end of the case. This piece of plastic did not seem robust enough to me, particularly after I made the cutout for mounting the AC connector. With safety uppermost in mind, I replaced this with a scrap of fiberglass PCB cut into the right shape. This is considerably stronger than the thin plastic originally used, and hot glue holds it very firmly in place.
A combination of a plastic bracket and some hot glue was used to firmly mount the power supply module in place. It is very rigidly fixed in place, important for long term safe operation. The meter was also hot-glued to the cover.

Although it is not shown in any of the photos, the base of the case is covered with a tightly fitting plastic plate which is screwed into place. The result is a very compact, strong, lightweight little variable power supply which can easily slide into in my shirt pocket.

The combination of the plastic enclosure, hot glue and plastic brackets, resessed metal screws and tidy construction makes this unit very safe and easy to use.

The final result is shown in the photo at the top of this page.
Wiring inside the box is minimal - just a few wires to the potentiometer, the meter, the AC input socket and the output connectors. The little Veroboard module mounts easily in the available space. The zener module is not easy to spot in this photo but it is just visible at the top left hand corner of the transformer.
                                                                                  DANGER!!!

Do not attempt the modifications described here unless you fully understand the risks associated with mains voltage switch mode power supplies and you are confident in your ability to complete any evaluation, testing, measurements and modifications accurately and safely.

Circuit voltages can easily rise above 300VDC, and, under some circumstances, to considerably higher voltages, especially if modifications are not carried out correctly. Voltages and currents present in these circuits, both before and after modification, can therefore pose potentially lethal risks to the unskilled or unwary.

Do not attempt to copy these designs or modifications or attempt to modify your own switchmode AC power supplies unless you have adequate expertise and experience with such circuitry. Furthermore, you should only attempt these modifications if you can, firstly, accurately analyse the specific power supply you are planning to modify.

In short, don't come complaining to me if you kill yourself while attempting to modify one of these power supplies!!