Menu:



Version:

June 16, 2010:
Revised: v2.0

ZL2PD Variable Voltage Power Supply

How to convert a fixed output switchmode 'wall wart' power supply into a small lightweight variable power supply.
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 aim is to reuse these to power 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.

But before we go on, let me give the usual warning:

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!!



Design Objectives

The variable power supplies I normally use around the workshop are both physically large and very heavy, thanks to their bulky transformers. These are high quality linear power supplies designed to cater for a wide range of applications. Of course, these are completely unsuitable for packing in my small suitcase when I go travelling.

What is required for this sort of application is a power supply which is as light and compact as possible. Based on the sort of design work I do while I am away from home, a power supply which covered a range of voltages from 3 to 15 V would be able to cope with most tasks.

Most of my designs involve opamps, logic gates, transistors, FETs and the usual array of passive parts. Given that sort of circuitry, the output current from this power supply need not exceed 500mA at 5V, or 300mA at 12V. After all, I wasn't aiming to power a 100W HF SSB transceiver. I just needed a compact variable power supply with what appeared to be a rating of about 5W.

Naturally, it would also need a small analog meter to allow me to set and monitor the output voltage reasonably accurately without the need to attach my multimeter.

Selecting a Possible Switchmode Power Supply to Modify

Looking into my cardboard box of recycled power supplies, I quickly discovered several potentially suitable wall-type switchmode power supplies. Three of at least six  possible power supply candidates are shown in the photo below. 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 could they be adapted to deliver a variable output volage rather than their standard fixed voltage?

There are several ways to achieve a variable output voltage. I could modify one of these power supplies to give, say, 16VDC and add a low voltage drop linear regulator circuit. This is by far the simplest approach. The output voltage with a linear regulator is arguably cleaner, with less switching noise and ripple, often a feature of switchmode power supplies.

However, there are several important limitations presented by a linear regulator. They usually 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.

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.

But, let's consider the best way to do this to see if it is practical. 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. Well, there's one obvious outcome - 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.

Key Requirements of the SMPS to be Modified

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

   1.  Adequate power rating - We've identified the rating required in the previous section

   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.

SMPS Categories

There are three basic types of compact wall-type switchmode power supplies that I have encountered. The first type use a small transformer but uses feedback via a primary-side winding to control voltage and/or current regulation. I've not worked on any of those because the small ones I've experimented with seemed to have relatively poor output voltage regulation. Given most of these were probably originally designed as basic battery chargers, this is hardly surprising.

The other two types of switchmode regulators both use an optocoupler for regulation feedback control to the primary switching device. The first type typically uses a TL431 or similar three terminal shunt voltage regulator as a detector on the secondary side, while the second type uses a single zener diode, sometimes with a couple of additional transistors for current limiting, to manage the voltage regulation and feedback control in combination with the optocoupler. These two types pof SMPS are the ones I find easiest to use and modify.

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. One significant problem is the switch. These often have "break before make" contacts which means there will be a short period of a few tens of milliseconds where there is no voltage reference for the supply. This can produce nasty voltage spikes on the output.

A continuously variable output voltage is much better. At first glance then, 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 with a variable resistor, this should allow the usually fixed output voltage to be changed to 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 above 14.5V to protect the 16V electrolytic smoothing capacitor from excessive 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 limited output voltage range is due to the series combination of the feedback loop's optocoupler LED, with a forward voltage drop of about 1.5 to 1.6V, and the lower voltage limit of the TL431 of 2.5V. It did not seem possible to easily use a TL431-type SMPS to give the desired 3V output voltage.
   

Next Attempt 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 in a Chinese-made SMPS, one of several similar ones with a brand 'East' marked on the PSU PCB.

While this "shunt regulator" circuit does not deliver the same performance as the equivalent zener diode, 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.


This was about as close to my requirements as I could have desired. i.e. This 1.5V shunt regulator voltage when added to a 1.5V drop across the optoisolator LED should yield a lower voltage output close to 3V. And so it proved. 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, in this case 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.    
   

Building the Variable Power Supply    

Once testing was completed, I rebuilt the variable zener circuit onto 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 build it.


The only other task left to do was to build the modified power supply into a suitable enclosure along with a small meter. (Why does this part always takes much longer than the interesting design or prototyping stages?)

The meter was modified too. I carefully pulled the original meter apart and replaced the old scale, one with a strange mix of coloured bars and lines, with a new 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 support the mains connector, particularly after I made the cutout in the thin plastic to mount the connector. With safety uppermost in mind, I replaced this with a scrap of fiberglass PCB trimmed to the right shape. This is considerably stronger than the thin plastic originally used, and hot glue holds it very firmly in place.

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. I used another blob of hot glue to hold the little veroboard zener-replacement in place.

A combination of a plastic bracket and yet more hot glue was used to firmly mount the modified SMPS module. It is fixed very firmly 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 final result is shown both in the photo above (the inside view just prior to final board mounting) and at the top of this page.

The Results

This has turned out to be a very compact, strong, lightweight little variable power supply which is small enough to easily slide into in my shirt pocket. To date, this power supply has done the equivalent of about three trips around the world, and its construction has proven up to the task. The combination of the plastic enclosure, hot glue and plastic brackets, resessed metal screws and tidy construction makes this a very safe and easy to use power supply.




Want to go back to the main page? Click here to return directly.