I suspect all you need have done to stabilise the circuit is connect a 100pF capacitor from the output of the operational amplifier to its inverting input.
EEVblog This might be a bit late, but for those kinds of circuits you should always use the startup option to .tran ("Start external DC supply voltages at 0V") so the simulation will use the input at 0V as initial state and doesnt start simulation with a steady state. This will lead to much more often oscillation, even with your original 2n222 only circuit right away. As additional hints, I always use .opt numdgt 15 (to force double precision, since oscillation might be smoothed out by rounding) and .opt plotwinsize 0 (to save more datapoints for the transient graph. uses more hdd space and memory, but makes the gaphs much smoother and fft much more accurate)
Great Vid! I love that you show how easy it is to destabilize these loops. And great job with the post-production adding in the inset pics as you work in the background! Very effective.
nice video! shouldn't something like a 22nF bypass cap e.g. from the OpAmp output directly to the inverting input should have fixed the problem? R = 10k || 27k = 7k3 and C = 10n ==> 1/(2*pi*R*C) = 991Hz should provide enough feedback to the high frequencies to get rid of the ~1kHz oscillation if I got the math right (haven't actually tried it in a simulator). But of course this would also make the regulator slower. So one would also need to enlarge C1 depending on the type of load.
One thing I've found that affects stability of this in SPICE is the equivelant series resistance value of the output capacitor. Without it specified it is more affable towards starting oscilla ting.
Place a compensating capacitor in parallel with R8 or RC series compensating network. Take a look into "Feed foward compensation techniques". I'm currently desining a professional power supply 0-60V 5A, (P-MOS in my particular case, so pretty challenge) and I had have the same problem.
@darrenhello2 afaics with this solution the circuit would start oscillating again when the load resistance is decreased, as this would reduce the effect the added capacitor has on the feedback path.
good video... I've just tryd your circuit and inserted a capacitor between the output of the op-amp and the emitter of the darlington pair (to have a sort of miller capacitor effect). It worked with every output capacitor tried. I didn't work with it for much time so I don't know its effects in detail but though it mite help!
from the sim it looks like the oscillations are at about 1Khz, i've actually made a linear adjustable supply with an LM324 with whatever power transistors i managed to salvage, as i dont have access to an oscilloscope i cant really check if it is oscillating (at least above 17Khz or so, using a signal tracer) but it seems pretty stable with maybe a bit of noise at the low ends, i'll probably add in those resistors at some stage and see if the noise goes down
Manage to discover this the same way. Having the gain in the feedback loop caused way to much instability. Just using unity feedback and the gain external to the control loop made a helluva difference! Still used the LM324, can't beat them!
Very nice post Dave, really appreciate the heavy tech content. More like this in the future please! You didn't mention if this circuit was for work or for a home project. I hope you didn't mention because you plan on doing some more building posts and you want to surprise us with your next blog. ;) Keep up the excellent work! Rob
@kraudio7 You can either use solder to join the "islands" (you will need lots of solder), enamelled wire (wire that has a thin isolating cover that can be remove just by heating/sandpapering it) or even standard protoboard wire if your designed pcb tracks are big. I would go with enamelled wire, its cheap (or you can get some from an old transformer) and its really easy to use and makes the board look nice from the top.
How can we simulate a circuit as accurately as possible? I have a circuit, where i've managed to obtain all of the simulation circuit components for LTspice. But when i simulate it, i don't get the same distortion and oscillations as i do in the real circuit. I've even gone to the effort of working out the inductance and capacitance of the traces but still nothing the same. The simulation shows that it should be working beautifully well.
nice video, i like it :> anyways, maybe u should use netnames for the supply voltages, like this its kinda ugly. actually a professor of mine said: "if u want a regulator, build an oscillator and vice versa"
True that the theory will not match the actual circuit response, but the theory will probably give you those crucial hints as to what is causing the instability. Otherwise you're just poking around in the dark!
Connect a high value "bleeder" resistor at the emitter of the first transistor of the Darlington pair and connect the other end it to the output of the Darlington pair. Leave the gain at four if you want but kill the high-frequency gain of the feedback loop by adding a capacitor across the feedback resistor. You may need to play around with the values, but it will kill the oscillation. Darlington pairs like this have always had a tendency to oscillate. Why did you choose to use a Darlington pair as the output driver in the first place? What's wrong with just using the output of the opamp as the driver?
I suspect all you need have done to stabilise the circuit is connect a 100pF capacitor from the output of the operational amplifier to its inverting input.
I love Dave’s old videos. Real EE stuff here.
EEVblog This might be a bit late, but for those kinds of circuits you should always use the startup option to .tran ("Start external DC supply voltages at 0V") so the simulation will use the input at 0V as initial state and doesnt start simulation with a steady state. This will lead to much more often oscillation, even with your original 2n222 only circuit right away. As additional hints, I always use .opt numdgt 15 (to force double precision, since oscillation might be smoothed out by rounding) and .opt plotwinsize 0 (to save more datapoints for the transient graph. uses more hdd space and memory, but makes the gaphs much smoother and fft much more accurate)
Great Vid! I love that you show how easy it is to destabilize these loops. And great job with the post-production adding in the inset pics as you work in the background! Very effective.
Your videos are too good I'm addicted to them
nice video!
shouldn't something like a 22nF bypass cap e.g. from the OpAmp output directly to the inverting input should have fixed the problem?
R = 10k || 27k = 7k3 and C = 10n ==> 1/(2*pi*R*C) = 991Hz
should provide enough feedback to the high frequencies to get rid of the ~1kHz oscillation if I got the math right (haven't actually tried it in a simulator).
But of course this would also make the regulator slower. So one would also need to enlarge C1 depending on the type of load.
One thing I've found that affects stability of this in SPICE is the equivelant series resistance value of the output capacitor. Without it specified it is more affable towards starting oscilla
ting.
Place a compensating capacitor in parallel with R8 or RC series compensating network.
Take a look into "Feed foward compensation techniques". I'm currently desining a professional power supply 0-60V 5A, (P-MOS in my particular case, so pretty challenge) and I had have the same problem.
@darrenhello2 afaics with this solution the circuit would start oscillating again when the load resistance is decreased, as this would reduce the effect the added capacitor has on the feedback path.
good video... I've just tryd your circuit and inserted a capacitor between the output of the op-amp and the emitter of the darlington pair (to have a sort of miller capacitor effect). It worked with every output capacitor tried. I didn't work with it for much time so I don't know its effects in detail but though it mite help!
from the sim it looks like the oscillations are at about 1Khz, i've actually made a linear adjustable supply with an LM324 with whatever power transistors i managed to salvage, as i dont have access to an oscilloscope i cant really check if it is oscillating (at least above 17Khz or so, using a signal tracer) but it seems pretty stable with maybe a bit of noise at the low ends, i'll probably add in those resistors at some stage and see if the noise goes down
Manage to discover this the same way. Having the gain in the feedback loop caused way to much instability. Just using unity feedback and the gain external to the control loop made a helluva difference! Still used the LM324, can't beat them!
Very nice post Dave, really appreciate the heavy tech content. More like this in the future please!
You didn't mention if this circuit was for work or for a home project. I hope you didn't mention because you plan on doing some more building posts and you want to surprise us with your next blog. ;)
Keep up the excellent work!
Rob
@kraudio7 You can either use solder to join the "islands" (you will need lots of solder), enamelled wire (wire that has a thin isolating cover that can be remove just by heating/sandpapering it) or even standard protoboard wire if your designed pcb tracks are big.
I would go with enamelled wire, its cheap (or you can get some from an old transformer) and its really easy to use and makes the board look nice from the top.
hi , can you help please show how to simulate an LDO and Battery on LTSpice?
@gbowne1
Nothing fancy, probably just a recap of the first 100!
I need an ADC. I am thinking of a MAX186 or MAX188. Any suggestions?
How can we simulate a circuit as accurately as possible? I have a circuit, where i've managed to obtain all of the simulation circuit components for LTspice. But when i simulate it, i don't get the same distortion and oscillations as i do in the real circuit. I've even gone to the effort of working out the inductance and capacitance of the traces but still nothing the same. The simulation shows that it should be working beautifully well.
@desertbard Why not just use a micro with a built in ADC?
Why BJTs instead of MOSFETs?
I need a complex switching regulator.
Well, we're almost to episode #100.. gee what's dave got planned for the big 100th episode.
change that two resisters into higher value.
nice video, i like it :>
anyways, maybe u should use netnames for the supply voltages, like this its kinda ugly.
actually a professor of mine said: "if u want a regulator, build an oscillator and vice versa"
True that the theory will not match the actual circuit response, but the theory will probably give you those crucial hints as to what is causing the instability. Otherwise you're just poking around in the dark!
It wanted to be switchmode
Connect a high value "bleeder" resistor at the emitter of the first transistor of the Darlington pair and connect the other end it to the output of the Darlington pair. Leave the gain at four if you want but kill the high-frequency gain of the feedback loop by adding a capacitor across the feedback resistor. You may need to play around with the values, but it will kill the oscillation. Darlington pairs like this have always had a tendency to oscillate. Why did you choose to use a Darlington pair as the output driver in the first place? What's wrong with just using the output of the opamp as the driver?
hi