Show by Label

Tuesday, July 18, 2017

My New Power Supply Design Project Part 3

Updated text and diagrams after I fully built and tested the supply.


The Auxiliary Power & Reference Supply

Enough with the simulation, I'll move over to the schematic capture of the complete project.
First of all the Auxiliary Power Supply and Reference Voltage.

Here is the schematic, using Diptrace:


There is really nothing special about this, but let me go through the design. I use a 9-0-9V AC transformer I salvaged out of a alarm radio a long time ago. I have no idea what the maximum current is, but that hardly matters. I'm only pulling a few milli-Amps from it. This transformer is located in the transformer box that I'll cover later.
The 9V AC as a minimum is important, because it creates enough head-room for the regulators, and helps with my "early warning switch off system" that I'll cover later.

The 9-0-9 V lines come in the power supply enclosure through a 3-pole DIN connector, like we use a few decades ago for audio equipment. From the chassis part, it will go to a connector on the main PCB. The above circuit is just that section of the main PCB.

Because I only draw a few milli-Amps, I use 1N4148 diodes for rectification, they can handle 100mA. Next to the filter caps, I use 18K bleeder resistors to quickly remove their charges. This helps with the turn-off/ back on of the supply. I use TO-92 low power linear voltage regulators to get plus and minus 5V. These supplies are used for the Opamps.

The +13V tap is used in my early warning signal that the mains is going down, and this voltage is used to turn the supply output off right away, to prevent mishaps at the DUT. As I mentioned in the simulation earlier, the trip point is at 10.6V, this is 3 volt above the regulation headroom margin for the 5 V regulators, so before they start to cave-in and cause problems with the Opamps, the output has been shut off long before.

I could have used the 5V supply of the positive regulator as the reference voltage for the volt and current setting. The PCB is made such that I can easily bridge the LM317L, and leave the series resistor in place. Because I want to be able to use this supply with a controller, I will use 12-bit DAC's to drive the volt and current settings. Using a reference voltage of 4.096V makes the settings and calculations easier, allowing 10mV steps in the volt setting. Also, the output stability and noise specifications are largely depending on the reference voltage source, so I'll build at least one supply with the 4.096V reference voltage. Note that the resistors for the volt setting and the current setting in the V/I control section need to be adjusted to get 30V and whatever Amps you want at the output.

I use a small trimmer to adjust the reference output to exactly 4.0960V. During my tests, this reference voltage turned out to be very accurate and stable with a fluctuation of only +/- 0.0002V over a period of several hours. This is a mixture of my 5 digit DVM (still in calibration) and the reference itself. I cannot measure the noise level other than with a scope, so I can't give you any numbers, but it's very low.


Transformer Box

As I mentioned before, the space on my "bench" is precious and limited. This is one of the reasons why I decided a long time ago to separate the bulky transformers and even the rectifier bridges and smoothing electrolytes to another enclosure, that I can put in the background. An other benefit is that I am much more flexible with this relatively expensive equipment. As an example, I added 4mm binding posts to the AC outputs as well as the rectified outputs so I can have multiple uses out of these parts. 

Right now I have three transformer boxes, of which I'll cover two here. One houses my 15-0-15VAC 3.3A transformer, rectifier and 2 x 10.000uF capacitors and a small 9-0-9VAC transformer. The second one houses my 12-0-12VAC 2A transformer, and also a smaller 9-0-9V transformer. Both transformer boxes will be used with this supply (I'll build two). The output voltage of the supply fed by the 12-0-12VAC supply will go to 30V, but the current will be a bit limited at higher voltages. At the maximum 30V DC output, I can pull 1.1A before the output starts to drop. At the realistic minimum of 1.8V at the output, I can draw just about 3A before the voltage starts to drop.

This is what is in the T2 12-0-12VAC 2A transformer box:

 And here is my T3 15-0-15 3.3A transformer box:




There is really nothing special about them, although I use a not so well known trick to get the most out of the relatively small capacitors in the T2 box. The little series resistors actually separate the two electrolytes. The first will take the full charge and discharge rectification smoothing cycle, and the second one is more of an effective filter due to those 0.6 Ohm resistors. The 9-0-9 AC transformer is feeding the auxiliary power section explained above. It is switched in parallel to the main transformer, and is connected to a 3 pin DIN chassis part. The main three outlets are going to 4mm banana sockets.

The 0V or AC transformer center tap is also brought out (as 12 or 15VAC), and that is used, together with the negative DC output, to create a separate and isolated 8V DC supply for the Volt and Amp panel meter.


Panel Meter & Fan Supply
The power for the Panel Meter and the Fan is coming from this power section. In an optimal situation, both of these supplies should be separate and isolated from the main supply. Normally, this is done by added separate winding's on the main transformer. That's not so easy to do, and getting a transformer like that is close to impossible.

I need 12V to run the cooling fan, and I need anywhere from say 5..25V DC to power the panel meter.
The reason to keep these supplies separate from the main one is because they introduce a lot of noise. The fan with PWM activity and the display with switching noise.. You don't want that superimposed on the auxiliary and reference supply. Besides that, that aux. supply is floating on top of the main supply so you really don't want to mess with that.

Initially, I wanted to try the following method.
I wanted to use the 0V AV centertap of the transformer together with the negative DC main power output to create a lower value DC supply. Using the "raw" supply for that purpose is possible, but the voltage is most likely too high for normal regulators, and you generate a lot of extra heat to bring that voltage down. The extra rectification and filtering will help to isolate the two supplies somewhat.

So, this supply is rectified and goes to a 12V linear TO220 type voltage regulator. It will be mounted on the main heatsink. As the fan controller, I use a chip that I learned to use a while earlier, and although it is a little strange to figure out (for me), I still like it a lot. The TC648B is a dedicated controller for fans, and you can set the starting point, minimum RPM, maximum RPM based on an NTC input and a cut-off point for the fan as well. The resulting PWM is rather clean and all you need is a small MOSFET or transistor to drive the fan. I have configured it such that normally the fan is off, but will kick into life at about 30-35 degrees. I especially selected this rather low temperature, because it will take a while before the heatsink can be cooled down, especially when it is heating up quickly, and you don't really hear it in the beginning anyway.

The fan supply needs to be isolated from the main supply due to the induced noise coming from the fan and the PWM to drive it. 

The panel meter is a combined volt and ampere meter is fed by the unregulated 12V supply. I may need to add a small capacitor at the panel meter to further decouple the noise coming from it. The panel meter I selected is a type I really like, because it acts more like a DMM with switching decimals. It can display 0-33.000Volt and from 0 to 9.999mA and then switches over from 1.000 to 3.000 Amp. Perfect for the job.
In the first version, that was the basis for my PCB layout, I used this schematic:


I actually build a prototype for this section as well, and it seemed to work. I did not spend a lot of time on it, because it seemed so simple...
So I went ahead, and created a PCB layout and ordered the boards from OSHparc.

While waiting for the boards to arrive, I actually started to spend a little more time with the complete setup, and started to profile and measure everything. It was than that I noticed a problem, a BIG problem when I was measuring noise levels when the supply was in the lowest output settings. There was way too much noise  seeping into the supply.  So I had to redesign it, while the PCB is already in fabrication. Bummer!

While trying to keep the noise down, I actually saw that the panel meter I used was generating a lot less noise than previous panel meters I used before. I figured that if there was too much noise in the final product, I could still add some filtering to the supply afterwards, but not on the PCB anymore.

The biggest problem that I noticed was with the noise introduced by the PWM driving the fan. So I switched my attention to isolating that from the main supply. In these attempt, I used the DC-DC isolator method to electrically isolate the fan supply. Because the fan is rated above the single DC-DC isolator, I used two in parallel.

So my version 2 looked like this:


So I again started to measure things and found that even this setup produced too much noise. I new that the DC-DC isolators produced a lot of noise on the outside, but that was isolated, so no problem, I thought. I've used these devices before, but in other applications, so I thought I was safe.

I was wrong, it turned out that the DC-DC isolators generate a lot of switching noise on the input side, and that was something unexpected, and made these devices useless in this application.

Bummer! Another reset was needed.
The fan itself generates a lot of high frequency noise that no matter what I tried, I couldn't get it to a level as low as I wanted it. 

In my version 3, I have now resorted to the easy way out, using a separate 12VDC switched wallwart. The wallwart itself is a few feet away from my sensitive equipment, and where it comes in to the supply, I'll make sure it is quiet.

So here is the latest version (3) of this section.

Note that I added a Schottkey diode to protect the supply from input polarity reversals and I used a capacitor to filter out noise. Both are mounted on the DC chassis part.

After I got the PCB, I needed to isolate the fan controller section by some trace cuts and I also needed some cuts and wires to isolate and create the new panel meter supply. The LM340 on the heatsink was no longer needed, so I put a 78L08 TO92 regulator on the connector pins intended for the leads going to the LM340. 

After having populated the PCB and putting everything in the enclosure, I spend some time tuning the fan controller circuit, and I am now happy with the results. I dropped the slow start feature of the fan, because that uses PWM to slowly ramp the speed up. I don't wanted to avoid that noise. I figured that if the heatsink starts to warm up, it's better to make it run full blast, because of the inertia that the heat sink has towards the real temperature of the series transistor(s). 

So now, the fan kicks in at full blast, and terminates when no longer needed. The fan will kick-in at about 30 degrees C. This is all determined by the resistors setting the VAS pin (that sets the termination threshold) and the resistors setting the Vin pin that sets the starting point.

The panel meter supply looks like a bit of an overkill, but that meter will be on the front panel, close to the volt and current setting potmeters, so I want it to be as clean as possible, with no mains rectification hum present. These components are on the main PCB already anyway, so I may as well use them.



Series Transistor and Output Section

There are actually two versions for the two supplies that I will build. One is intended to be used with the T2 box, with limited output current at maximum output voltage, and one for the T3 box with the full 30V 3A.

This is the T2 version with only one series transistor:



And this is the T3 version with two series transistors in parallel to stay within the SOE by sharing the current, and spreading the heat.



Voltage and Current Control Section

Here is the main control section for the voltage and current control, and the output switch on/off circuit.


Note that I used two resistors in series to set the maximum voltage (R35 and R36) and current (R19 and R24) for this supply. This allows you to use various combinations. If only one resistor is needed, use a 0 Ohm one or a solder blob for the other. The current resistor selections in the diagram are for a 10K potmeter. If you use another one, I recommend a value somewhere between 1K and 50K, you need to recalculate the values. Initially, I used a good single turn potmeter, but after trying to set the current at milli-Amp settings, I switched to a 10-turn version.

My suggestion is to find the point where the maximum voltage, in my case 30V starts to drop when you apply more and more current. This will be the maximum current level the supply can deliver at 30V, and then select the resistor value for R19 and R24, so that the CC LED just comes on at the maximum value. 

Make sure that you first properly adjusted the reference voltage after a sufficient warm-up period before you try to figure out what the maximum current at the maximum voltage is. In my case, using my DC load, I could get just over 1.45A at 30V from my T1 box so I selected 120K + 56K resistors for R19 and R24 to get to 176K.

The value of the voltage setting potmeter is not critical and also not influencing the maximum output voltage. You can use whatever you have available but I suggest to use the same range as for the current potmeter.
Make sure you have normal red LED's (I use 3mm ones), not high efficiency ones, nor ones that use a large current.
Protection diodes D16 and D17 are not really needed. I put them in, and left them in, while I was testing. They protect the OpAmp input from stupid mistakes, but if everything is wired correctly, you don't need them. (their added capacity makes the supply a little faster without them)

Room for C21 was added for possible frequency compensation, but was not needed. Just don't install one. I also found that it did not really matter a whole lot if I used other OpAmps. I would stick to those that have a FET input, but otherwise you can try different ones. I used sockets for all the OpAmps, so I could play with various versions. Better is to solder U8 and U7 directly.


Thermal Protection



I changed the red LED to a higher intensity blue one, to better show the thermal cut-out event.

I used one of the many LM741 OpAmps I still have in my stash dating back to the 1970's. This is one of the few OpAmps that can be used as a comparator without introducing unwanted side-effects. If you want to know more about this, use Google, otherwise, use a real comparator instead.


Turn Off Protection



All the parts, except for those in the transformer box, and in the "On Output Terminals" and "On Heatsink" are on the main PCB. I finished a layout, using through-hole technology parts and SMD. All the resistors and capacitors, as well as the 1N4148 diodes are SMD, the rest is THT, simply because I have a lot of them. Plus, it makes it easier to replace them when needed. The Opamps are DIL versions and are socketed, also for easy replacement.

Here are some pictures:

This is the T2 transformer box.




This is my T3 box with the 15-0-15VAC 3.3A transformer.



Some of you will remember that in the early PC days, we had parallel interfaces to connect PC's to printers. As there was only one parallel printer interface, you could use a switch box to connect several printers to one PC. This enclosure is from such a box, all there was in it was one PCB with a rotary switch to connect two printers to one PC.


This is the main controller section with the bias supply, the volt and current controllers and the thermal switch.
I used good quality sockets to be able to select and switch the compensation networks.



This is the auxiliary supply with the 5V reference section.




Here is the 4.096V reference part, still on a bread board, which is how I typically start out and them transfer the circuit to a soldered protoboard.





This is the section that watches the raw auxiliary supply (the 13V tap) and connects to the bias totem pole to
quickly turn the output off and prevent glitches.







And here is the whole mess on my desk connected together. In the forefront is the Volt/Amp panel meter.




In Part 4 I'll show the final Power Supply and some measurements.
http://www.paulvdiyblogs.net/2017/08/my-new-power-supply-project-part-4.html

If you like what you see, please support me by buying me a coffee: https://www.buymeacoffee.com/M9ouLVXBdw

Saturday, July 15, 2017

My New Power Supply Design Project Part 2

I actually built prototypes of the earliest design and started to learn more about the functionality, and try to find the limits. I'll go in much more details later, but for now let's go through the characterization of the complete control segments and see how stable this design rally is, by using the simulator. In the process, we will also figure out what frequency optimization we can use to make the supply stable and still have the optimum switching speed, which is the usual trade-off.

Because we are dealing with two circuits, the Voltage control and the current control, I have actually split the stability characterization in two parts.

Volt Control Stability Analysis and Tuning.

Here is the LTsim circuit of the Voltage control section:

I also use this for the Step Response measurements, so some artifacts are already in this schematic.  I won't go into many details because I may mislead you, but in order to do the stability analysis, you need to measure the Open Loop Gain. This is accomplished by "breaking" the Voltage feedback loop and inserting a small sweeped AC signal (V5 with 1V AC, 0 phase shift). 

In order to let LTsim establish the DC settings, we'll apply a huge inductor and a huge capacitor to block any AC from disturbing the Open Loop measurement. Because we want to do an AC analysis and get a Bode plot of the responses, we instruct LTsim to do an AC sweep with 10 decade steps from 10Hz to 100MHz. (.ac dec 10 10 100meg) as you can see below V1. (The .trans instruction below it is turned into a comment and does not play a role here.) I have isolated the Current Control section by breaking the connection between the LED and the bias circuit.
With a load of 10 Ohm at the output terminal we draw the maximum load (3A).

After I played with the frequency compensation networks (C7 R6) and a potential network across R8, this is the resulting Bode plot.


There are a number of key parameters to obtain from this plot.
1. The cross-over frequency (fx) where the Gain curve (straight line with scale on the left) is crossing the 0dB or Gain=1 line. In this case the frequency is almost 10KHz. This is a function of the speed of the system.
2. The Phase Margin. The phase curve is the dotted line with the scale on the right. This is a measure of the stability of the system. The Phase Margin (PM) should be >45 degrees at fx. In this case it is about 60 degrees, which is OK.
3. The Gain Margin (GM). The GM is another measure of the stability of the system. When the Phase is crossing -180 degrees, the system will oscillate. There should be enough margin in the Gain to prevent that. The GM at fx is about 50dB. The GM at -180 degrees is minimal, but the Gain is already attenuated with 100dB, and the Phase is crossing the -180 degree point at 50Mhz. I don't think this causes any harm.
4. The slope of the Gain at fx should be -20dB/decade, and that's exactly what is is.

I think that this is good enough to try in real life.

Current Control Stability Analysis and Tuning.

Here is the LTsim diagram for the Current Control section that I used.

I disconnected the Voltage Control section by removing the connection between the LED and the bias. In order to make the current section do something to drive the pass transistor, I used a separate Voltage source (V5), and set that to 0.1V, enough to drive the Current Limiting with 10 Ohm at the output. The Open Loop Gain is obtained by breaking the feed back loop with the same trick as I used for the Volt section.

Here is the resulting Bode plot.


Let's look at the 4 key criteria again:
1. fx at just over 400KHz, which is pretty fast. One of the reasons is that there is no large capacitance in this loop, because the output cap C6, is out of this loop.
2. PM at fx is about 65 degrees (-220 + -155), which is OK
3. GM at fx is about -40dB, which is OK
4. Slope of Gain at fx is about 34dB, also good.

Step Response Verification for the CV to CC/CL Mode Changes


This is the combined circuit of the two above. 



The difference is with the LTsim analysis instructions, because now we want to see the system in action. Three LTsim settings are needed. We tell the simulation to run a transient measurement by making the .trans instruction active again. We tell the simulator to run for 55mSec.

Because we want to see the Voltage turn on and off, we instruct V1, the volt setting input to start at 0V, after 5mS switch to 2.5V (which is 15V at the output), and leave it there for 40mSec. Both ramps are with 10uSec edges.
Because we want to see the Current limited in action, we set the current setting input V7 to initially start at 1V (no CL), after 15mSec, switch to 0.5V and leave it there for 10mSec. both edges are 1uSec.
Here is the result:




At 5mSec, the output goes to 15V, at 15mSec, the CL kicks in. At 15V, a 10 Ohm resistor will result in 1.5A and with the CL set at 0.5V this will result in a maximum current of 226mA, causing the voltage to drop to 2V. The edges are very clean, no ringing, no overshoot. The round corner of the leading edge of the CL is die to the fact that the output capacitor is de-charging, causing a slight delay in the CL limiter. This is the major reason I like to keep this capacitor as small as possible, and I even put a small resistor in series. Real testing will reveal of this is acceptable or not.

Here is a trace of the current going through the load resistor:


The output current starts out with 0A, then switches to 1.5A. When the CL kicks-in the output goes to 226mA, after which it goes back to 1.5A, to become 0A again towards the end.


Thermal Protection & Management
Because I use rather small enclosures, the size of the heat sinks where the pass transistor(s) are mounted on are limited in size. The worse that can happen is when the series pass transistor develops a C-E short, which will surely destroy the DUT, and may even destroy the power supply itself.

For this power supply, I wanted to have two thermal protections. One that would react as fast as possible to the die temperature of the pass transistor(s). Another circuit would be to drive a fan to cool the heat sink, but I only want the fan on when it is needed, to cut down on the noise level. (I cannot stand loud fans!)

Let's cover the thermal protection of the pass transistor first. The easiest method I have found is to mount an NTC directly on top of the transistor. I have found an NTC that is mounted on a lug that can be inserted under the screw that mounts the TIP142 to the heatsink. I have found that the fastening screw itself gets warm very quickly, and since the NTC is also on top of the plastic package of the transistor, there is little mass involved, so the NTC will react pretty quickly.

I use a simple comparator circuit to set the trip temperature of the NTC.


Normally, the 10K NTC is part of a voltage divider, here with R1 and R2. I simulate the voltage level of this divider with V3. When the voltage is representing the right trip temperature, the Opamp switches state and sucks the bias current away from the pass transistor, turning it off. R5 is used to create a hysteresis so this switching state will not oscillate. You want to be able to turn the supply off, because it will otherwise turn on after the temperature has lowered. Sometimes that's OK, like if you are charging a cell.


Here is the resulting trace.  The green trace depics the voltage of the divider with the NTC, and this will turn on the Opamp, taking the bias current away. After the temperature has move up a bit higher than the trip temperature, the supply is turned on again.


Output Load
To add stability to the overall control loops, it is customary to add a little load to the output, so everything is under control when there is nothing connected to the output. You could simply use a resistor, and I have been using a 3K3 resistor so far, which generates about a 10mA current, at 30V. However, knowing Ohm's law, that load is dropping to about 1mA below 10V, so no longer really a load...

In many supplies, a constant current load is created by an LM317, or a J-FET. Unfortunately, these solutions only work well above a few Volts. I came across a simple and very effective circuit, unfortunately, I did not record where I found it. Apologies to the creator, because this is a very nifty circuit and starts working above about 0.6V already.

Here is the circuit as I tested it in LTspice: 
(actually I verified it again after I blew up the transistor on the PCB while I was ramping up the output voltage the first time.)


Four components is all it takes to create a constant current of 10-12mA, regardless of the output voltage.

Here is the simulation:


The red trace is the power supply output voltage that is going from 0 to -30V and back. The green trace is the current through R2, the 56Ohm resistor. The current flows when there is more than 0.6V, or thereabouts, on the output.

There is more to this circuit though... I initially build a prototype with normal THT components on a breadboard. I used a 2N3904 transistor (my favorite workhorse) and a BS170 MOSFET. I picked this MOSFET because I use that a lot and it was the first one I saw in my box. I tried it and was amazed how well it worked. Initially, I was going to use a single J-Fet, but I didn't have one that was capable of handling the 30V output voltage. I tried a few alternatives, but this is by far the best solution.

When I populated my PCB, I selected two SMD parts. A BC847B transistor and a 2SK3018 MOSFET. When I first tested the supply and started to ramp up the output, the transistor turned into a torch. It turned out that the 2SK3018 was not up to the task, because the VDS rating was too low. I sloppily selected this part, instead of a 2N7002 that I also had in my box. Because I did not take the trouble to simulate this with the actually selected components, I overlooked this fact. So to understand what was going on, I added the2SK3018 and the 2N7002 MOSFET 's to the LTsim library and did it again. Sure enough, the 2SK3018 caused the fail. After replacing both parts, everything worked as expected. Lesson learned!


Fan Controller
I also use a fan controller circuit, to turn the fan on and off, and the chip I use will control the speed of the fan based on the temperature. The NTC needed for this circuit is mounted directly on the heat sink with a bolt.

The chip I use to control the fan is the TC648B that I also used in other projects. Have a look at my other post for more information.


I'll continue in Part 3
http://www.paulvdiyblogs.net/2017/07/my-new-power-supply-design-project-part.html

If you like what you see, please support me by buying me a coffee: https://www.buymeacoffee.com/M9ouLVXBdw



Friday, July 14, 2017

My New Power Supply Design Project Part 1



Although I have been using my 0-30V 0-1 or 3Amp power supplies for quite some time now, I have never been really happy with them. They are described in other posts on my forum.

The major design constaint, in my opinion, has to do with the poor scaling of the circuit. It is not possible to go much above 30Volt at the output, because the raw input voltage will become too large for the maximum supply voltage of the used Opamps. Also, the current shunt is too big, causing a significant voltage drop in the ground circuit at higher loads. Also not very good. 
As I have shown in my forum post while trying to improve this design, a significant weakness of the design is that (deadly) transients can appear on the output when the main power is switched on and off. You need to go through some significant modifications to avoid this. Lastly, the reference voltage that is used for the voltage and current setting is simple, but not very quiet nor stable. This principle design is very popular and easy to build but dates back many years. It was designed with the 2N3055 as the pass transistor, which is notoriously slow. Lastly, it is not easy to modify this design to use digital controls, ie control the volt and current settings with a DAC.


I always wanted to build a supply myself, so after a lot of reading forum posts of designs, studying other designs DIY and commercial and several handbooks, I started to piece together what I wanted. BTW, an excellent reference is the "DC Power Supply Handbook" or Application Note 90B from Hewlett-Packard/Agilent Technologies. There are 3 versions of that App Note as far as I know. Google for it and you shall find. Figure 3 on page 19 of the B version shows the basic block diagram of the supply I want to build.

DISCLAIMER
I'm not a professional engineer, I'm a hobbyist. I do have an electronic education, but that formally ended in 1972. After I retired a number of years ago, I picked-up my old hobby and I have been learning ever since. I try to document what I'm doing for people that know as much as I do, or even less, that are trying to learn as well, so I try to keep it simple. I'm using simplistic terms and they may not always be totally correct and I won't go in the theory, nor will I explain everything I did. Please keep that in mind.

BTW, I did not design this Power Supply from scratch myself. It is a combination of various pieces I found over the last couple of years, and they are the result of much more qualified people. I only made some changes here and there or adjusted or modified something to suit my needs.

Design Goals
Before we dive in, I had set aside a couple of goals that I wanted this new supply to have, basically making a much improved version of the ones I already have (all described in other posts on this blog)
The first one was to eventually drive this supply with a micro controller. This would allow me to precisely set the voltage and current levels, but also combine the power supply with a new programmable DC Load and create a feed-back system for elaborate tests. 

This requirement puts some constraints on the way the Voltage and Current are to be set. I also wanted to use a much better reference voltage, to make the supply as quiet as I could, without going to extremes. I can't really measure that anyway. 

Yet another one was to make the analog and later digital controlling hardware as detached as possible from the power section. This allows me to use the same design with very different supply specifications. The reason is that I put my transformers in separate enclosures. Power transformers are expensive and bulky, and my bench space is precious and limited. The other power supplies I have follow the same principle. It allows me to switch raw supplies or upgrade transformers without rebuilding the complete power supply. The new basic controller architecture will allow me to go up to 100Volts or more if I want to, and 3, 5 or 10 Amps if needed.

The Basic Concept
To get started, let me explain the basic principle by using a simulator. I use LTspice.
Here is the basic concept:


The pass transistor, a TIP142 NPN Darlington transistor, is biased with a stable 10mA current. With this current applied, the transistor will be fully open, so the output voltage is the input voltage minus the drop of about 0.6V The bias is accomplished with V1 and I1. R3, the base resistor is needed to avoid oscillations, and needs to be as close as possible to the TIP142 transistor Base pin. The pass transistor is going to manage a raw power supply, V2, which is currently set to 10V.

The "Trick"
The "trick" to drive the TIP142 on and off is to actually "suck" the bias current away from the base. In this simulation example, that is accomplished by another voltage source, V3. Because we want a visual indication later on if the supply is in the Constant Voltage (CV) or Constant Current (CC) mode, we use an LED in series with a small current limiting resistor, R5. The voltage source V3 is simulating the Voltage setting circuit. In this case, we let the voltage step from 0V to -4V with a slow rise and fall time. Because the negative going voltage will source a current through the LED and R5, it will take something of the available constant current (10mA) away from the pass transistor, making it less conductive and hence limiting the output voltage.

The Floating auxiliary supplies
Note that for this circuit, all the controlling voltages are referenced to Vout+, which is tied to the ground level of the overall circuit. On the outside BNC connectors, this does not matter, because the negative output (Vout-) is the "ground" level to the outside world. So the negative output voltage, which will be the "zero" reference, is floating downwards. This construction is key to these kind of supplies and you really need to be able to wrap your mind around this before you can continue to follow and understand this architecture. If not clear, read the H-P app note I mentioned earlier.

So in essence, the auxiliary supplies for the controlling logic are floating on top (+5V) or below (-5V) the Vout+ supply, and this is accomplished by tying the ground of the auxiliary supplies to the Vout+ pole. Now you can probably already see why the raw supply can be 100V, because it does not matter for the controlling logic. It floats on whatever level of the raw voltage we select to use.

In any case, here is the result of the simulation:


The red trace is the result of V(set), the voltage source V3. The green trace is the output voltage, measured at the negative side of the output (Vout-) At about -2.7V of V3, the conductivity of the pass transistor is closing rapidly, and about 0.6V further down, the transistor is "closed", there is no output anymore. When Vset starts to rise again, the same happens in reverse. Look at this graph and the circuit until you really grasp what is going on.

Controlling the Constant Voltage Setting
The next step to control the above turn on/off process better is by using an Opamp that is more capable to open and close the transistor. By selecting an inverting Opamp, we get a positive going voltage setting resulting in a rising output voltage.  When we apply the resulting output (Vout-) to the Opamp, we give the Opamp the feedback to get a closed loop system. I specifically selected the TL071IP Opamp, because it is available in a DIP and SOIC version, dual and single Opamps per package, has J-Fet inputs and is generally speaking a very good Opamp. There many others to choose from, in most cases you will not really see any benefits or changes.

Here is the LTsim schematic:


A few things to note. I have raised to raw supply to 35V. This gives the series pass transistor some headroom for a 30V supply output. The Power Supply itself is really a high gain amplifier. It needs a capacitor (C1) on the output for several reasons. This capacitor should be as small as possible. The inverting Opamp has a small capacitor (C2) in the feedback to limit oscillation, and this turns it into an integrator as well. This capacitor could also be applied across the feedback resistor R4, or in a combination. We'll get to that later. The feedback resistor R4 has a value that limits the output of the supply to 30V. The combination of the voltage setting and the feedback is "summed" at the inverting input of the Opamp.

This is the result of the simulation:


The green trace is the result of the Voltage setting source V3, which is now going from 0 to +5V. This results in an output voltage (red trace) rising with the input voltage smoothly to the maximum output of 30V, and back again.
If we were to use a potmeter connected between ground and +5V, instead of V3, we could set the output precisely in the range from 0 to +30V, which is what we want.

Note that the voltage we feed into the summing input of the Opamp to set the output voltage, has a direct relationship (5V in = 30V out or 1:6), so every change due to noise or instability of the input voltage will have a direct influence on the output. From now on I will refer to this voltage as the Reference Voltage.

The reason I selected +/- 5V for the auxiliary supply is to accommodate a DAC and ADC later on.

Note that the only component that needs to change if you use a different raw voltage, is the feedback resistor R4.
This is an important step if you want to make a supply scale-able and universal.

Adding the Current Limiter
The next logical step will be to add a way to control the amount of current the supply can deliver to the output. The easiest method is to include a small (shunt) resistor in the output connection, and measure the voltage across it. When the voltage level across the shunt has reached a certain value, we want to limit a further rise.

Here is the LTsim circuit with the current limiter added:


The second Opamp measures the voltage across the current shunt resistor through R9, and compares that with the current limiter voltage reference V5. The current shunt should be as small as possible to avoid adding an influence and to limit the heat developed into it with high currents.
The principle is the same as with the voltage setting. When there is too much current, the second Opamp will start to suck the bias current away from the series transistor, and that will lower the conductivity, resulting in a lower output.

Because the voltage drop over the shunt is very low with only a 10mA load (the 3K3 resistor), I used some formulas in LTsim to lower the voltage setting and the voltage output, so you can see the relationship.

The purple trace is the voltage setting. It still goes from 0-5V, but the trace level is divided by 100 as you can see in the label. The green trace is the current level voltage, going from 10mV towards ground. The power supply output is the red trace, divided by 600 to show the relationship. You can see that the output is going back in step with the current setting voltage all the way to 0V when the current limiter is active. 

I already mentioned that the Reference Voltage is critical, and especially with the Current Limiter, which deals with milliVolts, this is even more critical. Another stability factor is the bias current level. When this fluctuates, the output cal fluctuate with it. Let's look at a simple circuit that will be an adequate constant current source.


The Bias Current Circuit

Here is the really simple circuit that will provide the bias current for the pass transistor.


A single transistor, two resistors and an LED is all that is needed. The LED is a red (3mm) version. The color can also be green, but stick to these two because of the voltage drop. With an emitter resistor (R1) of 220Ohm and a bias resistor (R2) of 5K6, you get a steady 8mA constant current at the collector. The type of transistor is not really important, I use a run of the mill 2N3906.

One important aspect of a power supply is the ability to switch it on and off with the main switch. You should never really do that, but as a minimum, there should be a form of protection, such that the supply does not harm your Device Under Test (DUT). Typically, when a supply is started up, the voltages for the various parts need to settle before regulation is stable. With this circuit, we can add a capacitor across the LED to delay the bias current for a few 100 milliseconds, so the other circuits have time to stabilize before the TIP142 gets turned on. I selected an electrolyte capacitor of 200uF. This will delay the turn on by approx. 1 second.

We will discuss the turn off protection later.



Main Power Off Protection
Just in case you switch off the Power Supply through the mains switch, or when there is a mains problem, you don't want the Power Supply to damage or destroy your DUT. You may have some expensive parts that your working with.

The turning off is a delicate and unstable process, due to the dwindling supplies. They may all act differently due to the load that the supply is feeding, and the capacitance reservoirs in the internal supply circuits. I have seen outputs of power supplies that shot op to several times the set output voltage, surely destroying delicate parts.

This supply was behaving rather well, but if you try long and hard enough, there will be situations where there is a large spike on the output. The following circuit makes sure that as soon as the main supply is decaying, the pass transistor is switched off, regardless of the state of the controlling logic. I spent quite some time finding and improving that circuit, and eventually settled on this:


I will show later that I use a small 9-0-9VAC transformer  to create the +/- 5V auxiliary supply voltages. The AC voltage is rectified and fed to 5V regulators. These typically have a 2V drop out, so they will certainly  regulate when the input voltage is above 7V. The rectified and buffered raw voltage is about 13V. This is simulated by V2, which is the input to the turn-off protection circuit.

The base of Q1 gets turned on when the voltage is that of the Zener diode (10V) plus the 0.6-0.8V of the Q1 junction, or at 10.8V. That turn off is amplified by Q2, which acts like a Schmitt-Trigger and further amplified by Q3. Q3 will turn on and start to sink the current from the bias circuit, turning the pass transistor fully off.


Here is the result. The green trace is the raw 13V supply. If that falls below 10.8V, the auxiliary supplies are still fully functioning, but Q1, Q2 and Q3 immediately sink the bias current away from the TIP142 to 0mA (the red trace) and so turn off the output.

I will continue in Part 2
http://www.paulvdiyblogs.net/2017/07/my-new-power-supply-design-part-2.html


If you like what you see, please support me by buying me a coffee: https://www.buymeacoffee.com/M9ouLVXBdw