# Automatic ranging current sensing

I am trying to implement a current shunt sensing circuit. This should be automatic and currently i want it to measure uA to around 200mA, and Change to the mA range at around 200uA. This is to profile sleep and active profiles in micro controllers. It will then finally interface with an ADC.

The circuit comprises of the following:

• 2 x LTC6102 - These are current sense amplifiers and are fed with two different size shunt resistors. 10 ohm for the uA range, 10m ohm for the mA range.

• 1 x LT1016 Comparator active low - I am using this here for switching to the mA range. With a reference of 3v3.

• 1 x PMOS - Using this to short the connection of the 10ohm resistor when the current changes to mA.

So the ideal theory of operation is:

• Measuring low amount of uA. Micro controller turns on and consumes mA this causes the node uA to saturate, turn on the compartor and thus on the PMOS shorting the 10 ohm resistor and now we use the 10m.

Here is the circuit in LTSpice

Issues

The issue i have with this is it just doesn't work. I don't know if this is due to the fact i would need some kind of delay in the switching and sensing of M2?

I also have an issue with the common mode voltage input. So when using 5V the LTC6102 will output the correct gain when saturated, this is given by Av=R3/R2 which is 1650 in both amplifiers. However when using 3v3 this same gain does not work seems around a 1/4 of the voltage output?

I can provide current/voltage profiles if needed

• For start, PMOS Bulk connected to the low side, change it. Sep 19, 2016 at 12:44
• However when using 3v3 this same gain does not work Do you mean that you make the supply voltage of the LTC6102 equal to 3.3 V ? Look in the datasheet, the minimum supply voltage is 4 V ! My guess is that at 3.3 V there's not enough headroom to open the build-in NMOS sufficiently so less current comes out because the current is saturated. Plot Vout vs Iload to prove this. Sep 19, 2016 at 13:44
• You will need some hysteresis around the switch point, once you get it working. Sep 19, 2016 at 14:10
• FakeMoustache, the supply voltage is still 5V, but the voltage to the inputs is 3v3 it won't work Sep 19, 2016 at 14:11
• (i.imgsafe.org/ff38557d19.png) See the output diagram of Vout and Iload, when driven supposedly to saturation is only 560mV and not the expected 3.3V Sep 19, 2016 at 14:19