I am working on a control and interface board for high voltage supplies, which requires some current measurement to be implemented. The general terms of the question are similar to this one. The device through which I want to sense the current is at up to +5kV DC but the ground is not guaranteed to be isolated so implementing low-side current sensing is non-trivial. In writing this question up, I have also found this answer which is for a very similar application, but I am expecting the current drawn to range from nano-amps to maximum of about half a milliamp in my case.
I wish to measure output current from the high voltage power module across a few decades, ideally from sub-microamps up to milliamps. The ultimate "display" of the data will be handled by a microcontroller, but in order to access the required dynamic range I've been thinking of using a LOG112 to directly sense the current relative to a reference. To get hold of the current from the high voltage circuit in the first place, I've been told that an optocoupler will work down to a few microamps and I've been recommended the Vishay CNY66, which in a simplified sense I intend to implement as below:
In practice I'm using a LOG2112 since this whole system will have two high voltage channels. As a current reference I'm taking the logarithmic amplifier's onboard 2.5V reference and putting it through a sense resistor.
Does this sort of architecture seem sensible? I'm not entirely sure how I should choose the value of R lim (R2) or what sort of sensitivity I should expect.
Any advice will be appreciated.
EDIT: Changed the diagram to fix an error with the high voltage load's connection.