Other Parts Discussed in Thread: LM321, TL071, , INA168
Tool/software:
Hello,
We want to put out a 4-20mA current (process control) from a filtered PWM.
Since we set it from a micro, it is low-sede, but we need a high-side output from 24V towards GND.
Using an opamp controlled NPN sink transistor with a PNP current mirror at 24V works fine, but error gets bigger (including 3 resistores plus 3x base current + beta variation + UBE mismatch).
So I added a high-side current monitor that puts out a small current towards GND, for feedback, see attached picture.
This corrects everything but R7 error and its own offset, if T2 is a FET. Using a bipolar would add some base current error, hence the BSS123.
It works with a TL071 for IC1 (input to V+) and LM321 for UC2, with just 1nF as C12 to tame the LM321.
To have the same part for both ICs, and get lower offset, we used OPA991 for IC1+IC2.
One or both opamps sometimes (!) oscillates wildly.
It works fine until you touch just about any node with a scope probe, then one or both ICs start oscillating and output current increases or descreases 20%. Removing the probe does not help then.
Using 1µF (!) for C12 makes IC2 stable, with IC1 still oscillating, but to my surprise the output is correct. Seems it intergates out the oscillations.
Adding one of the hand drawn caps C20-C22 just changes the frequency, down from 3MHz to a few kHz. Using BC847 for T2 helps nothing, and it is not the supply either (rock stable).
If we replave IC1 with INA168 (other mods see pic), it works with C12 just 1nF. Why is the INA stable, and the same circuit with external R5+6 and T2 added not?
If this is not readable, I can post a PDF.