High side current sensing circuit gives wrong voltage. - Page 1
Forum section: electronics / beginners

author: Grzegorz2121
author_rank: Contributor
timestamp: May 29, 2019, 08:57:04 pm
content: 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 withoutusing 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?

author: David Hess
author_rank: Super Contributor
timestamp: May 29, 2019, 09:51:16 pm
content: 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

author: jmelson
author_rank: Super Contributor
timestamp: May 29, 2019, 10:06:25 pm
content: 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

author: Grzegorz2121
author_rank: Contributor
timestamp: May 29, 2019, 10:07:43 pm
content: 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.

author: StillTrying
author_rank: Super Contributor
timestamp: May 29, 2019, 10:48:47 pm
content: On that pic of the simulation the -5V is wrong, a double negative!

author: Grzegorz2121
author_rank: Contributor
timestamp: May 29, 2019, 11:06:38 pm
content: Quote from: StillTrying on May 29, 2019, 10:48:47 pmThanks! 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!

author: Neomys Sapiens
author_rank: Super Contributor
timestamp: May 30, 2019, 12:43:24 am
content: Quote from: Grzegorz2121 on May 29, 2019, 08:57:04 pmMy thinking path went like that:I need a current sensing resistor before the load to not influence it.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.Quote from: Grzegorz2121 on May 29, 2019, 10:07:43 pmThen you will have replaced the resistor accuracy problem with a trimmer drift problem.

author: virtualparticles
author_rank: Regular Contributor
timestamp: May 30, 2019, 01:19:28 am
content: 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.

author: Psi
author_rank: Super Contributor
timestamp: May 30, 2019, 02:50:02 am
content: 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.

author: xavier60
author_rank: Super Contributor
timestamp: May 30, 2019, 03:14:10 am
content: Quote from: Psi on May 30, 2019, 02:50:02 amI 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.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: May 30, 2019, 03:29:45 am
content: Hi,Let me use LTspice to illustrate why the original posters circuit doesn't work very well in practice.Simplified ModelIf 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 TolerancesAs 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 1This causes the simulation to run 10 times, from 0 to 9 step 1The 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 LT1999Link:https://www.analog.com/en/products/lt1999.htmlI have attached the LTspice models.Regards,Jay_Diddy_B