Author Topic: feedback/shunt ammeter design  (Read 6200 times)

0 Members and 1 Guest are viewing this topic.

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
feedback/shunt ammeter design
« on: June 27, 2021, 06:57:19 am »
I'm putting together a piece of test equipment similar to the joulescope, with higher sample rate and much better bit resolution. Perhaps this could be a digitizing solution others could use as well. It will be open source of course. First part to tackle is the current sense.

Target specs are:

0-5A
1nA resolution
DC-500khz, maybe DC-1Mhz if possible
low burden Voltage ( <40 mV)

For low currents, (less than say 10mA) a transimpedance amplifier seems wise. OPA192 was chosen as first opamp. It has similar offset to OPA189 but has only 5pA bias current. There is 5k resistor in the feedback loop to allow for wide dynamic range of currents. Followed by a gain stage which performs two functions: provides some initial gain, brings the signal output back to positive polarity (not inverted). A small amount of capacitance on the output to stabilize the loop. This is switched to next gain stage.

Larger currents are measured via shunt. The individual shunts are selectable via fets. Part selection here was challenging. The ideal components would have low capacitance, and low Rds_on. Low C_ds  requires a physically smaller part, which tends to higher Rds on. If you have any better component suggestions, please advise. Two shunt selection FETs were placed in series (common source) to lower the capacitance for each "switch", and also to help lower leakage current. Negative gate voltage of -5V should help with leakage currents. The shunt voltages are fed to OPA189 which also does gain of 5. Then to the selector switch.

After selector switch is is composite amplifier. OPA189 auto zero in front for good dc performance followed by fast amplifier AD8065. Each amp has its own FB network for stability. I haven't done composite amp before so if you have better design in mind please advise. I wasn't sure if outer loop needed to be compensated or not. The outside FB network has default 200k resistor, and then other resistors added in parallel, to lower the value of the FB resistor. This provides gain ratios of 2,5,10,40, and 201. Total gain of 10, 25, 200, 1005. MAX4614 does the switching. It has good performance. 1k resistor placed in front of the switch to help isolate off capacitance of the switch from the output.
Edit#1: put 1k resistor in front of each switch
Edit#2: replaced TMUX1119 w/ FETs. Realized this needs to be make before break
Edit#3: switches changed from ADG721 to ADG1221
Edit#4: differential amp LT6373 and ADA4003 added



Here is picture of schematic, but pdf also attached because its hard to see part numbers and such in schematic picture. Any feedback is welcome. The next step is putting together differential driver for the ADC, and ADC selection.


« Last Edit: July 07, 2021, 01:48:47 am by Crossphased »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14197
  • Country: de
Re: feedback/shunt ammeter design
« Reply #1 on: June 27, 2021, 08:10:26 am »
The nominal offset of the OPA192 is good, but the drift is not that great.  So I would not consider the OPA192 a really good choice. The 5K resistor in the FB is relatively small. At higher currents one would get quite some heating of the resistor and the OP. So the TIA allready starts showing weaknesses from some 1 mA on.

The composite amplifier at the output has some flaws: the switches are in sereis with the gain setting resistors. So the gain would not be very stable. There are usually better ways, e.g. by having the divider at the outut side and only switching the feedback path to the OP.
With a fixed gain for the inner amplifier the low gain setting will likely have a stability problem. So usually one has to switch the gain of both amplifiers: one MUX (e.g. 1/2 of  HC4052) for the inner amplifier and the other halt for the total gain. Usually the gain of the inner amplifier should be a little lower than the total gain. Only at very high total gain the inner gain should be limited to about 1/3 the GBW ratio of the OPs times the square root of the total gain.

I see littel need for so many amplifier settings: the full scale voltage for the shunts is usually relative fixed and thus not much gain switching needed.
The TIA output is more like a high voltage and thus no need for the extra fixed amplifier stage after the TIA. It would be more that one could consider a divider to get levels comparable to the shunts. So the switching would be chosing the shunt path, the TIA direct and the TIA with a divider.
 
The following users thanked this post: Crossphased

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #2 on: June 27, 2021, 09:18:33 am »
Thankyou as always for your excellent replies Kleinstein. You are a wealth of knowledge and I always enjoy your rich with experience feedback.

The nominal offset of the OPA192 is good, but the drift is not that great.  So I would not consider the OPA192 a really good choice.
Quite right, did not notice the drift. I'll stick with OPA189 then for first OP.

Quote from: Kleinstein
The 5K resistor in the FB is relatively small. At higher currents one would get quite some heating of the resistor and the OP. So the TIA already starts showing weaknesses from some 1 mA on.
I think I misunderstand here, are you suggesting 5k is too small or too large? I agree, at 5k, only good up to ~1mA, or too much heat dissipation. Will reduce that to 1k. Its difficult to find a balance of getting good resolution at nA range, but still have higher ranges available. 1nA*1k = 1uV, then gained to 5uV on next stage so I guess that's ok. At 10mA that's (.01^2)*1k = 0.1W, that's doable. Will split 1k into two 500R for good margin.

Quote from: Kleinstein
The composite amplifier at the output has some flaws: the switches are in series with the gain setting resistors. So the gain would not be very stable.
Do you mean because of changing Rds_on of the switches due to temperature? I considered that, but according to the datasheet for MAX4614 the on resistance flatness is 1 Ohm over 0-85 C. So 1R change out of the smallest leg, 7.2k, is not too much. Then that in parallel with the other legs makes it very small change. I see what you mean though. I just looked at HC4052 datasheet and it changes on resistance by a factor of 3 over the temp span. That would definitely lead to unstable gain!!

Quote from: Kleinstein
There are usually better ways, e.g. by having the divider at the output side and only switching the feedback path to the OP.
Oh I see what you mean, got it- divider string of resistors, and switching tapped resistor to inverting input. Makes sense and then the switches don't carry current. Cool.


Quote from: Kleinstein
With a fixed gain for the inner amplifier the low gain setting will likely have a stability problem. So usually one has to switch the gain of both amplifiers: one MUX (e.g. 1/2 of  HC4052) for the inner amplifier and the other halt for the total gain. Usually the gain of the inner amplifier should be a little lower than the total gain. Only at very high total gain the inner gain should be limited to about 1/3 the GBW ratio of the OPs times the square root of the total gain.

Quote from: Kleinstein
I see littel need for so many amplifier settings: the full scale voltage for the shunts is usually relative fixed and thus not much gain switching needed.
The TIA output is more like a high voltage and thus no need for the extra fixed amplifier stage after the TIA. It would be more that one could consider a divider to get levels comparable to the shunts. So the switching would be choosing the shunt path, the TIA direct and the TIA with a divider.
I agree not so many amplifier settings are needed.
Figure for 1nA we get 5uV out of TIA, it would be nice to have 1000 gain to get to 5mV for ADC. Then have a good span 1nA-900nA (5mv-4.5V), with 1000x gain
Now 1uA, takes us to 5mV already,  don't need any more gain in microamp land
1mA, well that requires attenuation as you suggested. Ok, will fix that part.

As usual Kleinstein, you are totally right. Changing to fixed gain for shunts, and attenuation for TIA. With fixed gain of shunt amp will set the gain of the second OP higher. Thank you as always, you are very helpful!

« Last Edit: June 27, 2021, 09:53:08 am by Crossphased »
 
The following users thanked this post: WattsThat

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #3 on: June 28, 2021, 09:46:19 am »
After quite some thinking and analysis, a better approach was found. For the TIA, measuring over 3 decades of range requires variable gain somewhere. Either switching the FB resistors, or variable gain post TIA, or switchable attenuation post TIA. It seems the simplest and best accuracy is switching the FB resistor in the TIA. Using the largest resistor possible per current range.

Some simulation was done with OPA189, and it performs very well at DC, but very poorly above  ~200-250 khz in TIA configuration! I found most op amps had quite reduced gain bandwidth in transimpedance configuration. A good compromise was found: OPA380. Not quite as good at DC as OPA189, but much wider bandwidth performance.


Method for switching the FB resistor was found here: https://www.analog.com/en/analog-dialogue/articles/programmable-gain-transimpedance-amplifiers.html
Two switches per resistor. An interesting part is ADA4350, which is variable gain transimpedance amp with all those switches built in. Quite an expensive part though! $26.

The shunt amp was improved as well, with composite amp. The OPA189 for DC accuracy and the AD8065 to provide the bandwidth. Doing some simulation with two series OPA189 in X10 configuration like in uCurrent, it starts to lose accuracy above ~700 khz. So composite amp was chosen, and simulation shows it is accurate to above desired BW of 1 Mhz.
updated schematic in original post and below
« Last Edit: July 07, 2021, 01:44:13 am by Crossphased »
 
The following users thanked this post: MegaVolt

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16615
  • Country: us
  • DavidH
Re: feedback/shunt ammeter design
« Reply #4 on: June 28, 2021, 04:26:11 pm »
After quite some thinking and analysis, a better approach was found. For the TIA, measuring over 3 decades of range requires variable gain somewhere. Either switching the FB resistors, or variable gain post TIA, or switchable attenuation post TIA. It seems the simplest and best accuracy is switching the FB resistor in the TIA. Using the largest resistor possible per current range.

A TIA made with a log amplifier can achieve better than 1% accuracy over more than 6 decades.
 
The following users thanked this post: Crossphased

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14197
  • Country: de
Re: feedback/shunt ammeter design
« Reply #5 on: June 29, 2021, 06:32:21 am »
The switching of larger signals does not work with single MOSFETs (at least not the normal ones), because of the parasitic reverse diode. One should use CMOS switches there.
The leakage from the switches limits the range to low currents when using it for low currents.

The OPA380 is more like made for low currents and a FB resistor >> 10 K. If more BW and lower noise is wanted from a TIA, one can build a similar TIA from 2 separate OPs.
 
The following users thanked this post: Crossphased

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #6 on: June 29, 2021, 07:23:56 am »
Thank you for that David, much appreciated.

Would you suggest an off the shelf log amp, or rolling your own log amp? If rolling your own, do you have to temperature stabilize the diode to avoid distortion, or somehow compensate for temp changes? Just curious what your approach would be. I may stick with the current approach, but it is good to hear this suggestion from you.
Cheers
 

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #7 on: June 29, 2021, 07:35:17 am »
The switching of larger signals does not work with single MOSFETs (at least not the normal ones), because of the parasitic reverse diode. One should use CMOS switches there.
The leakage from the switches limits the range to low currents when using it for low currents.

The OPA380 is more like made for low currents and a FB resistor >> 10 K. If more BW and lower noise is wanted from a TIA, one can build a similar TIA from 2 separate OPs.

Thank you as always Kleinstein. I'm always grateful for your expert advice.
Ok gotcha - CMOS switches for the switching of the FB resistors.
Now regarding building TIA from 2 separate OPs, would this be similar to composite amp with accurate DC first amp and high speed second OP? Its a good idea. I'm wondering if the OPA189 would be suitable in this case.


And now a related question:
The voltage will be sensed as well, with high bandwidth also. An objective is to capture the phase relationship between V + I. Not so important with the TIA range of currents, but at the higher currents the phase relationship of V to I is important.  How does one maintain the phase delay / group delay between the two different signal chains? Or I guess more precisely, how does one extract the phase delay from a given OP and gain configuration?
Thank you very much
Cheers
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7386
  • Country: nl
  • Current job: ATEX product design
Re: feedback/shunt ammeter design
« Reply #8 on: June 29, 2021, 07:37:07 am »
Did you consider using an instrumentation amplifier? Those are great for these purposes.
Also for 5A you might already want to use 4 wire method, so these stacked shunts and "measure against GND" might already give you errors.
 
The following users thanked this post: Crossphased

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14197
  • Country: de
Re: feedback/shunt ammeter design
« Reply #9 on: June 29, 2021, 08:19:23 am »
The composite TIA would essentially look like the internal circuit shown for the OPA380. So a AZ OP as integrator to correct the DC/ low frequency error and that a fast OP for the main part / ouput. The OPA189 has a relatively high current noise. So it may be OK for the relatively high current ranges, but is no that good for really low currents (e.g. FB resistor > 50 K). The AZ OP would not see a higher voltage, so one is free to use a low voltage type (e.g. OPA388).

Using 4 wire connection is important for the very high currents and it can still be combined with a stacked set of shunts. The connection between the lowest 2 shunts should be low impedance.

For the phase relation-ship one would likely need to do a calibration anyway. So the amplifiers for voltage and current are still made to have a stable (and thus usually low) phase shift, but the actual phase shift / delay is measured and than taken into account in the math after the ADCs. There are some multi channel ADCs made for power measurement that include extra delay adjustment. This may simplify the math a little. The adjustment / calibration would than be with some low inductance / low capacitance resistors as a load, a little like the calibration measurements at a VNA.
 
The following users thanked this post: Crossphased

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16615
  • Country: us
  • DavidH
Re: feedback/shunt ammeter design
« Reply #10 on: June 29, 2021, 04:15:40 pm »
Would you suggest an off the shelf log amp, or rolling your own log amp?

Either is feasible.  Analog Devices appears to have discontinued all of their old log amplifiers, but they still make some, albeit in difficult to use packages.

Quote
If rolling your own, do you have to temperature stabilize the diode to avoid distortion, or somehow compensate for temp changes?

If you make your own, then either the temperature of the logging transistor can be stabilized, or an external thermister can be used for correction.  However this still requires a matched transistor.

The major complication if it can be called that is that log amplifiers are inherently unipolar, but there are ways to handle this like with a log inverter which uses a pair of matched transistors to reverse the input current, or with a PNP transistor log amplifier.
 
The following users thanked this post: Crossphased

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #11 on: July 01, 2021, 09:01:25 am »
Ok got some more work done on this. Thanks to Kleinstein for suggesting CMOS switches for the FB resistors. ADG721 look like good switches. Low leakage, low rds_on, low charge injection, fast switching, and allows for make before break. Picked that part to use for signal switching.

Also put together the TIA configuration Kleinstein suggested. Works pretty well after tweaking the values a bit. I found the large value input resistor to the integrator opamp caused a bit of an offset on the output. Decreasing the size of this resistor to 10K left an offset voltage of only a few uV. Very good. Intersting offset correction. Took some thinking to see how it was working. I like that OPA388 part, very low offset. Added an inverting OPA388 on the output of TIA to flip the phase back to being in sync with the input (or close to it). Things are looking much better.

Also a buffer was added to the two lowest shunts. I'm curious what the full meaning of the comment on req't for low impedance path to ground for the lowest two shunts. Did you mean low impedance path between the ground side of the shunt, and the ground pin of OPA189 in composite amp? In that case removing any offset from current in ground plane? Or did you mean low impedance path like measuring the high current shunts with diff amp? I'm thinking you mean voltage offset from current in ground path. Here's a question for you though, what if VSS of OPA189 is not connected to GND, but to negative supply? What would ensuring low impedance path mean in that context?

See attached updated schematic.
« Last Edit: July 07, 2021, 01:43:47 am by Crossphased »
 

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #12 on: July 01, 2021, 09:02:52 am »
The OPA380 is more like made for low currents and a FB resistor >> 10 K.

Were you able to determine this by the size of the input resistor to the integrator in OPA380 datasheet?
 

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #13 on: July 01, 2021, 09:06:02 am »
Using 4 wire connection is important for the very high currents and it can still be combined with a stacked set of shunts. The connection between the lowest 2 shunts should be low impedance.
could you explain a little more what you mean by this? I'm not sure I follow. Thank you very much.

Quote
For the phase relation-ship one would likely need to do a calibration anyway. So the amplifiers for voltage and current are still made to have a stable (and thus usually low) phase shift, but the actual phase shift / delay is measured and than taken into account in the math after the ADCs. There are some multi channel ADCs made for power measurement that include extra delay adjustment. This may simplify the math a little. The adjustment / calibration would than be with some low inductance / low capacitance resistors as a load, a little like the calibration measurements at a VNA.

Thank you very much for this, it was a question that was bothering me. Very good and simple solution. As always thank you for your advice
 

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #14 on: July 01, 2021, 09:07:50 am »

Either is feasible.  Analog Devices appears to have discontinued all of their old log amplifiers, but they still make some, albeit in difficult to use packages.

If you make your own, then either the temperature of the logging transistor can be stabilized, or an external thermister can be used for correction.  However this still requires a matched transistor.

The major complication if it can be called that is that log amplifiers are inherently unipolar, but there are ways to handle this like with a log inverter which uses a pair of matched transistors to reverse the input current, or with a PNP transistor log amplifier.

Thank you much for your tips and advice David. You are very knowledgeable and I always enjoy reading your contributions. Thank you for the assistance
 

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #15 on: July 01, 2021, 09:14:13 am »
Did you consider using an instrumentation amplifier? Those are great for these purposes.
Also for 5A you might already want to use 4 wire method, so these stacked shunts and "measure against GND" might already give you errors.

Yes I checked some In amps. I didnt check extensively, but looks like most of them have higher offset voltage, like min 15-25 uV, and lower bandwidth, couple hundred khz. I was shooting for ~1M bandwidth, but min 500k. Is there an In amp you can suggest that would work well for this case? Or make your own with  LTC5400?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14197
  • Country: de
Re: feedback/shunt ammeter design
« Reply #16 on: July 02, 2021, 07:47:19 am »
There is usually no real need for an INA. There is mainly the lowest shunt would a separate low side therminal to care about. One can do this with a careful layout and having that low side pin as the analog ground point. So the amplifier gain would be relative to that point. Many higher ADC chips have a differential input an can use this to compensate for a small shift on the low side.

Chances are the offset specs are not that critical - especiall if the signal is going to an ADC and thus control over the digital side. It is mainly if the signal goes to a ready made DMM or panel meter, that one case about the absolute offest. The more critical parameters are normall offset drift , noise and for the low currents ( < µA)  also input bias current and maybe current noise.
Especially with higher BW noise tends to become important.

For the switches at the TIA, it depends on the supply range. A TIA works best when the amplifier can also use a little higher voltage, as this gives more dynamic range. So a switch for 5 V only may not be such a great solution. There is also a balance between leakage and on resistance - low resistance switches tend to have more leakage. The circuit shown would not care mich about the switch resistance and could work with higher resistance too. So I don't think the ADC721 is suiteable for the circuit. I would more consider DG20x or DG40x type switches, depending on the supply. The TIA has more dynamic range that the direct shunt and may thus not need so fine steps resistors, so 1:100  steps may be enough, so less switches and thus less leakage.
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7386
  • Country: nl
  • Current job: ATEX product design
Re: feedback/shunt ammeter design
« Reply #17 on: July 02, 2021, 01:31:25 pm »
Did you consider using an instrumentation amplifier? Those are great for these purposes.
Also for 5A you might already want to use 4 wire method, so these stacked shunts and "measure against GND" might already give you errors.

Yes I checked some In amps. I didnt check extensively, but looks like most of them have higher offset voltage, like min 15-25 uV, and lower bandwidth, couple hundred khz. I was shooting for ~1M bandwidth, but min 500k. Is there an In amp you can suggest that would work well for this case? Or make your own with  LTC5400?
You have to be careful on how that offset voltage is defined. Some of it is input and some of it is output referred. For example if it is defined as ±10±100/G µV typical, then with a 100 gain, you only have 11µV offset.
I see the INA849 for example is quite fast INA. Or LT1102, AD8229.

