Author Topic: High side current sensing circuit gives wrong voltage.  (Read 436 times)

0 Members and 1 Guest are viewing this topic.

Offline Grzegorz2121

  • Contributor
  • Posts: 13
  • Country: pl
High side current sensing circuit gives wrong voltage.
« on: May 29, 2019, 08:57:04 pm »
Welcome!
After years of thinking I finally managed to make a voltage regulator section of my homebrew lab power supply that doesn't oscillate.
Now I'm tying on adding the current regulator section.
Schematic is attached bellow.

My thinking path went like that:
I need a current sensing resistor before the load to not influence it.
I have bought OP07 for this job but it cant survive 30 volts to the input.
So I created two ~5 ratio voltage dividers to lower the max voltage on the op amp input.
Then I created a 5x gain differential amplifier to compensate for those voltage regulators.
The output couldn't go to 0 so i decided to add a negative power supply.

Then i realized that the output voltage is negative... (In the real circuit)
So to debug it I created a simulation and... this simulation doesn't work neither...

I would ideally want 50x gain to compensate for that 0.1 resistor. But i don't think i can achieve it without
using stupid values like 1Meg (I might try but it doesnt work for 5x neither)

Can somebody explain me why doesnt this circuit behave like i designed it to work?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 9907
  • Country: us
  • DavidH
Re: High side current sensing circuit gives wrong voltage.
« Reply #1 on: May 29, 2019, 09:51:16 pm »
It looks like it should work but in real life, the tolerance of the resistors limits performance.  Better is to use a singled ended high side current sense circuit.  The only restriction is that the common mode input range of the operational amplifier needs to include the positive supply.

http://www.circuitdiagramworld.com/monitor_circuit_diagram/Current_Monitor_CIRCUIT__LM301A__457.html
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: us
Re: High side current sensing circuit gives wrong voltage.
« Reply #2 on: May 29, 2019, 10:06:25 pm »
You might look at the LTC2057 (or LTC2057HV) high voltage op amps.  The HV version is rated up to 60 V supply voltage.  I used these in a high-side sense setup and it worked well.

Jon
 

Offline Grzegorz2121

  • Contributor
  • Posts: 13
  • Country: pl
Re: High side current sensing circuit gives wrong voltage.
« Reply #3 on: May 29, 2019, 10:07:43 pm »
I have few trimmers so the resistor accuracy isnt a problem. I will check the board again and post some pic to make sure everything is connected properly.
The most interesting thing is that the output works but it is negative...

The simulation that i made gave me 6V... on the output. Do anybody have any idea why it is so?

edit:
I would like to stay with that amp. I dont have means to get a different amp.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2221
  • Country: se
  • Country: Broken Britain
Re: High side current sensing circuit gives wrong voltage.
« Reply #4 on: May 29, 2019, 10:48:47 pm »
On that pic of the simulation the -5V is wrong, a double negative!
CML+  That took much longer than I thought it would.
 
The following users thanked this post: Grzegorz2121

Offline Grzegorz2121

  • Contributor
  • Posts: 13
  • Country: pl
Re: High side current sensing circuit gives wrong voltage.
« Reply #5 on: May 29, 2019, 11:06:38 pm »
On that pic of the simulation the -5V is wrong, a double negative!

Thanks! The simulation works. Now i have to check the circuit... I think i might have reversed the - and + .... but i have checked it multiple times!
 

Online Neomys Sapiens

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: de
Re: High side current sensing circuit gives wrong voltage.
« Reply #6 on: May 30, 2019, 12:43:24 am »
I have few trimmers so the resistor accuracy isnt a problem. I will check the board again and post some pic to make sure everything is connected properly.
The most interesting thing is that the output works but it is negative...

The simulation that i made gave me 6V... on the output. Do anybody have any idea why it is so?

edit:
I would like to stay with that amp. I dont have means to get a different amp.

My thinking path went like that:
I need a current sensing resistor before the load to not influence it.

[/quote]
You need a current sensing element whose influence is covered by your control loop.
As long as your load/DuT is floating, it doesn't care at all. It is the necessity to work with devices and circuits which couple the neutral/return potential to 'ground' or 'chassis' that did lead to a preference to high side sensing in laboratory PS design.

I have few trimmers so the resistor accuracy isnt a problem.
Then you will have replaced the resistor accuracy problem with a trimmer drift problem.
 

Offline virtualparticles

  • Contributor
  • Posts: 30
  • Country: us
Re: High side current sensing circuit gives wrong voltage.
« Reply #7 on: May 30, 2019, 01:19:28 am »
I would use the LT6106 high side current sense amplifier. You can try to roll your own with op amps and whatnot but Linear Tech (now the AD evil empire) has already done this for you. Use this part and use a four lead Kelvin sense resistor if you can. If you can't, use a reasonable accuracy low value resistor with fat traces on the main current path in and out and use small and completely separate traces for the "sense" lines which go to the 6106 which connect perpendicularly to the resistor pads.

I'm kidding about the "evil empire" btw. AD has so many great products, I just don't like change.
« Last Edit: May 30, 2019, 01:21:13 am by virtualparticles »
 

Offline 3roomlab

  • Frequent Contributor
  • **
  • Posts: 919
  • Country: 00
  • can you tell me how to cal sesame street meter?
Re: High side current sensing circuit gives wrong voltage.
« Reply #8 on: May 30, 2019, 02:37:59 am »

Can somebody explain me why doesnt this circuit behave like i designed it to work?

I have tried this like you did before. in order for the current sense, drop its voltage, and stay true to the small current sense changes, the op amp must draw very little bias current from the drop resistors, (>100x less?) the 2 drop points are "isolated" from the gain stage with 2 more opamps (since OP07 have low bias). the R12 gives some idea about the "isolated" op amp bias current draw (so in PCB actual, this calls for a quad opamp ic. it is no longer a 1 opamp job)

(pic2) but when the lower currents are measured, the 4 drop resistors now need to draw >100x less parasitic current then the lowest current so that it does not become an error in the output.
« Last Edit: May 30, 2019, 03:02:06 am by 3roomlab »
spheres of influence, example linustechtips. can you feel the brainwashing? showing off equipment, etc. were you swayed and baited? with immense popularity (and social "titles"), can you afford to disagree?
 
The following users thanked this post: Grzegorz2121

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7344
  • Country: nz
Re: High side current sensing circuit gives wrong voltage.
« Reply #9 on: May 30, 2019, 02:50:02 am »
I'm not sure what you ultimate goal is but sometimes it's easier to do low side current sense and select a microcontroller that has 200x differential gain stage built in. 
Maybe 10% of AVRs have selectable differential gain stages.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online xavier60

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: High side current sensing circuit gives wrong voltage.
« Reply #10 on: May 30, 2019, 03:14:10 am »
I'm not sure what you ultimate goal is but sometimes it's easier to do low side current sense and select a microcontroller that has 200x differential gain stage built in. 
Maybe 10% of AVRs have selectable differential gain stages.
I agree. Assuming the control circuitry is referenced to the negative rail, current sensing on the positive output is fine for load monitoring on a fixed voltage rail but causes to much complication and lack of desired accuracy for a lab supply. Seems that some of the solutions will have trouble working down to 0V output.
High side sensing isn't absolutely needed for a dual rail supply.
If high side sensing is really wanted for a single rail supply, a good option is to reference everything to the positive terminal  like with the Harrison topology.
Hioki AS100D vom, HP 54645A dso, Fluke 87V dmm, AN8008 dmm, Agilent U8002A psu,  FY6600 function gen, New! Brymen BM857S-(With Battery)
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 1809
  • Country: ca
Re: High side current sensing circuit gives wrong voltage.
« Reply #11 on: May 30, 2019, 03:29:45 am »
Hi,

Let me use LTspice to illustrate why the original posters circuit doesn't work very well in practice.

Simplified Model
If I build a model for the shunt part of the circuit and the voltage dividers that bring the shunt signals into the common mode range of the amplifier I get:





And the circuit has the desired output 1V per Amp of load current.

Component Tolerances

As described by other contributors, the accuracy of the voltage dividers is very important in this circuit. If the two dividers are not the same a voltage will be appear between the two outputs.
In LTspice we can use Monte Carlo analysis to implement component tolerance. The format is:

{mc (nominal value, tolerance)}

{mc(10K,0.01)} this is a 10K 1% resistor.

The distribution is rectangular. That is equal probability of getting any value in the tolerance window.



.step param X 0 9 1

This causes the simulation to run 10 times, from 0 to 9 step 1

The results are:



If I increase the number of runs to 100 I get:



This is like building the circuit 100 times with 1% resistors, randomly selected.

IC manufacturers can do circuits like this, because the can trim and match the resistors.
Check LT1999

Link: https://www.analog.com/en/products/lt1999.html

I have attached the LTspice models.

Regards,
Jay_Diddy_B
« Last Edit: May 30, 2019, 03:34:29 am by Jay_Diddy_B »
 
The following users thanked this post: Grzegorz2121


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf