High Side Current Shunt Question - Page 1
Forum section: electronics / projects

author: dicky96
author_rank: Regular Contributor
timestamp: September 16, 2022, 02:42:54 pm
content: Hi guysI hope this question will be fairly simple for some of you guys, as I'm more of a fixer than a maker and definitely not a designerI have some current meters with 50A shunts like these oneshttps://www.aliexpress.com/item/1005001834315051.htmlI've tested them on my bench PSU with a load and they work as expected. However they only work with the shunt on the low side (one of the current sense wires is common with the meter module ground)I want to use them to monitor on the high side - specifically I want to monitor the current on 3.3V/5V/12V outputs from a power supply with common groundI understand in principle how to do this using an op-amp to monitor the voltage across the shunt but my knowledge is not good enough to design the circuit. See attached I don't need any gain in the op-amp as the meter already reads the correct current, I just need to reference the sensed voltage to ground - see attached pic, I'm pretty sure this will do it. But how do I select the resistor values to get 1:1 gain?I have in my stash of parts some OP07, LM741, LM358 and some common guad op-amps like TL084.I've read that this sort of circuit can't be built effectively using discrete resistors but I don't need any gain from the op-amp and my meters only have a resolution of 10mA or 100mA (over 10A) at best so is this still a problem? I have single rail supply voltages present to power the op-ampbest regardsRichard

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 16, 2022, 03:14:21 pm
content: Get a DC-DC isolator module -- no other circuitry needed.Tim

author: mag_therm
author_rank: Frequent Contributor
timestamp: September 16, 2022, 04:25:16 pm
content: LMP8645 need 12V single supply and can measure the shunt in a common mode range of -2 to +42 V, giving a ground referenced output.The minimum gain (set by one resistor) is 2mV/mV.So would need a divider, also check the input impedance of your meter can be driven by the LMP8645.I am now building a board with 2 of them, to try, for feedback on DC-DC conv.

author: pqass
author_rank: Super Contributor
timestamp: September 16, 2022, 04:36:55 pm
content: Quote from: T3sl4co1l on September 16, 2022, 03:14:21 pmIf you're saying to use the DC-DC module to raise the meter common to the positive supply line (and therefore the shunt is now across the positive line to the load) then the voltage measurement (red) LEDs of the meter won't be showing the supply voltage but the DC-DC module voltage.If OP just chooses resistors to be within 1% (or better) of each other (usually 10k) then it should work as long as the op amp has a low offset voltage and can go down to 0V. Op amp positive supply must be attached to the positive supply line which I assume is less than the op amps max. allowed. Even an LM358 with < 2mV offset should be within +/-1A accuracy (shunt shown: 75mV@50A is 1.5mV@1A). TL084 or LM741 won't cut it since their output won't go down to 0V.Instead of the usual way to wire-up this meter (see attached), you should be able to replace the shunt with your op amp output connected to the thick red lead. And meter supply inputs attached to the supply line if below its max.

author: WattsThat
author_rank: Frequent Contributor
timestamp: September 16, 2022, 04:43:20 pm
content: All that is required is an isolated supply for the meter. The meter is always reading across the shunt, there is no measurement of the supply voltage.

author: pqass
author_rank: Super Contributor
timestamp: September 16, 2022, 04:50:06 pm
content: Quote from: WattsThat on September 16, 2022, 04:43:20 pmThe meter has two LED displays; one for Voltage the other for Current.

author: dicky96
author_rank: Regular Contributor
timestamp: September 16, 2022, 05:05:25 pm
content: Thanks guys for some interesting replies'All that is required is an isolated supply for the meter. The meter is always reading across the shunt, there is no measurement of the supply voltage.'I'm not sure how to understand this - The PSU I want to monitor is ATX.. The meters I bought from AliExpress (linked in OP) read voltage and current. The meter has five wires.thin black and thick black are connected together and are connected to 0Vred connects to a power supply railyellow reads the voltage (can be same as meter power supply rail)I can kinda picture if I power the meter (red and thin black) from something like a wall-wart power adapter I could measure the voltage across the shunt even if it is in the high side therefore read the current, as the meter supply is now isolated from ATX PSU 0V but then how do I monitor the voltage rails of the PSU without a reference to 0VIf OP just chooses resistors to be within 1% (or better) of each other (usually 10k) then it should work as long as the op amp has a low offset voltage and can go down to 0V. Op amp positive supply must be attached to the positive supply line which I assume is less than the op amps max. allowed. Even an LM358 with < 2mV offset should be within +/-1A accuracy (shunt shown: 75mV@50A is 1.5mV@1A). TL084 or LM741 won't cut it since their output won't go down to 0V.Will OP07 work? The PSU is ATX so technically speaking I should have +12v and - 12V available to power the op-amp if I want to. Does that help? Iwas hoping to put this together out of bits I have lying aroundGet a DC-DC isolator module -- no other circuitry needed.TimCould you elaborate a bit on that please and how I would connect it?

author: pqass
author_rank: Super Contributor
timestamp: September 16, 2022, 06:12:34 pm
content: QuoteI haven't used an OP07 and reading the datasheet doesn't say it is "rail-to-rail" or something like this text from the LM358 datasheet: "In the Linear Mode the input common-mode voltage range includes ground and the output voltage can also swing to ground, even though operated from only a single power supply voltage."However, if you do have a negative voltage available (even just a few volts negative) then you should be able to use any of your op amps. OP07 should be the best since it has a low offset voltage as compared to the rest. Just make sure the op amp doesn't get more voltage across its + and - supply greater than say, 30V (the LM358 has a max +/-16V, the rest are slightly higher).I think this will work. See attachment.EDIT: Alternatively, you can connect the Thin Yellow wire after the shunt and before the load. As it is now, there will be a 30mV drop across the shunt @20A that won't be accounted for by the Voltage display.

author: dicky96
author_rank: Regular Contributor
timestamp: September 16, 2022, 06:26:17 pm
content: Quote from: pqass on September 16, 2022, 06:12:34 pmThanks for your help. Yeah it's an ATX PSU and they normally have +12V and -12V though sometimes the negative supply is not implemented, I can check tomorrow if mine is. I could use voltage regulators to get any other plus/minus supply voltage less than 12V

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 16, 2022, 07:19:37 pm
content: Oh, voltage and current?Isolation will work, if single (current) meters are used. You could get separate (voltage and current) meters, and run the ammeters from isolated supplies so that they can be ground-referenced to their shunts.Otherwise if you prefer the dual type meters, then level shifting is required. Be sure the "current" input is a voltage sensing type, of adequate scale for what the diff amp is doing.There are current sense amps available so you don't have to fiddle around with precision resistors and rail-to-rail amplifiers. INA180 and friends comes to mind.Tim

author: MarkF
author_rank: Super Contributor
timestamp: September 16, 2022, 08:00:58 pm
content: Maybe your particular panel meter can be modified to operate in differential mode as follows:https://youtu.be/A6VQhDioz_Q?t=527

author: WattsThat
author_rank: Frequent Contributor
timestamp: September 16, 2022, 08:51:30 pm
content: Wire per the lower right image.The “power” block must be an isolated 4 to 28 volt supply. A name brand surplus 5v wall wart usb charger will suffice. Beware of Dollar store chargers, they’re not well built and lack decent isolation.

author: thm_w
author_rank: Super Contributor
timestamp: September 16, 2022, 10:27:41 pm
content: https://www.analog.com/en/analog-dialogue/articles/high-side-current-sensing.htmlQuote from: WattsThat on September 16, 2022, 08:51:30 pmAll of those are low side measurement, which is not what the OP wanted..

author: Terry Bites
author_rank: Super Contributor
timestamp: September 16, 2022, 11:21:56 pm
content: The aliexpress page suggests that the shunt drops 75mv @ 50A. Thats 1.5mv per Amp, so for 1% resolution at 1A your opamp needs an offset of less than 15uV! Ibias will need to be down in the pA.The opamp also needs to have a common mode input range that extends to the positive supply. Check your datasheets.The circuit you need depends on the measurerment range and precision you desire.High side monitoring can be challenging, which is why there are current monitor ASICs.this kind of thing requires no precsion devcieswww.allaboutcircuits.com/technical-articles/how-to-monitor-current-with-an-op-amp-a-bjt-and-three-resistors/

author: WattsThat
author_rank: Frequent Contributor
timestamp: September 17, 2022, 01:52:23 am
content: We haven’t heard from the OP why it needs to be high side other than that is what he thinks he needs. The usual problem with those meters is the shared supply and measurement common which is solved by providing an isolated supply.

author: pqass
author_rank: Super Contributor
timestamp: September 17, 2022, 02:27:30 am
content: Quote from: Terry Bites on September 16, 2022, 11:21:56 pmIf OP uses a OP07E for the diff amp with offset of 30uA (or 60uA for OP07C) then the accuracy should be 20mA (or 40mA for the C version). Also, given a +12V supply to monitor, the +in and -in are at +12V/2=+6V, then the op amp's positive power rail (V+) can be at +12V; no need to be a couple of volts higher. Correct?https://www.analog.com/media/en/technical-documentation/data-sheets/op07.pdfInteresting circuit described by your link but it multiplies the high-side shunt drop by 1000x and not what OP needs since the meter's current lead (thick red) can measure the Vdrop over the 50A shunt directly (no gain required). However, that circuit's op amp will need a positive power rail (V+) to be a couple of volts higher than the monitored supply since at 0A through the shunt +in will be at +12V.I agree at 15uA per 10mA (ie. 2 decimal places of accuracy) it would be best left to purpose-made instrumentation amps but given that OP has the OP07 and resistors on his bench it may be worthwhile to breadboard it to see how good (or bad) it works out.

author: pqass
author_rank: Super Contributor
timestamp: September 17, 2022, 02:30:33 am
content: Quote from: WattsThat on September 17, 2022, 01:52:23 amI suspect OP is building a ATX-based bench PS with a V+A (combo) meter at each +12V, +5V, and +3.3V rail.

author: xavier60
author_rank: Super Contributor
timestamp: September 17, 2022, 12:10:24 pm
content: This thread shows a method,https://www.eevblog.com/forum/projects/improving-adjustable-dual-voltage-bench-power-supply/msg3028760/#msg3028760

author: dicky96
author_rank: Regular Contributor
timestamp: September 17, 2022, 02:32:14 pm
content: Just to confirm I do have plus/minus 12V rails for the op-ampsRe why I want to monitor high side. I do a lot of motherboard and GPU repairs on my YT channel. I want to convert an ATX PSU so I can monitor the current on each voltage rail 3.3V, 12V, 5V and while I am at it I may as well monitor 5VSTB as well. As all voltage rails have a common return path I have to monitor high side. I'm interested to see how useful a diagnostic tool this may be especially with GPU that fail when drivers load and similar. I did do something similar a while ago on a video using three bench PSU to power the motherboard and GPU and monitor the current behaviour and the results were interesting. This is an extension/revisiting of that project

author: magic
author_rank: Super Contributor
timestamp: September 17, 2022, 03:57:43 pm
content: Dual rails are good because even a single supply opamp like LM358 would still struggle with outputting voltages very close to ground if not connected to a negative supply. With ±12V you can use any jellybean opamp and OP07 would be a good choice due to low and stable offset voltage.The circuit shown in your first post works if all resistors are equal in value. Then the noninverting input sees exactly half the ATX rail voltage and the rest of the circuit works like an inverting amplifier with gain -1, so Vrail-XmV becomes ground+XmV - exactly what you want.If the resistors aren't exactly equal then the output isn't exactly accurate. For example, if Vrail/2=6V then R6 being 1% too high causes the output to be 1% of 6V too far from +6V, or in other words 60mV too low. Under light rail loading the output may even go below ground.I'm afraid this circuit is your only realistic option if you want to use the meters you have already bought.

author: dicky96
author_rank: Regular Contributor
timestamp: September 17, 2022, 05:03:44 pm
content: Quote from: magic on September 17, 2022, 03:57:43 pmThanks for the info I'll give it a go - I have some OP07 left over from another project I built on a recent video (milliohm meter) Actually the circuit I need is probably very similar to that one - without the CC generator the milliohm meter used. it was remarkably accurate compared with a Vici 480C+.So all resistors the same value - and 10K ohms is good? An accuracy around plus/minus 10mA would be a nice outcome.

author: dicky96
author_rank: Regular Contributor
timestamp: September 17, 2022, 05:13:53 pm
content: Quote from: pqass on September 17, 2022, 02:30:33 amYou were close to the reason I want to build it (see above). I can put this together on veroboard or breadboard and try it yes. Mostly I would be looking at the current drawn on a faulty device compared to a known good one so the accuracy is not so important as the consistency of the current readings.

author: HighVoltage
author_rank: Super Contributor
timestamp: September 17, 2022, 05:29:38 pm
content: There are small panel meters with differential input.This might be the simplest solution for you.

author: dicky96
author_rank: Regular Contributor
timestamp: September 17, 2022, 06:03:06 pm
content: Probably you are rightI'm just thinking I may as well try use what I have now

author: magic
author_rank: Super Contributor
timestamp: September 17, 2022, 07:04:23 pm
content: Quote from: dicky96 on September 17, 2022, 05:03:44 pmYeah, I guess 10kΩ could work. Things to worry about is error due to input offset current of the opamp (a few nA for OP07, translating to tens of µV offset error, in fact even LM358 is not too bad) and possible heating of the resistors (don't go crazy with low values).Try metal film if you have them and try to match to 0.1% on DMM. Then pray that they stay matched when the whole circuit gets hot in the PSUMount them close together to reduce chance of thermal problems.One more thing: opamps may do weird things if they lose a supply rail or even simply during turn-on or turn-off. It may be a good idea to protect the meters somehow from excessive voltage. Maybe clamp the opamp output to ground with diodes, or at least connect the meter to it through another 10kΩ resistor. See if the resistor doesn't cause error - connecting with 10kΩ to ground should give 0A reading, of course; if not, the meter sucks

author: dicky96
author_rank: Regular Contributor
timestamp: September 17, 2022, 09:55:16 pm
content: Quote from: magic on September 17, 2022, 07:04:23 pmIf you recommend some higher value resistors I will go with that instead. As you probably realise I am a fixer rather than a maker so I generally understand the principle of how things work/how to do things but don't appreciate the ins and outs of actually designing stuff