Author Topic: what's wrong with this current sense op-amp circuit  (Read 9962 times)

0 Members and 1 Guest are viewing this topic.

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 2008
  • Country: ca
what's wrong with this current sense op-amp circuit
« on: February 04, 2024, 01:13:59 pm »
Hi
I have designed the PCB for a high side current measurement, with variable gain, U6 along the Resistor network (R35,R37,R38) and U5 are the main parts to have 1X,10X, 100X gain in different currents that would pass trough R18, or R17+1R18 depending on the U3 switch conditions, at least that's what I hoped for, and in simulation it was working just fine, But now that I have designed and ordered the PCB, it has these gains roughly 1x, 1.1X and 2.16X in practice,  |O

Do you have any Ideas?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2178
Re: what's wrong with this current sense op-amp circuit
« Reply #1 on: February 04, 2024, 01:55:44 pm »
What does "current sense" drive ? Also, how are you measuring the gain - with respect to ground, or V-hi ? And what value is VDD that supplies U3?
« Last Edit: February 04, 2024, 01:58:28 pm by Andy Watson »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17936
  • Country: us
  • DavidH
Re: what's wrong with this current sense op-amp circuit
« Reply #2 on: February 04, 2024, 06:10:41 pm »
The on-resistance of the 4052 multiplexor in series with the feedback resistor might explain it.

There is a different circuit configuration where the switch is moved to be in series with the inverting input making its on-resistance irrelevant.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2368
  • Country: au
Re: what's wrong with this current sense op-amp circuit
« Reply #3 on: February 04, 2024, 06:49:51 pm »
Note the OP07 can swing neg to pos, but the 4052 can only tolerate 0-12V as you have wired it.
The analog switch resistance should affect the lowest range the most, and then only some %, your higher ranges are 'off by miles'.
 

Offline DannyTheGhost

  • Contributor
  • Posts: 49
  • Country: ua
Re: what's wrong with this current sense op-amp circuit
« Reply #4 on: February 04, 2024, 07:16:05 pm »
What are the logic levels that are driving inputs of multiplexer? These CD4000s multiplexers require that the voltage of logic "1" level on the inputs must be close to VCC, as it is indicated in datasheet.
I had such problem in one of my previous designs, and after close inspection of the datasheet and botched level translator to the PCB it was fixed.
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 2008
  • Country: ca
Re: what's wrong with this current sense op-amp circuit
« Reply #5 on: February 05, 2024, 09:57:31 am »
Quote
What are the logic levels that are driving inputs of multiplexer? These CD4000s multiplexers require that the voltage of logic "1" level on the inputs must be close to VCC, as it is indicated in datasheet.
I had such problem in one of my previous designs, and after close inspection of the datasheet and botched level translator to the PCB it was fixed.

The 4052 inputs are drive with ULN2803 outputs with 12V as high and 0.6v as zero, and the ULN2803 inputs are driven with a MCU powered @ 3.3V, so the inputs are fine.

Quote
Note the OP07 can swing neg to pos, but the 4052 can only tolerate 0-12V as you have wired it.
The analog switch resistance should affect the lowest range the most, and then only some %, your higher ranges are 'off by miles'.
I know that, But as it can be seen the shunt resistors are driven with in the 0-5V range, the right side which is consist of Q6,Q7 etc pairs and Q16 Q17 etc pairs are set to 2.5V supply AKA VGND or virtual ground, and the left side is driven with the currentsense output and an external Function gen for now with a sine wave with a 2.5V DC bias, so every thing is held at mid 5V supply, so I think the 4052 supply maybe not an issue.


Quote
The on-resistance of the 4052 multiplexor in series with the feedback resistor might explain it.
I think it would mostly affect the 1X range,

Quote
There is a different circuit configuration where the switch is moved to be in series with the inverting input making its on-resistance irrelevant.
I do not get it fully, would you explain more?

Quote
What does "current sense" drive ? Also, how are you measuring the gain - with respect to ground, or V-hi ? And what value is VDD that supplies U3?
The current sense would drive the negative feedback, you can check it in this post schematic, U3 supply is 12V and GND, also I would measure the gain like this, 1 channel of the scope is connected to the VDAC, and the other channel is connected to the current sense, Also I have inserted an Ampere meter in P2, so I can measure the output current directly, So basically If I change the 4052 switch to different ranges I should expect the output current be lowered 10X or 100X from 1X, But the Ampere meter would only show 1x, 1.1X and 2.16X in practice, for different positions, also the VDAC and current sense outputs seems to regulate to the same value,
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2705
  • Country: gb
  • Recovering Electrical Engineer
Re: what's wrong with this current sense op-amp circuit
« Reply #6 on: February 05, 2024, 02:55:19 pm »
As David Hess suggests,

you could put the amplifier gain switch in series with with the inverting input.
No feedback network current flows, so no voltage drop and very low gain error.

Or

It may be simpler to use fixed gain current sense amplifiers and select an ouput with a mux and a buffer. Dual and Quad current sense amp are cheap. eg A dual INAx180-Q1 are cheaper than an OP-07 4066 combo, it will perform better too.


 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17936
  • Country: us
  • DavidH
Re: what's wrong with this current sense op-amp circuit
« Reply #7 on: February 05, 2024, 04:39:51 pm »
Quote
There is a different circuit configuration where the switch is moved to be in series with the inverting input making its on-resistance irrelevant.

I do not get it fully, would you explain more?

There are other configuration but the one shown below is what I found first for an inverting connection.  With the switch in series with the operational amplifier input, it only sees the input bias current so its resistance is irrelevant and does not affect the gain.
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 2008
  • Country: ca
Re: what's wrong with this current sense op-amp circuit
« Reply #8 on: February 06, 2024, 09:20:43 am »
Thanks for the update, the complete schematic is attached, what I'm trying to achieve is generating 50Hz sin wave from 1mA to 30A with a single 5V source, so the output power dissipation would be minimal, so I should have a current sense network with gains of 1X,10X and 100X that have a 2.5V bias to it, so I can center it @ 2.5V which is 5V middle voltage, hence using the audio codec that has a 2.5V DC bias for generating the sin wave, so I can use a single ATX power supply to power every thing and do it cheaply in terms of price, Power dissipation and circuit complexity.
Now with this new information, How do you suggest I change the current sense network?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf