Anything wrong with this linear PSU design? (now selecting parts) - Page 1
Forum section: electronics / projects

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 06:33:55 am
content: I have for the longest time been working on making a nice power supply design capable of operating down to almost 0V on a single rail, capable of 3A for sure (and hopefully 5A) using 99% my own design. Just to put everything I do know about electronics to the test. I didn't crunch numbers, most of the values were guesses or very basic calculations, and messing with some values in LTspice to get a really nice stable output. I'd like more insight on how to measure the performance of the circuit please!If I choose to use a better rail to rail op amp, and had a current source that could work down to 0V, then I would be able to acheive a perfect 0V output with a single rail supply!If you guys think this design is sound, i'll take the time to whip up a PCB layout and order it. I purposely used a 0 to 5V pot for the voltage set so that I can use a DAC and arduino to set the voltage, and to set the current, I just need some way to convert an absolute voltage from a DAC into a current. (as close to an ideal voltage driven current sink as possible) or possibly a current DAC. I'd like 10mV resolution with an output, so at least 11 bit resolution required for 0-15V. This is a whole'nother question in it of itself.NOTE: I uploaded a both a PDF and a .ASC (basically just txt) of my circuit, but they are slightly different versions, the spice model has more ideal components in it (to set voltage and current) and utilizes 2 complementary pairs and 2 resistors which perform both load sharing and current sense.

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 06:38:30 am
content: Here is a picture of the PSU design, since neither file uploaded in the original post conveniently show a picture.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 01, 2017, 12:31:46 pm
content: With single transistors the current mirror (Q3,Q4) might need some emitter resistors. There a dual transistors available that can get away without them.The Sizlaki pair output stage usually does not like to be driven from a high impedance source. So one might need something like an RC snubber at the base of Q2, or another emitter follower. There is also a chance to have it oscillating at rather high frequencies. So one might need a resistor at the emitter of Q2 to reduce the local loop gain. Also include something like parasitic inductance of the shunt - this might promote oscillation.The LM358 is a rather slow OP and thus current limiting will respond slow - this could be a problem at a sudden short. An extra faster transistor based current limit might be needed in addition. There is currently no extra frequency compensation, it might just work with the model of the slow LM358, but usually one want's to have adjustment options. There is quite a large tolerance range for the frequency response of the LM358, especially as there are many manufacturers.Having the current limiting OP supplied from the fixed supply also puts some demand on the OP (e.g. high slew rate, PSRR). Simple models might not includes all possible side effects.The current source around U1 does not work all the way down to 0 V - so current limiting will not work properly at low output voltage.One might not need the current sources around Q6 and Q7.To test the performance in a simulation (e.g. LTspice) one can use a current source as a load at the output. AC simulation (with the current sink as AC source) gives the output impedance. Transient simulations (e.g. current jumping from 10 mA to 1 A and back) shows transient response.For a real life circuit (e.g. on a bread-board) one could look at the transient response with switching an additional load resistor on and off. A full stability test for any load is difficult, but the simulations should show the more critical load cases.

author: Yansi
author_rank: Super Contributor
timestamp: January 01, 2017, 05:02:00 pm
content: I'd say that the design is rather crazy, as it uses a ton of auxiliary power supply voltages: +18V +9V +5V and some unknown -V and a ton of other auxiliary circuitry.I also think the high side current sensing is not of the best options available.Let me draw you something a bit different.Most importantly - lacking any kind of protection. (negative output voltage, external voltage source - connecting for example a battery to this supply when it is powered of will certainly blow the ass out of Q1 BE junction and/or connecting any external voltage to it higher than the voltage set on this supply will definitely blow the ass out of Q2 and the opamp)

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 05:06:40 pm
content: Quote from: Kleinstein on January 01, 2017, 12:31:46 pmI figured they did make those, I'd like to try to stick with "jellybean" parts, and I have already noticed in the real world (with thermal considerations) how important those are due to annoying positive temp-co of BJTs when sinking/sourcing more than a mA or so.Quote from: Kleinstein on January 01, 2017, 12:31:46 pmLuckily I found this not to be a problem, but it is being driven almost directly from the op amps. The diodes essentially perform a MIN() function, so the op amp with the lowest output will "win" and take control of the feedback loop. Engenius I knowQuote from: Kleinstein on January 01, 2017, 12:31:46 pmI have been considering finding another better op amp. I know it's slow, it's the only op amp I have on hand (other than handfuls of LM324's) that have inputs that work down to ground. And with 10uF of output capacitance, the supply seems very stable both in simulation and in practice. Less than 3uF and you start to get some really long ringing and oscillation, and I have not found any combination of feedforward, lead lag, or even Dominant-pole compensation (mind you, I barely understand these terms, mainly I was just sticking random capacitors at random points to see if I could get a stable output. I couldn't.)Do you know of any faster (cheap) op amps that operate down to the -Vcc rail (or preferably rail to rail entirely) that can withstand 25V? I asked this on Instructables but did not get much of a response.Quote from: Kleinstein on January 01, 2017, 12:31:46 pmQuote from: Kleinstein on January 01, 2017, 12:31:46 pmThese current sinks were originally in place when I used the LM324, which while it could source some considerable current, it can only sink a few tens of microamps!!!Might as well be an open-emitter output! So my idea is that the current sinks will aid the chosen op amp in sinking more current, same way current sinks / sources are used for class A amplifiers. Also it might help with crossover distortion, if that's important for some reason. Although technically unnecessary with the LM358 due to its capability to sink 5mA or so, I would like to use 10mA or more from the source biasing the Szlaki pairs to ensure they are well-driven. In practice I found my LM358 is capable of sinking over 5mA, but the output does not get quite as low as I would hope (about 1V above Vee or in my breadboard circuit, 1V above ground.) Hopefully a better (not low power) op amp will entirely eliminate the need for this.Quote from: Kleinstein on January 01, 2017, 12:31:46 pmCool!I actually did already perform a transient test almost exactly as you specified, as well as in real life with a 555 timer and a small 4V christmas lamp (which draws like 250mA and considerably more when cold) and I did get some response figures. However I have no idea what a "good" transient response is. I might test a 7808 regulator in the same way and compare the responses.

author: Yansi
author_rank: Super Contributor
timestamp: January 01, 2017, 05:20:46 pm
content: Seems you ignore me, but..QuoteCertainly not true, you were doing something wrong. It will sink as much as it can source, enough for this application. The LM324 has different problems with its output stage (significant crossover distortion, being one of them).Lamp is not suitable for pulse load. Use resistors as load. The lamp/bulb is nonlinear load with current changing both in time and nonlinearly with voltage."which draws like 250mA and considerably more when cold" - thats exactly why its useless as a test load. You need a nice square current pulses. Build yourself a pulse load, just 555 + suitable NMOS and a bunch of resistors.

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 05:23:26 pm
content: Quote from: Yansi on January 01, 2017, 05:02:00 pmThe voltage rails were just arbitrarily selected, I probably should have explained that nonsense a bitI have not selected a transformer yet so those choices are volatile. Who knows, I may even choose to use a switching preregulator if I can figure out how to make a good one or find a good reg (low noise and ripple). My idea is to use a 9-0-9 transformer capable of 5 amps or more, and maybe wind a few extra turns of wire to get some random slightly more negative voltage for the op amp. Ideally, -V will end up being the same as ground. I want the output to go to 0V without the need of -V.Quote from: Yansi on January 01, 2017, 05:02:00 pmI do want to mirror this circuit for the negative half, so I have a dual rail lab supply (far more useful) but I figure I would first design the top half and see how good I can make it. I would be looking forward for your suggestion!Quote from: Yansi on January 01, 2017, 05:02:00 pmYikes!Thanks for reminding me. I almost forgot to add those reverse protection diodes. I'll go ahead and tack those on. I have killed a whole lot of LM317 and LM78XX regulators by adding a bunch of like 1000uF caps to the output thinking more = better. Took awhile to realize that if power is disconnected and the floating voltage on the input of the regulator was shorted, that the regulator would instantly die! So I should have known better lol

author: Yansi
author_rank: Super Contributor
timestamp: January 01, 2017, 05:37:15 pm
content: I am really interested as what diodes you will put there.Meanwhile, I've drawn you some ideas. But used the negative side current sensing, as I didn't know you need high side sensing specifically.Still, have a look how to protect the supply from any kind of external voltages properly. The 1K base resistor together with the reverse BE diode is mandatory there.//EDIT: Now I will think a bit about your high side current sensing. I don't like the idea of placing the R2 pot like you have, as if it fails, the output current won't be limited - I like a fail safe designs, regarding potentiometers.

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 05:53:41 pm
content: Quote from: Yansi on January 01, 2017, 05:20:46 pmNot at all ignoring you! I think I quoted your entire last response with my last response.Don't believe me, go take a look at the datasheet yourself! I was in just as much disbelief as you originally. Literally jaw dropped!Could it be possible I am looking at the wrong rating?? It's called "output current" IOand is split into 2 sections, Source and Sink. I can't imagine what else it might be referring to.The datasheet specifies the LM324 being capable ofsourcinga minimum figure of 20mA max with a typical figure of 40mA max, butsinkingas little as 12 microamps (50uA typ)!!! Pathetic!The LM358 is better in this regard, but even it can only sink half the current it can source. It's singing capability is rated at 5mA over the full temperature range, with a typical optimistic figure of 20mA at 25oC I was able to sink 1mA with my LM324's, but that is well outside of it's limit and explains why my real circuit had trouble when I tried to set the current source higher than a few mA's especially when trying to get near 0V output.My original design used LM324's, and without those current sinks, I could set the current source so I either had a supply that could provide a stable output voltage down to zero volts but with very little (less than 1A) current capability OR I had a supply which could deliver as much as 3A (maybe more if I had a power supply that could power it better) but incapable of outputting less than 4V! Or something like that, I don't remember anymore. This was mostly fixed by adding those current sources.I could also replace the schottky diodes with PNP emitter followers but these don't work down below 0.6V above the 1(ish)V minimum output of the op amp, leading to about 1(ish)V minimum output. Then again neither to these current sources so I guess the point is kinda moot, so oh well. Whatever!I don't suspect they are hurting anything having them there. Do you? If so please to tell me if there is a reason to remove them. As I might not even bother populating them after ordering a PCB.http://www.ti.com/lit/ds/symlink/lm2902-n.pdf]http://www.ti.com/lit/ds/symlink/lm2902-n.pdf]http://www.ti.com/lit/ds/symlink/lm2902-n.pdfhttp://www.ti.com/lit/ds/symlink/lm358.pdf]http://www.ti.com/lit/ds/symlink/lm358.pdf]http://www.ti.com/lit/ds/symlink/lm358.pdfQuote from: Yansi on January 01, 2017, 05:20:46 pmI also used 4 82 ohm resistor to make a 1W 82 ohm resistor as a pulse load when I had the supply set to 15V output. Even used a 2W 5 ohm resistor to draw a "clean" 3A (compared to a large drill motor) and yes, I know I was WAY over pushing it at 15V, don't bother telling me!I pulsed it (plugging it in and out) for less than a second at a time and it heated up nicely too!

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 06:06:37 pm
content: Quote from: Yansi on January 01, 2017, 05:37:15 pmGood point. I also don't like that if one of the op amp fails, then the current source will pull the output high naturally. Imagine something happens and the op amp burns up, then the full 15-20 volts get pushed into a $$$ mobo!Which I guess I could argue is the reason for the current sinks as well, although that would require the sinks to sink more current than the source.

author: Yansi
author_rank: Super Contributor
timestamp: January 01, 2017, 06:09:59 pm
content: You say to set the output voltage and current from a DAC? Well, probably you would like also to measure the current via an ADC. That would require a completely different approach to what you have currently.You will need to sense the current from the high and low rails, convert it down to a voltage against the ground - most probably using an instrumentation amp. (AD620 seems to go cheap on Aliexpress, by the way)I'd suggest to use completely different circuit topology, as this one does not give much chances with the current sense/set problem by a DAC/ADC respectively.QuoteNo, I do not believe you, so shouldn't you believe the Texas Instruments datasheets. Those fucks shall clean their mess up, as the sink current is not uA, but 10 to 20mA. The uA is for the second row of values. Check with datasheets from different manufacturers.The key here is the note about Vo voltage: 1V --> up to 20mA sink, 10mA typical. BUT, at Vo 200mV, the sink current will be tens uA. Vo is the output voltage against the V- supply pin and yes, the values does make sense a lot, if someone didn't mess the units up.QuoteYou shall design the circuit in such way, the opamp cannot burn by improper handling of the power supply. If you assume the opamp goes bad by itself, you can then expect even the output transistor to burn - in both cases, nothing you can do with it. However, the potentiometer fail can be caught up in the design.You can also design in another opamp/comparator to sense the output voltage independently and compare against the setpoint: If it differ too much for a given time, you can for example trigger an SCR to short the supply input leads and blow a fuse.

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 06:53:17 pm
content: QuoteMy very original design used a craptacular differential amplifier (4 resistors and an op amp) converting high side voltage differential from the shunt into a voltage referenced to ground, which was trivial to feed into a error amp (comparator) which would have also trivial to feed into an ADC. But the loop was too big, too many components in the loop (crappy differential amp, an error amp, a few diodes and transistors, output pass transistor..) and the design was not stable at all. A instrumentation amp might be better suited but I still don't want too many active components with additional propagation delays decreasing phase margin.That's what led to this design, in search for a simpler / less naive solution. To implement a ADC to measure current, I would probably just implement a special purpose current measuring chip across the same shunt and feed that to a cheap I2C ADC. This design is mostly a first attempt, and I will make modifications down the road to turn it into an arduino controlled dual rail supply. But I just want something that works right now, and is simple to power.QuoteAhh, that does make a lot more sense. Basically the less current I sink, the lower the output voltage of the op amp can become, down to as little as 100mV with essentially no current draw. This holds true with my experimentation especially regarding the LM358. Output goes down to essentially the negative rail but as soon as I connect any load from Vcc then the minimum output becomes like 0.6 to 1V. I end up with a tradeoff between the maximum output current of my power supply design and the minimum reachable voltage with a single-ended input. The ON-semi datasheet holds up with your claims, but the parts I have I believe are TI parts.Is there any way I can acheive this 100mV or 200mV output voltage from the op amp while sinking 10mA??? If so that'd be wonderful!

author: Kleinstein
author_rank: Super Contributor
timestamp: January 01, 2017, 07:59:59 pm
content: The LM324 is the quad version of the LM358. So the OPs properties are essentially the same, within the usual variations between samples and sources.A slightly better OP could be OPAx170 and OPAx171. For the sinking they give 1 mA at 70 mV. So 5 mA at 200 mV might work. For a mains powered supply you should not need to be so scary about an extra 600 mV of drop out.Unless you have really special needs (e.g. 4 quadrant operation), I would build a dual supply as two fully separate supplies, that can optionally be connected in series. This is how most (if not all) of the commercial dual supplies work. It makes things much easier and also more flexible and easier to develop and test.For a digital controlled supply, I would prefer the type of circuit HP was/is using: with a floating supply for the regulator, with an extra transformer tap or transformer. Here you have the signals for current and voltage control together and the auxiliary supply can also power the µc / display part.One problem with the circuit Yansi had drawn and to a slightly lesser part in the circuit from the beginning is, that current limiting is slow, as it needs the OP slew down all the way to the new voltage (which would be near GND in case of a short). This transition from CV mode to CC mode is one thing one should simulate too.

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 09:23:43 pm
content: Quote from: Kleinstein on January 01, 2017, 07:59:59 pmEhh, I was afraid someone would say that. I knew they were very simalar but not the same, I thought the 356 was supposed to be better/newer.Quote from: Kleinstein on January 01, 2017, 07:59:59 pmI guess you're right. I might as well move my current shunt to the low side, although I don't like it that way for some reason. It bothers me that the negative of the power supply is not the same as the output negitive, IDK why. Guess I'm OCD like that!Those op amps look perfect, but what is the slew rate of them? 0.4V/uS? (guesstimating from the graphs) Does not seem much faster than the LM356 at 0.5V/uS.Quote from: Kleinstein on January 01, 2017, 07:59:59 pmThe same problem exists with my current design, I did realize that, and I was afraid that might be an issue. Especially with these slow LM358s. To fix that, I just tacked on a little BJT with the collector to the output, emitter to the inverting input of the current amplifier, and a few diodes in series with the base, connected to the output of the current error amp. This ensures the voltage on the output of this error amp is clamped (via creating a secondary feedback loop) to a few Vd's above the voltage output. This way the op amp does not need to slew very far to take over. Hopefully leakage current through the BJTs will not cause too big an error on the voltage output.I posted a picture of this new circuit below. I will gladly repost the full .ASC file if you would like to analyze it further!

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 01, 2017, 09:55:08 pm
content: if you are interested, here is a circuit based around HP way of having 2 supplys, one for the supply itself and one for the op amps. it gives good performance and was basically designed by Kleinstein:

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 10:04:33 pm
content: The last schematic I posted (with a small mod to keep the voltage on the current limiting OP not too high) had a wiring mistake, the BJT collector goes to the output, and I replaced the diodes with an LED so it would glow when current-limiting. (although it's brightness depends on how "much" it is CC'ing.)

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 10:07:05 pm
content: Quote from: ZeTeX on January 01, 2017, 09:55:08 pmWOW, that circuit looks super difficult. Can I have the spice circuit model? I want to clean it up a little and try and figure out what it's doing. I the output is "ground" which is strange, I like that the voltage inputs to the op amp effectively track the output, that's smart so it avoids needing medium/high voltage op amps.

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 01, 2017, 10:15:34 pm
content: Quote from: Powermax on January 01, 2017, 10:07:05 pmReplace TL072 with LT1017 or something, its just for the cc or cv led indicators so not important. Replace the pass transistor (2SC5200) with any fast high power npn from ltspice libary.

author: Powermax
author_rank: Regular Contributor
timestamp: January 01, 2017, 10:32:57 pm
content: Looking at it more carefully, it appears that he did a few things the same way I did. Using diodes as a MIN function the same way I did, and (now) using a transistor to ensure the output of the op amp does not go too high when not controlling the feedback loop. There is a lot of compensation components in place, pF capacitors everywhere, something my supply did not require (likely due to a slow op amp)One problem I do have is that the voltage control is not referenced to ground, so controlling it digitally with a DAC would require a another supply referenced to the output if I am not mistaken, and the digital control of it would need to be galvanically isolated from an arduino referenced to ground (whatever that is, I'm not even sure!)SO my question now is how to I figure out what value of compensation components I should use to stabilize the output if it was not stable itself?

author: David Hess
author_rank: Super Contributor
timestamp: January 02, 2017, 04:32:49 am
content: That is a great design and reminiscent of the Tektronix PS501 or PS503.358/324 operational amplifiers do have problems sinking current below 0.6 volts because of their emitter follower output stage. Modern single supply or rail-to-rail output operational amplifiers do better. For instance the LT1013/LT1014 are improved replacements for the 358/324 and can sink current all the way to ground. The Tektronix PS501 and PS503 solved this problem by using a low voltage negative bias supply for the operational amplifiers which were just 301As or 741s.I like your solution even if it is not perfect. Using a Darlington output stage with its additional Vbe drop would help.

author: Powermax
author_rank: Regular Contributor
timestamp: January 02, 2017, 03:22:42 pm
content: I changed out the LT1007 / 1037 ( even though it isn't the ideal choice in this design) and got discusting parsitic oscillation, how am I supposed to stop this? How do I go about frequency compansation?

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 02, 2017, 03:47:00 pm
content: Quote from: Powermax on January 02, 2017, 03:22:42 pmIt's a very big topic and the most complicated about designing a PSU.http://www.linear.com/solutions/1831http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-1-general-structure-and-essential-concepts/http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-3-improving-noise-linearity-and-impedance/http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-4-introduction-to-stability/http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-5-gain-margin-and-phase-margin/http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-6-new-and-improved-stability-analysis/http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-7-frequency-dependent-feedback/http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-9-breaking-the-loop/http://www.allaboutcircuits.com/technical-articles/negative-feedback-part-10-stability-in-the-time-domain/

author: Kleinstein
author_rank: Super Contributor
timestamp: January 02, 2017, 04:22:17 pm
content: Adjusting the frequency compensation is one of the more difficult parts. You are very lucky if it works just with using an OP the is just slow enough.The LT1037 in the circuit shown by ZeTeX is not the obvious choice. Depending on the supply it is more like the TLC272 or LT1013 if high precision is wanted. The large number of capacitors for compensation is in part from keeping several optional ones and in optimizing the CV-CC transition very much. The larger number of parts to adjust also allows stability with any possible passive load, not just a simple resistors.Similar the transistor Q3 is not absolutely needed - it still works without it, just with slower CV-CC transition, but still better than with the other single supply circuit from the beginning. This extra transistor is usually not found in similar circuits. Otherwise many of the cheap chinese supply use a similar circuit type (leaving out a few more caps and more like an LM358 class OP). Also transformer tap switching is usually added with 2 relays.The circuit needs a separate supply for the OPs part and this supply would also supply the controlling µC. Due to the separate supply the circuit uses a different concept than the original circuit. The diodes are used to get the min value for the output current, as opposed to the output voltage in the other circuits at the start of this thread.

author: David Hess
author_rank: Super Contributor
timestamp: January 02, 2017, 04:56:09 pm
content: Quote from: Powermax on January 02, 2017, 03:22:42 pmDo not use the LT1037; it is decompensated for use at gains of 5 or greater. While it is possible to externally compensate it for lower loop gain with a series RC network between the inputs, this will result in higher noise than using an LT1007 because you have to raise its noise gain to make it stable and it adds complication.Add type 3 frequency compensation to each operational amplifier. All of the parts may not be needed but I usually include space in the layout for them. This includes the standard capacitor and series resistor-capacitor networks from the operational amplifier outputs to their inverting inputs and similar lead networks around R2 and R11. R2 should be fixed and the current from the current sink made adjustable.If the output capacitor ESR is too low, then that will make compensation more difficult. At least to start, remove C1 and C4; they will not do any good for decoupling of a remote load anyway. An appropriate value for RF decoupling can be added later although I have never found it to be necessary.U2 is not going to work correctly at low and high output voltages because its common mode input range will be exceeded. The mode can be detected by the current flowing into the outputs of U1.1 and U1.2.

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 02:27:02 am
content: QuoteI won't! I knew it wouldn't be stable but I wanted to see if adding the compensation capacitors that were in Kleinstein's design would work. It didn't.The LT1007 was easier to stabilize but with my current design the LT1007 would require a negative auxiliary, due to common mode input and output limitations.I think I am going to change around my design radically, to move the current shunt to the low side and enable the use of a wider range of op amps. I have a whole bunch of op amps, mostly LM324's, but some really nice LT parts as well. Almost none of them are rail to rail input/output, so I prefer my design to use junk I already have: (bolded ones are ones I may consider using.)LM324; // slow, crossover distortion issues, but I have a bunchLM224; // ditto, but in weird thicc packageLM386; // slow, crossover distortion issuesLM741; // ancient relics of the past, I literally have handfuls of them!UA1458TC // ancient relics of the past, I have a bunch of these!LM318H; // it's in a fancy metal caseTL072CP; // JFET inputs, limited output current and the output can't go below the noninverting input.TL2072AC; // ditto.OP37; // These things aren't even that fast and can't work at unity gain.OP27; // dittoLT1007; low noise, moderatly fastLT1167;LT1191;LT1363; CRAZY fast, 1000V/uS!!! Maybe too fast... Not even going to try to calm it down and stabilize it!LT1360; fast!! 800V/uS!!!LT1112;QuoteThanks!I took a look at the manual for the PS501 and I see what you mean.

author: pitagoras
author_rank: Regular Contributor
timestamp: January 03, 2017, 05:37:45 am
content: Thanks for sharing.I design myself a LAB PSU, took a look to Tek P501 too and a couple of other similar designs.Additionally this Linear AN (http://cds.linear.com/docs/en/application-note/an32f.pdf) is interesting because adds1) Stepping down the input DC so the dissipation at the linear regulator is low2) Strategies for lowering the dropout voltage3) The CC feedback acts on the CV input4) Uses MOSFET for output

author: David Hess
author_rank: Super Contributor
timestamp: January 03, 2017, 07:20:39 am
content: Quote from: Powermax on January 03, 2017, 02:27:02 amUsually the frequency compensation can be brute forced by adding a capacitor from the output to the inverting input but with a decompensated amplifier like the LT1037 or OP37, this will just make the operational amplifier oscillate. Stabilizing one of these below their minimum stable gain is a great learning experience.And of course you cannot add a feedback capacitor between the output and inverting input of a current feedback amplifier either unless you sacrifice a goat, say the magic words, and know the secret circuit. Or maybe it was just that last thing.QuoteThis is a good idea if you have no specific requirement for high side current sensing. It makes things easier but see below about the PS503.There are some old operational amplifiers like the 301A and some JFET input operational amplifiers which have a common mode range which includes their positive supply making them useful for high side current sensing. I always wished that someone had made a 324/358 equivalent for high side single supply applications with an output that goes to the positive rail but nobody ever did.QuotePersonally I do not think there is anything wrong with these for this circuit. Their low slew rate will increase recovery time but in a general purpose bench supply they are still fast enough. If I wanted faster recovery time, then I would add clamping circuits to keep the error amplifiers out of saturation.The 1458 is effectively a dual 741 and depending on who made them, they are identical. The 4136 was often used as a quad 741 but it is a different part with PNP inputs and faster performance.It is difficult to beat the price of the 741 or 1458 if their performance is sufficient.QuoteThe 318 is fast and supports external frequency compensation but has more noise and less precision because of the resistors used for input stage Gm reduction. The 318 was one of the first parts useful in video applications.QuoteThe higher slew rate allowed by the JFET input stage (Gm reduction again) would make recovery time faster. I am not sure what you mean about the output not going below the non-inverting input; are you referring to the phase inversion issue with the TL072 type JFET operational amplifiers when their (negative?) input common mode range is exceeded?QuoteThe OP37 is a decompensated OP27 just like the LT1037 is a decompensated LT1007. I have used the OP27 and LT1007 to great effect for high performance low noise regulators and power supplies but their capabilities are generally wasted on a bench supply.If you want extra precision at a low cost, then use a cheap OP-07 instead or the LT1112s that you have.QuoteYou kids with your fancy complementary process operational amplifiers - get off my lawn!LT1167 - too slow for current sensing.LT1191 - fast VFA and could be useful but not as an error amplifier.LT1363 - fast CFA and could be useful but not as an error amplifier.LT1360 - fast VFA and could be more useful than LT1191 but not as an error amplifier.LT1112 - can be treated as a very high performance replacement for the 1458 or a better dual OP07. This would be a great error amplifier if you want maximum precision with parts that you already have.Watch out for the maximum differential input voltage and current for precision amplifiers including the OP07, LT1007, and LT1112. Unlike 741 and 324 type operational amplifiers, they have a very limited differential input range and require input resistors to protect their inputs from excessive currents.Hmm, does anybody make a wide differential input precision operational amplifier except for the LT1006/LT1013/LT1014 type? I guess it is time to start a search but I bet the part will be too expensive if it exists.QuoteThe PS503 had to use high side current sensing because it can operate as a bipolar tracking supply. These power supplies also support remote programming.I would not copy these designs exactly but the way they handle current control is worth studying.

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 05:42:45 pm
content: OK, I got my new design, moved the current shunt to the low side, and the ground is taken to be the low side output. I am using the same basic technique for current sense, and due to op amp action, the inverting and noninverting inputs are essentially equal, and since the noninverting end is almost directly connected to ground, it becomes trivial to set both the voltage and the current (using a basic much cheaper voltage output 2 channel DAC)! Which is my favorite part of this new design!!!In comparison, the old design would have required a DAC with a current output and be capable of sinking current a few volts below ground for accurate current set.I used LT1007 in this design, and I was able to get the LT1037 stable in it as well, although it required more capacitance between the output and inverting input. I don't like that form of compensation because it is essentially slowing the op amp down, reducing bandwidth. I figure the LT1007 is better suited. Because the LT1007 is a basic single op amp package, and with a negative auxiliary voltage rail, it should be easy to substitute almost any op amp (like the classic UA741 / LM741, something I may indeed try!) and see what the performance of the supply will be.BTW, why hasn't Dave made video #741 yet!?!? Stop slackin' daveMy second favorite part of this design is the implementation of a few transistors, Q5 and Q6, which safely clamp the output of the op amps to Vbe above the "controlling" op amp, by establishing redundant feedback. Of course you can leave Q5 and Q6 and the base resistors out of the circuit but the transition between CV and CC will be slower. For a few extra pennies I think they are well worth it!Schematic Notes:Of course the rounded corners are necessary!We can't have the electrons flying of the edges!D2 will be replaced with a beefy rectifier diode in the PCB layout, I used a 1N5817 in inverse-parallel to the constant current supply to better simulate a real CC source. It's not perfect, as the minimum output voltage is -100mV instead of a few hundred millivolts above ground. I might use the LM334 to replace that. I didn't bother importing the LM334 into this design.The PNP pass transistor will be an MJE2955, possibly a few in parallel (with appropriate current sharing resistors, of course!) depending on how well the thing handles 5A draw.I forgot to include a way to measure CC/CV mode. I might just whack in a comparator to compare the output of each error amp. The schematic is starting to get a bit messy, is there anything I can do to simplify it?

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 06:17:27 pm
content: I have added that comparator into the design, and also cleaned up the naming of the resistors a bit. R1 through 4 help set CC and CV, Rload and Rshunt are fairly obvious, R5 through 7 set the current source, R9 - 10 limit base current for the PNP transistors, R11 and up are for compensation and input protection. I tried to number them based on purpose.The comparator U3 will not be a $$$ LT component, I just don't have libraries installed in LTspice for any other devices This will almost surely be a 741. The output will drive an arduino and/or some LEDs.I have also attached the .ASC text file for this supply below. You can easily download it and modify it freely in xxxSpice.

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 03, 2017, 06:27:37 pm
content: Quote from: Powermax on January 03, 2017, 06:17:27 pmNice, can you upload *.asc file? also did you choose C1 & C13, C5 & R14 by brute force or actually did a proper simulation?

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 06:38:15 pm
content: Yup! I just modified the last post to include the .ASC file. I got the values by guessing, since I don't know how to select the values properly. I tried using the minimum value for C's and maximum value for R's that ensured stability.

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 03, 2017, 06:45:40 pm
content: Quote from: Powermax on January 03, 2017, 06:38:15 pmThanks for including *.asc!I'm afraid guessing the value might still make the power supply unstable, lets hope that it doesn't happen. I also want to build micro-controller controlled mini PSU and your schematics seems to be going good, most likely I will use it with a few modification.also the curves on the schematic are kinda funny, what's the reason? at the end you are going to need to draw the schematic in real schematic +pcb software if you want to etch your own PCB or order one.

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 07:05:42 pm
content: I just did that for shits and giggles!I think it makes the schematic more readable as well.

author: David Hess
author_rank: Super Contributor
timestamp: January 03, 2017, 08:18:21 pm
content: The Tektronix PS501 and PS503 designs use an LED in series with the output of the current error amplifier to indicate when current limiting is in effect. This works well but LEDs are fragile and if the LED fails open, then the current control loop fails to operate. An optocoupler could be used in place of the LED for detecting the operating mode.My solution is similar but I place a PNP emitter follower at the output of each error amplifier and bring the collectors to the negative bias supply. The emitter followers unload the operational amplifier outputs preserving their precision at the cost of another 0.6 volts of voltage drop (the diodes are still needed if the amplifier outputs are not clamped to prevent reverse Vbe breakdown) and the collector currents can either drive voltage and current mode indicator LEDs or the collector currents can be detected to indicate mode. Older designs used p-channel JFETs instead of a PNP transistors.

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 08:33:57 pm
content: Quote from: David Hess on January 03, 2017, 08:18:21 pmI think the problem with that idea is that if current limiting occurs at Vout = 13V or higher, (suppose a 5 ohm resistor at 2.7A current limit? Vout = 13.5V) then the output of the op amp will be pretty high, around 14 or 16V depending on the diode and pass transistor chosen, there may not exist enough voltage to power an LED, it's brightness may become roughly dependant on output voltage. That is why I used an additional comparator (well, a lousy 741, anyway.)

author: VEGETA
author_rank: Super Contributor
timestamp: January 03, 2017, 08:39:10 pm
content: can your supply achieve 1v dropout or less? can it work with mosfets or how to make it better in terms of efficiency?thanks

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 10:00:06 pm
content: QuoteSince I'm that was asking about if the design is even any good, (I have not even breadboard-tested my latest revision yet!) I might not be the best resource to you, but I will try:The efficiency of any (including this) linear regulator is very straightforward, it's just theinput voltage divided by the output voltage. Power dissipated is the difference in the input and output voltage, multiplied by the current going into (or out of) the linear regulator design.It more-or-less doesn't matter what type of transistors you choose for the pass element, the power dissipated will always be voltage * current. I should note that those calculations are a bit oversimplified in regard that it ignores quiescent current draw which actually means more current flows "into" the design versis out. And so that is accurate when actually powering a moderate to large load which draws considerably more than the quiescent current draw of all the regulator components (error amps, LEDs, etc.) You should add in a few ten's of mA's times the input voltage (from 18V to -5V!) as part of the efficiency calculation for a more accurate calculation.I plan on using an 18V center tapped transformer for this design, and the "+18V" rail feeding directly into the collector of the complementary pair pass transistor will be switchable between 9V and 18V. Because the op amps and all the regulator circuitry will be hard-wired to the highest voltage rail, this means that if I set the output at 9V, I can set my transformer tap to "9V" (which will realistically be (sqrt(2)*9-1.2) volts = 11.5V average at low load) then I can have a very small voltage drop across the Sziklai pair (maybe 900mV or even less) as it saturates due to the base voltage being potentially higher than the collector.With my design, I expect the maximum power dissipation to be approximately (((9 × sqrt(2)) - 2)Vin - 0 Vout)*5A ? 55W power dissipation. Not too bad! I small CPU heatsink can easily tolerate that, possibly without active cooling! And since some of that power is dissipated in the shunt resistor (about 2.5W max) the transistor shouldn't ever see much more than 50W dissipation.As for the dropout voltage, I choose to use a Sziklai pair for the output. These may be difficult to stabilize in some cases, but I personally have not had much trouble with them, at least not much more than a discrete darlington arrangement. (I'm actually quite fond of that arrangement! Nearly all the advantages of darlingtons it only requires 0.6v for "Vbe.") My hard-wired circuit was able to achieve 2V dropout at 3A when using a 2N2955 & 2N4401, versis 5V at 3A with a MJE3055 & 2N4401 darlington arrangement.I like BJTs more than MOSFETs, even though I know darn good and well that MOSFETs >> BJTs in many designs and applications. Also since I didn't have high power MOSFETs on hand so I choose to go 100% oldschool BJT.

author: pitagoras
author_rank: Regular Contributor
timestamp: January 03, 2017, 10:04:07 pm
content: If you add a simple DC-DC switching converter at the input, controlled by the regulated voltage, you can reduce voltage drop, and thus dissipation, a lot.

author: Powermax
author_rank: Regular Contributor
timestamp: January 03, 2017, 10:12:34 pm
content: Quote from: pitagoras on January 03, 2017, 10:04:07 pmYup, a switching preregulator. This can be configured to "follow" the output, so as the output voltage changes, so does the output of the pre-reg. However, since the output can change quite fast (as the case when going from CC to CV), I am not sure if a preregulator will be capable of rapid changes to output voltage. It would require a surge of current to quickly charge the filter capacitors of the pre-reg.Also, I am unsure how good the line regulation of my design is, I don't know how to test it properly. Given that I will probably end up using "slow" op amps in the end (I have a bunch of 741's to burn!), I can only assume this supply will do a terrible job of rejecting high frequency ripple and noise. I prefer to use a transformer with many taps, or even just one single voltage and a reduction in current with reduction in output voltage. (maximum current set as a function of the output voltage) That way I never dissipate over 70W.

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 03, 2017, 10:17:04 pm
content: Quote from: Powermax on January 03, 2017, 10:00:06 pmWith 1 TO-247 with a Rthj-case of 0.45C/W, a 1C/W heat-sink (http://uk.farnell.com/abl-heatsinks/345ab1000b/heat-sink-1-c-w/dp/150016) and 50W dissipation, the mosfet temp will be 97.5C without a fan, that's a lot so be sure that a CPU heat-sink can handle it.calculated here:http://www.daycounter.com/Calculators/Heat-Sink-Temperature-Calculator.phtml

author: Kleinstein
author_rank: Super Contributor
timestamp: January 03, 2017, 10:47:21 pm
content: MOSFETs have a few disadvantages in a linear power supply:They need the higher control voltage (e.g. more like 2-4 V instead of 0.7 or 1.3 V for a BJT).Parallel configurations are more difficult due to scattering in gate threshold and usually higher TC.The SOA curve on MOSFETs are somewhat less reliable - so only a few types work well. MOSFETs specially made and tested for linear operation are expensive.MOSFETs at low currents get really slow and at higher currents they get really fast (could be a problem too). So they tend to need more minimum load than BJTs. As a MOSFET also needs a low impedance gate drive, there is no clear advantage if no load loss / efficiency. With audio amplifiers there is usually a higher loss with MOSFET class AB stages compared to BJT based ones.The Sziklai pair can perform very well, if does not oscillate. This is especially tricky with variable load and the power transistor not on the board, but with lose cables an a heat sink. It is not per se stable, even the simulation says so. Without extra compensation it is more like on the edge - so it can be parasitic effects that make the difference.The classical circuit with diode minimum for the voltage and low side shunt works reasonable, but with a slow current limit. The classical fix is to have an extra fast current limit and accepts the relatively large current pulse and not that good current limiting / CV-> CC transition. The fast limit usually needs the second shunt like resistor. The voltage is limited by the OPs - so more than about 25-30 V get difficult.

author: David Hess
author_rank: Super Contributor
timestamp: January 04, 2017, 12:59:13 am
content: Power dissipation is limited by die size and MOSFETs are more expensive than bipolar devices for a given die size although the difference has fallen over time. I used to run into this all the time when selecting complementary P and N channel MOSFET pairs. For a given Rds, P channel MOSFETs have a higher power rating and the capacitance to go with it because of their larger die size. Pick complementary MOSFETs for roughly equal dynamic performance and the P channel MOSFET will have a higher Rds and equal power rating.I have only rarely seen power MOSFETs used in parallel for linear applications but they always required matching, more source ballasting than a bipolar transistor, extra circuits to handle their variation in Vgs, or some combination. Oddly enough operating integrated regulators in parallel has the same problem because of their very low output resistance and the same solutions apply. In comparison, parallel bipolar transistors are easy to deal with.Bootstrap the operational amplifiers off of the output voltage and then the output voltage will not be limited by the operational amplifiers' supply voltage. The original current limit error amplifier here was almost setup this way. I think HP liked to do this and it is readily applicable to this design for both the current and voltage control loops.It would be interesting to replace the drive transistor of the Sziklai pair with a power MOSFET. This might be worth doing in a high voltage design with bootstrapped error amplifiers which would likely use a floating control circuit supply anyway so the higher Vgs would not be a problem.Quote from: Powermax on January 03, 2017, 08:33:57 pmTake a look at the PS501 or PS503 schematics to see what I mean. The output voltage from the supply follows the output voltage of whichever error amplifier is currently operating plus an offset (1) which is the difference between the drive transistor Vbe (or 2*Vbe if a Darlington is used) and the diode voltage drop. Adding the LED in series with the operational amplifier outputs increases the offset so the output voltage *increases* compared to the error amplifier outputs making it more difficult to achieve *low* voltages; the negative control voltage would need to be further lowered to make up for this. My change was to use an emitter follower in place of the LED and place the LED into the collector circuit.In either case, the current through the LED is the difference between the current from the drive transistor bias circuit and the base current of the drive transistor which is what makes using a MOSFET (or 317) for the drive transistor an interesting idea although I never needed to try it. I never built one of these where the current difference between 0 and full output current caused enough change in drive current to be a problem and even if it was, excess current could be routed around the LED with a zener diode and resistor.In a higher power design with all bipolar transistors, the emitter follower at the output of the error amplifiers would be required anyway if the operational amplifiers could not sink enough current at low supply output currents.(1) The pass transistors provide no voltage gain within the control loops which is good for stability.

author: Powermax
author_rank: Regular Contributor
timestamp: January 04, 2017, 04:50:12 am
content: QuoteOK, I checked, my transistor would get quite toasty inside at the worst case scenario, with 1.67oC/W thermal resistance. Taking a look at the power derating curve, I can dissipate approximately 50W so long as my case temperature does not exceed 65oC. Assuming the thermal resistance between the case and heatsink is negligible (directly coupled) then the thermal difference is negligible*50 = sorta negligible. Maybe a 10ish degrees. (I have a thermocouple and might measure this.) So my heatsink cannot exceed 55oC, and assuming the xbox CPU heatsink is 0.6oC/W then the maximum ambient air temperature tolerable is 30oC.So if I was running at the absolute worst possible case with my design, for an extended period of time, on a hot summer day outside, then I might be in trouble, running a bit hot. I could use the larger TIP2955 or even the 2N2955 which would effectively solve the thermal problem, or I could parallel 2 or more MJE2955's to increase dissipation.QuoteI did in fact consider that. I figured in the original design, if I choose to use discrete op amps for the current and voltage limit, then I could have easily did that. I was considering to make the voltage feedback simply unity gain and feed a 0V -15V signal to the non-inverting input and set up a +/- 5V supply referenced to the actual output. I gave up on that realizing that I would then need a DAC capable of 15V output, and did not want to bother with adding more op amps to operate as an gain=3 amplifier, and still have to figure out what to do for an affordable DAC capable of constant current sink output. So I moved the current shunt to the low side, and ended up liking this solution better because both the voltage and the current set can be set with 2 voltages (0-5V).So I do acknowledge that this supply design has a shortcoming regarding maximum voltage capability, If I need more than 2x 15V (Cause I'm-a-gonna build 2!) then I may use a different design entirely.

author: Powermax
author_rank: Regular Contributor
timestamp: January 04, 2017, 05:17:34 am
content: As for the compensation pins on the op amp, it appears these do not appear on the model in easyEDA. Not sure how to fix that. Is it worth bothering with?

author: David Hess
author_rank: Super Contributor
timestamp: January 04, 2017, 06:13:04 am
content: Quote from: Powermax on January 04, 2017, 04:50:12 amFor designs up to 20 volts and using 36 or 44 volt operational amplifiers like the PS501 and PS503, bootstrapping is not necessary so I did not recommend it. It would be convenient though if you wanted to use any of the various lower voltage operational amplifiers available today.Configuring a DAC to sink a constant current is easy enough with a single low voltage operational amplifier and n-channel JFET or MOSFET. Using a bipolar transistor adds an error from its base current.http://www.linear.com/solutions/1562Or if you want to use a current DAC's output directly, then a n-channel JFET or MOSFET cascode will allow high output voltage with no error.

author: Powermax
author_rank: Regular Contributor
timestamp: January 04, 2017, 03:35:12 pm
content: Quote from: David Hess on January 04, 2017, 06:13:04 amI have considered that, but I wasn't sure how accurate that would be. I do recall GreatScott on youtube did design a dummy load but it had serious stability issues which he did not address. If I used a cheap voltage DAC, I could possibly have referenced it to the high side such that it generates a voltage exactly where the resistor in the original design was, and I could have used an optocoupler to communicate to it digitally from an arduino anywhere (voltage-wise) in the circuit. This would probably have been the better solution.

author: VEGETA
author_rank: Super Contributor
timestamp: January 04, 2017, 03:58:24 pm
content: Your circuit seems to have a negative rail, will that rail consume the whole current of say 2A? In my design, the source is battery pack and not a center tapped transformer or whatever you are using. So my way of getting a negative 5v is to have maxim charge pump IC that only allows 10mA of current. Now this is not gonna be good for your design idea at all right?won't it be good if high-side monitoring is used? can you please try it with your circuit and see if it works properly in ltspice.Also, won't it be better to have a darlington pair in one IC instead of pnp-npn? I haven't tested your circuit with low dropouts tbh.

author: Powermax
author_rank: Regular Contributor
timestamp: January 04, 2017, 04:57:28 pm
content: Quote from: VEGETA on January 04, 2017, 03:58:24 pmI would certainly hope that the -5V rail does not sink 2A of current!!!It only exists because the op amps (LM741, or the much better LT1007) do not operate down to -Vcc. If you replace the op amps with one that can operate down to the negative rail (*Ahem*, LT1013/LT1014), and you have a constant current source that can sink at least some current down very near ground, then you could pontenially omit the -5V auxiliary entirely.And yes, my original design used high-side current sensing. Everyone seems to have a different opinion whether it should have lo-side or hi-side current sense. It honestly does not matter. But my original design did not allow you to set the current accurately when the output went below 1.5V. This is a result of the current source (temperature compensated LM334 circuit) minimum "dropout" voltage. The LM334 cannot maintain a accurate constant current below 0.9V, and since an additional diode was added for temperature compensation, it's actually 1 Vd (or approx 0.6v) higher than that.Quote from: VEGETA on January 04, 2017, 03:58:24 pmYes, you are correct.* That configuration is called the Complementary Darlington. It's generally a bit less stable than a typical darlington configuration, but I have not had problems regarding it specifically. The advantages of this configuration is that the gain is essentially the product of the 2 transistors, but the effective Vbe voltage remains at 0.6V. It is quite often used in quasi-low dropout regulator designs. In fact, it's used in the LT3080 and LT3081 devices! The only disadvantage is stability in some cases and supposedly slightly higher saturation voltage, although I have not personally observed that in discrete designs. At 5A with generic NPN and PNP transistor models in LTspice, I see no almost no difference.At 5A current, both configurations have a saturation voltage (Vce) of about 1V. The complementary darlington saturates at a lower Vbe.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 04, 2017, 05:23:02 pm
content: The last circuit from Powermax still has a few minor weaknesses:The current limit is not that fast (this a general problem with this type of circuit). So an additional fast limit might be a good idea. With a darlington output stage this could be just the available base current. One option for this would be a transistor in base configuration in series with the diode - so the current regulator does not have to follow the full voltage drop on a dead short. However this could cause a stability problem for the Szikla stage as the driving side is than high impedance.It would also effect anti-windup for the CV side. The way it is done (extra transistors) does not work well for voltage below about 1/3 of the set value anyway (it need the OPs output to be more positive than the input side). There is an easy way to get at least approximate anti windup: connect the compensation from behind the diode.As shown, the regulator can have trouble with a large low ESR (e.g. 1000 µF with less than 0.1 Ohms ESR) cap at the output, as output impedance is very much like an ideal inductor in the < 100 Hz range. To prevent this, one usually adds some phase boost at the voltage feedback. This also has two positive side effects:After CC mode was active the voltage is coming from below, relatively slow (e.g. ms time constant). So anti windup for the CV part is not that import any more. Also as the divider is loosing less, the GBW for the OP can be a little lower.

author: David Hess
author_rank: Super Contributor
timestamp: January 04, 2017, 05:25:00 pm
content: Quote from: Powermax on January 04, 2017, 03:35:12 pmFETs make bias current errors insignificant in cascodes and voltage to current converter output stages. Older simple designs would have used Darlington connected bipolar transistors. It would be interesting to make a complex discrete low bias current error bipolar design but fortunately that is not necessary. (1)FET input and low bias current bipolar operational amplifiers take care of the problem with bias current in the error amplifier. Picoamp input current bipolar operational amplifiers like the LT1112s you have might seem to be obsolete but they have good noise, good precision, and stable input bias current with temperature.That leaves error from offset voltage in operational amplifiers which is largely fixed and gain error from resistor tolerance and gain drift from resistor temperature coefficient. If an operational amplifier voltage to current converter is used then matched resistors can be used at the top and bottom. But a majority of the resistor error will come from the current shunt itself.How much current limiting precision and accuracy do you want? Excluding the current shunt, any design should be capable of 12 bit accuracy or 0.25mA resolution out of 1A full scale which is 250ppm. The current shunt is the most error prone element and current shunts better than 20ppm/C are expensive.(1) I am dubious about relying on low gate leakage current in small signal power MOSFETs but many people report good results. JFETs are a sure thing.

author: Powermax
author_rank: Regular Contributor
timestamp: January 04, 2017, 09:29:39 pm
content: What if I use a single discrete op amp to power a small resistor, and I used the actual +Vcc as the current sink? My guess is that the op amp has not been parameterized to sink current itself, and would probably draw an additional few tens of uA's on it's own (unless it was one of those ultra low power ones) Probably not a good idea, but could that be useful for other applications?As for the fast current limit, wouldn't the speed be limited by the output filter capacitors? Those could deliver a pretty large current transient when shorted, although long leads from a remote supply might have enough inductance and loop area to attenuate that spike. It would seem that using a low impedance pass output pass element is going to be doomed when it comes to current control, as the op amp will have to do all the regulating, vs the voltage control where the transistor's high current gain (and unity voltage gain) make the voltage error amp's job much easier.I don't know how I would go about modifying it if the transistors I added were not enough. What if I somehow bypassed the NPN on the pass element tapping directly into the base of the MJE2955 to set current? Surely that'd be faster (?)

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 04, 2017, 09:50:04 pm
content: Maybe you want a down-programmer: (aka make the supply a limited quadrant 2 output and complicate the shit out of it)http://electronicdesign.com/test-amp-measurement/if-your-power-supply-needs-fast-rise-and-fall-times-try-down-programmerBut just so you know, Rigol DP832 has1000uFoutput capacitance, and it counts as a really good use-able power supply, so your supply is already much better and probably fast enough for 99% of the things.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 04, 2017, 10:34:48 pm
content: Usually the output capacitor can deliver quite a lot of extra current, so there is a point on how fast current limiting has to be. No need to be much faster. The trouble is a little that with a fast voltage loop, that the current can go really up for the worst case of having a dead short from a not so low voltage. Here the peak current can go to the 10s or even 100 A in the simulation - though only for a few µs or so. This could be enough to blow a transistor. Some overshoot at the current is Ok, but it should not be much more than the normal current rating. At least limiting to such a fixed limit is relatively easy.To bring the voltage back to normal after a steep load step, there needs to be phased when the current is higher than the new current level. This is to give back the charge to the input cap it used before the regulator worked. So a limited overshoot in the current is often even desired.With slower voltage control, the current spike will also be smaller. So it could help, to not make the voltage control so super fast. Especially with the sziklai type output stage with low output impedance (essentially the shunt resistance) this is a very real option. A 2-quadrant output stage can help keep impedance of the power stage low, even for very low currents. With some slow ringing (which is hard to avoid) it is hard to ensure enough current through the power stage otherwise.For the speed of the circuit, one also has to take into account parasitic inductance. At a low output impedance in the 0.1 Ohms range, inductance in the 100 nH range has quite an influence. So there are limits on how fast one can get at such a low impedance level - high speed is something for 50 Ohms impedance, not 1 Ohms and below.

author: Powermax
author_rank: Regular Contributor
timestamp: January 04, 2017, 11:07:57 pm
content: Quote from: ZeTeX on January 04, 2017, 09:50:04 pmGood point. I honestly can't see why it would need to be hugely much faster, although if it can be done with a few extra BJTs, then why not!? If I have to entirely change my design to have a different type of current limiting, then I'm not going to bother. I think capping the maximum voltage output of the op amps so they do not saturate to Vcc - 2V will be good enough. A near-short from Vcc to ground will cause a (slow) LM741 will take about 30 µS to travel the full supply voltage.Interestingly, 0.5V/µS (the slew rate of the LM741) would cause the output capacitor do draw or source 5A of current, which happens to be my maximum current limit!Just by coincidence. So whether the thing is in CC or CV mode when initially turned on (as the output capacitor charges) when I is set to 5A may depend on the particular op amp and it's speed.To make the supply faster I could use better op amps (although that comes at the cost of stability.) If I use the LT1007 (I might in in a later design) I should be able to achieve 11V/uS which means I could travel the whole supply rail in just under 1.5µS!

author: Kleinstein
author_rank: Super Contributor
timestamp: January 04, 2017, 11:33:50 pm
content: The fast current limit is relatively easy: just an extra shunt at either side of the power stage and a BJT to limit the current.If you have a negative supply anyway, a down programmer is relatively easy: the minimal version is just a diode to let the OPs also pull down the output if they get more negative. Current is limited by the OPs. The more powerful version somehow collides with anti-windup, as the OPs in this case would have to provide a more negative voltage.The slew rate is not only limited by the OPs, but also from the compensating caps: the actual limit could be slower.

author: Yansi
author_rank: Super Contributor
timestamp: January 04, 2017, 11:56:27 pm
content: Why is it called a "downprogrammer"? It seems to me it is just like adding a two quadrant operation, with the current sink side less powerful.

author: David Hess
author_rank: Super Contributor
timestamp: January 05, 2017, 02:56:05 am
content: Quote from: ZeTeX on January 04, 2017, 09:50:04 pmThat is an insane amount of output capacitance for a 3 amp output. My starting rule of thumb is from 50 to 100 microfarads per amp (1) and my usual goal is to minimize the amount of output capacitance used consistent with transient response including mode transitions. A more careful and complex design might operate with even less capacitance.(1) I never bothered to look until now but the same output transistors, the Tektronix PS501 is 200uF per amp with a Darlington pair and the PS503A is 50uF per amp with a Sziklai pair which is suggestive. It would be interesting to see the schematic to the older PS503.

author: Powermax
author_rank: Regular Contributor
timestamp: January 05, 2017, 05:04:40 am
content: Quote from: Kleinstein on January 04, 2017, 11:33:50 pmYay!But I am not a fan of having an additional shunt resistor pissing away power. Could I used the already-existing shunt? Are you referring to the classic example of this!?Quote from: Kleinstein on January 04, 2017, 11:33:50 pmWhat is a "down programmer"? The and what is "anti-windup"? A quick google seemed to lead me to PID control theoryWhich is appropriate given this is a feedback system. What I understood was that it is essentially the "inertia" of a fast changing signal in this case. A signal that has the tendency to move fast but reluctant to change in dv/dt. Seems to be related to bandwidth, given that an integral function in the S domain or frequency domain looks like a downward sloping like (a sort of lo-pass filter)Quote from: Kleinstein on January 04, 2017, 11:33:50 pmSomehow I knew you were going to point out that oversimplification. But good, because I did almost neglect that. Luckily the 'slow' UA741's don't need any compensation components at all in practice and in simulation. I'd imagine the LT1007's I might use even with compensation will be much faster.

author: David Hess
author_rank: Super Contributor
timestamp: January 05, 2017, 09:37:18 am
content: Quote from: Powermax on January 05, 2017, 05:04:40 amThis is not a bad idea but I agree about adding an additional current shunt; I would rather use the existing current shunt or the ballast resistors if they exist. If the existing current shunt is used, then I might add another diode or two in series with the base or emitter of the fast current limit transistor to raise the threshold allowing greater sensitivity of the current shunt. There are more complex fast current limit circuits which provide a more accurate threshold but they are only common in integrated parts. If an integrated regulator is used in place of the drive transistor, then its internal current limiting can be used.Bipolar output transistors have an advantage over power MOSFETs as far as the fast current limiting because their gain falls at high currents naturally helping to protect the transistor. If the normal current limit is fast enough which is not difficult to achieve, then the decrease in current gain and thermal capacity of the bipolar output transistor will be enough to protect it during the momentary short which is reflected in the pulsed safe operating area curves.QuoteI think he means that an active load is used to pull the output down when the programmed output voltage is lower than the existing output voltage providing two quadrant operation. This is less necessary if the output capacitance is minimized. Some power supplies which include this can be used as active loads.The active clamps you added implement anti-windup preventing the external or internal compensation capacitors from charging when one or the other error amplifier is not driving the output. Although a lessor concern, this also prevents the operational amplifiers from saturating which in some cases can also increase response time.QuoteThis is why no more compensation than necessary should be used.Operational amplifiers which support external compensation might allow even better performance but they are uncommon and will make the design less universal. The same goes with operational amplifier which directly support clamping to prevent windup.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 05, 2017, 10:55:47 am
content: If more than one output transistor in parallel is used, which is very likely at 5 A, the current sharing resistors can be used to make the fast current limit. Having the fast limit with the low side shunt could work too, not as fast, but still faster than the normal regulation loop and fast enough.For the output capacitance, it makes a difference which type of circuit is used. The circuits with a low impedance output stage (like here), can work with very little output capacitance. They may not even need it for stability of the CV loop, but just to get the CC loop stable and to get better pulse response. So there could be output capacitance in the 1 µF range if you really want to, especially if a 2 quadrant output stage is used. So the 10 µF in the simulation can be realistic.Depending on the speed of the CC loop, this can add considerably to the measured impedance in the CC mode. Up to the point of having a large apparent output capacitance, if the CC loop is very slow. The shown current loop is reasonable fast, adding something like another 10 µF of simulated capacitance in the CC mode.There is a second class of lab supplies, that use a current controlling output stage. These generally need a considerably higher output capacitance. So here the 100 µF / A is somewhat realistic. One point here is that they need a certain ESR for that capacitance and the old electrolytic caps just need so much capacitance to reach low enough ESR values. So lower caps could work with modern low ESR types.

author: Powermax
author_rank: Regular Contributor
timestamp: January 05, 2017, 08:56:40 pm
content: It appears in the simulation, with a current source that steps from 10mA to 100A (set up as as an "active load" I assume that means it draws the configured current until the voltage falls to 0V or below.) I get a huge current spike, reaching 60ish V in simulation (if I decrease the timestep I expect I will see a higher reading peaking at 100A) due to the small 1uF "ideal" capacitor, and a tail of current dropping the set current of 2A after 16 microseconds. (using the LT1007's).If I remove the 10uF capacitor (and adjust the compensation capacitor on the CC error amp to avoid oscillation) then the peak current spike is a little less at 45A and falls to about 28A within 0.3uS and rock solid there for about 2.3uS. I set up the CV at 15V so the op amp has to slew from 15 down to zero. Once it gets within range then the current again exponentially falls to the set level.I tacked on an additional BJT with the emitter at the low side of the current shunt with the high side connected to the ground (output ground). This limits the current to 6.8A with already existing 0.1A shunt. I'd expect if I used a 0.25 ohm shunt (my dale resistors) the current will end up being limited to a bit under 3A.

author: Powermax
author_rank: Regular Contributor
timestamp: January 08, 2017, 05:58:13 am
content: OK, since I am not getting any more replies regarding improvements to the design, I'll go ahead and make the PCB layout. But before I do that I need to select parts.Huge shout-out to Kleinstein, David Hess, and Yansi for helping me improve the design! Thank you guys!! I appreciate it!I'm sure it can be further improved but at this point I just want to have a power supply that works. I might respin the board in the future to make improvements. But currently I keep running into the problem of needing a power supply and always end up bodging together a temporary LM317 circuit zener shunt regulators, I'm tired of wasting time with that.I did some research on the 0.25 ohm resistors I have, and as it turns out, they have a 90 PPM /OC temp-co!I found a really cheap (30 cent) strip of metal on Mouser claiming to be a 5% tolerance 0.1 ohm resistor with a more reasonable 20 PPM /OC temp co. There is only one resistor that has an even lower temp-co (at an astonishing 0.05% 3 PPM /OC) but they are asking $40 frickin dollars for it!!!http://www.mouser.com/Search/ProductDetail.aspx?R=OAR1R100FLFvirtualkey66200000virtualkey66-OAR1R100FLFOh, BTW, is there a way to perhaps "glue" a resistor of simalar temp-co to the shunt and use it to control the set current? My idea is that as the temperature of shunt rises, so will the temperature of the thermal sense resistor and if it rises at the same rate as R4, then perhaps I can get thermal compensation? I'll look into the calculations for that another day but I'm sure it could help a little.For a DAC (to allow interfacing to arduino and possibly even an app!) I selected the classic CMP4725 as it was one of the cheapest options available, appears to be easy to interface, and there is a sparkfun breakout board featuring the chip, so clearly it should be arduino friendly (libraries should exist for easily interfacing it.)http://www.mouser.com/Search/ProductDetail.aspx?R=MCP4725A0T-E%2fCHvirtualkey57940000virtualkey579-MCP4725A0TECHUnfortunately this limits me to 2mA resolution (which I guess isn't too bad) and 5mV resolution (From 0 --15V) if I want round increments without the ugly voltages produced by using the full resolution. Also I think this design might allow me to have an output that can go up to 30V, with the right transformer with enough tabs!The op amps should be (barely) capable as they can handle +/- 20V, which equates to 40V. I might add a shunt across them incase a surge occurs and blows my $$$ LT1007 parts.I found theseEC12D1524403's to be the cheapest rotary encoders that are pushable and have 24 clicks of resolution:http://www.mouser.com/Search/ProductDetail.aspx?R=EC12D1524403virtualkey68800000virtualkey688-EC12D1524403Most of the resistors, op amps, arduino, tack buttons, IC sockets, BJTs, diodes, and other passives, I have plenty of these. I have a significant savings here, too.The 2 things stopping me now is my selection for a transformer and, out of all things, finding some good knobs. On mouser, although there are a lot of options in power transformers, none are particularly cheap or suitable. I thought I might be able to get 3 smaller 5V transformers but this turns out to be more costly than a single large transformer.Does anyone know of a source to get a nice large 100VA transformer with 5 3V tabs, 3, 5V tabs, or 2 individual 12V tabs? Or maybe a 200VA transformer with the number of tabs doubled? I have heard of suggestions to rewind a MOT transformer, which I like the idea, but I would need to increase the turns on the primary as well to avoid core saturation. I don't want to have to force cool the transformer as well.And lastly, I want a jog wheel for the voltage/current set. I plan to use a single encoder that can be pushed to change between CC adjust and CV adjust. (no reason to spend extra for 2 knobs given no time saving in setting the output.) I would also use velocity control which would allow an automatic coarse and fine adjust. So I need a nice big knob!!! Anyone can link me to a good choice?

author: David Hess
author_rank: Super Contributor
timestamp: January 08, 2017, 07:22:06 am
content: Quote from: Powermax on January 08, 2017, 05:58:13 amIt is a difficult problem and I think your expectations of resolution and accuracy at high currents may be excessive.Precision current shunts are already temperature compensated by using an alloy like constantan or manganin so just adding the opposite temperature coefficient and getting it to track is not easy.A temperature sensor could be added to the shunt and calibration done.The easiest thing to do is power derate the shunt so that temperature rise is minimized. Multiple higher resistance 4-wire shunts in parallel might be required but this leads to a complex layout.For higher resolution at low currents, switch in a separate higher resistance shunt. In practice this usually means bypassing the low current shunt at high currents.One thing I have never seen done in a power supply which is possible in theory is to apply a low frequency modulated current to the current shunt and synchronously demodulate the voltage change to determine the current shunt's resistance in real time. The voltage control loop keeps the low frequency signal out of the output. Some multimeters can do this to make in circuit current measurements.QuoteI have blown out a few operational amplifiers this way. Absolute maximum ratings are not to be ignored.Some old but cheap operational amplifiers like versions of the 741 have a 44 volt maximum supply voltage.QuoteTransformers are expensive so I usually make do with transformers salvaged out of surplus equipment or find them used.A common design in older power supplies is to switch a dual secondary between series and parallel so the low voltage range has twice the current capacity as the high voltage range.

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 08, 2017, 12:07:49 pm
content: Quote from: Powermax on January 08, 2017, 05:58:13 amIt's better to parallel 10 or more resistors, this way achieve higher accuracy and distributed power dissipation, so for 10 1 ohm resistor 1% its 0.1ohm 0.1% resistor.MCP4725 has max +- 14.5 INL (Relative Accuracy) this is hopeless for power supply, you need something like +-4INL max, but in the graphs I don't see it reaching even close to 14.5INL. weird, I would use MCP4922 anyways.Make sure that the encoder can be mounted on front panel if you are going to put in the a box, also the encoder you choose has only 15 clicks of resolution.Maybe this one:http://www.mouser.co.il/ProductDetail/Bourns/PEC11R-4015K-S0024/?qs=sGAEpiMZZMsWp46O%252bq11WUFm4YUtE9euaZTpksE9hoM%3dFor transformer, look here maybe:http://spiratronics.com/toroidal-transformer-dual-primary-secondary-160va-0-12v.htmlhttps://www.toroidal-transformer.com/shop/toroidal-transformers/160va.html

author: Kleinstein
author_rank: Super Contributor
timestamp: January 08, 2017, 12:58:06 pm
content: From a 100 VA transformer you get about 70 W out on the DC side. AT this power level using just 2 transformer taps is usually enough. Only with higher power you might want more steps, to keep the peak currents when switching low, as the main filter caps have to load to the new possibly higher voltage.For the DAC, there is also the possibility to use PWM and filtering for the set-points. One can also combine this with an DAC and thus extend the resolution of the DAC by a kind of dithering. Another option is using a low accuracy, but high resolution R2R chain as an DAC and use an ADC (e.g. the one for the display) for corrections.90 ppm/K TC for the shunt is not that bad. Many cheap resistors are in the 300 ppm range. Correction is difficult as there are delays. One could have a second (lower resistance, more precise) shunt for the measurement / display, as here noise is not that important, because the BW is much lower.

author: Powermax
author_rank: Regular Contributor
timestamp: January 08, 2017, 05:34:04 pm
content: QuoteUgh, I figured. VA ? W. I don't entirely understand VA either. I know it's apparent power vs real power and power factor relates the 2 to each other, or something. But I don't know how that works when considering such a nonlinear load as a rectifier and capacitor. Simulations like to show peak currents in the hundreds of amps! Would it help to add a resonant capacitor to the transformer tabs output to help power through those surges? Also I have a few Lamba linear power supplies and they use bolts for diodes (the diodes that look like bolts) but they have small electrolytic capacitors directly across each one. One is the purpose of those?QuoteHow clean could a PWM signal possibly get? It seems to me that it would destroy the noise and ripple characteristics, and enough filtering would cause a very sluggish response. Also the PWM from the arduino is only 10 bits resolution. Achieving higher would require software PWM, which has it's own problems.QuoteI know lolI wanted to get 3.5 to 4 sig figs resolution/accuracy for both current and voltage. That's what I'm aiming for.QuoteINL? because I am using an LM317 as the voltage output, I can tune precise output voltage. I am concerned more about relative accuracy. (like how linear the output is) I know nothing about DACs though. I do plan to connect an ADC to the output for the arduino to display voltage set and voltage output.

author: Powermax
author_rank: Regular Contributor
timestamp: January 08, 2017, 06:10:48 pm
content: I'd imagine the temp-co is mostly or entirely dependant on the resistive material. Why would anything else matter? How can one ni-chrome wirewound resistor differ from another?If I cannot get a transformer supply for cheap, I guess I could settle for a variable switch mode supply, but I'll need good EMI sheilding and loads of filtering

author: David Hess
author_rank: Super Contributor
timestamp: January 08, 2017, 06:16:05 pm
content: Quote from: ZeTeX on January 08, 2017, 12:07:49 pmGraphs in datasheets usually show typical rather than maximum errors.The DAC error is an important consideration. The typical error of 4 INL out of 4000 counts is 1000ppm so a 20ppm/C current shunt would have to change by 50C which is almost reasonable. With a maximum error of 14.5 INL, this becomes 3500ppm and a change of 175C. So a 20ppm/C current shunt is better than really needed for this DAC.The specifications for a Rigol DP700 are 200ppm/C for current and 100ppm/C for voltage and an accuracy of 2000ppm for current and 500ppm for voltage so the above errors seem reasonable.This is a power supply and not a source meter.

author: VEGETA
author_rank: Super Contributor
timestamp: January 08, 2017, 07:12:16 pm
content: Do you really need the 12-bit? just use the 10-bit adc or dac in the microcontroller, or do you really need more accuracy? what is your minimum set current or voltage? I guess a good PIC MCU can have 10-bit ADC and DAC. This may give you a 10mV step for your voltage and maybe the same for current. Do you need more?

author: Kleinstein
author_rank: Super Contributor
timestamp: January 08, 2017, 08:25:17 pm
content: To simulate the rectifier one should include parasitic resistance of the transformer and caps too. Output resistance is about twice the DC resistance of the secondary. Also the fuse helps here a little. Usually one ends up at about 0.5-0.6 A DC for 1 A_RMS on the AC side. There is not very much one can easily do about this. An inductor would help, but this is bulky and the voltage drops under load. One can use just transformer - fuse - rectifier and filter cap and just accept that the power factor is not near 1 but more like 0.7. So for 1 amp of DC ouput current one needs something like an 1.8 - 2 A AC rating for the transformer.With the slow Arduino SW PWM it is no practical to use PWM to set the voltage. With the much faster hardware PWM (up to 16 bit resolution) of the AVR it is practical. The Response time of a 3rd or 5th order filter is not that long - more like in the 10s of ms range, depending on the resolution. So the other options are usually faster, but for a power supply this should be fast enough.The resistor materials are alloys and there TC depends on the exact composition and heat treatment. So it depends on the quality how low they can guarantee the TC to be. There are also a few different alloys used. Not all resistors need a low TC - so there is a market for low cost and higher TC ones too.

author: Powermax
author_rank: Regular Contributor
timestamp: January 08, 2017, 10:38:44 pm
content: Quote from: VEGETA on January 08, 2017, 07:12:16 pmI don't think it's possible to achieve 10mV resolution with a 10 bit DAC. 10 bits = 1024 discrete levels. The resolution will be 0.014648438 V. I could toss out 24 of those levels and have 15mV resolution, however. With a 12 bit DAC, I have 4096 levels, but only 3000 usable at a nice 5mV resolution. Much more wasteful. If I go for a 14 bit DAC, I can just achieve 1mV resolution throwing out 1384 out of the 16384 total bits. What I could do is interpolate a single more $$$ DAC using analog switches although I am unsure how much error would result from using these switches.I do only care about resolution but only for the lower voltage settings, so it might be possible to get away with 10 or even 8 bits of resolution if I make the output voltage range selectable. (like 0 -- 5V with 5mV resolution with 10 bits, or 0 -- 1A with 1mA precision) so this may be an option. Resolution becomes less important at higher voltage and power levels.Make sure that the encoder can be mounted on front panel if you are going to put in the a box, also the encoder you choose has only 15 clicks of resolution.[quote from: David Hess][Quote from: Powermax on Yesterday at 04:58:13 PM]Oh, BTW, is there a way to perhaps "glue" a resistor of simalar temp-co to the shunt and use it to control the set current? My idea is that as the temperature of shunt rises, so will the temperature of the thermal sense resistor and if it rises at the same rate as R4, then perhaps I can get thermal compensation? I'll look into the calculations for that another day but I'm sure it could help a little.It is a difficult problem and I think your expectations of resolution and accuracy at high currents may be excessive.I figured if it is easy to do (I can literally stick a resistor inside my wirewound noodle resistor without much problem.) then why not?But I was assuming the temperature coefficients were negative and linear. I don't know if that's the case or not. If it's not that easy then I won't bother.Now I am starting to question whether a LM317 will be stable with input voltage and more variably, temperature. I might move over to a DAC which supports a proper voltage reference. My chosen DAC uses the noisy 5V rail which is no good. I see a few offerings of voltage references tuned suspiciously to 1024V, 2048V, and 4096V. These do cost over a dollar each though. Guess you pay for convenience. Found this one that appears to be good:http://www.mouser.com/ProductDetail/Maxim-Integrated/MAX6043CAUT10TG16/?qs=sGAEpiMZZMuBck1X%252b7j9fADMRbLaMGMSpKa%2f1OuhCQ8%3dand if I trade the temp co, precision, and cost for the convenience of a 4096mV source, I can get this part:http://www.mouser.com/ProductDetail/Maxim-Integrated/MAX6198CESA+/?qs=sGAEpiMZZMuBck1X%252b7j9fADMRbLaMGMShqETZIS3RAM%3dThe rotary encoder are only 15PPM, but they have 30 indents. 15 refers to the number of cycles per revolution. But this can be 4 times higher (60) since there are 4 discrete pulses which can be detected per rotation, right? That's why I choose that one. It's the cheapest and I think 60 PPM with velocity control would be precise enough. What do you all think?

author: VEGETA
author_rank: Super Contributor
timestamp: January 08, 2017, 11:44:05 pm
content: for my initial design idea, I wanted to use a 2.048v voltage reference to power the DAC\PWM\ADC stuff which are 10-bits of resolution. So 2.048v/1024 steps = 0.002v = 2mV per step. Since CV op-amp outputs 1v per 10v or 0.1v for 1v, the 2mV gives an output of 20mV which is less than 10mV steps that I want... perhaps I should reconsider. As for current, it is 0.1V per 1A so that 2mV = 20mA, not too good TBH.If 12-bit is chosen, 2.048v/4096 = 0.0005V which means 0.5mV per step. This translates to 5mA and 5mV steps which is nice for voltage but not so good for current. maybe a solution is to get a 200mV voltage reference for current but this would mess the MCU a lot.So this leaves us with 2 options: use a normal cheap MCU like PIC16F family and get external DAC\ADC. Or, get a very powerful MCU which has more than 12-bits of ADC\DAC in it.Notice that resolution must be the same for your dac\adc because if your set accuracy is high (12-bit) while your reading is not (10-bit), you won't be able to sense the voltage accurately so your extra 2-bits of resolution will go in vain.

author: Powermax
author_rank: Regular Contributor
timestamp: January 09, 2017, 01:24:00 am
content: Quote from: VEGETA on January 08, 2017, 11:44:05 pmI'm not that fond of using the DAC or ADC inside a micro, those tend to be mediocre at best. I have 5 arduino pro's (ATmega328p) so the marginal cost of using is zero. I also have an LCD module, but it appears that it is being problematic. It refuses to work properly. I think dust and dirt worked it's way in between the LCD, zebra strips, and circuit board.

author: VEGETA
author_rank: Super Contributor
timestamp: January 09, 2017, 01:27:33 am
content: So what is your solution? and how it is affects your minimum set voltage and current?

author: Powermax
author_rank: Regular Contributor
timestamp: January 09, 2017, 02:46:21 am
content: I am now looking into the feasibility of configuring my arduino to have 12 bit PWM outputs, I can actually make some measurements and get a feel for how accurate it's gonna be. I think the arduino has it's own 1.1V internal reference, but I am not sure how good it is compared to a proper voltage reference.I do have some of these epic AD574 chips (12 bit ADC) and Burr Brown DAC71 (16 bit DAC) chips! They are moderately easy to interface (even with discrete logic!), just parallel. Loads of wires. The analog output is a bit more of a hassle to configure, they are not rail to rail and require a 5V logic supply and a dual rail supply.They are big and clunky and I think are not well suited for this application. They are a "successive approximation" DAC, but I guess that doesn't matter too much. What type of ADC is best?Now of course I could easily set up another PWM pin and an error amp and more arduino code to basically force the PWM output to approach the value of the voltage and current output, essentially making my own successive approximation DAC. Although I feel this is a bit of a hacky solution. I might instead look into a I2C ADC.

author: David Hess
author_rank: Super Contributor
timestamp: January 09, 2017, 03:45:44 am
content: Unless you are going for a design which requires no trimming, the absolute accuracy of the reference will not matter and even if it does, the absolute tolerance of the current shunt and output divider will create separate gain errors which will need to be trimmed anyway. That implies at least two separate trims whether you use an ADC to read back the output voltage and output current or not.An LM317 is not all that good as a reference with its 100ppm/C temperature coefficient. A TL431 is better at 50ppm/C. An LM336, LM385, or LM4040 is the cheapest common reference with a 20ppm/C typical temperature coefficient which is a good match if you use inexpensive 25ppm/C metal film resistors.You might be able to make a better but inexpensive reference by spending time to grade 6.2 volt zener diodes and diode pairs for low temperature coefficient. One of these days I want to try configuring a 723 regulator to operate with a constant elevated die temperature so it can be used as an ovenized reference.Dithering or PWMing a DAC improves resolution but does not improve accuracy in the form of INL.

author: Powermax
author_rank: Regular Contributor
timestamp: January 09, 2017, 04:17:34 am
content: Does the INL rating depend on the resolution? Like suppose I have 2 identical DACS, but one has 2x resolution. For them to have the same relitive acuracy (INL) would the higher resolution one have a proportanally higher INL?Does high INL mean nonlinearlity?When it comes to the R2R ladder, what is the maximum unbuffered voltage? It cant be exactly VCC because its still acting like a resistor divider.

author: blackdog
author_rank: Frequent Contributor
timestamp: January 09, 2017, 07:04:58 pm
content: Hi,Just some info...Multiple users of this forum, saying that a compound transistor often oscillate...That's not true if you use it right, directly mounted to the base resistor to the first transistor.So do not install the resistor on the board and then go with a piece of wire to the base, Wrong!And mount a small resistor also in the emittor wire of the first transistor, see the schematic .Here you can see a earlier version of my design, with two compound power sections.Extreem low noise reference section and good dynamic behavior, this schematic is not compleet! just to let you see how you aslso can do it.DC Ri, how good are you building it? in my test setup it was smaler than 0.0001 Ohm.Noise onder full load? about 2uV RMS 80Khz bandwith.This schematic is tested with the ADA4077-2 and the NE5532A, but know i have better Opamps, to get the Ri @ high frequenties, of lower, better fase margin.This is the Ri @ high frequency, "F" is the dual compound transistor, 100Khz 14m Ohm!Dynamic behaviorJust a sample of one of the measurements, NO! the the design is not ringing, This is one of my torture test for power supply'sThe dynamic load is connected via two cables of 50 cm and in the dynamic load is mounted a MKP capacitor 6,8uF.The ringing what is visible, is caused by the residual induction of the twisted connecting cables and the 6,8uF.It is verry hard for the power supply to get the error puls low as in this picture.Test with 2 compound transistors, NE5532A and a 9.5-Amp load puls.If i remove the 6,8uF capacitor then there is no ringing, just about 5 a 8mV drop and in 15uSec flat line. look at the line in the middle of the picture,no droop 10mV/Dic is not enough to sense the Ri of this measurement.OpampsA OPA140/2140, TLE2071 and my compound power transistor wil give you an nice phase margin and a low Ri of your power supply.This design is from theHarrison Divisionof Hewlett Packart @ the end of 1950's... still going strong with modern components and some atentionMy comments are intended only to show what is possible with an old design and new components.Not to demonstrate a complete power supply design.There are many ways to make a good linear power supply, this is just one of them.Kind regartsBlackdog

author: Kleinstein
author_rank: Super Contributor
timestamp: January 09, 2017, 07:23:16 pm
content: INL is the integral nonlinearity. This is the maximum deviation from a straight line (sometimes with 0 fixed).INL is often noted relative to resolution (e.g. in LSB) - so this number depends on the resolution.For those cheap microchip DACs there are 8 / 10 and 12 Bit versions. The overall accuracy of the 12 Bit version tends to be slightly better than for the 10 Bit version, but the INL expressed in LSB is nearly 4 times as high.For an R2R chain the maximum you can get is between Vcc * (1-2^N) and the full Vcc. It depends on were you put the last end. So you get quite close to the full voltage. However with just normal digital outputs and resistors the accuracy is limited. More than 8 Bits is already hard.

author: Dave
author_rank: Super Contributor
timestamp: January 09, 2017, 07:29:02 pm
content: Why are you using JFET schematic symbols for MOSFETs?

author: blackdog
author_rank: Frequent Contributor
timestamp: January 09, 2017, 07:47:25 pm
content: Hi Dave,Its a old schematic, i have found the MOSFET picture in a library knowKind regarts,Bram

author: Powermax
author_rank: Regular Contributor
timestamp: January 09, 2017, 07:51:22 pm
content: Quote from: blackdog on January 09, 2017, 07:04:58 pmNice design! You really went all out on some parts of it! I am particularly interested in the switching preregulator section and how you implemented current limiting. It appears my original circuit had a basic version of what you are doing for current limiting, (more specificially, the method I asked about on in this instructables question:http://www.instructables.com/answers/Can-I-use-the-same-resistors-for-current-shunt-AND/)To me it looks like Q7 serves as a fast current limit while the op amps can take time to slew down and take control of the pass elements very simalar to my original design (without Q7 however.) Because you used a potentiometer to set the current limit there is no requirement to figure out how make it settable from a grounded source as with my design. My solution was to use a variable current DAC to replace the constant current sink and pot in my original design, although it turned out this would not have been a cost-effective solution.Also what process did you use to calculate or otherwise figure out the compensation components around the op amps? I just did a guessing game with the LT1007's I choose.Would you consider your design low noise? I read that potentiometers are noisy so I tried to avoid them when possible.

author: blackdog
author_rank: Frequent Contributor
timestamp: January 09, 2017, 08:09:22 pm
content: Hi Powermax,Look at these pictures how good Q7 works.No Q7, +18 Amps for 1 transistor (no current loop, switch off)Q7 mounted, +7 Amps for 1 transistor (no current loop, switch off)This will keep the power section better protected.I realy love the LT1007 and the LT1037, nice low offset and low noise opamps, doe not use the LT1037 in a power supply, minimal gain is 5x.Low NoiseIs 2 to 5uV RMS 80KHz bandwith to much for you!!!Kind regarts,Bram

author: Powermax
author_rank: Regular Contributor
timestamp: January 09, 2017, 08:28:25 pm
content: Quote from: blackdog on January 09, 2017, 08:09:22 pmI plan to use the LT1007 because, well I have those lying in my junk bin. Strangely enough.And because they are in my LTspice component lists. I've never figured out or really bothered to add other component models. I am in need of adding the OP27, I have a bunch of those and would like to at least try them. I would also like to simulate how much worse a LM741 would perform.

author: Powermax
author_rank: Regular Contributor
timestamp: January 10, 2017, 05:12:52 am
content: I went ahead and got my arduino to output 14 bits of resolution natively, and used a 4 stages of RC networks (22K and 0.47uF) for filtering, but my UT61E claims 1.92mV of AC voltage still present, my Fluke 117 is OL. (but I think the fluke is wrong, I suspect the AC mv range is broke, as both AC and DC mV range have identical readings. I suspect maybe a blown DC blocking capacitor. Maybe time for a teardown?Got it for like $25 paired with a cheap $2 garbage multimeter so no clue of it's origins.)So after messing with this, I think I might be able to achieve 4 sig fig accuracy, although it might be hard. My filtering takes almost a second to settle, which is not too huge of a deal. At the half point (output set to 7.5V to allow the PWM to have the strongest primary frequency content) those 3 millivolts will be multiplied by 3 in the supply design, which is 10 mV, which will make a significant error on the LSB particularly at lower voltages. That's of course not even mentioning issues regarding powering the arduino with precisely 5V (or maybe 5.461333...V precisely so that 15000/2^14 outputs 5.000V), and whatever the effective INL would be, (my guess is that it would be related to jitter in the clock)So a cheap DAC may be better, what do you all think? Whats a good DAC under $5 12 or preferably 14 bit?I would not mind that inaccuracy too much if it was not periodic, audible, visible on a scope, etc. It just bothers me!So a proper 12 bit to 14 bit DAC may be a better option.

author: blackdog
author_rank: Frequent Contributor
timestamp: January 10, 2017, 07:59:25 am
content: Hi powermax,Just one thing before i go to work, LT Spice is OK, but...You learn more by building circuits!!!All your attention should go to the loop controle, to get it stable and fast as posible.You have to learn about wiring in a power supply, a good power supply is wired with the same attention as a HF AmplifierDigital control... one of the last parts of de power supply!My schematic is easy to convert to digital control.Use your soldering iron more and les Spice, just a tipKind regarts,Bram

author: VEGETA
author_rank: Super Contributor
timestamp: January 10, 2017, 12:50:19 pm
content: This DAC is 16-bit and cheap (3$):http://www.digikey.com/product-detail/en/maxim-integrated/MAX5217BGUA-/MAX5217BGUA--ND/3758774Here is the Digikey search:http://www.digikey.com/products/en/integrated-circuits-ics/data-acquisition-digital-to-analog-converters-dac/701?k=&pkeyword=&pv153=5&pv153=11&pv153=22&pv153=19&FV=2640005%2C264000a%2C264000b%2C2640013%2C2640016%2C1f140000%2Cffe002bd&mnonly=0&newproducts=0&ColumnSort=1000011&page=1&stock=1&quantity=1&ptm=0&fid=0&pageSize=25and this is an ADC with 16-bit:http://www.digikey.com/product-detail/en/microchip-technology/MCP3428-E-SL/MCP3428-E-SL-ND/2179226<< costs around 3.6$.I guess they are fairly cheap really with very high precision of 16-bit. Is there any problem with these 2 parts?

author: Kleinstein
author_rank: Super Contributor
timestamp: January 10, 2017, 01:21:25 pm
content: The DAC looks good for that price. Well good enough for a power supply. One might want a little filtering at the output, if low noise is important. But this would also need a low noise reference.The ADC is good, especially for the low voltage at the shunt.The LT1007/LT1037 are essentially the same as the OP27/OP37, just a different manufacturer. It is more like too good for a power supply - but chips are not that expensive any more. For the voltage loop one could still get away with the 741. The current loop might have some use for a low noise precision OP and the extra bandwidth.With a voltage regulator tuned extremely fast (like the one shown by blackdog), parasitic inductance and coupling could get important. So at that level stability depends on the layout and inductance of the parts. Spice usually does not include the extra inductance in the models. At such a low impedance even a few 10 nH could make a difference. One might at least include the inductance of the shunt and maybe the power transistors in the simulations.

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 10, 2017, 01:59:17 pm
content: Quote from: VEGETA on January 10, 2017, 12:50:19 pmIt has 0.65mm pitch, might be a little annoying IMO to solder.MCP4922 is 12 bit and duel, and it is a little bit cheaper but more common:http://www.digikey.com/products/en/integrated-circuits-ics/data-acquisition-digital-to-analog-converters-dac/701?mnonly=0&newproducts=0&ColumnSort=1000011&page=1&stock=0&pbfree=0&rohs=0&k=MCP4922&quantity=&ptm=0&fid=0&pageSize=25

author: David Hess
author_rank: Super Contributor
timestamp: January 10, 2017, 02:19:31 pm
content: Quote from: Powermax on January 09, 2017, 08:28:25 pmThe LT1007 is an improved OP27 so it should perform identically.It would be fun to test a low bandwidth but high slew rate part for the error amplifiers like the LT1371 or various low bandwidth JFET input operational amplifiers.

author: VEGETA
author_rank: Super Contributor
timestamp: January 10, 2017, 04:39:45 pm
content: zetex, 12 bit is not gonna help him achieve 10mV and 1mA minimum set value as I remember, so he needs 14 bit or more... So go for 16 bit. 0.5$ more and much more precision. Maybe I am wrong here and 12 bit is enough, I don't remember. Is there a device that has both dac and adc? that would be nice xD.the usage of external dac and adc with this accuracy will make him use a very cheap MCU since it won't be doing much, so maybe 1$ PIC MCU is going to be enough.

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 10, 2017, 05:06:22 pm
content: Quote from: VEGETA on January 10, 2017, 04:39:45 pm3000mA / 4096 is 0.7mA per 1 value so it will work, right?Sent from my Nexus 5X using Tapatalk

author: Kleinstein
author_rank: Super Contributor
timestamp: January 10, 2017, 05:46:47 pm
content: The MCP4722 and similar are 12 Bit resolution, but with limited accuracy. So the 12 Bit with not so good accuracy is not really giving you 0.7 mA steps. It is more like 0.2 - 1.5 mA steps depending on the code. So it is more like a 10 Bit ADC with 2 more bits than are nearly lost in the noise.Similar the 16 Bit version of the max5217 is not a very accurate 16 bit DAC, but still good for true 14 bits plus two more bits of limited use.If one accepts some extra time for adjustment, one could use the ADC to check the set point too and this way use it to correct a low accuracy but high resolution DAC (e.g. 2 10 Bit DACs combined, or 16 bits of R2R). This is quite some effort. For the current it might be a very real option to have two ranges and use two ranges for the shunt. The accuracy is limited at the very low end anyway, not just by the DAC but also the OP used and thermal EMFs: having a burden voltage of 200 mV at the upper end (more causes trouble with heat), means you are at 200 µV at 1/1000 of the range and thus in the range of thermal EMFs.

author: Powermax
author_rank: Regular Contributor
timestamp: January 10, 2017, 07:31:26 pm
content: Quote from: blackdog on January 10, 2017, 07:59:25 amThanks! Don't worry, I 100% agree! I have been doing that as well with every idea and revision. As I am afraid to kill my better op amps, I have prototyped my last design below. It has problems with current regulation at the very low end (it only goes down to a few mA's) most likely due to the really bad offset voltage of the UA741, and does not appear to have good line regulation at 100KHz, the frequency my 4A 24V switching supply operates at.Check out the rats-nest attached below

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 10, 2017, 08:44:05 pm
content: Quote from: Kleinstein on January 10, 2017, 05:46:47 pmCorrect me if I'm wrong because I have never used DAC's before but lets say that I have a 12bit DAC with +-4INL max, and lets say that the +-4INL is at all code ranges (e.g from 0 to 4096)so if my max current is 3000mA, it means about 0.723mA per 1 value, so if I set the value to 1000 I will get in theory without noise and such:0INL = 732mA-4LSB = 729mA+4LSB = 734mAIs it correct?

author: Powermax
author_rank: Regular Contributor
timestamp: January 10, 2017, 09:34:29 pm
content: I don't know how to make attachments appear/load at full size automatically (I'm still pretty new on this forum) so any advice is appreciated!So I got a rough idea of what filter capacitors I'll be using, 10 of these for 666 cents.:They have damn good ESR, good ripple current, 105oC rated, panasonic, and best of all 66 cents a piece!http://www.mouser.com/Search/ProductDetail.aspx?R=EEU-FM1V122Lvirtualkey66720000virtualkey667-EEU-FM1V122LFor the voltage reference, I like the LM336, looks like a jellybean part, I think someone recommended it, and it's one of the cheapest! (yes, I am a penny pincher, as strangely all the parts together cost like $40! I think mouser is rigged)http://www.mouser.com/Search/ProductDetail.aspx?R=LM336BDG4-2-5virtualkey59500000virtualkey595-LM336BDG4-2-5But I don't like the package. What a waste of 6 out of 8 pins!I found TO92 versions of the LM336 but why would the package affect the temp-co? The one above is rated 10PPM/oC while the TO-92 version rated 34PPC/oC (?)I did come across this bad-ass super-duper voltage reference, 0.05% initial accuracy, 3PPM/oC 10V reference but the 10V part is kind of a deal-breaker. I would need a dodgy resistor divider to bring that down to a more manageable level and then I basically throw those ratings out the window. It's too good and unsuitable. But I am certainly keeping an eye on it for future designs.http://www.mouser.com/ProductDetail/Maxim-Integrated/MAX6043CAUT10TG16/?qs=sGAEpiMZZMuBck1X%252b7j9fADMRbLaMGMSpKa%2f1OuhCQ8%3dI am still going for this rotary encoder, as it has 30 indents, more than the 20 my encoder has at the moment as well as a pushable switch. Unlike many of the other offerings, this one has half the resolution of the indents, so you get 2 pulses per turn. Why is this? Is the purpose of a full cycle per indent to allow programming the trigger to be easier? Or is the full cycle per indent common so that there is plenty of redundancy in case a pulse or 2 is missed?http://www.mouser.com/Search/ProductDetail.aspx?R=EC12D1524403virtualkey68800000virtualkey688-EC12D1524403For the current shunt, I still plan to use this glorified piece of wire, to further improve temperature drift, I will series 2 of them together (thus spreading the heat) That should also allow slightly improved regulation, as a larger voltage drop increases sensitivity of the error amp.http://www.mouser.com/Search/ProductDetail.aspx?R=OAR3R100JLFvirtualkey66200000virtualkey66-OAR3R100JLFOr do you think it would be better to go with one of these instead? Same one, but a flattened-out version. It should have slightly better heat-dissipation.http://www.mouser.com/ProductDetail/Bourns/PWR4412-2SCR1000F/?qs=sGAEpiMZZMtlleCFQhR%2fzUMu1%2fA3jOoDI9fAYn4YTO8%3dI'm not entirely sure if I want to bother with selectable shunts, I'll throw together a perf-board semi-permanent circuit using only the parts I have to judge performance at the low end, using cheap pots instead of arduino for this. (also because I am in desprete need of any sort of decent lab supply at the moment.)Also, what about connectors? What kind of connector should I add to the PCB layout? I don't really know what to look for in Mouser in this regard.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 10, 2017, 09:54:54 pm
content: For the voltage reference, it depends a little on the circuit / DAC, which voltage you need. With just a pot to set the voltage a higher voltage might be a better option.Other relative good cheap ones are TL431 (cheap and adjustable) and LM329 (relatively low noise, 7,x V).With just a pot to set the voltage, there is no need for a really low TC.The filter caps don't need to be low ESR ones. I am not sure you really need 10000 µF.It is a good idea to start with a simple version, without digital part.

author: Powermax
author_rank: Regular Contributor
timestamp: January 10, 2017, 10:26:41 pm
content: Quote from: Kleinstein on January 10, 2017, 09:54:54 pmIt's for the input, I am getting 10 mostly because of economies of scale. (10x quantity costs less per unit) and I know I don't need low ESR ones, just seems to be a really good value. I simulated the amount of ripple that 5A will see from a 80Hz transformer and I am seeing spikes of current reaching close to 20A. 10 of these can safely handle 36A.

author: David Hess
author_rank: Super Contributor
timestamp: January 10, 2017, 11:26:10 pm
content: Quote from: Powermax on January 10, 2017, 09:34:29 pmCheck the datasheets very carefully; Mouser tends to be inconsistent when listing some specifications like temperature coefficient. There is no difference between the same grade of SOIC and TO-92 part in this case.

author: Powermax
author_rank: Regular Contributor
timestamp: January 11, 2017, 12:42:53 am
content: Quote from: David Hess on January 10, 2017, 11:26:10 pmERRR 😠. Mouser, why!? Whatevs, thanks for letting me know.

author: blackdog
author_rank: Frequent Contributor
timestamp: January 11, 2017, 08:04:33 am
content: Hi,If you want to start by builiding a test circuit of your design, de LT1007 is realy fine, i see no problems.But! donotuse a "slow" power section, this give a to big phase lag and to keep it stable you must use large capacitors to compensate.Trap for young players, many designers make the same mistakeStay away of 2N3055 ect, use somthing as the 2SC5200 and de PNP 2SA1943 these are cheap(by real ones) and good. (Toshiba, Faichild)Buffer capacitor, aboud 2000 a 2500uF per Ampere, 6800uF for a 3 Ampere power supply is "normal"You may use 10.000uF for a 3 Ampere power supply, it will give you less ripple.The bigger the buffer capacitor, the more dissipation you wil have in the transformer and rectifier bridge.Be aware that is you buy a 5 Ampere transformer, you can only use about 60% of the max current of this transformer continuously...Kind regarts,Blackdog

author: Powermax
author_rank: Regular Contributor
timestamp: January 11, 2017, 02:58:31 pm
content: Quote from: blackdog on January 11, 2017, 08:04:33 amThanks! My final design should be capable of 5A continuous if I can find a suitable transformer with enough tabs. This is proving to be a challenge, I may need to wind my own. I get that I can take advantage of the ripple to reduce power dissipation as the RMS voltage is smaller. It's a cool technique! At 3A, my complementary darlington drops 1V. Higher than expected, then that paired with the 0.25shunt means I will probably have 3V dropout minimum. I might be able to reduce it if my complementary darlington saturates, which can occur when the voltage looking into the "collector" of the complementary darlington is a smaller voltage than the voltage being driven from the op amps.I am using an MJE2955 as the pass transistor, GBP is only 2MHz, which might be part of why line regulation is not the best. A switching preregulator will probably require the use of a higher speed more modern transistor.But no one can deny the sheer awesomeness of the classic 2N3055, with that 3mm2dye inside!

author: Powermax
author_rank: Regular Contributor
timestamp: January 11, 2017, 03:14:14 pm
content: last post above I have posted my prototype beta (alpha was breadboard) circuit. It's not finished yet, I have yet to solder in some current sources and sinks. Unfortunately the metal film resistor I have are all 100PPM/*C. And the ancient carbon composition 10% resistors are probably worse. Does temp-co matter when resistors are used as dividers? If they are identical resistors, I'd expect simalar changes in all the resistors, which means that the actual division ratio stays roughly the same even as the resistance of the individual resistors change with temperature.I picked the values for this prototype to allow voltages between 0 and 15V, and currents between 0 and 3A. The current was tricky because finding 2 resistors with the right ratio was very difficult. I ended up picking 274K and 16.2K.Also how can I easily achieve a negative 5V voltage rail with jellybean parts? The closest thing I have is a charge pump (MAX680) on hand but it runs of a 5V supply, not a 20V supply, and generates both a +10V and -10V rail, 10mA max. Useful for low power analog amps and stuff powered from a digital rail, but I don't know if I want my -5V rail at -10V, or if I want to use the 78c05 (surface mount 7805) which I am using as a voltage reference to power this chip. It may cause noise on the 5V rail, and significant power dissipation.(30mA max draw from the MAX680 * (20-5) = basically half a watt.)

author: Kleinstein
author_rank: Super Contributor
timestamp: January 11, 2017, 04:15:53 pm
content: One can reduce the dropout a little, if one uses separate diodes and filter capacitor for the base drive. With input tap switching you might want that anyway to have a constant supply for the OPs.Faster transistors can make the supply faster, but than you already get to a range where the layout is important. It can be layout and parasitics that makes the difference between a stable circuit and an oscillation of the sziklai stage. So you need to measure real world and maybe tweak the circuit, both for the complementary power stage and the loop adjustment. With a slow 2N3055 or similar you are in a more predictable range and still fast enough for a power supply.With more than about 2-3 A one might have to consider a second power transistor and thus power sharing resistors. Than these can be used for the extra fast current limit.Usually the drop on the shunt and power sharing resistor is something like 200-500 mV each. With more drop the heat dissipation will get rather large and thus self heating gets a problem.For the negative supply one can use a kind of charge pump, but driven from the mains AC. This is a kind of votlage doubling rectifier. The voltage can be rather high, but to a certain extend it can be adjusted by using the right size capacitors. The extra current through the capacitors is usually at a different time from the main current pulses - so it will not add much to the transformer AC current. Charge pump chips are notoriously noisy as they produce a lot of spikes, so I would avoid them if possible.

author: blackdog
author_rank: Frequent Contributor
timestamp: January 11, 2017, 08:19:29 pm
content: Hi Kleinstein,Try to think more positive, not backwards in design...He can use his LT1007 opamp's and like you say 2 power sections to distribute the heat, if you do it like i say, 2 extra resistors in the sziklai stage, than its stable, no problemo!The design dont have to be so fast as my schematic to be good, The LT1007 is a good opamp for a low noise, low Ri power supply.PowermaxDo not neglect my remarkse about the loopgain and the phase margin!Why do you think i tell you, to not use the 2N3055.Yes i know, there are 1000 designs with LM234/LM741 and 2N3055, 1970 electronic's...If you use more modern stuf like the LT1007 (also old but very good) en modern power transistors, you wil get a low noise and a low Ri powersupply thats not to difficult to build.Use about 50uF/Ampere output capacitor, for your 5 Ampere design this would be 220 tot 330uF, 50 or 63V and good of quality! say Rubicon brand, lager give you a better dynamic responce but also larger piek currents in your D.U.T. if something goes wrong.A tip, go read about loopgain and phase margen in power supply design, much more important than the DA converter.Without good stability of the design, your DA converters are not importantIf you use Google translate, read my measurements and remarke's on this Dutch websitewww.circuitsonline.net.The original design CO-2016 Power Supplyhttps://www.circuitsonline.net/forum/view/130041/1/co+0My modifications of the CO-2016 designhttps://www.circuitsonline.net/forum/view/131554/1/co+0My power supply design page on the circuitsonline.net forum(large)https://www.circuitsonline.net/forum/view/110029/1/co+0Topic on the same Forum of a friend of mine: Gertjan, He also did a lot of measurements on power supplies.https://www.circuitsonline.net/forum/view/130792Happy readingKind regarts,BlackdogPSSorry for my bad English, it is not my native language and I am dyslexic.So bear with me.

author: Powermax
author_rank: Regular Contributor
timestamp: January 12, 2017, 12:09:00 am
content: Quote from: Kleinstein on January 11, 2017, 04:15:53 pmI built up the prototype, made a optional removable daughterboard for a MAX680 charge pump, and on the output I can see the sharp periodic transients from it down around the 100mV range. My prototype uses LM741's and draws a lot of quiescent current (about 150mA, due to the saturated current error amp with its inputs far apart voltage-wise.) I have a selectable jumper pin on it to select either whatever inverting supply I choose, or to give it a proper negative supply externally. My layout is a bit of a mess at the moment due to the very small perf boards and complex circuit, and many mistakes that required soldering re-work. I have yet to debug the current error amp (as it did not appear to work initially) hopefully it's just that the trim is bad on it.Luckily because LM741 and LT1007 and OP27 all have simalar pinouts, I should be able to use any one of them. I mounted pots and connected pins5 and 8 together to one end, and pin 1 to the other, this will allow me to null out the voltage offset for precision.I think this will be necessary on the current error amp.

author: Powermax
author_rank: Regular Contributor
timestamp: January 12, 2017, 12:21:19 am
content: Quote from: blackdog on January 11, 2017, 08:19:29 pmThanks for your input blackdog!One of my unspoken requirements is to find a use for some of the junk I have collected. I have over a handful of 2N3055's (about 15), 10 more MJE3055's, and 11 MJE2955's. I also have a few mid power transistors like TIP31C, TIP42, TIP41C, and a few high voltage ones too. If I was to buy more transistors in the future I'll certainly keep this in-mind.I did read an excellent tutorial / article from All About Electronics that discusses the topic of frequency compensation. It's interesting although I don't fully understand the procedure to actually do it.

author: Powermax
author_rank: Regular Contributor
timestamp: January 12, 2017, 07:02:06 am
content: I just found a bunch of AD517JH op amps, in that sexy metal TO-99 package!I wish these packages still existed today! They look so great!They are astonishingly fast at a whooping 0.1V/uS, have insane GBP clocking in at a blistering 250kHz!Actually these specs are laughable!But I'm sure given that they are ancient relics of the past, I think they are actually pretty good on the precision specs. About 75uV offset, and the noise rating is only about 3 times higher than the LT1007. Those specs are more respectable. Of course I have no idea what any of this stuff means, I'm just a DIY'er Ah well.

author: David Hess
author_rank: Super Contributor
timestamp: January 12, 2017, 09:03:21 am
content: Quote from: Powermax on January 12, 2017, 12:09:00 amThat does not seem right. Maybe something is oscillating? Didn't you add clamps to prevent the error amplifiers from saturating?Quote from: Powermax on January 12, 2017, 12:21:19 amThe modern but still old jelly bean fast TO-220 power transistors are the D44/D45 series. The MJE182/MJE172 series or MJE243/MJE253 make good fast driver transistors if you need something beefier than the 2N4401/2N4403.Fast transistors are wasted on a general purpose bench supply though because of long external lead lengths. Release the 2N2955/2N3055 and TIPs of war.QuoteLook up how to perform transient response testing using a pulse/function generator and oscilloscope. It takes less time to substitute a couple of capacitors and resistors than to run a simulation to find values which will need to be changed anyway.Quote from: Powermax on January 12, 2017, 07:02:06 amWalter Jung's book mentions the AD517. He says it is a laser trimmed version of the AD508 which itself is sort of a super beta 308 but with precision enhancements. To me, it looks like AD's version of the OP07 which is a trimmed OP05 and that is how I would treat it.The AD517/OP07 has much lower bias current than an LT1007/OP27 so it has higher voltage noise but lower current noise. That makes it useful with higher source impedances where the LT1007/OP27 would be noisier. The difference is roughly 30k versus 3k.Be careful about using these operational amplifiers because unlike the 741, they have low voltage shunts across their inputs limiting their differential input voltage range. The input source impedance can limit the differential current preventing damage.

author: Powermax
author_rank: Regular Contributor
timestamp: January 12, 2017, 01:21:04 pm
content: Quote from: David Hess on January 12, 2017, 09:03:21 amYeah, I didnt add them yet. That was total current draw including current draw from the charge pump. So its probably double what it should be. The MAX680 was powered from the 78c05 reference, so its not acvurate. I dnt know how efficient the charge pump is.Quote from: David Hess on January 12, 2017, 09:03:21 amThanks for the lead, I'll check it out!Quote from: David Hess on January 12, 2017, 09:03:21 amIntresting! I'll need to find a use for these 40 or so parts!Quote from: David Hess on January 12, 2017, 09:03:21 amOh yeah, the annoying antiparelell diodes. Would using 1K resistor (or a source with that minumum impedance) on the inputs fix that? My full design should avoid that anyways but good to be safe then sorry!

author: Powermax
author_rank: Regular Contributor
timestamp: January 12, 2017, 01:51:50 pm
content: Here is a picture of the almost completed circuit! It is still problematic, some reason the main pass transistor failed, not sure why, so I rebuilt the complementary darlington. I ran out of solder before I finished it, ended up desperately using disregarded blobs of solder in my cleaning steel wool and lots of flux to finish the job lol! Surprisingly that worked better than expected.

author: Powermax
author_rank: Regular Contributor
timestamp: January 12, 2017, 11:53:59 pm
content: I think I might go for a classic TL431 it has an acceptable temp co, can be precisely tweaked,and has so many uses in analog circuits. The other day when looking at stuff relating to crystal set radios, I saw a "single transistor" amplifier with a very high gain using this chip. Given the price I might buy several along with some LML334's to have on hand.

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 13, 2017, 09:05:01 am
content: Quote from: blackdog on January 11, 2017, 08:19:29 pmHiI would like to simulate your PSU with LTSpiceI'm particularly interested in the preregulatorI already made a rough simulation using an LT1083 as post regulator, butnow I would like to simulate the whole circuitcan you provide a link to the most recent schematic?thanks

author: David Hess
author_rank: Super Contributor
timestamp: January 14, 2017, 05:27:40 am
content: Quote from: Powermax on January 12, 2017, 01:21:04 pmThey would be good as part of a reference circuit. They are not quite as fast as a 741 but certainly fast enough for a general purpose power supply if clamps are used. The annoying part about them is that with a metal can package, they are not exactly direct substitutes for parts in DIP packages.QuoteWith the clamp circuit where the output pulls the inverting input to follow the non-inverting input, this is not a problem. Otherwise series resistors can be used to limit the current if the existing feedback or non-inverting network have too low of an impedance.This is more of a problem with the LT1007/OP27 because they work best with low impedance inputs which makes it difficult to limit the current. With your AD517s, that is no problem at all.

author: Powermax
author_rank: Regular Contributor
timestamp: January 14, 2017, 06:01:44 am
content: Quote from: David Hess on January 14, 2017, 05:27:40 amCool! I might take a look at the pinouts and see if I can substitute it. Currently I am having issues with the reference portion of my supply. I have killed a small SMD 7805 regulator (probably from accidental reverse polarity)and substituted a LM317T into it. Not the best line regulation (I can see an LED literally changing brightness in CC mode with input voltage.(!) but it had killed a 1K pot to adjust voltage, and I am suspicious if the part is damaged or not working properly. Soldering rework on phenolic is a real PITA!!!-----------Also, I noticed my complementary darlington was pickup paranormal activity!!! (ohhh)! well, acting very strange to say the least. I noticed that in emitter-follower config going into an old green LED, the LED would flicker like there was a bad connection or noise pickup even with the base shorted to ground. I scraped and scraped away at the PCB material trying to eliminate soldering gunk between the pins of the MJE3055, but it still seems intermittent at best. Any ideas?

author: Kleinstein
author_rank: Super Contributor
timestamp: January 14, 2017, 08:12:14 am
content: Those complementary darlingtons are somewhat prone to oscillation and if just at the edge, they might pick up RF noise. Just the two transistors are usually just an the edge - so minute extra inductance or capacity can make the difference. To reduce the tendency to oscillation, have a resistor at the emitter of the NPN and make sure the input impedance is not to high. So something like 1 K and 1 nF in series to ground might be a good idea, even if this slows down normal operation.One might use a normal darlington instead of the Sziklai pair. With a slightly higher supply for the drive side there is not more drop.

author: Powermax
author_rank: Regular Contributor
timestamp: January 14, 2017, 05:16:11 pm
content: Quote from: Kleinstein on January 14, 2017, 08:12:14 amI'm not convinced it's a parasitic oscillation, given the chaotic nature of it (the LED is flickering like as if it was a really crusty connection) but I don't know what it could be. The first NPN transistor should not have had anything to do with it, it's job is to turn ON the PNP, not off. I didn't add the pullup resistor to the PNP pass transistor so it's base was left floating. My guess is that something was causing small currents to enter it. Leakage from some source.I might choose to use a darlington in the more final design, because I have 12 2N3055 transistors in the annoying but classic TO-3 package. The only problem is heatsinking. Finding cheap heatsinks large enough that can mount TO-3 is hard. CPU heatsinks are cheap and readily available. I do have 3 of these nice aluminum cast moldings which you can mount a TO-3 package to, and bolt the whole thing to a large flat surface for heat sinking, so I might use these things! I got them out of a 5V 10A linear Lambda power supply. It was a defective unit and was gutted to turn it into a 12V unregulated supply. It had 3 pass transistors in it, and a very weird looking wirewound resistor with 3 seperate 0.3 ohm elements. I didn't reverse engineer the supply but surely these were the balancing resistors for the unit.

author: Powermax
author_rank: Regular Contributor
timestamp: January 15, 2017, 04:34:44 am
content: What do you guys think of the MAX5215 / MAX5217? They seem nice, not the very cheapest but seem more than good enough.INL is Integral Nonlinearity, and DNL is Differential Nonlinearity, and the MAX5217 has a maximum of 4LSB error. Does this mean the output could be as much as 4 counts off? This would translate to (15 / (2^16)) * 4LSB = 0.915527mV maximum error in the output? If so, I think that would be acceptable, still within 4 sig figs, only 1 least significant figure off after rounding.What's the diff between those and the MAX5216 / MAX5216 parts? Banner specs seem equivalent at first glance.Also, if I want to make low noise supply, should I avoid trimmers? I read that pots are notorious for poor thermal coefficients and noise.

author: Powermax
author_rank: Regular Contributor
timestamp: January 15, 2017, 05:00:42 am
content: Also, is it possible to order resistors such that I get an assortment of all the common values? Resistors are surprisingly expensive when you need to order 2 of those, 3 of these, 1 of that, etc...

author: Powermax
author_rank: Regular Contributor
timestamp: January 15, 2017, 05:10:07 am
content: Also, as for "high speed" I have bought these PHE13009 transistors for a flyback driver, but found out they were basically unsuitable due to the difficulty of a strong gate drive and high Vce even when saturated. (something like 4V or so!) Would these be any better than the MJE2955/3055?

author: ZeTeX
author_rank: Frequent Contributor
timestamp: January 15, 2017, 08:34:53 am
content: Quote from: Powermax on January 15, 2017, 05:00:42 amNobody really orders resistors the same amount they need, when you order a resistor, generally most of them are like 0.01$ per one so people just buy 25 of them (even if they need 1 for the project) and slowly they start having a collection.what I did because of reasons is I went to taydaelectronics.com and ordered most of the 1/4W 1% resistors in 10 quantity, tayda doesn't just throw all the resistors in a bag, they separate all the resistors and put them in a small neat zip-lock bag with a sticker that says the resistance of the resistors in the bag.like this:so its much easier to assort them.The resistors are OK quality, defiantly use-able, but "vishay" brand cheap resistors are better as they have thicker legs and usually more accurate then the 1% specified.maybe if you want to get high quality resistors from known distributors but without ordering tons of values you will never use (even though they are cheap) go to tayda website, and look at all the resistors value and choose the one you think you would need in the future and just search them in digikey or something, this way you will never miss a value instead of just going to site and searching random values outwith knowing if they are E12 / E24 and so on.Just don't get the cheap eBay kits, they are horrible and messy.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 15, 2017, 10:16:26 am
content: The max5215/5217 are quite similar chips: one is 14 Bit resolution and the other one 16 Bit. Due to the similar construction the accuracy (INL relative to output range) is similar and thus the 16 Bit version provides not much extra accuracy. I don't think the 14/16 Bit versions are binned parts, it is more like same technology parts with the 16 Bit version possibly a little newer as an upgrade option.

author: David Hess
author_rank: Super Contributor
timestamp: January 15, 2017, 03:22:48 pm
content: Quote from: Powermax on January 15, 2017, 04:34:44 amConfigure the circuit using series and parallel resistors so that the trimmer adjustment range is small. Then the trimmer's uncertainty is reduced.Quote from: Powermax on January 15, 2017, 05:10:07 amThe PHE13009 should work fine but its high speed will make local oscillations more likely.

author: Powermax
author_rank: Regular Contributor
timestamp: January 15, 2017, 03:32:10 pm
content: Quote from: David Hess on January 15, 2017, 03:22:48 pmCool, will do. To reduce noise, I should also use trimmers on the non-inverting input side, not part of the feedback, that way I can tack on a small capacitor on the output of the pot to smooth out noise (?)Quote from: David Hess on January 15, 2017, 03:22:48 pmEven in the darlington config? I can't make a complementary darlington as it's not a PNP transistor anyways.

author: David Hess
author_rank: Super Contributor
timestamp: January 16, 2017, 02:46:28 am
content: Quote from: Powermax on January 15, 2017, 03:32:10 pmIt should not matter if the adjustment range is minimized.For an ADC and DAC controlled design, it should be possible to arrange for only the reference voltages into the ADCs and DACs to be trimmed which gets the trimmer circuits out of the frequency compensation path and allows them to be filtered as much as you want.Arrange the trimmer circuits so that if the wiper goes open, the output voltage or current change is either limited for drops to zero.QuoteSince the PHE13009 and all similar high voltage transistors that I know of are NPN, that will limit you to using it as the output transistor. The only reason to use this type of transistor is because you have a bunch available; a new design would use something like the lower voltage D44/D45 series which are available in both types.I would not worry so much about the output transistor configuration unless you are trying to get the last bit of performance; instead use what you have available.

author: Powermax
author_rank: Regular Contributor
timestamp: January 16, 2017, 06:01:48 am
content: On an unrelated note, I bought those transistors to drive a flyback transformer as replacements for some more expensive MOSFETs. I wanted to see how BJTs would compare to MOSFETs in this application. Those were dirt cheap so I thought I'd give them a try. I was disappointed in the results.Is there much I can do to reduce the Vce voltage and really drive them hard into saturation? I tried making a darlington but quickly found out that unless I use 2 of those transistors, then the small one will die (due to high voltage transients in flyback operation). Using 2 of them defeats the cost benefit of my favorite FTP33N25 MOSFET (a modern more-or-less equivalent to the IRFP250N with simalar ratings)Interestingly, the TIP120 gave me amazing results!!!! (nice fat juicy white arcs, almost as good as the MOSFET), For about 2 seconds, till' it died.So I know of the darlington configuration, and the complementary pair, and after asking this question on Instructables, and I did receive a very interesting configuration shown below, but other than that, what other classic or common BJT circuits exist for high power switching?

author: David Hess
author_rank: Super Contributor
timestamp: January 16, 2017, 01:14:00 pm
content: Quote from: Powermax on January 16, 2017, 06:01:48 amUse different transistor types in ways that take maximum advantage of their strengths. Use the PHE13009 in common base configuration and drive the emitter with a cheap high current low voltage n-channel power MOSFET:http://electronicdesign.com/power/cascode-configured-gan-switch-enables-faster-switching-frequencies-and-lower-losses

author: VEGETA
author_rank: Super Contributor
timestamp: January 20, 2017, 12:17:30 pm
content: Quotethis thing has an SMD version, how can it be used in such designs? and also how to dissipate heat?