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 Szlaki 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.
I used the LM324, which while it could source some considerable current, it can only sink a few tens of microamps!!!
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)
Seems you ignore me, but..QuoteI used the LM324, which while it could source some considerable current, it can only sink a few tens of microamps!!!
Certainly 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.
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.
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" IO and is split into 2 sections, Source and Sink. I can't imagine what else it might be referring to.
Good 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.
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.
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.
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.
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:
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:
WOW, 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.
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?
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?
Do 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.
That is a great design and reminiscent of the Tektronix PS501 or PS503.