Hello incf,
It might be that using a vanilla opamp and some current mirror voodoo will do the trick. But of course the path is a bit steep and final specs could be disappointing.
If you need mutiple source for a dedicated part (in this case, the current sense amplifier), you may want to select 2 or 3 parts from different manufacturers and put multiple footprints on the PCB. You only populate one of those, depending on parts procurement.
Here's the list of Current Sense Amplifier from LT/AD (uni and bidi versions, up to 105 V, zero drift, 'Over-The-Top' feature, which is even better than 'rail to rail').
I have to admit that I'm not sure offhand how the opamp's CMRR spec would affect it's ability to serve as unity buffer/current mirror
If I understand the formulas right, a CMRR of 80dB on a unity gain buffer would give a offset voltage of 100 microvolts per volt - I think?
So from 10V to 30V a common mode offset voltage of 2mV might develop (equivalent to an error of +/-0.2 amps across a 10 milliohm shunt)
It's the input offset voltage which is the main problem for the current mirror circuit. The CMRR isn't a big deal because both inputs stay around the same voltage. The supply rejection ratio is more of an issue, if the input voltage doesn't stay constant, but that can be improved with the zener diode.
While I like the concept of the LT6015, it doesn't fit the bill.
I'm limited to the cheap commodity type parts with multiple suppliers.
There are plenty of high voltage JFET input parts which have an input common mode range that includes the positive supply. The venerable LM301A bipolar part also works to the positive supply.
Which ones? so far I've got
- TL071/072/074
- TL081/082/084
- LM301A
edit: gee... the '301 really is a lousy amplifier. The large signal gain is only 15k not the usual >1M - I feel like having so little gain would introduce offset error (2mV @ 30V I think)
The stuff about clamping is nice to know, but irrelevant to this application.
The low gain shouldn't be a problem with the current mirror circuit, because the gain of the circuit is close to unity. The output is connected to a source follower, which means the voltage on M1's source is the same as the gate, plus a fixed threshold voltage. Changing the input voltage by 100mV, causes the op-amp's output to change by roughly the same voltage.
I was going to suggest the ZXTC1009, because it's very easy to use, but it's not a generic IC and is only rated to 20V, so will need some tricks with a cascode to get it to work at higher voltages.
https://www.mouser.com/datasheet/2/115/ZXCT1009-93594.pdfSchematic for educational purposes only. M1 has a potential divider which delivers half the supply voltage to its gate. The source voltage follows the gate voltage and is always a couple of volts above the gate. The voltage across the ZXTC1009 is therefore half the supply voltage minus a couple of volts. No current flows through the MOSFET's gate, so the drain current is the same as the source. The ZXTC1009 changes its current draw dependant on the the supply voltage and is sensed by R4. It works on the same principle as the current mirror circuit in my previous post.

A cascode circuit similar to the above can be used with the current mirror circuit I posted, to improve the supply rejection ratio. Engineering is all a compromise. If you want better accuracy, lower offsets, higher supply rejection etc. then it means more costly ICs and/or more components.