Introduction: Portable Variable Power Supply

Picture of Portable Variable Power Supply

I'm working on a project that requires a portable battery-fed power supply that provides variable output voltage and an adjustable current limit. I needed an output voltage between 0 and 12V, current limit between 10mA and 1A, and load regulation 0.1% or better at full output voltage and current. Because the supply would be used in noise sensitive analog circuit design, I couldn't use one of the many switching regulator options available due to the 100mV of high frequency noise that's typical of those products.

The well-known LM317 is an easy way to meet my variable voltage requirement but constant current control isn't its strength. And its minimum output voltage is around 1.25V. Not a major issue but I would prefer to be able to drop the supply voltage to 0V when needed instead of having to flip a switch.

Before starting a custom design I thought I'd see what was available off-the-shelf, preferably in a DIY kit form so I would have some options on component values and controls placement. One product that consistently appeared on Amazon and eBay was the power supply kit featured in this article. The cost of the kit was so cheap I ordered two without doing further research. After receiving the kit I was impressed with the quality of the packaging, circuit board, and the variety of components included. Whatever the outcome, this kit was definitely worth the price.

After reviewing the documentation available on the Internet, the following phrase in bold letters caused some concern: "The circuit must be connected to 24V alternating current power, and direct current is forbidden". A quick look at the schematic told me why. The current limiter, error amplifier, and current pass depends on an -5V auxiliary supply derived from the main bridge rectifier. After thinking about the problem a few minutes the solution was obvious and is covered in this article. I've found an analog variable power supply kit that, with some modifications, fit my requirement exactly.

Step 1: Introduction to the WeiKedz Variable Power Supply DIY Kit

Picture of Introduction to the WeiKedz Variable Power Supply DIY Kit

Introduction

The WeiKedz Variable Power Supply DIY kit is an electronics project kit containing all the components needed to build an analog variable power supply EXCEPT transformer, power cord, knobs, and enclosure (more on this later). There are a number of distributors in Asia offering this kit under various brand names. But as of November, 2017 the WeiKedz branded version was available on Amazon (ASIN B01KNSCDNU) with Prime shipping for $10, which in my opinion is a great value considering WeiKidz includes a large aluminum heat sink, 24V fan, and mounting hardware.

The specifications for the power supply are as follows:

Input voltage: 24VAC
Input current: 3A (maximum)
Output voltage: 0-30VDC (adjustable)
Output current: 2mA to 3A (adjustable)
Output voltage ripple: maximum 0.01%

As you will see in the analysis sections that follow, these specifications are too optimistic. The power supply I assembled works very well and is suitable for almost any analog project the beginner or experienced maker is likely to find exciting. But it is not, by design, capable of achieving exactly these specifications. In addition, I ended up substituting a 20VAC transformer (Hammond 185F20) for the 24VAC transformer specified in the documentation in order to keep OpAmp supply voltages below the manufacturers maximum ratings. There is some assembly documentation available on the Internet, but it is hard to find and has some technical and English language weaknesses that I've corrected in the assembly document attached below. That being said, for $10 and the cost of a transformer it's a great kit that is fun to build. A V/I multimeter can be added to make it easier to set the output voltage and current limit.

Parts List and Component Identifier

Attached below are the parts list and component identifier documents describing everything that came with my kit. For those new to electronics, the component identifier document will help you figure out which part is which. For some reason the manufacturers web site shows components that look like somebody stuffed them in their jeans and accidentally ran them through the wash. Never fear, all of the parts I received were well packed, protected where needed, and with clean and straight leads. So yours should arrive that way too.

Assembly Manual

If you should decide to build the WeiKedz power supply, I've also included a comprehensive assembly guide below that is a bit more detailed than that provided by the manufacturer. If you are new to electronics but have some experience with a soldering iron, this guide will provide just about everything you need to know to successfully build the kit.

Operation and Maintenance Guide

One of the weaknesses in the manufacturing design of the circuit board was the decision to use component values (100K, 4004, 5V1, etc.) on the component layer silk screen instead of schematic reference numbers (R1, C2, Q4, etc). The decision to use component values helps an experienced builder solder parts to the board with minimal documentation. But if you ever need to troubleshoot the power supply using the circuit diagram you are out of luck. The lack of reference numbers on the board makes matching a node on the schematic with the corresponding node on the circuit board very, very difficult. For example, there are five 10K Ohm resistors on the circuit board. Without a schematic reference number on the board, you can't tell which 10K resistor on the board goes with which 10K Ohm resistor on the schematic. All of the documentation I've included below uses both component values and schematic references. The Operation and Maintenance guide contains images of the board along with it's components, component values, and schematic reference numbers. It also contains the tune-up procedures and some troubleshooting steps to follow if the power supply doesn't work properly. You will find this guide invaluable to maintaining the power supply.

Circuit Analysis

In the next few sections, I'll break the power supply schematic down into it's major functional blocks and describe how each works and what most of the components do. This will help in determining how to make changes and substitutions that tailor the power supply for a specific application. For example, WeiKedz and other brands offering this kit for sale are not very specific on the transformer needed, which has been a source of most of the confusion builders have had with the kit. I'll clear that right up and show you how to make the proper selection based on your voltage and current requirements.

Hacking It

At the end of this article, I'll describe the changes needed to convert the power supply to portable (i.e. battery) operation and add a V/I display. This is the version shown on the cover. As you will see later, it's not as simple as attaching a battery with the correct voltage.

A note on content

Where possible I've attempted to describe the operation of various circuits using basic mathematics. The majority of electronic design can be done with a good understanding of algebra and a little bit of trigonometry (occasionally pressing the sin or cos button). Electronics concepts and some experience with the usual fundamental equations like Ohms Law, RC time constants, power factor, etc. is necessary. But I'm more interested in communicating the importance of one skill in particular: The ability to observe a physical system in action, write an equation that describes what is being observed, and use that equation to predict what will happen when the system is changed. THAT is a far more useful skill than just memorizing the laws of exponents. Designing and then building a working circuit is way more fun and satisfying than blindly plugging in one resistor or capacitor value after another until it works. I know some folks who are pretty good at doing things that way, but they are more interested in the art of the thing than the science.

Step 2: Power Supply Block Diagram and Schematic Diagram

Picture of Power Supply Block Diagram and Schematic Diagram

The WeiKedz variable power supply is a fairly standard design with 5 functional blocks as described below:

Bridge Rectifier and Capacitor Filter

Converts the 24 VAC power from the transformer into +32.5 VDC and -5 VDC power for use by other function blocks.

Voltage Reference

This is the heart of the power supply. It's job is to provide a fixed known reference voltage that other function blocks use to control the power supply output voltage and limit the power supply output current.

Error Amplifier

This function works much like the thermostat in your home. You set the temperature you want, the thermostat compares that to the actual indoor temperature, and then signals the climate control system raise or lower the indoor temperature to match. The error amplifier works the same way. You set the output voltage you want, the error amplifier compares that to the actual output voltage and signals the Current Pass function to raise or lower the output voltage to match.

Current Limiter

This function works in similar fashion to the Error Amplifier except that it senses the output current (as opposed to the output voltage) and signals the Error Amplifier to reduce the output voltage when the current limit is exceeded. This helps prevent damage to the components of a circuit caused by wiring or design error.

Current Pass Regulator

This is the workhorse of the power supply. It's job is to maintain the voltage set by the Error Amplifier independent of the current drawn by the circuit attached to the power supply. During normal operation the power consumed by the circuit attached to the power supply will be less than the output power of the Bridge Rectifier/Filter function. This difference in power has to be consumed by the Current Pass Regulator and released as heat, which is why this function has large metal heat sinks attached.

Summary

I've attached a PDF version of the schematic for the WeiKedz variable power supply below along with the voltages that will appear when a 24 VAC transformer is attached. Each of the function blocks above is described in detail in the steps that follow.

Step 3: Problems With the WeiKedz Power Supply Design

Before I start the analysis I'd like to mention that the manufacturers specifications for the power supply are far too aggressive.

This is not a power supply capable of reliably delivering 0-30VDC at 0-3A. The power supply I assembled was unable to achieve the manufacturers specifications for all voltage and currents. For example, I experienced overheating in capacitor C1 and transistor Q4 when drawing 3 Amps from a 5V output setting which would have resulted in the catastrophic failure of these components had I allowed the test to run uninterrupted. You'll see why in the sections that follow.

Below is the short list of issues with the design:

1. Transformer VI recommendation is under-sized.
2. Ripple current for C1 exceeds manufacturers maximum ratings when output current >1A.
3. Power supply range (V+ and V-) exceeds manufacturers maximum ratings for U2 and U3 (TL081).
4. Vceo for Q2 (2SD882) exceeds manufacturers maximum rating when output voltage is 0.
5. Ripple voltage for C1 exceeds regulation window for 30V at output current >100mA

The above issues will result in near-term component failure after the power supply is placed in service.

However, I think the power supply is a good design that has simply been over-specified. Below are my recommendations for how the power supply should be operated for good long-term reliability if no component substitutions are made:

Transformer: 20V RMS @ 4A (Hammond 185E20)
Output Voltage: 0-20V
Output Current: 0-1A

With the above ratings, the fan can be omitted and the large heat sink on Q4 can be reduced in size (I cut mine almost in half). The transformer sizing I've specified covers you for the low power factor of the secondary current and allows for +/- 10% line voltage tolerance at the mains. And, the full 1A current can be drawn from any output voltage setting.

Step 4: Analysis - Rectifier and Filter Circuit

Picture of Analysis - Rectifier and Filter Circuit

If you examine the schematic diagram above, you will notice that there are three power supplies associated with this function block: The V+ Supply, the V- Supply, and the Fan Supply. A short description of each is provided below followed by a more detailed operating analysis.

Description: The V+ Supply

The rectifier and filter section is a very basic full-wave bridge bridge circuit (D1 through D4) with a large filter capacitor attached (C1). Resistor R1 will safely discharge C1 when AC power is disconnected from the transformer. Regulator U4 drops the V+ voltage to 24V to power the cooling fan provided in the kit. The transformer attached to the power supply provides an alternating current (AC) voltage with frequency of 50Hz or 60Hz depending on country. On the positive half of the AC cycle, diodes D1 and D4 conduct which charges capacitor C1 for that portion of the cycle. On the negative half of the AC cycle, diodes D2 and D3 conduct which also charges capacitor C1 for that portion of the cycle. See Illustration 1.

Description: The V- Supply

The remainder of the circuit is a -5V power supply for use by the Current Limit, Error Amplifier, and Current Pass function blocks. During the negative half of the AC cycle, C2 is charged through R2 and D3/D5. The time constant of R2/C2 allows C2 to reach an average charge of about +21.5V. R2 also serves to limit the ripple current in C2 to around 60mA which is important as the manufacturers datasheet recommends no more than about 112mA ripple current or reliability will be affected. During the positive half of the AC cycle, C2 discharges into C3 via R2 and D1/D6 until C3 reaches an average charge around -10V. Zener diode D7 then regulates the voltage from C3 down to -5.6V which is then sent to other power supply function blocks. For this supply to work correctly, the transformer must have a secondary voltage of at least 18V RMS. See Illustration 2.

Description: The Fan Supply

The fan included with the WeiKedz power supply is a standard DC brushless fan requiring 24V at 100mA. A three-terminal regulator IC U4 (7824) is used to provide a constant 24V output to the fan. Power dissipation for U4 is almost 1W so this part will get very warm during operation. There is no heat sink provided for this part so some convection or forced air flow will be required to keep it from going into thermal shutdown.

Function Block Analysis

Let's take a close look at the components involved and examine a few formula that describe the operation of this portion of the circuit:

A. Surge Current

When the power supply is first turned on, the bridge circuit will see a very large current spike during the first half AC cycle. This "surge current" is the result of charging capacitor C1 from it's initial voltage at or near 0. The magnitude of the surge current depends on the series DC resistance of the transformer secondary winding, the effective series resistance of capacitor C1, the initial voltage of capacitor C1, and the transformer voltage at the time the power supply was turned on. Non-repetitive surge current will not produce enough heat to damage the transformer or C1, but excessive surge current can instantly destroy rectifiers D1 through D4. According to the 1N5408 datasheet, the maximum surge current for one half cycle is 200A. During testing with a suitably sized transformer (Hammond 185G24), the power supply I built produced a surge current of around 40A which is well within the margin of safety.

RESULT: Surge Current performance is ACCEPTABLE


B. V+ and V- Supplies

With no load attached to the power supply, capacitor C1 will charge very quickly to the peak voltage described by the formula below:

V+ = (Transformer Vrms * 1.414) - 1.4

V- = -5.6V (For transformer secondary >= 18V RMS)

So if you do what WeiKedz recommends and attach a 24V RMS transformer to the power supply, both power supplies will reach the following voltages:

V+ = (24 * 1.414) - 1.4 = 32.5V

V- = -5.6V

The total range for both supplies is 38.1V. This is the first problem with the design specifications. There are two integrated circuits, U2 and U3 (TL081), that are connected to both supplies. However the manufacturers datasheet for the TL081 specifies the absolute maximum supply range to be 36V. The recommended supply range for the TL081 is 30V. The manufacturer specifically states that operation outside of the recommended voltage range is not guaranteed and reliability is compromised when absolute maximum ratings are exceeded. For this reason, I do not recommend using a 24V RMS transformer for the WeiKedz power supply.

RESULT: V+ and V- Supply performance is NOT ACCEPTABLE


C. Ripple Voltage and Ripple Current

The peak to peak ripple voltage occurring across capacitor C1 when loaded is approximated by the following formula:

Vripple = I / (2 * f * C) where I is the load current, f is the mains frequency, and C is the value of C1 in Farads.

Ripple is important because it causes heating within the capacitor. The lifespan of a large electrolytic capacitor can be drastically shortened by internal heating due to electrolyte evaporation, can swelling, seal failure, and in extreme conditions explosive failure of the capacitor. For the WeiKedz power supply, the ripple voltage across C1 when the power supply is delivering 3A output current is:

Vripple = 3 / (2 * 60 * .0033) = 7.57V peak to peak

The equation result is an approximation due to the complexity of the actual charge and discharge waveforms on C1. In the power supply I built, the measured ripple voltage was approximately 6V peak to peak while operating at 3A output current.

Due to the many different sizes and voltage ratings of capacitors, manufacturers specify the maximum ripple rating as ripple current in mA. The formulas for determining ripple current in C1 is:

Iripple peak-to-peak = Vripple / sqrt(Xc^2 + ESR^2)

Iripple RMS = Iripple peak-to-peak / (2 * sqrt(3))

Xc = 1 / (4 * pi * f * C) where f is the mains frequency in Hertz and C is the value of C1 in Farads

ESR = DF * Xc where DF is the Dissipation Factor specified by the manufacturer and Xc is reactance of C1

The manufacturers datasheet for C1 indicates that DF is 0.12 and the maximum ripple current is 1.5A RMS. Solving each equation reveals:

Xc = 1 / (4 * pi * 60 * .0033) = 0.402 Ohms
ESR = 0.12 * 0.402 = 0.048 Ohms
Iripple = 7.57 / sqrt(.402^2 + 0.0408^2) = 18.74A peak to peak

Converting the Iripple value from peak-to-peak to RMS results in:

Iripple RMS = 18.74 / (2*sqrt(3)) = 5.4A which is far greater than the manufacturers specifications of 1.5A.

The above calculations show that regardless of output voltage, the power supply cannot deliver 3A without rapid heating and eventual destruction of C1. My actual measurements for ripple current in C1 were almost 4A and the temperature of C1 exceeded 60DegC in a matter of minutes. The best I could achieve without excessive C1 heating was 1A. This is the second problem with the power supply design specifications.

In addition, the ripple voltage on C1 at 3A output current results in the input voltage to the Current Pass function block (Vin) dropping below the 30V output specification (Vout):

Vin = (V+) - Vripple = 32.5V - 7.57V = 24.94V

Since Vin to the Current Pass function block must be greater than or equal to (Vout + 1.4), it is not possible for the power supply to produce a 30V DC output voltage (Vout) when the load current is 3A. The best I could achieve was a DC voltage of about 26V superimposed with a 6Vpp 120 Hz ripple voltage. Not good. This is the third problem with the power supply design specifications.

RESULT: Ripple Voltage and Current NOT ACCEPTABLE


D. Bridge Rectifier Peak Inverse Voltage and Average Forward Current

The two most important parameters for the rectifiers in the bridge section is Peak Inverse Voltage (PIV) and Average Forward Current (IFavg). PIV is the maximum voltage that can be placed across a rectifier in the non-conducting direction. Exceeding this specification can cause the diode to short circuit and burn out, a condition called avalanche breakdown. IFavg is the maximum average current that the rectifier can carry in the conducting direction. Exceeding this specification can cause the diode to overheat and burn out, a condition called junction thermal breakdown.

In a full-wave bridge rectifier, the maximum reverse voltage is equivalent to the transformer secondary peak voltage less one diode voltage drop. The formula for this is:

PIV = ( Transformer Vrms * 1.414 ) - 0.7

If you accept the WeiKedz specification and attach a 24V RMS transformer to the power supply the bridge rectifier PIV voltage will be:

PIV = ( 24 * 1.414 ) - 0.7 = 33.24V

The datasheet for the 1N5408 rectifier indicated that PIV should be no more than 1000V so there is no problem here.

The datasheet specifies that the maximum average forward current can be no more than 3A. In a bridge rectifier configuration, each diode conducts 1/2 of the average current drawn by the load and filter capacitors. In a well designed full-wave bridge circuit, the rectifier current when conducting will be a very large but very short pulse (See Illustration 3). This pulse represents the energy needed to charge the filter capacitor back to peak voltage while powering the load at the same time. Because the pulse usually lasts less than 2ms of a 16ms rectifier conduction cycle, the rectifier current averaged over the entire 16ms cycle will be much lower than the peak current. In the WeiKedz power supply, the Average and Peak current while the bridge rectifiers are conducting is approximated by the following equations:

Iavg = I * ( 1 + pi * ( sqrt ( 2 * Vp / ( Vp - Vr )))) Where I is the Load Current in Amps, Vp is C1 peak voltage, and Vr is C1 ripple voltage.

Ipeak = I * ( 1 + 2 * pi * ( sqrt ( 2 * Vp / ( Vp - Vr )))) Where I is the Load Current in Amps, Vp is C1 peak voltage, and Vr is C1 ripple voltage.

Rectifier conduction time is approximated by the equation:

Dct = [ sqrt ( 2 * ( Vp - Vr ) / Vp ) ] / ( 2 * pi * 120 ) Where Vp is C1 peak voltage and Vr is C1 ripple voltage.

And the Rectifier Average Forward Current for an entire cycle is:

IFavg = Iavg * Dct * 60

Solving these equations for the maximum specified output current of 3A then gives a good estimate of the expected IFavg for rectifiers D1 through D4:

Iavg = 3 * ( 1 + pi * (sqrt ( 2 * 32.5 / ( 32.5 - 7.57 )))) = 18.22A
Ipeak = 3 * (
1 + 2 * pi * (sqrt ( 2 * 32.5 / ( 32.5 - 7.57 )))) = 32.44A
Dct = [ sqrt ( 2 * ( 32.5 - 7.57) / 32.5) ] / ( 2 * pi * 60) = .0016 seconds
IFavg = 18.22A * .0016 * 60 = 1.75A

According to the 1N5408 datasheet this current is good for an ambient temperature up to about 90 DegC (194 DegF) which is more than sufficient for most lab situations.

RESULT: Rectifier Reverse Voltage and Forward Current ACCEPTABLE


E. Transformer Selection

WeiKedz isn't very clear on transformer selection and that appears to be one of the largest complaints with the product. So I thought I would address a simple method here. In their defense, WeiKedz recommends an 80W or greater 24V RMS transformer. But which manufacturer and part number? Manufacturers specify transformers in VA (Secondary Voltage and Current) not Watts so what should the current be?

I use a simple equation and a parts list from Hammond Manufacturing or Triad Magnetics to choose a transformer. A bridge rectifier with capacitor filter is known to have a very poor power factor of between 40% and 55% due to the large peak current, narrow conduction angle of the rectifiers in the bridge, and reactance of the filter capacitors. In the power supplies I've designed, the power factor from no load to full load averages 50%. This makes the following equation a good choice for transformer sizing and one I've used successfully for general purpose power supplies:

Transformer VA Rating = (( Vp - ( Vr / 2 )) * Io ) / PF

Where Vp is the peak voltage of C1 for a given transformer secondary RMS voltage, Vr is the ripple voltage on C1 for a given power supply output current, Io is the power supply output current, and PF is the power factor. Check the sections above for how Vp and Vr were determined.

Solving for the Weikedz power supply with a 3A output current gives:

Transformer VA Rating = (( 32.5 - ( 7.57 / 2 )) * 3 ) / .55 = 156.63

To determine the transformer secondary current divide the Transformer VA Rating by the transformer secondary RMS voltage:

Transformer Secondary Current = Transformer VA Rating / Transformer Secondary Voltage =
156.63 / 24 = 6.53A

Looking through the Hammond Manufacturing catalog, the 185G24 with a secondary of 24VAC and 7A would work perfectly if it weren't for the problems listed above that will prevent the power supply from operating reliably long term.

Looking through the Triad Magnetics catalog, the VPS24-7300 with a secondary of 24VAC and 7.3A would work perfectly if it weren't for the problems listed above that will prevent the power supply from operating reliably long term.

Both of the transformers are available from Mouser and Digikey for around $35.00

Step 5: Analysis - Reference Circuit

Picture of Analysis - Reference Circuit

Well. For a seemingly simple circuit, the last section was quite complicated to explain. Fortunately the next few sections are quite a bit easier to describe and understand.

As mentioned earlier the Reference Circuit is the heart of the power supply because it provides the measurement standard that controls both output voltage and output current. This circuit may look complicated because it uses an OpAmp IC, but as you'll see it's actually very simple.

A brief description of an Operational Amplifier

The TL081 (datasheet attached below) is a single OpAmp in an 8-pin DIP optimized for precision low-power applications. It comes close but is not quite equal to the ideal characteristics of an OpAmp:

A. Infinite input impedance
B. Infinite open-loop voltage gain
C. Infinite common mode rejection
D. Infinite signal bandwidth
E. Zero output offset voltage
F. Zero output impedance
G. Zero sensitivity to variations in power supply voltage (V+, V-)

The TL081 OpAmp has two inputs A (non-inverting) and B (inverting), and one output. The equation that defines the output voltage with respect to the input voltages A and B is simply:

Vo = A * (Va - Vb) where A is the open loop gain, Va is the voltage in the "+" (non-inverting) input terminal and Vb is the voltage on the "-" (inverting) input terminal.

If the OpAmp open loop gain is infinite, common mode rejection is infinite, and output offset voltage is zero, then:

Vo = 0, when (Va - Vb) = 0
Vo = V+ (V+ is the positive power supply voltage), when (Va - Vb) > 0
Vo = V- (V- is the negative power supply voltage), when (Va - Vb) < 0

This property is very useful in control circuits like those used in the WeiKedz variable power supply and we'll be using it to describe how the Reference, Error Amplifier, and Current Limit functions work.

The OpAmp is capable of doing far more than this, but I recommend you purchase a good book on Operation Amplifiers if you would like to learn more.

Reference Circuit Operation

Observe the Reference Circuit schematic and you'll notice that the voltages on the A and B inputs of the TL081 are easy to describe:

Va = Vo * R6 / ( R5 + R6 )
Vb = Vo - Vz where Vz is the zener diode voltage

The output voltage Vo depends on Va and Vb according to the equation:

Vo = A * (Va - Vb)

If A is very large, then Va and Vb will need to be almost exactly the same for Vo to settle at some value other than +V and -V. What we need to know is the value of Vo after the circuit powers up and Va and Vb stabilize. An easy way to do this is write the OpAmp equation expanding Va and Vb, set Vo on the left side of the equation to 0, and then solve for Vo on the right side of the equation:

Vo = A * (Va - Vb)

then

0 = A * [ ( Vo * R6 / ( R5 + R6 ) - ( Vo - Vz ) ]

Next plug in the known values for R5 (10K), R6 (10K), and Vz (5.6). For now, assume we don't know what A is:

0 = A * [ ( Vo * 10K / ( 10K + 10K ) - ( Vo - 5.6 ) ]
0 = A * ( Vo * 0.5 - Vo + 5.6 )

Last, rearrange the equation to solve for Vo:

0 = ( A * Vo * 0.5 ) - ( A * Vo ) + ( A * 5.6 )
- ( A * 5.6 ) = ( A * Vo * 0.5 ) - ( A * Vo )
- ( A * 5.6 ) = A * Vo * ( 0.5 - 1 )
- ( A * 5.6 ) / A = Vo * ( 0.5 - 1 )
- ( 5.6 ) = Vo * ( 0.5 - 1 )
notice that A ended up getting cancelled out so we didn't need to know its value
Vo = -5.6 / -0.5
Vo = 11.2V notice that the signs cancelled leaving a positive result

So for a Zener voltage of 5.6V, the OpAmp multiplies that voltage by 2 and produces an +11.2V reference voltage for Vo.

The reference voltage is then sent to the Voltage and Current potentiometers (P1, P2) that allow selection of the power supply output voltage and output current.


Questions and Answers

1. Why use an OpAmp?

The primary advantage of this circuit is that the reference output voltage Vo is virtually unaffected by the ripple voltage on C1. The output Vo of a good OpAmp is insensitive to changes in V+ or V- as long as Vo is kept somewhere in between. A Zener diode by itself, due to it's internal impedance, would be sensitive to ripple voltage on C1 which would result in a significant amount of ripple voltage on the power supply output.

2. Why use a 5.6V Zener Diode?

You'll notice on the circuit board that the zener diodes are marked as 5V1 (5.1V) but the parts supplied are actually 5V6 (5.6V). The reason the 5.1/5.6 diodes are used is due to their lower temperature coefficient which helps the power supply maintain a stable output voltage over a wide temperature range. One manufacturer may offer a better temperature coefficient on their 5.1V part while another offers the same on their 5.6V part. So I suspect (or I hope) that WeiKedz chose a part that offered better temperature stability. Attached in the PDF below are a few examples of the temperature coefficient seen from typical zener diodes.

3. Why use a reference voltage of 11.2V?

I'm now guessing as to what was on the mind of the person that designed the power supply, but based on my testing I believe the WeiKedz power supply was intended to provide 0-20V, not 0-30V as claimed. A 5.1V zener will provide a 10.2V reference while a 5.6V zener will provide a 11.2V reference. Both of these are reasonably close to 1/2 of the power supply output voltage range which helps prevent ripple voltage on C1 from affecting the reference output voltage.

4. Can I hack it?

Yes you can. Now that you know how the circuit works and what it is good for, you can use it in your own projects. To change the output voltage, simply determine the voltage you want and divide by 2, then select a zener diode with the closest voltage:

Vzener = Vo / 2

The "divide by 2" part is determined by the ratio of R5 and R6. So you can also change the output voltage by leaving the zener voltage where it us but changing R5 and R6 using the following formula:

Reference Multiplier = 1 + ( R6 / R5 )

Below are a few resistor values for different multipliers:

Multiplier x2, R5 = 10K, R6 = 10K
Multiplier x3, R5 = 10K, R6 = 20K
Multiplier x4, R5 = 10K, R6 = 30K

A precision 50K 10-Turn trimmer resistor could be used for R6 allowing the multiplier to be continuously adjusted up or down as needed instead of changing the zener diode.

Don't change the Reference voltage on the WeiKedz power supply without reading about the Error Amplifier and Current Limiter as both are designed to work with 11.2V. After you understand both of these functions, you can make the changes you want and the power supply will work as you intended.

Step 6: Analysis - Error Amplifier Circuit

Picture of Analysis - Error Amplifier Circuit

The Error Amplifier measures the power supply output voltage, compares it to the set-point voltage selected by the user, and tells the Current Pass function to raise or lower the output voltage until it matches the set-point voltage. How this is done is actually very simple but first let's take a look at a few ancillary portions of the schematic:


Reference Input Low Pass Filter

Notice that the set-point voltage from potentiometer P1 in the Reference Circuit passes through R8, R9, and C4 before it gets to the non-inverting input of U2. These components serve two functions:

1. Low pass filter for P1/P2

R8 and C4 form a low pass filter with cutoff frequency of:

Fc = 1 / ( 2 * pi * R * C )
Fc = 1 / ( 2 * pi * 27000 * .0000001 ) = 59 Hz

This prevents AC and RF noise pickup on the potentiometer wiring from affecting the power supply output.

2. Regulator Soft Start

To avoid power supply output ringing and possible oscillation during startup and after a current limit event, the time constant of R8 and C4 smoothly raises the output voltage over a time period of 14ms as defined by the following equation (See Illustration 1):

t = 5 * R * C
t = 5 * 27000 * .0000001 = .014 seconds


Error Amplifier Offset Null

Operational Amplifiers aren't perfect and sometimes the IC output doesn't reach the exact voltage expected due to IC variation, temperature, and external component tolerances. The difference between the expected output voltage and the actual output voltage is called the "offset voltage". Normally this voltage is very small and doesn't affect the operation of a typical OpAmp circuit. But in precision control circuits it can be critical that offset be removed or "nulled out". The TL081 provides an optional set of pins to do this. Trimmer resistor RV1 and fixed resistor R10 comprise the external null adjustment for IC U2.

The TL081 datasheet and the TI best practices (attached below) recommend using a 100K trimmer resistor attached to the offset null and Vcc- pins. For the TL081, an additional 1.5K resistor is used to avoid shorting either offset null pin to Vcc- when the trimmer resistor is rotated to the left or right extreme. What this arrangement does is balance the current mirror output in the differential amplifier section of the OpAmp IC (See section 8.2 of the TL081 datasheet).

However, the WeiKedz design does not attach the trimmer resistor to Vcc- and the tail resistor R10 is 270K instead of the recommended 1.5K. The value of R10 (270K) was likely chosen so that the offset adjustment makes full use of RV1s adjustment range. But the attachment to the power supply output ground is a mystery and may be a design error. This arrangement likely works because the Vcc- voltage is so small (-5.6V) compared to the Vcc+ voltage (+32.5V).

Current Limit Signal

The Error Amplifier input is connected to the Current Limiter output through diode D9. In the WeiKedz power supply I built, this not a over-current shutdown feature. It's actually a fold-back current limit feature that reduces the set-point voltage at the Error Amplifier until the output current falls below the current limit set-point. To completely turn off the power supply voltage output, the current limiter output must be able to go negative by at least -0.7 volts due to the voltage drop on diode D9. This is one reason the negative 5.6V power supply is needed.


And now... The Error Amplifier

I've saved the simplest (maybe) part for last. The Error Amplifier is a simple non-inverting amplifier described by the following standard equation:

Vout = Vref * ( 1 + R12 / R11 )

However, the feedback loop is not connected to the output of U4. It's connected after the Current Pass function which has a DC voltage drop of 1.4V. So the standard equation needs to be modified:

Vout = Vref * ( 1 + R12 / R11 ) + 1.4

The closed-loop DC gain of the amplifier is:

Acl = 1 + R12 / R11 = 1 + 56K / 27K = 3

The Voltage Reference circuit described in the previous step includes a set-point potentiometer P1 which provides a voltage to the Error Amplifier between 0 and 11.2V. The Error Amplifier output to the Current Pass section is therefore between:

Vout = ( Vref * Acl ) + 1.4 = ( 0 * 3 ) + 1.4 = 0V

and

Vout = ( Vref * Acl ) + 1.4= ( 11.2 * 3 ) + 1.4 = 35V

For a given reference voltage range, the Error Amplifier voltage range can be changed simply by changing the values of R11 and R12.

When the set-point reference voltage is set with P1, the error amplifier will continuously compare the power supply voltage to the set-point and and adjust its output voltage up or down so that the power supply output voltage does not change regardless of load current.

However, there are three problems with the Error Amplifier output voltage range:

A. U2 (TL081) Maximum Output Voltage Swing

The datasheet for the TL081 OpAmp specifies that the output can swing no closer than 1.5V of Vcc+ or Vcc-. The maximum output voltage on U2 when the power supply is unloaded is:

Vout = Vp - 1.5 = 32.5V - 1.5V = 31V

Remember that the Error Amplifier is connected to the Current Pass function which drops 1.4V from the Error Amplifier output. So the actual maximum voltage to a test circuit attached to the power supply is:

PSout = Vout - 1.4V = 31V - 1.4V = 29.6V

Keep in mind also that the maximum voltage swing used above is a typical value at 25 DegC. Results will vary. The minimum peak output voltage swing in the data sheet is 3V below Vcc+ which would make the power supply output voltage closer to 28V. There is not enough headroom on U2 to reliably generate a 30V output. This is not a 0-30V power supply.

B. Unregulated output when P1 is rotated to its fullest extent

If you remember from the Rectifier and Filter circuit described earlier, the peak unloaded voltage on C1 was around +32.5V and the power supply schematic shows that C1 is used for the +Vcc supply on Error Amplifier U2. Adjusting Reference potentiometer P1 to its highest range will saturate the output of U2 at 31V resulting in an unregulated 29.6V output from the power supply. The cooling fan included with the kit consumes around 100ma which will produce approximately 1Vpp of ripple out of the supply. This ripple voltage will appear at the power supply output to your circuit, which is highly undesirable.

C. Loss of regulation under load

This problem was also discussed in the Rectifier and Filter circuit. With a 1A to 3A load, the ripple voltage on C1 varies between approximately 2.5Vpp to 7.5Vpp. The power supply I built varied between 2Vpp and 6Vpp. For the Error Amplifier to stay in regulation, its output must be below the ripple voltage on C1:

Vout = Vp - Vr - 1.5V where Vp is the peak voltage in C1 and Vr is the ripple voltage on C1. The 1.5V term is the U2 saturation voltage.

Solving this equations for a variety of output currents reveals:

Vp = 32.5V, Vr = 2.5V @ 1A
Vout = 32.5V - 2.5V - 1.5V - 1.4V = 27.1V

PSout = 27.1V - 1.4V = 25.7V

Vp = 32.5V, Vr = 5V @ 2A
Vout = 32.5V - 5V - 1.5V = 26V
PSout = 26V - 1.4V = 24.6V

Vp = 32.5V, Vr = 7.5V @ 3A
Vout = 32.5V - 7.5V - 1.5V = 23.5V
PSout = 23.5V - 1.4V = 22.1V

So the maximum regulated power supply output voltage is between 22.1V and 25.7V depending on load current.

A 5.6K fixed resistor or 10K trimmer inserted above potentiometer P1 will allow the voltage set-point range to be reduced so that regulation will be maintained throughout the full rotation of P1 for all load currents. But this solution limits the power supply output voltage range to 0 - 20V. And it doesn't address the other problems discussed earlier.


Error Amplifier Feedback Frequency Response and Slew Rate Limiting

The Error Amplifier is as its name suggests, is an amplifier. It has gain. As such, if careful design steps aren't taken an amplifier can reinforce noise and harmonic frequencies generated by your test circuit or become a high frequency oscillator just sitting on the bench, which will do your test circuit and your lab not a bit of good. To prevent that, two features were added to the Error Amplifier circuit:

Feedback Low Pass Filter

The addition of C6 to feedback resistors R11 and R12 form a low pass filter with cutoff frequency approximately 32Khz.

Slew Rate Limiter

The TL081 OpAmp has a maximum slew rate of 13V/uS (13,000,000V/S !!!) which is exceptionally fast for such a simple low-cost IC. It is capable of moving from the recommended +V power rail to the -V power rail in about 2uS. The addition of C9 between the U2 output and inverting input pin limit the OpAmp slew rate to around 50uS. Without C9 the output of U2 tends to overshoot and ring with sudden changes in the power supply output voltage. C9 also ends up in parallel with C6 to drop the feedback filter cutoff frequency to 16Khz. Frequency response rolls of to unity gain around 100Khz which helps prevent the power supply from becoming an oscillator.

Step 7: Analysis - Current Limit Circuit

Picture of Analysis - Current Limit Circuit

The current limiter circuit is one of the simpler function blocks. It's job is to measure the voltage on the current sense resistor and compare it to the current set-point voltage. Initially the output of the limiter is near the V+ power rail, but switches toward the V- power rail when the current set-point is exceeded. This reduces the reference voltage to the Error Amplifier and keeps the regulator output current at the current set-point.

Voltage Comparator

Remember how an ideal OpAmp works and this circuit is easy to understand. The equation for the output of U3 is:

Vo = A * (Va - Vb) where Va is the voltage on the non-inverting (+) input pin and Vb is the voltage on the inverting (-) input pin.

When there is no feedback network attached to U3, gain A is a very large number so the output of U3 can be described as follows:

Vo = 0, when (Va - Vb) = 0
Vo = V+ (V+ is the positive power supply voltage), when (Va - Vb) > 0
Vo = V- (V- is the negative power supply voltage), when (Va - Vb) < 0

This is the simple definition of a voltage comparator. In practical circuits, however, it is nearly impossible for Va and Vb to be equal so the last two equations are the ones that are important.


Current Sensing

The current sense resistor R7 is a small value power resistor (sometimes referred to as a "shunt") that works as a current-to-voltage transducer. It's value must be small so that only a minimal amount of energy is lost, but it also must be large enough to produce a measurable voltage for U3. The relationship between the current through R7 and the voltage on R7 is:

Vr = I * R where I is the power supply output current and R is the value of R7. So for various output currents the voltage on R7 is:

Vr = 0 * 0.47 = 0V when I is 0 Amps.
Vr = 1 * 0.47 = 0.47V when I is 1 Amp.
Vr = 2 * 0.47 = 0.94V when I is 2 Amps.
Vr = 3 * 0.47 = 1.41V when I is 3 Amps.

The current sense voltage can vary between 0V and 1.41V when output current varies between 0A and 3A. This is the voltage range that will be compared to the current limit set-point voltage.

You will notice that R7 is physically large. Even though the resistance of R7 is small, the current through it will be quite high and a good deal of heat will be produced. The surface area of R7 needs to be large enough for that heat to be exchanged with the surrounding air. Otherwise R7 can become so hot it self destructs. The work done (Power) in the form of heat in Watts by R7 is described as:

P = Io^2 * R7 where Io is the power supply output current

Solving this equation for the power supply maximum rated current of 3A results in:

P = 3^2 * 0.47 = 4.23W

This is dangerously close to the 5W maximum rating of R7. At 4.3 W power the resistor surface temperature will reach 117 Deg C (242 Deg F) in less than a minute. "Don't touch this" comes to mind and that heat needs to be removed if the power supply is placed in an enclosure. The WeiKedz kit provides a fan for this but you will need to remove it from the heatsink so that are can be moved across the entire power supply, not just the heat sink.


Current Limit Set-Point

Potentiometer P2 is used to provide the set-point current limit voltage. It's a simple voltage divider composed of P2, R17, and R18. The set-point voltages that can be obtained from P2 are described by:

Vccw = Vref * ( R17 / ( R17 + P2 + R18 )) where Vref is the reference voltage of 11.2V and Vccw is the voltage on U3 Pin3 when P2 is fully counter-clockwise.

Vcw = Vref * (( R17 + P2 ) / ( R17 + P2 * R18 )) where Vref is the reference voltage of 11.2V and Vcw is the voltage on U3 Pin3 when P2 is fully clockwise.

Solving these equations using the known values gives the following voltages for Vccw and Vcw:

Vccw = 11.2 * ( 33 / ( 33 + 10000 + 56000 )) = 0.0056V
Vcw = 11.2 * (( 33 + 10000 ) / ( 33 + 10000 + 56000 )) = 1.70V

Because OpAmp U3 is acting as a voltage comparator its output will shift from V+ to V- only when the current sense voltage is greater than the current set-point voltage. So the minimum and maximum power supply output currents can be calculated as:

Iccw = Vccw / R7 = 0.0056 / 0.47 = 12mA
Icw = Vcw / R7 = 1.70 / 0.47 = 3.62A

In the kit I built, I didn't want 3A of current so I changed the value of R18 to 200K which changed the output current limit range between 4mA and 1.14A. You can use the above equations to define your own ranges by changing the values of R17 and R18.


Slew Rate Limiting

As was mentioned in the previous step, the TL081 OpAmp has a maximum slew rate of 13V/uS which allows it to traverse the recommended +V/-V power rails in about 2uS. This is fast enough for parasitic inductance and capacitance to induce ringing and oscillation in the power supply. To prevent that, C8 was added to limit the slew rate from 13V/uS to around 0.3V/uS. Fast enough for the current limiter to do it's job, but not so fast that current control is lost.


Current Limit Indicator

The current limiter includes an indicator feature that lights an LED when current limiting is engaged. When U3 output falls to around 28V, PNP transistor Q3 is forward biased through resistors R19 and R20 as described in the formula:

Vo = ( V+ ) - ( VBEsat * ( R19 + R20 )) / R19 where V+ is the voltage on C1 and VBEsat is the forward biased base-emitter saturation voltage for the SS9015 PNP transistor (see data sheet below).

Solving this equation results in:

Vo = 32.5 - ( 0.82 * ( 2200 + 10000 )) / 2200 = 27.95V

When Q3 turns on, almost the full V+ voltage is applied to R22/D12. Typical maximum LED current is 20ma to 30mA with a forward voltage of 2V to 3V so it's best to check the datasheet or test the LED before deciding on the value of R22. The LED I received in the WeiKedz kit turned on at 2V forward voltage with almost 2.4V at 10mA. The designer of the kit elected to limit diode current to approximately 7.8mA which is plenty of brightness:

ILED = ( V+ - VLED ) / R22 = ( 32.5 - 2.2 ) / 3900 = 7.8mA

Power dissipated in R22 is:

P = ILED^2 * R22 = .0078^2 * 3900 = 237mW

That's very close to the 250mW rating of R22 but I'll allow it since the LED will only be turned on when the current limiter is activated. The user will then likely intervene and increase the current setting or turn off the power supply.

Step 8: Analysis - Current Pass Circuit

Picture of Analysis - Current Pass Circuit

The Current Pass function is the workhorse of the power supply. It's job is provide a fixed output voltage regardless of the size of the load attached to the power supply (depending on the current limit set-point or the maximum current rating of the supply).

The active elements in this function block are Q2 (2SD882) and Q4 (2SD1047). These two transistors are wired in a Darlington configuration which provides an extremely high input impedance (>50K Ohms) to the Error Amplifier and a very low output impedance (<0.1 Ohms) to the load and very high DC current gain (>10,000). The Darlington configuration comes with a few disadvantages:

1. Output voltage is 1.4V lower than the input voltage due to the combined Base/Emitter junctions of Q2 and Q4.

2. Slower switching speed due to Base-Emitter capacitance of Q4.

3. Higher power dissipation in Q4 when used as a switch due to 0.7V saturation voltage limitation.

There is nothing we can do about the first limitation other than account for it in the design. To minimize the effect of B-E junction capacitance in Q4, it is common to add a resistor (R16) between the Base and Emitter terminals of Q4. This is a recommended practice but not strictly needed in a general purpose analog variable power supply. Testing of the WeiKedz power supply I built shows no change in the performance of the Current Pass function when R16 is omitted. The slew rate limiting applied to the Error Amplifier and Current Limit functions eliminate any benefit of R16. The 3rd limitation doesn't apply to an analog variable power supply.

The output voltage is described by the following equation:

Vout+ = Vset - 1.4

Notice that the Error Amplifier voltage sense input is connected to the output of the Current Pass function, so the 1.4V drop in Q2/Q4 is automatically accounted for.

All other components in the schematic are ancillary functions. Q2 and Q4 are doing all of the work. There is one issues with the WeiKedz design as you'll see when reviewing the datasheet for Q2 (2SD882):

When the power supply output voltage is set to 0V, the maximum Vceo rating of Q2 is exceeded by 2V (see attached 2SD882 datasheet). The transistor Base terminal is not open-circuit as specified in the rating, but exceeding Vceo under any circumstances is bad practice. Temperatures higher than 25DegC can result in the Collector-Emitter junction breaking down unexpectedly. A C-E short-circuit in Q2 will cause the power supply output to suddenly change to V+ (32.5V) with current limiting disabled, potentially destroying the circuit attached to the power supply. This is further evidence that the WeiKedz power supply was not designed for 0-30V as specified.

-5V Failure Shutdown

The -5V supply is required for the variable power supply to operate properly. Without it, the Error Amplifier and Current Limit functions become unstable. R13, R14, and Q1 form a shutdown circuit for the Current Pass function if the -5V power supply falls below approximately -3.8V. Q1 will be saturated by R13 shorting the output of Error Amplifier U2 to ground, which turns off Q2 and Q4 and drops the power supply output to 0 volts. U2 is internally protected from short circuit to ground or to either of the power supply pins.

However the maximum U2 IC dissipation (650mW at 25DegC) cannot be exceeded during an output short circuit event. This is not a problem when operating the TL081 at the recommended +/- 15V power supply voltages. Short-circuit output current for the TL081 is internally limited at 20mA. But when using a +32.5V supply and adding in the TL081 operating current of 1.4mA, shorting U2 output to ground will result in 700mW of device dissipation. This is a bad thing if the -5V supply fails and the operator doesn't notice. U2 will likely overheat and self destruct. During testing of the power supply I built, lifting R14 from the PCB overheated U2 in less than a minute. Using a 20VAC transformer instead of a 24VAC transformer reduced U2 dissipation to 500mW which is still high but manageable. Yet one more data point that makes me believe this power supply circuit was not intended for a 30V output.

C7 Discharge

C7 is included to improve output voltage stability when powering circuits with small but rapid changes in load current. However, C7 doesn't have a low impedance discharge path if no load (or very light load) is attached to the power supply. The only path available is the large value resistors R11/R12 (83K Total) in the Error Amplifier. If the power supply output voltage is set to maximum, and then quickly set to zero, Q4 Base-Emitter junction will be reverse biased and no current will flow through the Current Pass function. It will then take over 4 seconds for C7 to discharge through R11/R12 according to the following:

Discharge Time = R * C * 5 = ( 56000 + 27000 ) * .00001 * 5 = 4.15 seconds

This will be visible if a volt meter is used to measure the power supply output, and can make adjusting the power supply difficult without a load attached.

To prevent this, D10 and R15 were included to provide a low impedance discharge path for C7. If the reference voltage falls below the output voltage, D10 will be forward biased which results in R15 being connected across C7. The discharge rate for C7 will then be:

Discharge Time = R * C * 5 = 1000 * .00001 * 5 = .05 seconds

R11/R12 were not included in the above equation because their combined value is so large that R15 dominates.

Reverse Output Voltage Protection

To protect the power supply from reverse voltages attached to the output (charged capacitors, batteries, another power supply, etc.) diode D11 is attached across C7. If a voltage greater than -0.7 volts is attached to the power supply output, D11 will conduct preventing the voltage from rising further until the offending voltage is removed or D11 is destroyed.

Step 9: Assembly Manual for Transformer Operation

Picture of Assembly Manual for Transformer Operation

I've re-written the assembly manual for the WeiKedz Variable Power Supply to make it easier to follow and included some part placement and soldering tips for those wanting the benefit of better illustrations before attempting an this electronics project.

I've also included an Operation and Maintenance guide for use after the project is assembled. This guide will provide some assistance and suggestions for attaching a transformer to the power supply, and also includes detailed description of each power supply function block.

Step 10: Modifying the Power Supply for Battery Operation

Picture of Modifying the Power Supply for Battery Operation

My initial concern with this project was finding a reliable supplier of rechargeable cells that were small, light, easy to use, and cost effective. Turns out a totally different problem would lead me to the exact product and company I needed:

While I was working on this project, one of the battery packs failed on my DeWalt 12V drill/screwdriver. The thing cost me $90 bucks at Home Depot about 18 months ago so I was hoping to find a replacement pack for maybe $20 to $30. Ha. No such luck. The best I could do was $60 for a single pack from DeWalt.

Holy crap! For that price I might as well buy another screw driver. I was so mad. This is THE single reason I refused to by rechargeable tools back in the bad old NiCad days. I was thinking I was an idiot for buying the DeWalt on impulse, but then I thought, "There has to be a way I can avoid playing the manufacturers planned obsolescence game." So I ignored the dire warnings in bold large print on the manual and disassembled the failed battery pack. Wouldn't you know it was stuffed with three 18650 cells in series and a little charge control circuit board. Checking voltages on each revealed one cell with zero volts; open circuit.

A quick google search and I had thousands of hits. But one vendor popped to the top with exactly the cell I needed: liionwholesale.com

They had the exact part number I needed for just a few bucks. They processed my order on a Sunday (no kidding... Sunday), and shipped first thing Monday morning. The cell was a perfect fit and immediately restored my battery pack to operation. Now I don't have to avoid rechargeable tools because the manufacturers want to extort me on the cost of a battery pack. The batteries used for this project were ordered from liionwholesale.com. Give them a try because they have a huge selection of protected, unprotected, low ESR, and high capacity cells. And some really good prices as well.

The point of the previous sections was to deconstruct the WeiKedz Variable Power supply and examine each function block and component to describe what they do. There is very little informational in detail available on the WeiKedz product and I was hoping to cast more light on it, because I think it is a good product. It only suffers from some optimistic specifications. If you are unfamiliar with power supply design, or you needed a lot more information before giving the power supply a try, I hope the previous sections have helped.

I purchased the WeiKedz kit because I needed a variable power supply that could run on LG M26 2600mAH 18650 protected button top batteries. Four of these in series would provide a battery voltage between 12.8V and 16V with a nominal voltage around 14.8V. Protected cells make charging and discharging the cells easier than providing a balance charger. I only need the power supply to provide a variable 0 to 10V at 0 to 1A output current, so the lower ESR of unprotected cells wasn't an advantage in my application.

The specifications I was hoping to achieve were:

Input voltage: 14.8VDC nominal (12.8Vmin to 16.8Vmax)
Input current: 1A (max)
Output voltage: 0-10VDC nominal (0 to 12V max)
Output current: 4mA to 1A (adjustable)
Output regulation: 0.01%

However if you remember from the introduction, the WeiKedz power supply was designed to be powered from a transformer only. A negative 5V power supply generated from the transformer is used by the Error Amplifier, Current Limiter, and Current Pass functions. Running the WeiKedz supply on batteries as-is was not possible.

But as you'll see in the next sections, the solution to this problem was actually an easy one.

Step 11: Battery Mod - Rectifier Circuit

Picture of Battery Mod - Rectifier Circuit

To convert the Rectifier Circuit to battery operation, we first need to eliminate all of the components that aren't needed. This saves weight, reduces cost (i.e. unused parts can be used for another project), and makes space available for some new components.

The components that are not needed are:

  • Rectifiers D1 through D4 (1N5408)
  • Resistor R1 (2.2K 1W)
  • Capacitor C1 (3300uF 50V)

Do not install the components listed above.

Optional Components are:

  • Positive 24V Regulator IC U4 (7824)
  • 2-pin Connector J5
  • 24V 100mA Fan

I elected to skip the 24V regulator and fan as convection cooling would be sufficient for my purposes.

The components I added were:

  • 2A Fast Blow Fuse (5mm X 20mm)
  • Through-Hole Fuse Holder (5mm X 20mm)
  • 555-based Astable Timer
  • DROK V/I Panel Meter

In order to gain a bit more headroom on the -5V supply, I replaced the 5.6V zener D5 (1N752) with a 5.1V zener (1N751). This change is optional but recommended if you have the part on hand.

The changes made to the Rectifier Circuit are shown in the schematic above.

The astable timer is used to replace the positive-to-negative charge switching provided by the transformer and bridge rectifier. When the output of the 555 timer is high, capacitor C2 is charged to +12V through diode D5 and resistor R2. When the output of the 555 timer is low, R2 is shorted to ground which reverses the polarity of capacitor C2 and discharges C2 into capacitor C3 through resistor R2 and diode D6. C2 charges C3 to -9V before the cycle repeats. The voltage on capacitor C3 is regulated to -5.6V by R3 and Zener diode D2 and sent on to the function blocks that need -5V.

I built the Astable Timer (photos above) on a small piece of prototyping board using the following design procedure:

Most electrolytic capacitor manufacturers provide design data for 60Hz, 120Hz and 1000Hz, so I chose an astable frequency of 1Khz with near 50% duty cycle to minimize the ripple voltage in the converter.

I used the astable circuit from the datasheet and calculated the values for C24, R23 and R24 according to the equations:

T1 = 0.693 * ( R23 + R24 ) * C24 where T1 is the charge time for C24

T2 = 0.693 * R24 * C24 where T2 is the discharge time for C24

F = 1 / ( T1 + T2 ) where F is the astable frequency

DC = R24 / ( R23 + ( 2 * R24 )) where DC is the astable duty cycle

I wanted to keep current consumption on the astable timer low to keep battery drain to a minimum so the combined values of R23 and R24 need to be fairly large. TI includes a nice nomograph that shows the capacitor value needed for a certain frequency and resistor combination. I used that to choose a .01uF value for C24 because the combination of R23/R24 would be near 100K Ohms. Arranging the equation for T1 above to solve for R23/R24 and substituting known values gave:

R23 + R24 = T1 / ( 0.693 * C24) = .0005 / ( 0.693 * .00000001 ) = 72,150 Ohms

The .0005 term for T1 is the cycle time for 1000 Hz (.001 seconds) divided by two for charge time which makes T1 equal to .0005 seconds.

The astable schematic and duty cycle equation shows that a 50% duty cycle requires a large resistor value for R24 and a small resistor value for R23. However, R23 can not be so small that power dissipation in the 555 is exceeded. So I first selected the value for R24 by consulting the EIA E12 resistor chart which describes the most common resistor values I have in inventory, and looked for the resistor value closest to 72,150 Ohms without going over. That value was 68K Ohms. Subtracting 68000 Ohms from 72150 Ohms left 4150 Ohms for R23. Consulting EIA E12 again, I chose the closest resistor value above 4150 Ohms, which was 4.7K, and used that for R23.

Checking the resistor values with the equations shows:

T1 = 0.693 * ( R23 + R24 ) * C24 = 0.693 * ( 4700 + 68000 ) * .00000001 = .000504 seconds

T2 = 0.693 * R24 * C24 = 0.693 * 68000 * .00000001 = .000471 seconds

F = 1 / ( T1 + T2 ) = 1 / ( .000504 + .000471 ) = 1026 Hz

DC = R24 / ( R23 + ( 2 * R24 )) = 68000 / ( 4700 + ( 2 * 68000 )) = 0.48 or 48%

These results are almost perfect for the purpose. C11 and C12 in the schematic are bypass capacitors recommended in the 555 datasheet (attached below).

To prevent internal short circuits from damaging the battery, wiring, or circuit board components I recommend installing a Bussman 250V 2A fast acting fuse (5mm X 20mm, Part number GMA-2R) and fuse clips on the PCB as shown above. I used the pads for rectifier D1 to mount the fuse clips. Bussman recommends that the DC voltage applied to their fuses be no more than 1/2 the AC rating, or 125V, to ensure fast clearing of a fault. The maximum battery voltage of 16.8V is well below that. The cold DC resistance of the GMA-2R is 0.066 Ohms which is about the same is an equivalent automotive fuse. If you feel more comfortable using a purely DC rated fuse, feel free to substitute an automotive fuse for the glass fuse I used.

The DROK panel meter will be covered in a later step.

The next step will cover the construction and installation of the astable timer.

Step 12: Battery Mod - Astable Timer Construction

Picture of Battery Mod - Astable Timer Construction

The astable timer I built is constructed on a small piece of prototype board. You can use anything you have on hand and you can use any layout that works for you. Just follow the schematic diagram included above. I've included a top/bottom layout diagram for the astable timer I built to use as a guide.

After the astable time is constructed, the trace connecting R2 to rectifier D4 must be cut in the location shown above. Then solder in the astable timer onto the traces indicated above. Small pieces of solid #22 or #24 hookup wire can be used for the V+ and GND leads when the astable timer is installed in the C1 position. But a 2" length of stranded #24 or smaller hookup wire will be needed for the OUT signal to reach R2.

If you aren't planning on attaching a V/I panel meter to the power supply, solder in a #18 or larger jumper wire in the location shown. Otherwise, install the DROK panel meter before testing the astable timer.

When completed, attach a 12V to 16V power source to J1 as indicated above. Check the voltage at the indicated test point to verify that the timer is working correctly.

Step 13: Battery Mod - Reference Circuit

Picture of Battery Mod - Reference Circuit

The minimum battery voltage for the 18650 pack I'll be using is 12V. The TL081 OpAmp IC saturation voltage is 1.5V below V+ which is not enough headroom for an 11.2V reference voltage. And I was not convinced that the 5.6V zener was the best choice for temperature compensation. So I elected to replace the 5.6V zener diode included in the WeiKedz kit with a 5.1V zener from my inventory. This will provide a 10.2V reference voltage which is just enough headroom as the battery pack reaches cutoff.

Replace D1 with a 5.1V zener part number 1N751

Step 14: Battery Mod - Error Amplifier Circuit

Picture of Battery Mod - Error Amplifier Circuit

The nominal battery voltage for the 18650 pack I'll be using is 14.8V. Accounting for TL081 saturation voltage (1.5V below V+) and the voltage drop in the power section (1.4V), the maximum output voltage is 11.9V. The gain of the Error Amplifier need to be changed to account for the different V+ voltages (13.8V on battery vs 32.5V on transformer power). Instead of a gain of 3, I needed a gain of:

Acl = Vout / Vref = 12V / 10V = 1.2

The non-inverting amplifier gain equation is:

Acl = 1 + ( R12 / R11 )

To avoid changing the frequency response of the Error Amplifier, resistor R12 should be left at 56K. Rearranging the gain equation to solve for R11:

R11 = R12 / ( Acl - 1 )

Substituting known values makes R11 equal to:

R11 = 56000 / ( 1.2 - 1 ) = 280,000 Ohms

The nearest IEA E12 resistor value is 270K Ohms.

Replace R11 (27K Ohm 1/4W) with a 270K Ohm 1/4W resistor.

For a reference input voltage between 0V and 10V, the power supply output voltage will vary between:

Vout = Acl * Vref

Vout = 1.2 * 0 = 0V

Vout = 1.2 * 10 = 12V

Step 15: Battery Mod - Current Limiter Circuit

Picture of Battery Mod - Current Limiter Circuit

For my purposes I only wanted a maximum of 1A output current. But the current limit control is scaled for 0 to 3A which means that only the first 1/3 of potentiometer rotation would be useful, and if rotated further would allow a higher output current than desired. So the current limit scaling resistor R18 needs to be changed.

The voltage on the current sense resistor R7 depends on the power supply output current. The minimum current limit according to WeiKedz is 4mA and the maximum current for the battery modified power supply is 1A. So the voltage on R7 is:

V = I * R

Vlow = 0.004A * 0.47 Ohms = .002V

Vhigh = 1A * 0.47 Ohms = 0.47V

The output voltage of potentiometer P2 needs to vary between 2mV and 470mV.

If R17 is left at 33 Ohms and the voltage out of the Reference Circuit is 10.2V, then the value of R18 needs to be:

R18 = (( Vref / Vhigh ) - 1 ) * ( R17 + P2 ) = (( 10.2 / 0.47 ) - 1 ) * ( 33 + 10000 ) = 207,704 Ohms

The nearest EIA E12 resistor value is 200K Ohms.

Replace R18 with a 200K Ohm 1/4W resistor.

Using this value to check minimum current limit results in:

Iout = ( Vref * R17 ) / (( R17 + P2 + R18) * R7 )

Iout = ( 10.2 * 33 ) / (( 33 + 10000 + 200000 ) * 0.47 ) = .00034 or 3.4 mA

This is close enough to allow the power supply output current to be varied between 3mA and 1A.

Step 16: Multimeter Mod - Adding a VI Display

Picture of Multimeter Mod - Adding a VI Display

Adding a panel meter to the power supply is a simple matter of soldering in the power, voltage monitor, and current monitor leads at specific pads on the WeiKedz variable power supply PCB. I wanted both a voltage and current display. And I like the look of red/green/blue 7-segment LED's instead of the bland grey of LCD displays, and I didn't want to get too fancy with color LCD meters that measure a whole bunch of parameters. After looking around on Amazon, I liked the DROK V/I panel meter (Amazon ASIN B00EXCUHJU) best because it has an offset null and span adjustment for current measurements.

The documentation provided by DROK has not made much sense to me and doesn't appear to be accurate. For example, the documentation for the panel meter I bought suggests that the power leads are isolated from the voltage and current monitor leads. However that is not that case. The meter power ground and current monitor negative lead are internally connected together. And the voltage monitor lead is reference to the power ground lead. So the meter power supply is not electrically isolated from the power supply being monitored as shown in the documentation. Instead, the meter power, load voltage being monitored, and load current being monitored will share the same ground.

As it turns out, though, this panel meter is easy connect to the WeiKedz power supply and works great.

1. Solder the thin red meter lead to the battery + input PCB trace as indicated in the diagram above. The meter + lead will use the unoccupied PCB pad assigned to rectifier D2 cathode.

2. Solder the thin black meter lead to the battery - input PCB trace as indicated in the diagram above. The meter - lead will use the unoccupied PCB pad assigned to rectifier D2 anode.

3. Solder the thin yellow voltage monitor lead to the power supply + output PCB trace as indicated in the diagram above. The voltage monitor lead will be soldered directly to diode D11 cathode.

4. Solder the thick red current monitor + lead to the power supply GND trace as indicated in the diagram above. The current monitor + lead will use the unoccupied PCB pad assigned to rectifier D4 anode.

5. Solder the thick black current monitor - lead to the battery - input PCB trace as indicated in the diagram above. The current monitor - lead will use the unoccupied PCB pad assigned to rectifier D4 cathode.

To test, verify that voltage potentiometer P1 is fully counter-clockwise and current potentiometer P2 is fully clockwise. Attach a 10 Ohm 10W load resistor to the power supply output. Attach a 14.8V battery positive lead to the B+ terminal on J1 and the battery negative lead to the B- terminal on J1. The panel meter will power on and display 0V/0A. Slowly rotate the voltage potentiometer clockwise and verify that the voltage and current measurements are close to the following:

Voltage Current

1.00 0.10
2.00 0.20
3.00 0.30
4.00 0.40
5.00 0.50
6.00 0.60
7.00 0.70
8.00 0.80
9.00 0.90
10.00 1.00

The DROK panel meter has a small trimmer resistor on the back that can be used to adjust the current measurement to more closely match the above table if needed.

Step 17: Conclusion

The WeiKedz variable power supply is a good kit that includes a good collection of parts for experimenting, including a large heatsink, fan, and regulator IC. The circuit is well designed and only suffers from voltage and current specifications that are two optimistic. When operated within realistic parameters, the power supply performs extremely well. It comes as a kit which is excellent for hacking. And for $10, the kit is a really good value.

If you've stuck with me this far, I hope the information presented has been helpful.

Good Luck!

NetZener

Comments

Abhrodeep Chanda (author)2017-12-18

Nice DIY kit but please give the link to buy this

There are numerous sellers for the power supply kit including Amazon, eBay, Aliexpress, Banggood, and more. Some sellers are better than others depending on where the buyer resides. I typically include the manufacturer/reseller name, product description, and part number when available from a global retail platform like Amazon. The Amazon part number (ASIN B01KNSCDNU) was included in the cover image and in the article text.

What you do is enter the ASIN number in a google search or the Amazon search bar. If the product is still available under that ASIN, it will be listed in the results.

If the ASIN is no longer available, search for the product description and/or reseller name. "WeiKedz variable power supply diy" usually works for me.

NetZener

About This Instructable

1,252views

36favorites

License:

More by netzener:8 Transistor Stereo AmplifierPortable Variable Power SupplyOne Tube AM Radio
Add instructable to: