Cheap way of low side current sense (under 0.5USD) - Page 1
Forum section: electronics / projects

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 06:32:54 am
content: 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?

author: Rbastler
author_rank: Frequent Contributor
timestamp: August 10, 2017, 06:47:15 am
content: Quote from: ali_asadzadeh on August 10, 2017, 06:32:54 amWhat is it doing then ?The circuit seems fine to me in the schematic.Edit: typo

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 06:50:28 am
content: 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!

author: nugglix
author_rank: Regular Contributor
timestamp: August 10, 2017, 07:12:00 am
content: Take a look at the datasheet.hint: GBWAnd for low currents you might have problems w/ the offset voltage.

author: hans
author_rank: Super Contributor
timestamp: August 10, 2017, 07:45:22 am
content: 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.

author: Rbastler
author_rank: Frequent Contributor
timestamp: August 10, 2017, 07:52:41 am
content: 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

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 07:56:11 am
content: Thanks for the hints, any Op-amp part suggestion?where should I put the LPF?

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 08:12:35 am
content: 50KHz

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 08:48:00 am
content: Thanks blueskull, what about the LPF?

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 10, 2017, 08:50:01 am
content: Quote from: ali_asadzadeh on August 10, 2017, 06:50:28 amat 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...

author: Zero999
author_rank: Super Contributor
timestamp: August 10, 2017, 09:02:38 am
content: 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 10, 2017, 09:07:23 am
content: Also, did D1 survived? It's a 45V diode used at 75V.Is it really needed? What is the main reason for using D1?

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 10:05:32 am
content: QuoteThe size of R1 is 2010 or 1W ResistorQuoteIt'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 transformersQuoteI 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!

author: Zero999
author_rank: Super Contributor
timestamp: August 10, 2017, 10:24:24 am
content: Quote from: ali_asadzadeh on August 10, 2017, 10:05:32 amThe MC34063? Yuck! Use the ICL7660 if you want a negative rail.http://docs-europe.electrocomponents.com/webdocs/14bf/0900766b814bf84b.pdf

author: RoGeorge
author_rank: Super Contributor
timestamp: August 10, 2017, 10:36:17 am
content: 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

author: Alex Nikitin
author_rank: Super Contributor
timestamp: August 10, 2017, 10:57:20 am
content: 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.CheersAlex

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 10:58:00 am
content: QuoteI can get MC34063 cheaper in here! but I think they probably achieve similar prices

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 10, 2017, 11:00:45 am
content: Quoteuse your hacker kid inside to do a better jobwe are engineers and we need to come with a better and cheaper solution every time

author: trampas
author_rank: Regular Contributor
timestamp: August 10, 2017, 11:08:42 am
content: 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.Trampaswww.misfittech.net

author: chris192
author_rank: Newbie
timestamp: August 10, 2017, 11:42:49 am
content: Could you use aIR25750instead of that current sensing resistor?AppNoteIf 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.

author: Zero999
author_rank: Super Contributor
timestamp: August 10, 2017, 12:44:37 pm
content: Quote from: ali_asadzadeh on August 10, 2017, 10:58:00 amBut 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.

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 10, 2017, 01:15:10 pm
content: If the ICL7660 is too expensive, you can actually build a negative voltage generator using a 555.http://www.next.gr/uploads/38-9bc409daf7.gifIf you replace the 1N4001 diodes with schottkys, the circuit will work down to 5v

author: Rbastler
author_rank: Frequent Contributor
timestamp: August 10, 2017, 01:21:31 pm
content: Quote from: schmitt trigger on August 10, 2017, 01:15:10 pm50ct 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

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 10, 2017, 01:26:24 pm
content: 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....

author: Zero999
author_rank: Super Contributor
timestamp: August 10, 2017, 01:48:08 pm
content: 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.

author: Buriedcode
author_rank: Super Contributor
timestamp: August 10, 2017, 05:48:31 pm
content: Quote from: ali_asadzadeh on August 10, 2017, 10:05:32 amYou can't use an 0805 inductor with the MC34063. Well, ok, you can, but it either won't work or be horribly inefficient. Even for very low current applications the MC34063's design requires a minimum load, and its switching frequency means a rather large inductor. 0805 inductors are generally for filtering, not power applications, unless the inductance is very small (<10uH) and its low power (<100mA).As many have suggested, a charge pump is the way to go if its just for the negative rail of an opamp for ground sensing. Current will be what, 5mA? maybe 8mA max. That lends itself to either a dedicated IC charge pump, or just a discrete one with two diodes and two caps running off a square wave (555, 74xx ttl oscillator, discrete astable multivibrator, you choose). As you probably won't need more than -2.5V you won't even need to use schottky diodes, good 'ol 1n4148 or 1n914 will do.But a dedicated charge pump IC (as recommended several times, by several people) is generally the easiest - requires two caps and you're done.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 12, 2017, 05:40:18 am
content: Thanks guys, The problem is not how I generate -5V, Ok I will choose 7606The problem is with in the low price of current sense! what's your idea about adding a RC low pass filter after the shunt, before the Op-amp? something like this

author: cellularmitosis
author_rank: Unknown
timestamp: August 12, 2017, 07:53:28 am
content: Did someone say ICL7660?https://www.eevblog.com/forum/projects/an-evening-with-the-icl7660/