Current Sense Amplifier INA180 Negative Supply Measurement? - Page 1
Forum section: electronics / projects

author: hal9001
author_rank: Regular Contributor
timestamp: November 28, 2021, 12:24:45 pm
content: I want to measure supply side current for a -12V supply with a current sense amplfier like INA180.Do I have to reverse the IN- and IN+ pin for IN- to connect to the -12V supply side of the sense resistor and IN+ to connect to the load side of the sense resistor?From the data sheetQuoteCheers!

author: ledtester
author_rank: Super Contributor
timestamp: November 28, 2021, 02:32:12 pm
content: It would be helpful to have a schematic which also shows how the INA180 is powered. Then we can make sure all of the voltage limits are met.

author: hal9001
author_rank: Regular Contributor
timestamp: November 28, 2021, 03:55:12 pm
content: Quote from: ledtester on November 28, 2021, 02:32:12 pmCheers!

author: ledtester
author_rank: Super Contributor
timestamp: November 28, 2021, 04:20:35 pm
content: I'm pretty sure that's not going to work -- you need IN- to be at or above the supply voltage ground.That is, the INA180 supply ground is really -12V and Vs is 2.7 to 5.5 V above that.

author: coromonadalix
author_rank: Super Contributor
timestamp: November 28, 2021, 05:39:12 pm
content: Have you read the datashhet for high side, low side measurements ?

author: hal9001
author_rank: Regular Contributor
timestamp: November 28, 2021, 11:07:46 pm
content: Quote from: ledtester on November 28, 2021, 04:20:35 pmThanks. If ground pin is connected to -12V and 5V is connected to Vs pin this will violate the 6V absolute maximum rating for Vs with reference to its ground pin?Then I have to use a current sense amplifier with higher Vs rating like MAX4172?

author: ledtester
author_rank: Super Contributor
timestamp: November 28, 2021, 11:54:33 pm
content: Quote from: hal9001 on November 28, 2021, 11:07:46 pmYes. You will need to create a "-7V" rail to power the INA180.QuoteThe MAX4172 is described as a high-side current sense amplifier.Where did you find that schematic? I didn't see it in the MAX4172 datasheet.My instinct tells me there is another family of devices better suited for what you want to do. How do you plan to interface the output of the current sense amplifier to the rest of your application? Are you going to read it with the ADC of a microcontroller?

author: ledtester
author_rank: Super Contributor
timestamp: November 29, 2021, 12:04:16 am
content: Quote from: ledtester on November 28, 2021, 11:54:33 pmOk, I found it:Maxim Application Note 2011HIGH-SIDE POSITIVE CURRENT SENSOR MONITORS NEGATIVE SUPPLY

author: tonyh88
author_rank: Regular Contributor
timestamp: November 29, 2021, 02:45:23 am
content: For your info I did something similar recently but with a INA220. Based on this app note from TI for INA226 :https://www.ti.com/lit/pdf/tidu361Works perfectly.Basically using a zener diode to power the IC to get a logic positive voltage from your negative rail

author: hal9001
author_rank: Regular Contributor
timestamp: November 29, 2021, 10:53:50 am
content: Quote from: ledtester on November 28, 2021, 11:54:33 pmThanks. Im going to read it with the ADC.Quote from: tonyh88 on November 29, 2021, 02:45:23 amThanks thats a intriguing circuit. Does this mean voltage on Vs pin is -48+4.7V? Did you connect your microcontroller power pins same as the INA220 power pins with ground pin to -48V?Measuring this negative supply current is harder than I expected

author: ledtester
author_rank: Super Contributor
timestamp: November 29, 2021, 03:25:39 pm
content: You could use an op-amp to convert the negative voltage into a positive one:https://electronics.stackexchange.com/questions/3105/how-do-i-measure-a-negative-voltage-with-a-adcAlthough you have one available the op-amp doesn't need a negative rail for this to work.

author: tonyh88
author_rank: Regular Contributor
timestamp: November 30, 2021, 02:39:47 am
content: Quote from: tonyh88 on November 29, 2021, 02:45:23 amThanks thats a intriguing circuit. Does this mean voltage on Vs pin is -48+4.7V? Did you connect your microcontroller power pins same as the INA220 power pins with ground pin to -48V?Well the the INA IC is powered from the zener diode. IN the example it is a 4.7V zener so as far as the IC is concerned it only sees a 4.7V potetial between VS and GND. Same as if you powered it frm a 4.7V rail. Yes the whole thing is floating at your negative rail voltage but the IC doesn't know that. In my case I used it on a -15V rail and it worked.Since your supply is floating on the negative rail, to communicate with I2C with your MCU you need a digital isolator like the ISO1541 that is also powered from the same zener on one side and your regular +3V3 rail on the MCU side. So only th INA ic and the digital isolator are floating on the negative rail. Everything on the MCU side stays on your regular digital voltage rail (3V3 or whatever).Take a look at the circuit attached that shows the idea. It is not the most power efficient or cheapest circuit because you need an isolator and the zener diodes always draw a little bit of current but for a circuit that is not battery powered it is a rather elegant solution that works pretty well.Everything is explained pretty well in the app note

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 30, 2021, 04:11:11 am
content: Hi,Let me introduce this circuit:This circuit will measure the current flowing through R1 and produce a signal that is positive with respect to ground.The output voltage = -I x R1 x R4/R2The op-amps must include the negative rail in their common mode range. LM324 or better LT1013 will work.I have attached the LTspice model.Regards,Jay_Diddy_Bneg i sense.asc

author: hal9001
author_rank: Regular Contributor
timestamp: November 30, 2021, 09:57:10 am
content: Thanks all!Quote from: Jay_Diddy_B on November 30, 2021, 04:11:11 amCheers!Impressive to use jelly bean parts! I wonder whats the function of M1?

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 30, 2021, 12:14:26 pm
content: Hi,The MOSFET M1 provides level shifting between the two op-amps.When the circuit is in equilibrium, the gate current of M1 = 0.The voltage across M1, Vds, is almost constant, it is the 12V - (I x R1)The source current of M1 is equal to the current flowing R2.Since the gate current is zero, the source current must flow in the drain.The current in R4 is equal to the drain current.This means I(R4) = I(R2) = I(M1_drain) = I(M1_source)Since the same current is flowing in R4 and R2, the magnitude of the voltage gain is R4/R2.On this schematic I have marked the voltages with a current of 1A flowing in R1.Jay_Diddy_B

author: Ian.M
author_rank: Super Contributor
timestamp: November 30, 2021, 01:28:34 pm
content: Or if you prefer to break it down to circuit building blocks you *SHOULD* recognize:U1, M1 & R2 are a classic OPAMP + MOSFET current sink, with its control voltage from the drop across the load current shunt R1==> Id(M1)=(R1/R2)*IloadU2, R4 is simply an inverting current to voltage convertor, referenced to 0V rather than the negative supply.==> Vout=-Iin*R4Putting it all together,Vout=(R4/R2)*R1*IloadNote that if M1 drain ever gets disconnected, or if U2 rails due to excessive load current (or poor choice of resistor ratio), U1 will rail, putting close to its full V+ supply on the MOSFET gate. That's 17V, and the 7N2002 max Vgs is +/-20V. If you were using >5V positive rail U1 would need to be powered between 0V and the negative rail to limit the max Vgs. If you wanted to monitor a -24V rail you'd need a separate (positive) regulator to supply U1 with 12V or 15V, referenced to the negative rail and fed from the 0V rail. e.g. LM78L12 or ..L15 or a Zener and a dropper resistor.Also, in all cases it would be advisable to add a clamping diode from 0V to U2 In- to prevent it being dragged too far below ground during over-current faults. 1N4148 should do nicely. A resistor in series with M1 drain to limit the fault current through the clamping diode may also be necessary, chosen to still leave enough voltage across M1 for linear operation at full scale current.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 30, 2021, 02:34:18 pm
content: Hi group,Building on the sound advice provided by Ian.M, I am providing a revised model that includes a lot of the protection features:I would certainly include the extra parts if this was a laboratory power supply where the extra protection is necessary.Regards,Jay_Diddy_B

author: Ian.M
author_rank: Super Contributor
timestamp: November 30, 2021, 02:51:44 pm
content: Don't forget decoupling for U1 as its got to drive M1's gate capacitance. Without it, the Zener regulator is likely to drop out on fast increasing load current transients, which may cause instability. Personally I'd Muntz it for negative rails between -10V and -18V and simply feed U1 V+ from 0V/Gnd.You may also need a gate resistor and a few tens of pF feedback capacitance round U1 to limit the bandwidth, trading off transient response for stability.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: November 30, 2021, 04:11:25 pm
content: If it helps, in my circuit, I used the INA293 to measure current from a negative voltage output of a buck-boost converter. The current was measured via a sense resistor, with one end connected to my buck-boost converter output (negative voltage side) and the other end continuing on to my load.For the op-amp itself, the input terminals were in parallel with the sense resistor, with the inverting terminal connected to my buck-boost output side while the non-inverting terminal was connected to the load side. With regards to the op-amp supply, the positive supply was connected to +5 volts while the negative side was connected to my buck-boost output, because everything was referenced to that negative voltage output. That's how I did it, though I'm sure it could have been improved upon.

author: Terry Bites
author_rank: Super Contributor
timestamp: November 30, 2021, 05:00:20 pm
content: https://www.eevblog.com/forum/projects/shunt-current-measuring-on-a-negative-voltage-rail-tricky/

author: Terry Bites
author_rank: Super Contributor
timestamp: November 30, 2021, 05:10:48 pm
content: https://www.analog.com/media/en/technical-documentation/app-notes/an-105fa.pdfPage 15 onwards, loads of ideas.Fig 29 is of particular interest.

author: Ian.M
author_rank: Super Contributor
timestamp: November 30, 2021, 05:21:22 pm
content: Fig. 29 doesn't have any overload protection. Somewhere around 18A load current (or a bit higher) transient or sustained, even if the shunt's beefy enough, it will elect a pope!

author: Terry Bites
author_rank: Super Contributor
timestamp: December 01, 2021, 04:42:11 pm
content: add some?

author: LoveLaika
author_rank: Frequent Contributor
timestamp: December 01, 2021, 07:48:26 pm
content: Quote from: Ian.M on November 30, 2021, 05:21:22 pmThis is an interesting app note. If I may, I can probably guess why you would need it, but what's the worst case here without overload protection? Wouldn't the output of the 2054 just saturate to the rails? If we're talking about overload protection for the inputs, could you just add diodes at the inputs so they don't go to too high a voltage?Also, if I'm understanding the Zener and how it works, it's causing a +5 voltage difference between the positive and negative voltage supplies for the 2054, correct? That way, the 2054 can be tied to very low voltages without damaging it.

author: Ian.M
author_rank: Super Contributor
timestamp: December 01, 2021, 09:00:03 pm
content: Its easy enough to add over-range protection - as the fig.29 circuit is so similar to the one I commented on above, it has the same defect if the output OPAMP rails and the same sort of clamping + current limiting for the MOSFET with a drain resistor will fix it. Heck, if the -48V supply is limited to less than 15A peak surge current, it doesn't even need protection. However I am surprised that there doesn't appear to be any mention in the appnote of the need to protect that low side sensing topology against the output OPAMP in- being dragged negative beyond its permissible input voltage range during a severe over-range condition. A short paragraph in the circuit description would have been sufficient . . .

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: December 02, 2021, 12:27:49 am
content: Hi group,Here is Figure 29 from the Linear Tech application note AN105.The circuit is the same topology that I proposed earlier in this thread.The circuit uses a zero-drift, chopper-stabilized op-amp in the first position. The offset voltage of this op-amp get multiplied by the gain of the circuit, in this case x100.The circuit includes some capacitors to reduce the bandwidth.Protection, if needed can be added, the same way as described by Ian.M and illustrated here:Jay_Diddy_B

author: LoveLaika
author_rank: Frequent Contributor
timestamp: December 02, 2021, 12:57:55 am
content: If the Zener acts in the way that I think it does, isn't it safe, barring unusual conditions? Since its referenced to the low negative voltage, the Zener ensures a 5 volt difference between its rails so that would allow it to tolerate very low negative voltages?

author: ledtester
author_rank: Super Contributor
timestamp: December 02, 2021, 03:53:58 am
content: The Zener and the corresponding resistor (the 39K in the LT app note and R5 in Jay_Diddy_B's circuit) form a classiczener voltage regulator.The main design concern is to pick the resistor so that there is enough current for regulation and the device receiving the regulated power while staying within the power limits of the zener diode.