Yes it does, but only if the negative supply rail is below ground, in LTSpice the opamp still got to about 20mV which wasn't too bad on first pass, but I have since decided I want to have a negative rail to allow the opamps to swing to ground
Just because the simulator says it might happen, doesn't mean the model is right, and that it will always happen in practice.
LM358 for example is rated for single supply operation (inputs work down to -0.3V, output will pull down to ~mV), but if you try drawing any current with the output, it won't saturate at mV, it will saturate more like 0.5V. The actual saturation curve is kind of three-stepped, as different parts of the output stage start turning on. The "single supply" characteristic is only true if current is very low (sub 1mA), or even negative (you can use a pull-down resistor from the output to -V, without needing to power the op-amp itself from -V as well). The typical example is a pull-down resistor to 0V, so the output stage ideally never has to sink current at all. Which also keeps it in class A (LM358 output stage has relatively bad crossover distortion, i.e., when output current reverses).
Subtle things like these are useful to know about op-amps. Old parts usually came with an equivalent schematic, which gives you some ideas... if you can decipher it. Sometimes they don't tell you anything, and you just have to guess, or suck it and see. (Example: early MOS op-amps where output range and bandwidth depend on input common mode voltage! Later CMOS (RRIO) amps are better behaved, but the input offset voltage changes suddenly at certain common mode voltages -- because the entire amp is actually two strapped in parallel, so when one polarity of input stage turns off from the common mode voltage, the other is still there to function. But the transistors have slightly different offsets.)
I was concerned about this for my prototype and was hoping someone would comment on this. My thinking was that C5 should filter some of the noise out but still had an aching feeling it wasn't going to be enough. I'm not too sure I follow you with your buffer suggestion though, are you sure you don't mean the currentsense? Also I don't quite follow your suggested buffer layout...
I mean, since you'll have an R+C feedback, the ISET voltage will be disturbed by it (namely, the input into the "op-amp plus feedback" looks like a virtual ground at high frequencies). The compensation will also depend on how much resistance is on the ISET node. Putting a voltage follower after ISET and before the amp isolates this, and lets you set a fixed series resistance.
The purpose of the sinks is that the lm1086 needs 10mA current draw to provide proper regulation, the LM234's are set to about 9mA each (10mA maximum as per datasheet). In this config my theoretical load can be 2mA (probly just lost in the wire anyway) and I will still get good regulation
A BJT current sink would be fine -- easy enough to set for 20mA (plus temp range), no need for a regulated current ref.
Or if you'll be using a negative supply, a resistor wouldn't be terrifically bad. It will draw a bit more current at full output, which you need to be able to sink through that negative rail.
Yes I probably should put a cap at the start. Do you think it would be better to put the current sense after the prereg? Only thing is that in the current configuration I would have to allow the prereg to track an extra volt higher, but shouldn't matter too much as the shunt resistors would dissapate the heat at higher currents
Yes, I would suggest putting it at the output. The voltage drop shows up after the regulators, but you aren't really using them to regulate, anyway. You're using them as followers with a stable offset voltage (namely, Vo = Vin + 1.25V or whatever).
Which, since you're just doing that, you might as well kill two or three birds with one stone:
- Drop the regs, go with regular power BJTs instead (TIP31 or better?)
- Which has crappy offset (Vbe, which depends on load and temp), but
- low dropout (you can drive base voltage up to 0.7V above collector voltage -- dropout is limited by Vce(sat) alone!)
The offset is bad, so you need feedback from the output anyway. But you want that regardless, because you're already wasting the REF accuracy with the REG error -- and, obviously, if you put the current sense at the output, it directly ruins the output resistance. So you need feedback after that, anyway.
So you'd change IC4A feedback from the ADJ node to the output, with a little compensation, and... some other things, such as to implement the current limit safely.
You still want the series resistor R24 from IC4A output to follower input (was ADJ, now the power transistor bases), to limit base current (and to a looser extent, collector current) and allow the op-amp some freedom from the BJT capacitance.
Depending on ratings and all, you may want several BJTs in parallel. Usually with current-sharing emitter resistors. But base resistors may be necessary to prevent oscillation. You may also need additional current, usually a Darlington strapped configuration -- but, you don't need to source that voltage from the preregulator (which would waste your low dropout) -- you can draw that from the primary supply.
The resistors around the transistor actually set PREREG to about 1.7 volt higher than the output, I breadboarded this to get the resistors right as I wasn't sure how to calculate it
Probably because it's in a beta or device dependent manner. In any event, the feedback pin must have a pulldown, because the pin is something like an op-amp input -- high impedance. (If the SPICE model didn't capture this... well...)
- Input protection (you've got a diode on the output, but you're perfectly happy to place a poor, defenseless CD4047 right across a lumbering, looming 15V, 3A+ supply rail?) Good point! How much effort do you thing I should go to? Would a zener and SCR crowbar with a fuse arrangement be too much considering I am using a laptop adapter? Or should I just use a zener similar to the one on the output?
If the adapter is permanently connected, probably not a big deal. But if it's hot plugged and stuff, it's going to see all sorts of nasty transients. I once lost a laptop motherboard to, as far as I know, an intermittent short in the adapter cable. Probably a combination of things: the transient itself causing severe undershoot and large peak reverse currents, and the power management circuitry not responding fast enough to disconnect the battery from the charger (remember, just because it works at DC, doesn't mean it will work at all, or not explode under unusual conditions!).
So, it's better simply not to -- if you can arrange, say, a low voltage rail to handle the logic supply, then that isolates the pansy chips from the mean old outside world. You also get a nice and clean rail to run the REF from, so it's even cleaner.
It would also be nice to run the op-amps from such a supply, but you may not have the opportunity to (i.e., you need to drive the output follower with a voltage range that covers most of the supply range). That said, you can use an analog level shifter or gain stage to accommodate wider ranges from lower voltage op-amps. So there are many ways to attack it, depending on how fancy you want to get.
With the extra regulators, you can then do a couple things: extended supply range (maybe it's good up to 30V instead of 18), put on a very reasonable value TVS (18-24V rating is good for a circuit rated 30-36V abs. max. -- it should survive, say, distant lightning with that protection!*), and maybe even overvoltage or reverse protection (good for automotive use?!).
*There's not really a good working example for this, since the adapter takes the brunt of lightning on AC mains, and probably just blows up under that kind of stress (without making much trouble at the output itself). The working example would be, you have the 18VDC (or whatever) connected through a few hundred feet of wiring, say if you routed it through a house for... who knows why. So nearby lightning causes EMP causes induction in the cable = transients into the thing. Telecoms are a better example (36-72VDC routed through large exchanges and such?), but obviously not the use-case here.
But yeah, just a TVS at the input should be fine to keep things safe under most conditions, as long as everything connected to the rail is safe to run at those voltages (30-36 say). You may then need a level translator to use the CMOS with the rest of the circuit... though I guess you only have it running LEDs and little switches, so that won't actually be a problem at all here, and is actually very handy.
Tim