There is usually no real need for an INA.
Usually not, and they are more expensive than regular opamps. I like using them because of the excellent CMRR, which is usually neglected when designing with regular opamps. The matching errors between discrete resistors could upset a traditional designs. They are also very well characterized, less chance of errors. Versatile due to the ref pin.
Perfect for shunts where you have high gain, and want to have zero loading of the shunt ie with bias currents.
 

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #18 on: July 07, 2021, 01:43:23 am »
Hello,
I have an update. The schematic has become more finished. Voltages, labels, decoupling caps have been added. Also, as Kleinstein pointed out, CMOS switches with higher Rds on have lower leakage. The ADS721 has been replaced with ADG1221. ADG1221 has higher on resistance, ~120R, but only 2pA leakage. The on resistance will not matter as it is within the feedback loop of the TIA. Also the ADG1221 has wider supply range , allowing for larger range of currents. I found 3 shunts were still necessary however, to cover the wide range of currents: nA, uA, mA.

To select between TIA or shunt amp output requires lower resistance switch, as the switch is in series with fully differential amplifier. Too high of resistance throws off the gain balance. For this switch, ADG1421 was used- only 2 Ohms on resistance. ADG1421 feeds fully differential amplifier LTC6373, then filter network, then AD4003. Also, fast comparator LT1715 used to detect when range switch is necessary. The ADC: AD4003 is 18 bit 2Msps SAR ADC. A faster 5 Msps ADC would be nice but price quickly climbs with sample speed.

Digital isolator on the output of AD4003, which will feed USB powered controller, either microcontroller or FPGA. Most likely FPGA, as SPI bus speed needs to be 100 Mhz to read out the ADC @ 2Msps. Next steps to complete:
  -power isolation from digital side to analog side
  -analog volt measure section
  -controller and USB interface

See attached schematic :)
« Last Edit: July 07, 2021, 01:51:35 am by Crossphased »
 
The following users thanked this post: MegaVolt

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14197
  • Country: de
Re: feedback/shunt ammeter design
« Reply #19 on: July 07, 2021, 03:56:14 pm »
I see very little need for the extra buffer U24. The output from the sunt is well low enough in impedance. There is also little need to switch the ouput at the shunts - it should be OK to take all the shunt signals from the 10 Ohms shunt. A tap in between my be needed of there are very large shunts (like >10 K) because of noise and maybe effect of leakage.

I don't think the extra phase inverter for the TIA is a good idea. Inversion can be better done in software.

C70 at the compound TIA can probably be larger, so that the cross over from the conventional OP to the AZ op is at a lower frequency. The coresponding cap is very small in the OPA380, because large caps are expensive on chip.

Ideally the gain setting resistors at the amplifier for the shunts would be a bit lower. The noise of the OPA189 corresponds to some 1.6 K Ohms. So the noise contribution from 1 K ohms would be still visible. Slightly lower resistance is also less sensitive to parasitive capacitance, which may be an issue at high speed.
The AD8065 is not 100 times faster than the OPA189 - so the amplication of the inner loop should be lower, so more like 90 times total and may be 20-30x for the inner loop. I am still not sure so much gain is really needed. It is more likely to have peak voltages at the shunt to the 100 mV range.
 
The following users thanked this post: Crossphased

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #20 on: July 08, 2021, 04:13:09 am »
I see very little need for the extra buffer U24. The output from the sunt is well low enough in impedance. There is also little need to switch the ouput at the shunts - it should be OK to take all the shunt signals from the 10 Ohms shunt. A tap in between my be needed of there are very large shunts (like >10 K) because of noise and maybe effect of leakage.
Gotcha- yea it was added when I misunderstood the comment about about low impedance ground path for the composite amp. Going to remove that and the switch

Quote
I don't think the extra phase inverter for the TIA is a good idea. Inversion can be better done in software.
I'm curious, what could be bad about the phase inverter? Just wondering. Extra chance for oscillation? More phase delay?

Quote
C70 at the compound TIA can probably be larger, so that the cross over from the conventional OP to the AZ op is at a lower frequency. The corresponding cap is very small in the OPA380, because large caps are expensive on chip.
I see, so the cap governs the switchover frequency when AD8065 takes over from the AZ OP. I'd like to understand this part better. Could you say a bit more about what function C32 and R29 perform here? (image attached)

Quote
The noise of the OPA189 corresponds to some 1.6 K Ohms. So the noise contribution from 1 K ohms would be still visible. Slightly lower resistance is also less sensitive to parasitive capacitance, which may be an issue at high speed.
How does one calculate the noise from resistor? Also, does the large value of the 99k (now 75k) resistor add quite some noise here?

I understand now why the gain should be split up more. AD8065 has ~ 10x the gain bandwidth of OPA189, so AD8065 should be making around 10x the gain of OPA189. So gain of 3 and 30 satisfies those specs nicely. Will round down to 3 and 25, for little less gain

As always, thankyou very much for sharing your knowledge Kleinstein, I very much appreciate it. I've learned so much from you over the past couple years, much more than I ever did in the classroom! Thanks
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14197
  • Country: de
Re: feedback/shunt ammeter design
« Reply #21 on: July 08, 2021, 07:33:18 am »
C32 , R29 are filtering the ouput of the AZ OP. The main purpose is to fitler out the fast switching transients of the AZ OP. However the fitler should not be to slow to add too much phase delay. So the filter frequency should not be too low in frequency unless extra measures are taken.

For calculating noise of the resistors the approximate (there is a temperature where this is exact) value is 1 nV/sqart(Hz) from a 60 Ohms resistor and than proportional to the square root of the resistor. Uncorrelated noise sources add squared. A convenient way (though not standard practice) is to convert the OPs noise to resistance of equivalent noise and than add the resistors and equivalent noise resistances. Adding the resistance values is equivalent to adding the squared noise sources. Gain stages act squared on the resistors.

In the FB divider the 1 K is relative to the input, while the 100 K total resistance would have noise relative to the output. So the more relevant noise is the noise from the 1 K resistor.  Actually it would be the 1 K and 100 K resistors in parallel to set the ouput impedance of the divider, but this does no change much. The point is making the divider lower impedance. With a maximum output of some 2 V something like 10 K total resistance should be enough, not to have too much load to the OP, heating of the resistors and ground current.

The extra phase inverter adds some noise. In addition the inverter also is effected by the switch resistance at the input. The OPA388 would also add dealy / phase shifts. The extra amplifier stage would not oscillate (it is not part of a feedback loop), but it adds noise and errors with essentially no benefit. Modern OPs are amazingly accurate, but they still can't beat a simple wire when it comes to noise, offset and linearity.
The digital part has to know which path the signal is coming from. So there should be no problem doing the inversion with the digital data. The control of the range could also be done from the ADC data - so there is little need for the extra comparators.

 
The following users thanked this post: Crossphased

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #22 on: July 10, 2021, 09:17:42 pm »
C32 , R29 are filtering the ouput of the AZ OP. The main purpose is to fitler out the fast switching transients of the AZ OP. However the fitler should not be to slow to add too much phase delay. So the filter frequency should not be too low in frequency unless extra measures are taken.

For calculating noise of the resistors the approximate (there is a temperature where this is exact) value is 1 nV/sqart(Hz) from a 60 Ohms resistor and than proportional to the square root of the resistor. Uncorrelated noise sources add squared. A convenient way (though not standard practice) is to convert the OPs noise to resistance of equivalent noise and than add the resistors and equivalent noise resistances. Adding the resistance values is equivalent to adding the squared noise sources. Gain stages act squared on the resistors.

In the FB divider the 1 K is relative to the input, while the 100 K total resistance would have noise relative to the output. So the more relevant noise is the noise from the 1 K resistor.  Actually it would be the 1 K and 100 K resistors in parallel to set the ouput impedance of the divider, but this does no change much. The point is making the divider lower impedance. With a maximum output of some 2 V something like 10 K total resistance should be enough, not to have too much load to the OP, heating of the resistors and ground current.

The extra phase inverter adds some noise. In addition the inverter also is effected by the switch resistance at the input. The OPA388 would also add dealy / phase shifts. The extra amplifier stage would not oscillate (it is not part of a feedback loop), but it adds noise and errors with essentially no benefit. Modern OPs are amazingly accurate, but they still can't beat a simple wire when it comes to noise, offset and linearity.
The digital part has to know which path the signal is coming from. So there should be no problem doing the inversion with the digital data. The control of the range could also be done from the ADC data - so there is little need for the extra comparators.

Thank you very much for that Kleinstein. Excellent response! Very informative. Yes I agree about not the need for extra comparators. I was going to try to do gain switching in hardware to make gain switching faster, but after some thinking I think ADC->MCU will be plenty fast enough.

I had a thought about the inverting phase amp section. I think it is required, or at least a buffer is required. If no OPA is there, then series resistance from second TIA gain switch, ADG1221, is in series with the differential amp, and will throw off the gain ratio. So it may be best to have at least a buffer on the output before the FDA. A do not populate resistor could be added to the layout to configure the OPA as a buffer or inverting phase. What are your thoughts? Maybe a faster OPA for this component? I see a couple others that are faster but have higher offset V are LT1028 or ADA4625

Also, I have a question about using OPA388 as buffer/phase invert. I was looking at specs of OPA388 vs OPA189. OPA189 has 14 Mhz bandwidth for -3db point, OPA388 has 10 Mhz for -3db point. Looking closer, OPA189 has slew rate of 20V/us, while OPA388 has slew rate of only 5V/us. A factor of 4 difference. I'm trying understand how there is a factor of 4 difference in speed, but only 1.4 factor in bandwidth. How to resolve those two?
Thanks very much

« Last Edit: July 10, 2021, 09:23:21 pm by Crossphased »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14197
  • Country: de
Re: feedback/shunt ammeter design
« Reply #23 on: July 10, 2021, 09:31:13 pm »
The slew rate is set by 2 factors: one is the GBW and the other is the input voltge up to which more voltage still results an a faster slew rate. The second factor depends on the input stage : BJT based OPs often already saturate from some 50 mV on, while FET based OPs are linear up to a higher voltage (like 1 V). The low voltage OPs tend to faster saturate in the slew speed.

The advantage of the OPA388 is the slightly lower current noise and possibly less current spikes from switching. So it should be the better choice at the TIA. The slew rate should not really matter there, as this OP only compensates for the offset and LF noise of the fast OP. So even a very slow AZ OP would be OK - though usually higher noise.

You are right, the amplifier for the ADC input is relatively low impedance. The logical position of the extra buffer would thus be behind the extra switches to choose between the shunt path and the TIA path (and possibly the TIA part with a divider).

 
The following users thanked this post: Crossphased

Offline CrossphasedTopic starter

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: feedback/shunt ammeter design
« Reply #24 on: July 11, 2021, 08:27:46 am »
The slew rate is set by 2 factors: one is the GBW and the other is the input voltge up to which more voltage still results an a faster slew rate. The second factor depends on the input stage : BJT based OPs often already saturate from some 50 mV on, while FET based OPs are linear up to a higher voltage (like 1 V). The low voltage OPs tend to faster saturate in the slew speed.

The advantage of the OPA388 is the slightly lower current noise and possibly less current spikes from switching. So it should be the better choice at the TIA. The slew rate should not really matter there, as this OP only compensates for the offset and LF noise of the fast OP. So even a very slow AZ OP would be OK - though usually higher noise.

You are right, the amplifier for the ADC input is relatively low impedance. The logical position of the extra buffer would thus be behind the extra switches to choose between the shunt path and the TIA path (and possibly the TIA part with a divider).

Awesome thank you so much Kleinstein, ok will keep it as a buffer. Yes I think a divider is a good idea to put after the TIA as well. 

Here's a question about the ADC: it has +-2.5V inputs. To clamp the voltage within this range I have the supplies to the FDA as +-2.5V. Do you think this is adequate? Or should protection diodes be added in the filter area of ADC inputs?

Also, do you think it would be wise to monitor the back to back input protection diodes at the very front of the current measure circuit? I mean monitor the diodes for current flow, in case of some kind of overcurrent event, or if a shunt goes open circuit for some reason.

Cheers and thank you always for your help and advice
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf