Author Topic: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?  (Read 1284 times)

0 Members and 1 Guest are viewing this topic.

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1619
  • Country: gb
Can anyone advise me whether there are any flaws or 'gotchas' in what I'm doing here?

I'm using a high-side load switch to switch power to a load, but I also want to measure the current that the load is drawing. However, I'm only interested in the relative current draw between an 'idle' and 'active' state. I don't really care what the absolute amount of current is, only what one state is in relation to the other. So, given that, I thought rather than add a separate series shunt resistor, why not use the switch's RDS(on) as the shunt resistance? The RDS(on) of the switch I plan to use is approx. 80mΩ, so should serve my needs (I was thinking otherwise of using a 100mΩ shunt) when combined with an amplifier gain of 100V/V.



Now, before you say anything, yes I know using a MOSFET's on-resistance as a measurement shunt isn't typically a good idea, due to imprecision of resistance specification, temperature coefficients, etc, etc. :blah: But given my scenario - I only care about relative current measurement, not what the actual values are - I think it should actually be suitable.

But is this still a good idea? Are there any reasons I haven't thought of why it won't work?

These are the concerns that I've had come to mind that I think are adequately addressed:

- Temperature variation: even if the RDS(on) of the switch does increase at higher temperatures (e.g. maybe it goes up to 100mΩ), it doesn't really matter for my application. The 'idle' and 'active' current readings will both increase by the same amount. And if it's the 'active' current draw itself making the RDS(on) increase only in that state, then it'll just mean there's a slightly higher difference between the two states, which is totally fine.

- Current sense amplifier Vsense voltage when the load switch is off: the INA180 is rated for ±26V differential between VP and VM and common-mode of 0-26V, so if the load side of the switch is at ground when off, and the other is at the supply voltage of +5V, then that's well within the specification, right? The switch I'm considering right now, the MT9700 doesn't have output discharge, though, so I guess technically the load side would be floating? So I don't know what impact that would have on the differential Vsense voltage of the amp. I'm thinking maybe I should change to one with output discharge when off (i.e. load side is switched to ground through a resistance), just to be sure.

- ESD protection diode: the load is off-board, so I want to protect the load output from ESD, so have added TVS diodes that should serve dual duty to protect both current-sense amplifier and switch. I've chosen diodes with minimal leakage current (80nA), as I assume anything of any significance will affect the amp input, in the same way that input offset currents do? Diode capacitance isn't really something I think I need to be concerned with, though, because it'll just form an RC low-pass filter on the amp inputs with the series 10Ω resistors; I'm already low-pass filtering the amplifier output, so some much, much higher-frequency LP filtering on the input is of no importance.

Any other things I should be concerned about? Or do I need to go back to the drawing board? :)
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2146
  • Country: au
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #1 on: January 23, 2025, 06:53:30 pm »
Capacitive touch buttons work fine on change of value.
You have not said how much or how quickly the current changes ?
One issue is immediately after your circuit starts, or resets, is the load state unknown?
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4890
  • Country: dk
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #2 on: January 23, 2025, 07:23:07 pm »
 

Offline Greybeard

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: de
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1619
  • Country: gb
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #4 on: January 24, 2025, 02:56:26 pm »
Capacitive touch buttons work fine on change of value.

Huh? Where did I mention capacitive touch buttons? :-//

You have not said how much or how quickly the current changes ?
One issue is immediately after your circuit starts, or resets, is the load state unknown?

When turned on, the load will pulse between 'idle' and 'active' current draw a few times a second.

The load will be off at all times unless the microcontroller in charge specifically turns it on with the high-side load switch (i.e. LOAD_EN goes high).

here's a gate driver that shows using the Rdson for current sense, https://www.infineon.com/dgdl/Infineon-ir2127-DS-v01_00-EN.pdf?fileId=5546d462533600a4015355c868861696

I'm not sure how that's relevant. I'm not driving the gate of a MOSFET. And that datasheet doesn't explain how it operates.

https://www.planetanalog.com/low-side-rdson-current-sensing/

While that's interesting, I'm doing high-side switch and current sensing.
 

Offline Hr_Satch

  • Contributor
  • Posts: 20
  • Country: be
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #5 on: January 24, 2025, 06:25:08 pm »
Good idea, but your schematic won't work with twice the same 5V supply.
You will need atleast two separate 5V supplies,
and one needs to be higher than the other ;-?
So you are speaking about High-side driven ?
So i suppose P-fet is applied for ?
So Source is higher potentail than Drain, . . .

Just K.i.S.S. when precision is not an issue, just go for simplicity:
additional series shunt, . . .

Also Mosfets Rds-on is very Low, so only usefull for big currents, in the Amps regions.

But the idea is nice
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2146
  • Country: au
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #6 on: January 25, 2025, 01:34:26 am »
Capacitive touch buttons work fine on change of value.

Huh? Where did I mention capacitive touch buttons? :-//
The point is that sense works on a change in value, with a rather unknown base value.
Exactly the same as what you seek to do.

We still do not know your ON and OFF currents you hope to distinguish?
If they change 5%, or rapidly, that's tougher than if they change 100:1
« Last Edit: January 25, 2025, 04:45:41 am by PCB.Wiz »
 

Online Smokey

  • Super Contributor
  • ***
  • Posts: 3105
  • Country: us
  • Not An Expert
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #7 on: January 25, 2025, 01:42:30 am »
Rdson changes with temperature.  Just be heads up on that. 
And as others have said, some stuff uses the Rdson for rough current sensing.

example:
https://www.ti.com/lit/ds/symlink/lm74912-q1.pdf
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15984
  • Country: fr
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #8 on: January 25, 2025, 03:35:35 am »
Why not... if you can deal with the error due to variability of the RDSon.

There's just one thing that occured to me though with that setup. With the above limitation, that would work... when the power switch is on.
But when it's off, the measured current will obviously be completely wrong (the amplifier's output will likely saturate). Possibly you don't care about that if you control the power switch anyway, but just mentioning.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 9490
  • Country: fi
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #9 on: January 25, 2025, 07:20:48 am »
Rds_on current sensing for peak overcurrent protection is very usual thing to do on integrated DC/DC converter chips (especially when the power MOSFET itself is integrated, but also on those with external MOSFET, in which case they could have a separate pin for configuring the current limit threshold). In such use case, the fact that current trip level gets lower with increasing temperature might be even considered desirable. Since power dissipation in the MOSFET is relative to this voltage drop, it's really a "dissipation limit" more than a current limit.

In fact I would say 99% of modern DC/DC supplies do that since they are voltage sources and no accurate constant-current mode is needed, just protection.

If the accuracy is good enough for your application, then there are only upsides: getting rid of separate shunt resistor power loss, one component less, smaller layout...
« Last Edit: January 25, 2025, 07:23:15 am by Siwastaja »
 

Offline timeandfrequency

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: fr
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #10 on: January 25, 2025, 09:25:30 am »
Hello HwAoRrDk,

An long time ago, Motorola (now On-Semi) manufactured Mosfets called SENSEFETs with an internal current probe feature.
Package was often the 5 pins 'TO220-5'.

You can still find some parts as NOS :
https://www.veswin.com/product-MTP40N06M.html

But datasheets are really hard to find : under the same part numbers, one can now find  the 3 pin 'equivalent' part  :wtf:

These (identical ?) AN show up these kind of 4 and 5 pins Mosfets :
https://www.onsemi.com/pub/collateral/and8093-d.pdf
http://www.bitsavers.org/components/motorola/_appNotes/AN-1001_Understanding_SENSEFETs.pdf

On page 9 of the AN above, the MTP10N10M has 4 pins, so an external sense resistor is still required. But the latters' rather high value (200 Ohms) for a shunt resistor shows that just a small amount of the current entering the Drain pin is actually measured.

An for the moment I could not find any online datasheet for the 4 pins version of the MTP10N10M...
Will I have to go into my barn to dig out an old Motorola paper databook?
« Last Edit: January 25, 2025, 10:49:39 am by timeandfrequency »
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 580
  • Country: ie
    • LinkedIn
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #11 on: January 25, 2025, 12:01:21 pm »
An long time ago, Motorola (now On-Semi) manufactured Mosfets called SENSEFETs with an internal current probe feature.
Not only Motorola. Many others did (and still do): https://www.digikey.ie/en/products/filter/single-fets-mosfets/278?s=N4IgjCBcoJwKwyqAxlAZgQwDYGcCmANCAPZQDaIAzJQGxgAMlIAukQA4AuUIAyhwE4BLAHYBzEAF8pQA
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1619
  • Country: gb
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #12 on: January 25, 2025, 03:00:21 pm »
Rdson changes with temperature.  Just be heads up on that. 

I'm well aware of that. These load switches are specced for 80mΩ typical RDS(on), up to a maximum of 100mΩ across the operating temperature range (-40 to +85°C), which should be fine for my application. Prior experience with these kinds of load switches I've measured about a 10-15mΩ rise when warm, so that seems about right. The RDS(on) going up is fine, it would only be an issue if it went down. :)

There's just one thing that occured to me though with that setup. With the above limitation, that would work... when the power switch is on.
But when it's off, the measured current will obviously be completely wrong (the amplifier's output will likely saturate). Possibly you don't care about that if you control the power switch anyway, but just mentioning.

Yeah, that's not a problem. When the load switch is off, I'll not be looking at the measured current at all, so whether it's saturated or not I don't care.

That has brought to mind one thing, though: these load switches have soft-start, so I'll have be sure not to take current measurements for a short period right after switch-on, because they won't be a proper measurement. IIRC the soft-start period is only something like <1ms, so probably wouldn't have an impact even if I didn't implement a delay.
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 2340
  • Country: us
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #13 on: January 25, 2025, 03:11:08 pm »
There are high side drivers with a sense pin output, many created for automotive applications.  And some can run at 5V.  For example, TI TPS1HC100-Q1:

  https://www.ti.com/lit/gpn/TPS1HC100-Q1

And OnSemi NCV84160:

  https://www.onsemi.com/pdf/datasheet/ncv84160-d.pdf

Other manufacturers of similar devices include Infineon and ST.

Current sensing is not wonderfully accurate at low currents for any of these devices, but it's also possible to generate a calibration table for each driver to improve accuracy, if that makes sense for your application.
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #14 on: January 25, 2025, 03:31:53 pm »
Decades ago we patented (7728565, Non-invasive load current sensing in LDO regulators) a concept where the PMOS pass device in an LDO was duplicated but scaled down (we usually used 1/1000) and forced to have the same Gate, Drain and Source Voltage as the pass device, thus replicating the pass device load current but scaled by the scaled factor. The load current sensing output was a current source of the scale factor which represented the LDO pass load current both statically and dynamically.

We utilized this is many of our custom chip designs to monitor various on-chip distributed LDO regulators behavior and load currents.

https://golden.com/wiki/US_Patent_7728565_Non-invasive_load_current_sensing_in_low_dropout_(LDO)_regulators-VW9689P

Best

Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 
The following users thanked this post: oPossum

Offline KerimF

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: sy
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #15 on: January 25, 2025, 04:07:33 pm »
In my DC to AC inverters, I simply sense the voltage on Rds_on for the overload protection (of the output power MOSFETs).
Fortunately, Rds_on increases with temperature, this lets the overload protection be more effective.
 
A philosopher: A living thing has no choice but to execute its pre-programmed instructions embedded in it (known as instincts).
Therefore, the only freedom, a human may have, is his ability to oppose or not his natural robotic nature.
But, by opposing it, such a human becomes no more of this world.
 

Offline exe

  • Supporter
  • ****
  • Posts: 2665
  • Country: nl
  • self-educated hobbyist
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #16 on: January 25, 2025, 05:53:22 pm »
While I think it might work to certain extend (and I'm curious to see the actual performance), I think just putting a shunt will be better in almost every way possible, except some little drop on it (which can be less than 50mV full-scale). But hey, why not.

If you want to go fancy, put the second MT9700, and use it just a shunt (=always on). This way it will handle properly situation when power is disabled on the original MT9700. But I still think a resistor will be cheaper.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4890
  • Country: dk
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #17 on: January 25, 2025, 09:30:03 pm »
Rds_on current sensing for peak overcurrent protection is very usual thing to do on integrated DC/DC converter chips (especially when the power MOSFET itself is integrated, but also on those with external MOSFET, in which case they could have a separate pin for configuring the current limit threshold). In such use case, the fact that current trip level gets lower with increasing temperature might be even considered desirable. Since power dissipation in the MOSFET is relative to this voltage drop, it's really a "dissipation limit" more than a current limit.

In fact I would say 99% of modern DC/DC supplies do that since they are voltage sources and no accurate constant-current mode is needed, just protection.

usually called  desaturation or desat protection

 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 9490
  • Country: fi
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #18 on: January 26, 2025, 09:54:14 am »
usually called  desaturation or desat protection

Yeah, circuit-wise it's the same thing (so worth googling with that term), but the purpose is slightly different: "desaturation" means that there is something wrong with drive voltage and the transistor isn't fully conducting when it should, so voltage across it is larger, dissipation is larger, and you need to turn it off.

Then again, even in desired "full conduction", too much voltage over the transistor again indicates the same problem: too much dissipation, and the remedy is exactly the same, so terms "desat protection" or "Rds_on overcurrent sensing" can be used interchangeably.

You hear "desat detection" more in the context of large IGBTs, and Rds_on current sensing / overcurrent protection in the context of smaller (often integrated-transistors) switch-mode supplies.
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1619
  • Country: gb
Re: MOSFET Rds(on) as current shunt - it's not stupid if it works, right?
« Reply #19 on: January 26, 2025, 03:44:31 pm »
I realised I already had roughly the necessary components to try this out - not the exact components I drafted in my schematic, but functional equivalents. Instead of the INA180A3, I have an ST CS30BL (50V/V gain rather than 100) and some Richtek RT9742 (55mΩ RDS(on) rather than 80).

So I cobbled together the circuit on some old strip board. And... it works! ;D

I'm getting ADC readings about what I would expect from the specified 55mΩ RDS(on). In a test case, current draw in 'idle' state was approx. 55mA, and ADC reading correlates with theoretical calculated value for 60mA, which is close enough for my purposes. Readings from 'active' state were similarly 'close enough'. :-+

As expected, the current sense amplifier output is saturated at nearly 5V when the load switch is off, due to having around 5V across Vsense+ and Vsense-.

I don't have any 5V ESD diodes to hand, so I wasn't able to include that part in the prototype circuit, and so I don't have a handle on how that would influence the performance, but I'm pretty sure now that any impact would be negligible.

One other thing I didn't include was the 100nF capacitor across the load output, as I figure that maybe that's not a good idea when measuring current, as any decoupling may influence the readings (or, at least, introduce some latency to the true current draw). However, maybe I should experiment with that to see.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf