I am working on a circuit for measuring very low and very "fast" currents (think: measuring power consumption of an MCU). I found out that I can measure what I want with a sense amp and a shunt resistance of 270R. The load needs around 2.5 V and can have a peak current of 20 mA but the usual current is well below 1 uA. At the maximum current the shunt would be dropping 5.4 V so I picked a regulator (LT3042) that has an independent sense pin to compensate for the drop in the shunt.
When I connect a fixed load (resistor or current DAC) the circuit works exactly as desired but when I connect the real load (an MCU) the circuit starts to oscillate and the voltage at the load is lower than desired.
When I short the shunt with a piece of wire the circuit immediately stabilizes and delivers proper fixed voltage but goes bad immediately when I remove the wire.
R1 & C1 are to stabilize the regulator. Without them the regulator delivers unreliable voltages in all circumstances.
Is there a a better topology (or components) for an adjustable LDO that can regulate the voltage behind a 270R shunt?
simulate this circuit – Schematic created using CircuitLab
CH 1 (top blue trace) is the voltage "before" the shunt. CH 2 (bottom red trace) is the voltage "after" the shunt (at the load), it should be 2.5 but oscillates between 1.8 and 2.47 V.
UPDATE 1
Cset = 4u7 reduced the output ripple a little bit but there are still wild oscillations on the regulator output.
UPDATE 2
I was able to reduce the shunt to 45R and increase sense amp gain. The output still oscillates but now the voltage after the shunt has a ripple of 5 mV which is "good enough".