Author Topic: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?  (Read 17718 times)

0 Members and 1 Guest are viewing this topic.

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #25 on: July 12, 2020, 11:43:48 am »
High dynamic range is also important for the µCurrent.  Not sure if there is something clever that could be done here, for example a logarithmic mode?  Is there such a thing as a log autozero amp...

Dynamic range on the order of 26 bits with reasonable accuracy is feasible with a logarithmic design.  I do not remember ever seeing an automatic "zero" logarithmic converter but it could be done using a pair or more of reference currents.

Since the output would be a logarithm, I am not sure it makes sense without a dedicated meter to show units and I have seen current meters which did exact this to show picoamps to milliamps without range switching.

A few months ago I built a design around TI’s LOG114 plus a programmable power supply. On soldered breadboard (Busboard with solid copper groundplane) I could reasonably resolve from 100pA to 5mA, so not at all far off 26 bits.

The problem with this approach is that it’s dependent on a virtual ground, and the device loses its accuracy beyond a few mA as the virtual ground is too weak.

I used an on board MCU and LCD display, and powered it with a battery. I used the MCU’s on chip 12 bit ADC.

You have to be very careful when measuring, I put the entire measuring device and DUT into a foil tray.

Looks like a good chip, could probably be pressed into service for a logarithmic uCurrent.

It would be awesome to lose the range switching problem altogether.  Maybe it doesn't have to be as good as a real logarithmic response, perhaps a crude approximation with two selectable linear slopes is enough - the second slope goes into effect at some fixed output voltage, say 1V to keep things simple.

The second slope could then be x1, x10, x100, x1000 for outputs beyond +/- 1V




« Last Edit: July 12, 2020, 11:46:22 am by SilverSolder »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17200
  • Country: us
  • DavidH
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #26 on: July 12, 2020, 09:36:31 pm »
Since the output would be a logarithm, I am not sure it makes sense without a dedicated meter to show units and I have seen current meters which did exact this to show picoamps to milliamps without range switching.

The scale could be some number of millivolts per DbV, or something like that, so it would work with any multimeter or scope?

I do not think that would be usable.  The analog logarithmic current meters I have seen simply used a log scale on the meter and the same would apply to an oscilloscope; use a log scale for the vertical axis.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #27 on: July 13, 2020, 01:55:32 am »
Since the output would be a logarithm, I am not sure it makes sense without a dedicated meter to show units and I have seen current meters which did exact this to show picoamps to milliamps without range switching.

The scale could be some number of millivolts per DbV, or something like that, so it would work with any multimeter or scope?

I do not think that would be usable.  The analog logarithmic current meters I have seen simply used a log scale on the meter and the same would apply to an oscilloscope; use a log scale for the vertical axis.


Example:  we set 0 mA as the 0dB reference level at the middle of two log scales.

so


Code: [Select]

 200dB =  100mA
 180dB =   10mA
 160dB =    1mA
 140dB =  100uA
 120dB =   10uA
 100dB =    1uA
  80dB =  100nA
  60dB =   10nA
  40dB =    1nA
  20dB =  100pA
   0dB =   10pA or less  (uCurrent can't go that low anyway)
 -20dB = -100pA
 -40dB =   -1nA
 -60dB =  -10nA
 -80dB = -100nA
-100dB =   -1uA
-120dB =  -10uA
-140dB = -100uA
-160dB =   -1mA
-180dB =  -10mA
-200dB = -100mA
So the output of the uCurrent could vary from +2000mV to -2000mV to represent the current magnitude and direction of +200.0dB to -200.0dB (1 decimal point).

This could look good both on a scope and on a DMM.

10 decades of log amplifier might be a tall order...  but the highest couple of ranges could be a "cheat" of some kind...  and 0dB could be 100pA instead of 10pA, realistically.  8 decades doesn't seem too terrible?
« Last Edit: July 13, 2020, 01:58:11 am by SilverSolder »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14842
  • Country: de
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #28 on: July 13, 2020, 08:33:03 am »
Analog logarithmic circuits usually rely on the diode IV curve and are quite a bit temperature dependent. If the measured current directly goes through a diode, there would be self heating at the higher ranges (e.g. > 100 µA).
Even with some compensation it would not be very accurate. One has some 60 mV for 20 dB and 2 mV/K of temperature drift. So even of 90 % are compensated it would be some 0.05 dB/K of residual temperature effect.
Drift of the OP would be the smallest problem. Temperature regulation needs to much power to practically used battery power.

Due to the large drop with a diode it would need some kind of logarithmic trans-impedance amplifier, so only for currents the amplifier can drive, so maybe up to some 10 mA.

It would be a completely different instrument / tool, and not really workung well with negative currents, or just zero. 
 
The following users thanked this post: SilverSolder

Offline exe

  • Supporter
  • ****
  • Posts: 2622
  • Country: nl
  • self-educated hobbyist
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #29 on: July 13, 2020, 01:43:49 pm »
I wonder if an oven could solve the problem. Like, a log-amp in LM399 package with an integrated heater.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14842
  • Country: de
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #30 on: July 13, 2020, 03:00:53 pm »
A log amp with an oven is a real option. It would at least avoid the temperature drift compensation and variable scaling factor. I have seen such plans using a quad transistor array: 2 heaters, one sensor and one as a diode for the log function. One may be able to use an LM723  (the main amplifier as a heater, the output transistor or auxiliary zener as sensor and the transistor for current limiting as the log element.
 
The following users thanked this post: exe

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #31 on: July 13, 2020, 03:26:24 pm »
A log amp with an oven is a real option. It would at least avoid the temperature drift compensation and variable scaling factor. I have seen such plans using a quad transistor array: 2 heaters, one sensor and one as a diode for the log function. One may be able to use an LM723  (the main amplifier as a heater, the output transistor or auxiliary zener as sensor and the transistor for current limiting as the log element.


I had no idea that log amplifiers were so sensitive to temperature, but it kind of does make sense.   We are dealing with something like 24 bits of solution to span 8 decades, which is probably always going to be "challenging" to get excellent results from.

Perhaps there is a simple way to approximate a log response with a few linear segments, which would be "good enough for Australia" for this application?

(Love the LM723 idea!)
« Last Edit: July 13, 2020, 03:30:16 pm by SilverSolder »
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #32 on: July 13, 2020, 03:50:12 pm »
Another option for a log amplifier might be to use a variable gain amplifier.

For example, this snippet from the Texas Instruments VCA810 data sheet:



Maybe the OPA820 op amp could be replaced with an auto-zero op amp for DC applications?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14842
  • Country: de
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #33 on: July 13, 2020, 04:47:26 pm »
The problem with the log amplifier is not so much the large dynamic range, but the inherent temperature dependence. The scale factor is  kT/e  and thus proportional to abs temperature. Something like an PT1000 can give an approximate compensation, but not perfect.

There are reasonable cheap resistor arrays (e.g. MMPQ3904) available and the LM723 is TO99 is rare - AFAIK it also lacks the auxiliary zener. For the simple log circuit there is no need to have matching.

The trick would be using the nonlinear diode / transistor directly in the input stage as a shunt replacement. If one still has a shunt resistor to start with, one has the limited dynamic range from the small drop at the shunt.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #34 on: July 13, 2020, 05:17:50 pm »
The problem with the log amplifier is not so much the large dynamic range, but the inherent temperature dependence. The scale factor is  kT/e  and thus proportional to abs temperature. Something like an PT1000 can give an approximate compensation, but not perfect.

There are reasonable cheap resistor arrays (e.g. MMPQ3904) available and the LM723 is TO99 is rare - AFAIK it also lacks the auxiliary zener. For the simple log circuit there is no need to have matching.

The trick would be using the nonlinear diode / transistor directly in the input stage as a shunt replacement. If one still has a shunt resistor to start with, one has the limited dynamic range from the small drop at the shunt.

The downside with that approach is that it doesn't start to work until the burden voltage is > 0.6V or something like that...  and the whole point is to get the burden voltage down very low.  Perhaps diodes / transistors can be placed somewhere else, e.g. in the feedback path?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14842
  • Country: de
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #35 on: July 13, 2020, 05:26:06 pm »
Because of the high drop the diode would have to be in a feedback path, a little like a trans-impedance amplifier.
This a quite common configuration for a log amplifier. The downside is that the current range is a little limited to maybe some 10 mA or so, because of heating in the transistor, even with a low voltage (e.g. some 0.5 V).
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17200
  • Country: us
  • DavidH
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #36 on: July 14, 2020, 02:24:27 pm »
The emitter resistance of the transistor limits accuracy at high currents before self heating by adding to the Vbe.  The collector voltage is very low limiting power dissipation.  At low currents leakage limits accuracy but picofarad measurements are possible.

Note that the transistor connection yields several more decades of dynamic range compared to the diode connection; ignore the limitations of diode connected logarithmic amplifiers.
« Last Edit: July 14, 2020, 02:35:34 pm by David Hess »
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #37 on: July 14, 2020, 04:14:13 pm »
The transistor(s) could perhaps be switched in and out of the feedback by means of another switch on the uCurrent -  so the device can retain its three "standard" linear ranges, and add a Logarithmic mode for those situations that call for it.

Winner, winner, chicken dinner!  :D
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14842
  • Country: de
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #38 on: July 14, 2020, 05:29:13 pm »
The logarithmic part would be essentially independent. In addition the log part would need quite some current, especially when using temperature stabilization. Even without, the measured current would have to come from the source.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5410
  • Country: gb
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #39 on: July 14, 2020, 10:44:27 pm »
Dedicated log amps like the LOG114 and AD's ADL5303/5304 use trimmed internal thermal compensation.

Despite having the Eval boards for all of these devices, it was a bit of an uphill struggle to get them to work in the way I wanted, because they're really designed for photo diode applications. The TI LOG114 offered the path of least resistance in the end. It was surprisingly easy to get 100pA resolution in my own design. Because of the logarithmic nature of the device, if you're OK with nearly 3 sig figs of resolution across the range, you can make do with an MCU's 12 bit ADC. From grim experience, this is much easier than trying to get decent readings out of a 24 bit ADC, which will be much slower, and require averaging and oversampling.

You have to remember that you need to have a means of combining the log amp with a power supply of some sort. In its simplest form, you can use the on chip reference, but I used the MCU's DAC output with a bipolar voltage follower. In retrospect, bearing in mind it's only a few mA, you could use an op amp as a buffer, but keep in mind the limitations of any capacitive loading.

If you have a scope with a math exp function you can usefully probe the log amp's output (DS1000Z even has it), pretty darned useful for my use case which is button cell powered MCU based devices.

The biggest problem as a practical device for my use case is the weak floating ground which becomes a problem when you start going over a couple of mA, a real problem if you have inrush current or activity spikes because effectively your DUT's power supply voltage lags badly.

I've gone back to using 24 bits ADCs and some of the newer low offset current sense amps for current measurement for now, but practically speaking I'm finding it difficult to achieve much beyond 5.5 decades with an acceptable update rate, but it's a work in progress.
 
The following users thanked this post: exe

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #40 on: July 14, 2020, 11:10:30 pm »

A further complication is that the uCurrent has to be able to deal with both positive and negative currents, so it isn't strictly speaking enough with a log transfer function...
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5410
  • Country: gb
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #41 on: July 15, 2020, 07:47:39 pm »

A further complication is that the uCurrent has to be able to deal with both positive and negative currents, so it isn't strictly speaking enough with a log transfer function...

That’s right, although I’ve never meant to use the uCurrent in that mode.

Its only flaw in my use cases is that it lacks dynamic range within the limitations of the cobbled together systems I’ve come up with that use it, partially due to the instruments, and partially due to the uCurrent’s shunt resistor plus unipolar output.

To measure the kind of high dynamic ranges typical of today’s low duty cycle battery powered devices, 6+ decades of current measurement is very useful, with a top end ITRO 100mA and bottom end resolution in 100s of nA.
 
The following users thanked this post: SilverSolder

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #42 on: July 16, 2020, 03:30:19 pm »
If it is acceptable to deviate a little from the ideal bipolar logarithmic response, it seems possible to get very good results with the kind of relatively crude circuit below.  The circuit gets pretty close to the "mathematically ideal" log response despite being an approximation "mix" of two lines and a log.

Here, the op amp handles the response near zero so performance is stable with no temperature effects there.  The transistor temperature effects only come into play at high readings - and since they are linearized (a little!) with the emitter resistor, the effects are not really terrible at all, within a range of about 10C around room temperature.

Since the op amp solely determines the precision near zero, the circuit should work over many decades, perhaps as many as 8 or even more, depending on noise etc.?





« Last Edit: July 16, 2020, 03:43:49 pm by SilverSolder »
 

Offline exe

  • Supporter
  • ****
  • Posts: 2622
  • Country: nl
  • self-educated hobbyist
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #43 on: July 16, 2020, 03:38:07 pm »
Since the op amp solely determines the precision near zero, the circuit should work over many decades, perhaps as many as 8 or even more, depending on noise etc.?

Without temperature compensation I expect error to be quite big. Although, may be a periodic auto calibration can be an option.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5410
  • Country: gb
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #44 on: July 16, 2020, 07:09:22 pm »
Since the op amp solely determines the precision near zero, the circuit should work over many decades, perhaps as many as 8 or even more, depending on noise etc.?

Without temperature compensation I expect error to be quite big. Although, may be a periodic auto calibration can be an option.

In the TI (Burr Brown) LOG114 I've used, it has a parallel path, one for the DUT and the other with a precision current reference (implemented with an internal voltage ref plus external precision resistor), and then an internal difference amplifier. The two paths use internal matched transistors and thermally dependent resistors on each path to cancel out temperature drift.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #45 on: July 16, 2020, 09:21:20 pm »
Since the op amp solely determines the precision near zero, the circuit should work over many decades, perhaps as many as 8 or even more, depending on noise etc.?

Without temperature compensation I expect error to be quite big. Although, may be a periodic auto calibration can be an option.

Here is what happens at temperatures of 15C and 25C (both green curves).  The temperature only has an effect at higher readings (where the transistors are fully active) and looks like about a 2.5% error.  The temperature error doesn't look much worse than the error made by approximating the log function in the first place...

Close enough for Australia?   ...you can always switch back to a Linear mode on the uCurrent for precision measurements.  The log function is really only to be able to "see" the wide dynamic signal on the scope, not necessarily to make precision measurements on it (how would you even do that).  No?

« Last Edit: July 16, 2020, 09:33:30 pm by SilverSolder »
 

Offline exe

  • Supporter
  • ****
  • Posts: 2622
  • Country: nl
  • self-educated hobbyist
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #46 on: July 17, 2020, 08:06:52 am »
The log function is really only to be able to "see" the wide dynamic signal on the scope, not necessarily to make precision measurements on it (how would you even do that).

I think it's a nice idea to have different tools with different trade-offs. Some people are happy with just measuring sleep current and active current separately, or even just measuring an average current. Others say they need to see transitions between the two or three  states (active/sleep/wireless transmission) because this somehow affects battery efficiency due to battery chemistry or something (I'm clueless how this works).
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #47 on: July 17, 2020, 11:09:32 am »
The log function is really only to be able to "see" the wide dynamic signal on the scope, not necessarily to make precision measurements on it (how would you even do that).

I think it's a nice idea to have different tools with different trade-offs. Some people are happy with just measuring sleep current and active current separately, or even just measuring an average current. Others say they need to see transitions between the two or three  states (active/sleep/wireless transmission) because this somehow affects battery efficiency due to battery chemistry or something (I'm clueless how this works).

You just pretty much exactly described my use case -  keeping an eye on transitions between active/sleep/wireless transmission.  I found the µCurrent simply doesn't have enough dynamic range to do that without running multiple tests at different ranges.  Of course, you could always buy a second µCurrent, put both in series, set them to different ranges, and feed their outputs into separate channels on your scope!  :D

As other posters have pointed out, a high quality log function is unlikely to be simple or cheap enough for a relatively inexpensive device like the µCurrent.  So we are looking at either auto-ranging (which some competitors to the µCurrent have implemented) or a very good but not perfect log function.  Auto-ranging is much more likely to introduce weird artifacts in the results than a log function, as the device hops between ranges "chasing" the signal...
« Last Edit: July 17, 2020, 11:13:35 am by SilverSolder »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17200
  • Country: us
  • DavidH
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #48 on: July 17, 2020, 11:22:44 am »
Quote
A further complication is that the uCurrent has to be able to deal with both positive and negative currents, so it isn't strictly speaking enough with a log transfer function...

I think there is a Burr-Brown or Analog Devices application note which solved this problem with a translinear current inverter which has more dynamic range than an inverting amplifier.

I remember how this works now and it applies especially to integrated log amplifiers.

The problem was how to accept a positive current into the common NPN log amplifier which only works with negative currents.  An inverting current amplifier using a transimpedance amplifier followed by a resistor will not work because it does not have enough dynamic range.  A current mirror would destroy the virtual ground.

The solution is to add an operational amplifier to a current mirror to make the input into a virtual ground, which results in a log and antilog pair.  It is the same circuit as the transimpedance amplifier followed by a resistor except the two resistors are replaced with diodes or transistors.  The diodes or transistors compensate each other for temperature so no special requirements other than matched devices are required.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: EEVblog #1318 - What's State-of-the-Art in µCurrent Opamps?
« Reply #49 on: July 17, 2020, 01:37:09 pm »
Quote
A further complication is that the uCurrent has to be able to deal with both positive and negative currents, so it isn't strictly speaking enough with a log transfer function...

I think there is a Burr-Brown or Analog Devices application note which solved this problem with a translinear current inverter which has more dynamic range than an inverting amplifier.

I remember how this works now and it applies especially to integrated log amplifiers.

The problem was how to accept a positive current into the common NPN log amplifier which only works with negative currents.  An inverting current amplifier using a transimpedance amplifier followed by a resistor will not work because it does not have enough dynamic range.  A current mirror would destroy the virtual ground.

The solution is to add an operational amplifier to a current mirror to make the input into a virtual ground, which results in a log and antilog pair.  It is the same circuit as the transimpedance amplifier followed by a resistor except the two resistors are replaced with diodes or transistors.  The diodes or transistors compensate each other for temperature so no special requirements other than matched devices are required.

Would it be difficult to implement this 'on the cheap' outside the confines of an integrated circuit?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf