# Current measurement over a fairly large range

A part of a circuit I'm building has the following components:

simulate this circuit – Schematic created using CircuitLab

• For clarification, the transistor's base is being supplied with current from a different part of the circuit.

V1 is a voltage source, variable between 0 and 35V. It can deliver up to 1amp, however, in sake of the transistor's safety, I'll be limiting the max. current to no more than 250mA.

R1, is a sensing resistor. 0.1% with a low temp. coefficient.

The values of V1 & R1 as shown are arbitrary.

A voltage will be developed on R1 as current passes through it. My intention was to use a current sensing amplifier that feeds a 14 to 16bit ADC to read the voltage.

The problem is that my ADC will have a reading range of up to 5V, probably a bit less. The current sensing amplifier has some internal gain, 20 seems a common one. This makes it impossible to find a single resistor value which will enable me to get readings in the uA range and high mA range.

For example, if 1uA flows through R1 which is 1Ohm there will be a voltage of 1uV across the resistor. Amplified by 20, the current sensing amp. will output 20uV. With a 16bit ADC and 5V range I have a resolution of 5/2^16 = ~76.3uV so this is will fail to detect anything under 3.8uA and that will be my final resolution. In real life it would be less because of noise, perhaps half of that or a bit worse.

At 250mA the voltage across the resistor is 0.25V times 20 = 5V so that would be the highest value I could measure.

Easy to see that I can not use a larger resistor because that would mean that higher current will go over 5V which means I will not be able to read them. Using a smaller value resistor will cause further loss of resolution on the low range.

What's the way to get "the best of both worlds"? I can imagine using two resistors, but how do I know when to switch between them and who to "believe"? This current reading will be used to auto shut off in case it overshoots a certain value - it must be reliable.

• Since this seems to be just an "auto shut-off" threshold thing, do you really need to be able to measure that threshold down to $1\mu A$ resolution? Out of a max of $250mA$? Seriously? What kind of application is this? – jonk Sep 19 '16 at 18:15
• @jonk I've mentioned the auto-shutoff just to make it clear that the solution needs to be reliable and I can not have unreliable behavior at the end of the selected max current. The device is something like a curve tracer so it will have to measure small currents. – user34920 Sep 19 '16 at 19:00
• Yeah, that current mirror technique was the first place my mind went, earlier. – jonk Sep 19 '16 at 20:19
• But an automated curve tracer! Now that's interesting. Do you want to set currents, sinking or sourcing, and be able to measure the voltage at the pin, as well? Plus, be able to set a low impedance source voltage anywhere, and measure the currents? Now that would be one fancy pin driver! Hmm. You may need to get into $nA$, too. – jonk Sep 19 '16 at 20:20
• Hmm. What kind of voltage compliances? – jonk Sep 19 '16 at 20:26

This is not going to be easy. The normal answer is to use a high side current sensing chip, like the INA16x series. Although I haven't checked the datasheet, I expect that this won't yield 16 bit accuracy.

The first strategy would be to see if you can re-arrange the circuit to do low side current sensing.

That failing, you probably need to float the A/D with V1. If V1 was always at least enough to power the A/D, then just a negative linear regulator would be sufficient. However, since V1 can go to 0, you have to supply some other power. Tie the positive output of the special A/D power supply to V1, then opto-couple the digital lines in and out of the A/D.

• The INA16x chips are high quality instrumentation amps, so this would basically work like some current sense amplifiers from ADI which I looked at, probably the same thing but with fixed (and trimmed) gain resistor in the inst. amp. This is pretty much where I am now. I can configure one of these devices the same way I do with a current sense amp, however I can control the gain which can be good, however I am not sure how to make this bullet-proof in software. Sending the voltage deferentially is not a problem so I think I'll have little benefit from re-arranging the circuit. – user34920 Sep 19 '16 at 17:46
• @user: At 16 bit accuracy, taking two readings and subtracting in software is probably going to get you far too little common mode rejection. Floating the A/D with V1 eliminates common mode problems, because that is handle by opto-isolators and only on digital signals. – Olin Lathrop Sep 19 '16 at 19:10
• So you are saying I should power the ADC from the same voltage source that is used to test the transistor. That is not a problem since V1 is actually a power supply running at about 35V connected to linear regulators that feed the HV digital side of the circuit, namely a DAC that will generate various voltages that are fed into an op-amp + transistor to generate various voltages for V1. – user34920 Sep 19 '16 at 19:16

Not sure if this is any help. But its a thought. It's not designed for $250mA$, but using $\pm 10V$ at the input it will do precision $\pm 500\mu A$ at the output pin with $\pm 50V$ compliances.

simulate this circuit – Schematic created using CircuitLab

Might provide something to stimulate other thoughts. I've certainly used something like it for curve tracing, anyway. (This one is a mock-up for illustration.)

Your Requirements are different than a good DMM.

Normally one chooses a current shunt with a 100mV full scale more or less depending on power ratings, gain to full scale on ADC, input offset error, and desired resolution/error budget.

Start with these specs. 1) Resolution, 2) resolution 3)accuracy in each range

• Then consider shunt R's to optimize the above ranges for 50 to 150mV drop full scale.

• 14 bit ADC gives 8,192 levels + sign bit or <4 decades

• 16 bit ADC gives 32,768 levels + sign bit or 4 1/3 decades