Author Topic: Cheap way of low side current sense (under 0.5USD)  (Read 7087 times)

0 Members and 2 Guests are viewing this topic.

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Cheap way of low side current sense (under 0.5USD)
« on: August 10, 2017, 06:32:54 am »
Hi,
I just wanted to be able to measure the Drain current of my Power mosfet in a cheap way, the Maxium current would be 20A and the PWM Signal is 100KHz to 250KHz, I have used this simple single LM324 Circuit, but it seems it's not working as expected, I wanted to scale the output voltage to be 0-3.3V for interfacing to my MCU ADC, Do you have any Idea to make it work or any other cheap brilliant Ideas? :)
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Rbastler

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: it
  • Wörk Wörk
    • Rbastlers Blog
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #1 on: August 10, 2017, 06:47:15 am »
I have used this simple single LM324 Circuit, but it seems it's not working as expected.
What is it doing then ?
The circuit seems fine to me in the schematic.

Edit: typo
http://rbastlerblog.jimdo.com/
Gamma spectrometer works. Now some yellow crystals need regenerating and testing.
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #2 on: August 10, 2017, 06:50:28 am »
The sense Resistor is 0.0015 Ohm and the Op-amp is LM324, it's Not working as expected, the out put is near zero! |O
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline nugglix

  • Regular Contributor
  • *
  • Posts: 209
  • Country: de
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #3 on: August 10, 2017, 07:12:00 am »
Take a look at the datasheet.       :horse:

hint: GBW

And for low currents you might have problems w/ the offset voltage.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1689
  • Country: nl
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #4 on: August 10, 2017, 07:45:22 am »
The drain current is chopped up with the PWM. You're trying to measure and amplify a 100kHz signal with 100x gain. You need at least 10MHz GBW for that, but preferably much more.

The LM324 is a jelly bean op-amp and only has 1MHz unity-gain bandwidth.

And yes the offset voltage is also important, it will swamp your to be measured signal and create large static offsets.
 

Offline Rbastler

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: it
  • Wörk Wörk
    • Rbastlers Blog
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #5 on: August 10, 2017, 07:52:41 am »
With a max offset voltage of 3mV with a LM324 and the 0.0015Ohm shunt, you'll have a error of 2A.
Didn't think about the GBW though. Learning something new every day.
A chinese panel amp meter should work fine. Although thats not around 0.5$... I used one in a project that faild in the end for other reasons.

Sent from my A0001 using Tapatalk

http://rbastlerblog.jimdo.com/
Gamma spectrometer works. Now some yellow crystals need regenerating and testing.
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #6 on: August 10, 2017, 07:56:11 am »
Thanks for the hints, any Op-amp part suggestion?

where should I put the LPF?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #7 on: August 10, 2017, 08:12:35 am »
50KHz ;)
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #8 on: August 10, 2017, 08:48:00 am »
Thanks blueskull, what about the LPF? ;) :)
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: my
  • reassessing directives...
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #9 on: August 10, 2017, 08:50:01 am »
The sense Resistor is 0.0015 Ohm and the Op-amp is LM324, it's Not working as expected, the out put is near zero! |O
at 100KHz, LM324 can do just over 10dB of voltage gain, and thats at 15Vcc, at your 5Vcc, i guess its much lower.. 10dB gain is only 3X magnification of your 30mV sense voltage (20A x 1.5mOhm) = 90mV. another thing is, your source impedance to the gate is not known, if its high, it also can prohibit from the mosfet to ever turned on, or turn on poorly. the inductance also can prohibit rush current from ever passing the mosfet but i dont have a ballpark value for inductive current ramp... so not sure what your problem is... in order to get 100X (40dB) gain out of LM324, you need to lower the PWM less than 5KHz (and thats at 15Vcc) ymmv...
« Last Edit: August 10, 2017, 08:56:01 am by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20004
  • Country: gb
  • 0999
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #10 on: August 10, 2017, 09:02:38 am »
Is there a negative rail?

The MIC920YC5 is good, but its common mode range doesn't include the negative rail, so it might not be suitable, if single supply operation is a requirement.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6812
  • Country: ro
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #11 on: August 10, 2017, 09:07:23 am »
Also, did D1 survived? It's a 45V diode used at 75V.
Is it really needed? What is the main reason for using D1?

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #12 on: August 10, 2017, 10:05:32 am »
Quote
What's the physical size of R1?
The size of R1 is 2010 or 1W Resistor

Quote
Also, did D1 survived? It's a 45V diode used at 75V.
It's just for illustration in here! I had a 200V Fast Diode  there. also 1mH is something for illustration  too, I want to use it for different types of inductors and transformers :D



Quote
Is there a negative rail?

The MIC920YC5 is good, but its common mode range doesn't include the negative rail, so it might not be suitable, if single supply operation is a requirement.

I can make a -5V with MC34063 that can supply 50mA with 0805 inductors and being cheap, but I prefer to use a single supply design tough! ^-^
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20004
  • Country: gb
  • 0999
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #13 on: August 10, 2017, 10:24:24 am »
I can make a -5V with MC34063 that can supply 50mA with 0805 inductors and being cheap, but I prefer to use a single supply design tough! ^-^
The MC34063? Yuck! Use the ICL7660 if you want a negative rail.
http://docs-europe.electrocomponents.com/webdocs/14bf/0900766b814bf84b.pdf
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6812
  • Country: ro
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #14 on: August 10, 2017, 10:36:17 am »
D1 comes with some disadvantages. For power MOSFET driven inductive loads, D1 may be removed. The internal diode of the MOSFET will be enough for protection.
http://www.nxp.com/video/driving-inductive-loads-with-mosfets-nxp-quick-learning-44-part-1:MOSFETS-INDUCTIVE-LOADS-1

Offline Alex Nikitin

  • Super Contributor
  • ***
  • Posts: 1316
  • Country: gb
  • Femtoampnut and Tapehead.
    • A.N.T. Audio
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #15 on: August 10, 2017, 10:57:20 am »
30mV full scale, 12 bit ADC, ~7.5uV LSB. Ideally you want the noise to be about not more than 2LSB p-p or roughly 0.3LSB RMS or 2.5uV RMS In a 100kHz BW it works out at 8nV/rtHz, and ideally not more than 2.5uV p-p at LF (0.1-10Hz range) . Possible, but not that simple, and you would also need a Kelvin connection to the shunt resistor.

Something like INA141 chip set for a gain of 100 might be OK (but would need a negative supply - at least -2.5V), however it is not cheap.

Cheers

Alex
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #16 on: August 10, 2017, 10:58:00 am »
Quote
The MC34063? Yuck! Use the ICL7660 if you want a negative rail.
http://docs-europe.electrocomponents.com/webdocs/14bf/0900766b814bf84b.pdf

I can get MC34063 cheaper in here! but I think they probably achieve similar prices ;)
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1931
  • Country: ca
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #17 on: August 10, 2017, 11:00:45 am »
Quote
30mV full scale, 12 bit ADC, ~7.5uV LSB. Ideally you want the noise to be about not more than 2LSB p-p or roughly 0.3LSB RMS or 2.5uV RMS In a 100kHz BW it works out at 8nV/rtHz, and ideally not more than 2.5uV p-p at LF (0.1-10Hz range) . Possible, but not that simple, and you would also need a Kelvin connection to the shunt resistor.

Something like INA141 chip set for a gain of 100 might be OK (but would need a negative supply - at least -2.5V), however it is not cheap.

Cheers

Alex

use your hacker kid inside to do a better job ;) we are engineers and we need to come with a better and cheaper solution every time
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline trampas

  • Contributor
  • Posts: 44
  • Country: us
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #18 on: August 10, 2017, 11:08:42 am »
I have tried to measure low side current with inductive load as you are doing.

I learned a few things, first off consider the on time of the FET.  For example if you have high voltage drive and want to regulate small currents the on time of the FET will be very small, this means more GBW on the op-amp, also it means you will have to have a fast ADC or do analog filtering which has issues as well.  After several prototypes I decided I wanted to measure current in inductive load, so gave up with low side current sensing and went with a hall effect current sensor, like ACS711 to sense the current in the inductive load.

Not in my application (motor controller) drove with an H-bridge such that after putting power into inductor I would short leads such that inductor would continue to circulate the current.  So with the hall sensor reading of the current was not time critical with respect to FET operating frequency.

Trampas
www.misfittech.net



 

Offline chris192

  • Newbie
  • Posts: 4
  • Country: gb
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #19 on: August 10, 2017, 11:42:49 am »
Could you use a IR25750 instead of that current sensing resistor? AppNote
If your RDSon is 44m (Ohm), you would get a 0.9V full scale output.
If your MCU has a built in 1V reference you might be able to do away with the op-amp as well.

From a cursory read of the datasheet it looks like you might be able to create a LPF by just adding a capacitor on the CS pin. An active filter would be better though.

Chris.
« Last Edit: August 10, 2017, 12:09:07 pm by chris192 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20004
  • Country: gb
  • 0999
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #20 on: August 10, 2017, 12:44:37 pm »
Quote
The MC34063? Yuck! Use the ICL7660 if you want a negative rail.
http://docs-europe.electrocomponents.com/webdocs/14bf/0900766b814bf84b.pdf

I can get MC34063 cheaper in here! but I think they probably achieve similar prices ;)
But the other components required are not. The ICL7660 only requires a couple of cheap electrolytic capacitors. The MC34063 requires an inductor, amongst other components which are much more expensive. Over all, the ICL7660 solution will work out cheaper than the MC3463.
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2359
  • Country: mx
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #21 on: August 10, 2017, 01:15:10 pm »
If the ICL7660 is too expensive, you can actually build a negative voltage generator using a 555.

http://www.next.gr/uploads/38-9bc409daf7.gif

If you replace the 1N4001 diodes with schottkys, the circuit will work down to 5v
 

Offline Rbastler

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: it
  • Wörk Wörk
    • Rbastlers Blog
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #22 on: August 10, 2017, 01:21:31 pm »
If the ICL7660 is too expensive, you can actually build a negative voltage generator using a 555.

http://www.next.gr/uploads/38-9bc409daf7.gif

If you replace the 1N4001 diodes with schottkys, the circuit will work down to 5v
50ct for a chip isnt expensive, Id say. Order on Aliexpress and wait some time.
Since the ICL7660 is made for that exact purpose, I always would choose it. I also ordered 20pcs on Aliexpress for 3€ some time ago. They arrived and work fine.

Edit: changed text
« Last Edit: August 10, 2017, 01:28:32 pm by Rbastler »
http://rbastlerblog.jimdo.com/
Gamma spectrometer works. Now some yellow crystals need regenerating and testing.
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2359
  • Country: mx
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #23 on: August 10, 2017, 01:26:24 pm »
I ALWAYS use the 7660 for low power negative supplies. It is one of those old "classic" ICs which fill a niche very, very nicely. Which explains its longevity.

But the OP may have some 555 at hand, or perhaps with an acquaintance....
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20004
  • Country: gb
  • 0999
Re: Cheap way of low side current sense (under 0.5USD)
« Reply #24 on: August 10, 2017, 01:48:08 pm »
Yes, the 555 will work too. I didn't recommend it because it's inferior to the ICL7660, in this application and requires more parts.


A Schottky diode would be better. If the current draw is very low, use the BAT54, which comes in a dual variant, to safe space.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf