Amplifying a mV signal

Thread Starter

strantor

Joined Oct 3, 2010
6,798
Remember what I was saying about not monitoring the current during the time the MOSFET is turned off? The current getting recycled through the diode isn't being measured? (see reply #5).

Well, that's what you are running into.

Have a look at the attached. I yanked out the discrete PNP/NPN gate driver and threw in an LTC4440 high-side driver. It's not the solution for you, because the '4440 has an 80v limit - but it's good just to show you how one could do this (implement a high-side driver so that all of the current through the load is measured, whether sourced from the MOSFET or recycled via the diode).

I removed most of the port type flags for power rails, as they drew attention away from the important I/O signals. I left the +96 port type, because it's HV (even though I lowered it to 75v for the demo).

Even though this configuration works to limit the current, I'm still not terribly fond of it. The MOSFET array keeps getting turned on for short "blips" when the PWM signal goes high; that will result in power dissipation in the module.

The diode you chose is woefully inadequate for the simulation - I left it as it is, but you should change it to an MBRB2545CT. That one isn't rated for the voltage either (~75 volts present at times) or current, but at least it'll have much less of a voltage drop across it (the excessive voltage drop during current limiting results in the boost cap being charged to ~20v).
SGT you are a bona fide genius. I should just listen to you the first time, every time. Thank you for saving my day!

The components I used for the most part are just dummies to get a simulation going. I will spec better parts before I build anything (which I will probably start asking about in short order). The diode I have in mind is this one:
http://www.mouser.com/ProductDetail/IXYS/MEO550-02DA/?qs=t7yjd2JO/gSLM9NDot8IsA==
200V 582A ~.9V drop
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
Oops, I left R1 set to 297k. Change it back to 27k. I had it set to 297k so that it would not take so long to run.
It didn't get changed on my end. for some reason the file you uploaded wouldn't sim; it said it could not find the ".net" file, so I copied all your changes to my ciruit. For some reason it still runs @ 96V without me changing it to 75V - I guess the simulator doesn't care I've exceeded the max voltage.
 

SgtWookie

Joined Jul 17, 2007
22,230
SGT you are a bona fide genius. I should just listen to you the first time, every time. Thank you for saving my day!
I don't proclaim to be a genius. However, I HAVE run into this very problem before, and it was somewhat of a struggle to resolve it using common components. Now that you have also wrestled with it, you probably won't forget how to implement a possible solution. Note that you will also run into this kind of problem with an H-bridge, but it's a bit more subtle to figure out the current paths; and a single current sense resistor for both sides of an H-bridge doesn't work - but I digress.

Now, one CAN sense current on the high side if using the proper components. However, with that high side being in the 96v range, that makes low-side current sensing much more attractive.

Another option would be to use a Hall-effect sensor on a conductor, which eliminates the high-power resistor altogether; but the Hall-effect sensor can be dicey to set up. Even though the resistor causes a power loss, it's still much easier to use.

The components I used for the most part are just dummies to get a simulation going.
Well, you need to at least use parts that are somewhere in the ballpark of what you're planning on doing. The diode you'd selected was only rated for 0.23A, and it had a heck of a Vf at 5A - I didn't bother to check it at 50A.

I will spec better parts before I build anything (which I will probably start asking about in short order).
It's a good thing to test those items in LTSpice so you can get an idea on how they might perform.

Did you know that you can check how much power a part needs to dissipate? After you've run a transient analysis and the plot window is open, hold down the ALT key, and hover the cursor over a part. The cursor will change to a thermometer. Left-click on the part, and you'll see the power dissipation vs time. You can select a plot area to 'zoom in', and then Ctrl+LeftClick on the signal formula in the heading of the plot; it'll pop up a window showing the start & end times of what it's displaying, the average power in Watts, and the integral.
That looks pretty beefy. You'll still have to figure out how to keep it cool.

If it has a Vf of 1v @ 300A, and you're dumping 300A through it, then that's 300 Watts you need to either get rid of, or the diode will pop like a shotgun blast.
 

SgtWookie

Joined Jul 17, 2007
22,230
It didn't get changed on my end. For some reason the file you uploaded wouldn't sim; it said it could not find the ".net" file, so I copied all your changes to my ciruit.
That's quite odd. Can you do a screen capture of the error message, and the SPICE error messages? Ctrl+L should bring up the Spice error log.

For some reason it still runs @ 96V without me changing it to 75V - I guess the simulator doesn't care I've exceeded the max voltage.
No, it won't. I changed it to 75 just as a reminder that the high-side drive needed to be changed.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
I don't proclaim to be a genius.
geniuses never do. Einstein's attempt to shrug off his genius:
“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.”
Another option would be to use a Hall-effect sensor on a conductor, which eliminates the high-power resistor altogether; but the Hall-effect sensor can be dicey to set up. Even though the resistor causes a power loss, it's still much easier to use.
I've pored through forums of people debating this and the general idea I got is that hall sensors are too slow for pulse-by-pulse current limiting. I will be using a hall sensor (in addition to the sense resistor), but it will be interfaced with my microcontroller to measure average current. My microcontroller will measure current over time and limit it's analog output based on this. This way I can set limits like "300A for 1 min" or "500A for 10 seconds" and my hardware current limiting circuit does all the work.
Well, you need to at least use parts that are somewhere in the ballpark of what you're planning on doing. The diode you'd selected was only rated for 0.23A, and it had a heck of a Vf at 5A - I didn't bother to check it at 50A.


It's a good thing to test those items in LTSpice so you can get an idea on how they might perform.
yes, the next lesson in spice: how to import models from manufacurer's websites into spice. There was a link earlier in this post to a thread in which it was explained how to do it, but I haven't tried it yet.
Did you know that you can check how much power a part needs to dissipate? After you've run a transient analysis and the plot window is open, hold down the ALT key, and hover the cursor over a part. The cursor will change to a thermometer. Left-click on the part, and you'll see the power dissipation vs time. You can select a plot area to 'zoom in', and then Ctrl+LeftClick on the signal formula in the heading of the plot; it'll pop up a window showing the start & end times of what it's displaying, the average power in Watts, and the integral.
No, I didn't know that. thanks for the tip. I see my diode dissipates 6KW peak & 2KW average while in the 50A current limit plateau. That's a lot, but as discussed that diode isn't the one I'll be using.
That looks pretty beefy. You'll still have to figure out how to keep it cool.

If it has a Vf of 1v @ 300A, and you're dumping 300A through it, then that's 300 Watts you need to either get rid of, or the diode will pop like a shotgun blast.
Yes it and the MOSFET module will be bolted to a 12" X 6" X 3"thick extruded aluminum heat sink (donor from a failed industial motor drive), possibly with forced cooling if needed.


EDIT: on the topic of geniuses, I am wrong. some do proclaim it; when they do, they do to excess. I have met some like that who can't stop talking about how smart they are. Can't really argue with them, but nobody needs to hear it all day every day.
 

praondevou

Joined Jul 9, 2011
2,942
I've pored through forums of people debating this and the general idea I got is that hall sensors are too slow for pulse-by-pulse current limiting.
Well I used closed-loop hall effect sensors for peak overcurrent protection of inverters, sometimes it was faster than the driver module built-in VCE protection.. It depends on which hall sensor you choose I guess. I have to admit that I never used it for pulse-by-pulse limiting.

Have a look here: http://www.lem.com/hq/en/content/view/269/206/
There are several that work into the few hundred kHz range.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
would this be a good Op amp to use? It's rail to rail so I could eliminate the negative supply and it has 4 channels so I could wrap most of this circuit up into 1 IC. Apart from those 2 things, I don't really know what specs are important to me; I assume it needs to be very fast, and this one claims 11MHz.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
Well I used closed-loop hall effect sensors for peak overcurrent protection of inverters, sometimes it was faster than the driver module built-in VCE protection.. It depends on which hall sensor you choose I guess. I have to admit that I never used it for pulse-by-pulse limiting.

Have a look here: http://www.lem.com/hq/en/content/view/269/206/
There are several that work into the few hundred kHz range.
Well, those do appear to meet the requirement. I may have to go back and see exactly why they were saying what they were saying and what devices they were making their arguements based on.
 

tom66

Joined May 9, 2009
2,595
An LM324 is good for up to 100kHz at a gain of 10. This would be fine for 10-20kHz PWM.

The opamp you link to would be okay for 1.1 MHz or up to 100-200 kHz PWM.
 

#12

Joined Nov 30, 2010
18,224
Just so you know...op-amps also have input voltage limits. Most of them don't respond properly to 0.0 volt input when the bottom rail is 0 volts. It's called, "common mode input range".

As far as I know, every op-amp has limitations on every specification and they fall short of the imaginary, "ideal" op-amp. That's one reason why there are so many op-amps manufactured. Some are optimized for minimum input offset voltage, some for frequency ability, some for input bias current, some for output voltage range, etc.

I predict you're going to spend a couple of hours reading about op-amps.
 

#12

Joined Nov 30, 2010
18,224
Don't worry. We gotcher back.
Personally, precision analog is one of my specialities. I've tracked down errors in the nanoamp range, more than once, and there are smarter people that me on this site.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
Ok, first stupid question:
http://www.allaboutcircuits.com/vol_3/chpt_8/2.html
Just as a voltmeter will only display the voltage between its two test leads, an ideal differential amplifier only amplifies the potential difference between its two input connections, not the voltage between any one of those connections and ground. The output polarity of a differential amplifier, just like the signed indication of a digital voltmeter, depends on the relative polarities of the differential voltage between the two input connections.
Does this mean I could use low side switching and simply move my sense resistor from [between ground and the MOSFET] to [between the motor and the MOSFET, in the loop with the diode] and achieve the same effect as I did changing to high side switching?
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
Ok, first stupid question:
http://www.allaboutcircuits.com/vol_3/chpt_8/2.html

Does this mean I could use low side switching and simply move my sense resistor from [between ground and the MOSFET] to [between the motor and the MOSFET, in the loop with the diode] and achieve the same effect as I did changing to high side switching?
in answer to my own question:


http://www.allaboutcircuits.com/vol_3/chpt_8/13.html
As a rule, you should never allow either input voltage to rise above the positive power supply rail voltage, or sink below the negative power supply rail voltage, even if the op-amp in question is protected against latch-up (as are the 741 and 1458 op-amp models). At the very least, the op-amp's behavior may become unpredictable. At worst, the kind of latch-up triggered by input voltages exceeding power supply voltages may be destructive to the op-amp.
So, NO because when the MOSFET is off, both of the opamp inputs would be @ 96V.
 

SgtWookie

Joined Jul 17, 2007
22,230
It wasn't such a stupid question. Glad you discovered the answer on your own. ;)

Although at first it sounds difficult to switch the high side of the load, it makes resistive current sensing a heck of a lot easier. You can still wind up with problems though, because with the currents you're looking at, you will see voltage drops across even large gauge wire - and parasitic inductance will not be your friend.

1 foot of AWG-4 wire will drop ~25.3mV with 100A current flowing through it, and has ~279nH inductance. If the current flow tries to change suddenly, the inductance will cause a voltage spike.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,798
exciting news: a few months ago I salvaged about 6 book boxes worth of assumed obsolete (been sitting in a cabinet since the 70's or 80's) random components from the E-waste at work. They have been sitting in my garage unopened the whole time. I had not gone through them yet because (I'm lazy/busy) I figured there was nothing good in there or else it wouldn't have been thrown out. Dug into it last night and I have LOADs of opamps; about 2 dozen LM324's IIRC and dozens of other types. I have all manner of logic gates and voltage regulators, counters, transistors, diodes, capacitors (might not be any good), inductors, and carbon comp resistors (so far all testing within tolerance), and a bunch more stuff I don't even know about yet. I only got about halfway through the first box, looking up datasheets.
I might just be able to finish this project without having to make any more trips to radioshack or waiting for parts in the mail. It will however take me a few days to log and categorize this collection.
 

SgtWookie

Joined Jul 17, 2007
22,230
Gee, I missed the LM324 reference.
Tom, you're forgetting that the PWM output is a square wave; and you need lots more bandwidth to output a square wave than a sinewave or triangle wave.
 
Top