Will noise generated by switching effect shunt mV signal?

strantor

100 W
Joined
Sep 12, 2011
Messages
207
Location
Houston, TX USA
Ok, in my last post I said I couldn't find a shunt resistor large enough for my controller. I was just looking in the wrong places.

I am looking at shunt resistors like this one (http://www.ebay.com/itm/Digital-Pan...ltDomain_0&hash=item5ae3357be6#ht_1867wt_1270).
600A 75mV.
600A is way above where I plan to run (0-150A, occasionally up to 300A), but I don't want to limit my controller. I'm shooting for a 600A capability. I was just doing the math, for a resistor like this, if I was running for example 20A, I would get 2.5mV out of the shunt. I am worried that the signal level is too small. I'm worried that the noise from all this crazy high power switching may be more than 2.5mV. what do you think? are my fears misplaced? I need a good clean signal for pulse-by-pulse current limiting.
 
The influence of the switching voltage on the current signal is represented by the Common Mode Rejection Ratio (CMRR) of the current sense amplifier. There should be some kind of amplifier IC that is amplifying the voltage difference across the shunt, and transforming it into a ground-reference voltage (possibly with offset).

The CMRR (in dB) can be used to estimate the noise of the switching voltage. Since they standardize on a 20dB/decade system, estimate the switching noise as 10^(-CMRR/20) * V_battery. For a 100V system with 80 dB CMRR, expect 10 mV of noise on the output.

CMRR may be bandwidth-dependent. If so, be sure to use the value corresponding to your switching frequency.
 
You are going to need an amp with a common mode to and a bit below ground, and do not forget you need a 100 microvolt class Input Offset Voltage Op Amp with low Vos drift of say 5 microvolts. An LT1013 could do it but you will need to run split supplies. (+8V,-8V). It's a bit slow, but pretty accurate.

Ask methods about how much EMI/RFI a running motor throws about everywhere. It will be a challenge, but one worth pursuing for the learning.
 
There are quite a number of places to buy shunts on the cheap.

http://ebike.ca/store/store_accessories.php has a 300A shunt, 0.25mOhm. So that would be 75mV at 300A. I would recommend this one for your ride. That's a 300A continuous rating.

I use a 500A, 50Mv ( .1mOhm) Shunt on my 350A peak scooter and it works very well. Turns out my Thundersky's can't put out more than about 215A though, so I would have gotten even better accuracy with the 300A model. I bought it at http://www.altestore.com/
 
There are a couple of other tricks too. The IR21771 and IR2177 avoid much of the switching noise by floating the differential amp and powering it off of the gate drive power supply caps. They provide a PWM output that you would route to a capture/compare unit on your microcontroller as well as a fast(ish) fault current signal. The PWM output should be much more noise tolerant than an analog signal. You supply the sensor with a sync clock to synchronizes the current sampling to the motor drive PWM, and that way cancel out some of the harmonic noise in the current signal.

If you stick with straight analog, then you can spend a pinch more to get a big boost in CMRR. TI SLOD006 "Op Amps for Everyone" Appendix A, circuit A.3.12 "High Common-Mode Range Differential Amplifier" should do the trick, as long as R1 and RG2 are sized large enough to stay within the opamp's current capability. Using an appropriate Vref should let you use rail-to-rail 5V or 3.3V single-supply opamps. If you set RF = R2 = RG1, Vref1 = Vref2, and RG2 = R1, then the transfer function simplifies to Vout = (Vin2 - Vin1)*Rf/R1 + Vref. Keeping your sensing traces away from (and perpendicular to) the high current traces should help with EMI, but it will be a problem anyway. You can also add a single pole to the sensor by adding a capacitor CF in parallel with RF (but not R2!) to help with the high frequency noise.
 
jdb said:
If you stick with straight analog, then you can spend a pinch more to get a big boost in CMRR. TI SLOD006 "Op Amps for Everyone" Appendix A, circuit A.3.12 "High Common-Mode Range Differential Amplifier" should do the trick, as long as R1 and RG2 are sized large enough to stay within the opamp's current capability. Using an appropriate Vref should let you use rail-to-rail 5V or 3.3V single-supply opamps. If you set RF = R2 = RG1, Vref1 = Vref2, and RG2 = R1, then the transfer function simplifies to Vout = (Vin2 - Vin1)*Rf/R1 + Vref. Keeping your sensing traces away from (and perpendicular to) the high current traces should help with EMI, but it will be a problem anyway. You can also add a single pole to the sensor by adding a capacitor CF in parallel with RF (but not R2!) to help with the high frequency noise.

Scratch that. I made a mistake - this circuit is for wide common-mode range, but not CMRR. The CMRR will be dependent on how well you match RG2 to R1 and RF, R2, and RG1 together, making it somewhat poorer for this application.
 
Thanks for the replies guys; I don't want you to think I've abandoned this thread. I need a couple of hours I can dedicate to reading up on what you've recommended, which so far hasn't happened yet. I will be back; thanks again.
 
bigmoose said:
You are going to need an amp with a common mode to and a bit below ground, (...)
That's because of negative part of voltage noise? Because of -0.7V of freewheeling diodes? Because of...?
 
Njay said:
bigmoose said:
You are going to need an amp with a common mode to and a bit below ground, (...)
That's because of negative part of voltage noise? Because of -0.7V of freewheeling diodes? Because of...?
I think because even rail-to-rail opamps are nonlinear near zero. always best to have a negative supply if you want to amplify from zero, on up.
 
Specifically, I think the best part for you to use would be an instrumentation amplifier. They are designed to operate in differential mode and generally have good CMRR (80 dB is typical). AD8223 or AD8220 are a couple of potential candidates. Both have the necessary bandwidth and can accept inputs slightly below ground when operated from a single supply. You set the gain with a single external resistor. There are many other similar parts out there, but a purpose-built instrumentation amp will have much better CMRR than anything you put together from discrete parts.

Generally, the way to approach something like this is to use something like an instrumentation amp with a modest gain for the first stage, followed by a filter and second gain stage. The second stage can be a conventional op-amp, preferably of the low-noise, low-offset type. If you wanted full-scale of 300 A to be around 5 V output, that would work out to a required gain of about 120. I'd set up the instrumentation amp for a gain of 10 and then the op-amp stage for G=12.
 
Stantor hit my reason, but I like rhitee's recommendations better! Going to have to look at his Analog Devices recommendations in detail, I may be able to ditch my ol' roll your own out of LT1013's instrument amp...
 
When I was looking for opamps, I was looking for a high slew rate. The opamp I picked out had a 9000V/uS slew rate. the AD8223 only has a .2V/uS slew rate, but does that not matter much because it's only first stage and won't be doing any large signals? Would I gain anything by having a high slew rate second stage op amp?
My simulation shows that with a motor of 45uH & .09ohms, my current skyrockets about 3A/uS. I'm sure it will be slower due to lead inductance and whatnot, but My instincts are telling me I need it to be lightning fast.
 
jdb said:
There are a couple of other tricks too. The IR21771 and IR2177 avoid much of the switching noise by floating the differential amp and powering it off of the gate drive power supply caps. They provide a PWM output that you would route to a capture/compare unit on your microcontroller as well as a fast(ish) fault current signal. The PWM output should be much more noise tolerant than an analog signal. You supply the sensor with a sync clock to synchronizes the current sampling to the motor drive PWM, and that way cancel out some of the harmonic noise in the current signal.
I have been recommended those ICs previously on another forum. The problem is that I don't trust a microcontroller to be fast enough to limit the current in the way I am trying. I may be wrong about that. I'm going on the assumption that microcontrollers are slow in comparison to discretes.

jdb said:
If you stick with straight analog, then you can spend a pinch more to get a big boost in CMRR. TI SLOD006 "Op Amps for Everyone" Appendix A, circuit A.3.12 "High Common-Mode Range Differential Amplifier" should do the trick, as long as R1 and RG2 are sized large enough to stay within the opamp's current capability. Using an appropriate Vref should let you use rail-to-rail 5V or 3.3V single-supply opamps. If you set RF = R2 = RG1, Vref1 = Vref2, and RG2 = R1, then the transfer function simplifies to Vout = (Vin2 - Vin1)*Rf/R1 + Vref. Keeping your sensing traces away from (and perpendicular to) the high current traces should help with EMI, but it will be a problem anyway. You can also add a single pole to the sensor by adding a capacitor CF in parallel with RF (but not R2!) to help with the high frequency noise.
That's a hell of a reference! I just downloaded it and I'm reviewing that circuit.
 
strantor said:
Njay said:
bigmoose said:
You are going to need an amp with a common mode to and a bit below ground, (...)
That's because of negative part of voltage noise? Because of -0.7V of freewheeling diodes? Because of...?
I think because even rail-to-rail opamps are nonlinear near zero. always best to have a negative supply if you want to amplify from zero, on up.
My interpretation of what BigM was saying was to choose an ampop part that tolerates CM going a bit below ground (below it's own Vss); if you power "any" ampop with a negative voltage on Vss it will obviously have a CM that can go below ground...
 
strantor said:
jdb said:
There are a couple of other tricks too. The IR21771 and IR2177 avoid much of the switching noise by floating the differential amp and powering it off of the gate drive power supply caps. They provide a PWM output that you would route to a capture/compare unit on your microcontroller as well as a fast(ish) fault current signal. The PWM output should be much more noise tolerant than an analog signal. You supply the sensor with a sync clock to synchronizes the current sampling to the motor drive PWM, and that way cancel out some of the harmonic noise in the current signal.
I have been recommended those ICs previously on another forum. The problem is that I don't trust a microcontroller to be fast enough to limit the current in the way I am trying. I may be wrong about that. I'm going on the assumption that microcontrollers are slow in comparison to discretes.
[\quote]

That's what the fault signal is for. It has a fixed 7.5us time delay. The threshold is fixed, but it would be faster than waiting to time up the pulse width. You can combine the fault signals on a common net and use that for a faster brake signal that doesn't depend on your maximum interrupt latency.

Of course, it still won't be as fast as using a fast dedicated comparator (like MAX996: 200ns) would be.
 
strantor said:
When I was looking for opamps, I was looking for a high slew rate. The opamp I picked out had a 9000V/uS slew rate. the AD8223 only has a .2V/uS slew rate, but does that not matter much because it's only first stage and won't be doing any large signals? Would I gain anything by having a high slew rate second stage op amp?
My simulation shows that with a motor of 45uH & .09ohms, my current skyrockets about 3A/uS. I'm sure it will be slower due to lead inductance and whatnot, but My instincts are telling me I need it to be lightning fast.

Good lord, you don't need anything nearly that fast. Do the math: Your shunt, for 600 A @ 75 mV output, has a scale of 125 uV/A. Multiply that out, and 3 A/us gives you a input signal at 375 uV/us. Factor in the gain of 10x, and you get... 37.5 mV/us. The AD8223 is almost 10x faster than that. It also provides 125 kHz of small-signal bandwidth at G=10 and has a large-signal settling time of 18 us (~ 50 kHz). That's plenty fast to do pulse-by-pulse limiting for PWM in the 10-20 kHz range.

You will need a (slightly) faster part for the second stage, but a run-of-the-mill op-amp with a slew rate in the single-digit V/us will be perfectly adequate. Even at 1 V/us, that means your output could swing 5 V in 5 us, which is probably less than 10% of your PWM period. Such a part would have a small-signal bandwidth at G=10 in the single-digit MHz range.

Remember that you pay a price if you want a really fast part, there are tradeoffs in other specifications. Your requirements here are not particularly high-speed, so you'll be much better off if you pick a part with good noise, bias current, and offset voltage characteristics.
 
strantor said:
I'm going on the assumption that microcontrollers are slow in comparison to discretes.

Stantor, let me give you two more leads. I typically recommend the IR2113S for the FET half bridge driver, and a dsPIC30F3010 for the controller. If you look at these two parts you will see that the IR2114S has a shut down pin that lets you kill the FET drive in 100 nano seconds, also when you search the dsPIC30F3010 (and other dsPIC series) you will see that the PWM FaultA pin operates to kill the PWM with hardware type latency of 50 nSec!! Don't think I could do it faster with discreets.

It is real simple to do a current based drive system with these two components. That is why I question folks designing their own FET drivers and such. Good for learning, but IR makes good parts cheap!

BTW thanks for asking your questions, it brings a lot of good stuff out from all the guys. I truly enjoy this forum as much as design reviews... lots of good advice and experience floating around here with the highest signal to noise ratio I have experienced outside of the leather chairs, danish and kona coffee crowd.
 
@Rhitee
Thanks; that really puts things into perspective. I really had no idea what I was looking for; I just picked something with the highest slew rate I could find. Thank you for your recommendations; I think I will go with what you said.

@Dave. You recommended the IR2113S to me in another post, and now its sitting on my work bench. I need to figure out how to solder SMD before I can use it though :( . I'm really behind the power curve on lots of things, that's standing between me and my goal. It will take a while, but I will get there, with you guys' help :wink:
As far as the DSPIC, I guess I will have to shell out for the programmer. Until now, all my microcontroller experience has been with arduino. I know it probably sounds laughable to design a motor controller around an arduino, but I was trying to minimize the cost and the amount learning curves needed to accomplish this. I might as well just do it right the first time I guess.
What programming software should I get to go with the dsPIC30F3010? I'm not a competent programmer, but I have experience with, and relatively comfortable with microsoft Visual Basic and the arduino language (hear it's close to C).
 
I use the MPLAB C30 compiler. I believe they have or had a student edition that was pretty full featured. I program in C, with embedded assembly only where absolutely needed. The C30 compiler supports what I have needed. I am old and never did get C++, a friends son, who I am God father to, has taken me under his wing to try to tutor me on all the nifty features of C++... it may be a long road for Charlie! :oops:

Shop around before you shell out money for a compiler. Also note there are other dsp processors that do a fine job, TI and Cygnal and many others. To some degree it is a Ford/Chevy or should I say Honda/Toyota kind of thing... there is the brand you know, and the one the "other guy" uses. I tend to talk about what I know, other options are acceptable and may be better.

To make the next step in controllers, it is my opinion that you will need one of the two features I described above...
 
Ok, I've been looking into getting started with PIC and this is what I've found:
The PICkit 3 allows debugging and programming of PIC(R) and dsPIC(R) for 70$ (http://www.microchipdirect.com/ProductSearch.aspx?Keywords=DV164131)

MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications employing Microchip's PIC® and dsPIC® microcontrollers. (http://www.microchip.com/stellent/i...E&nodeId=1406&dDocName=en019469&part=SW007002)
Want to write your code in C?
Choose MPLAB C Compilers, the highly optimized compilers for the PIC18 series microcontrollers, high performance PIC24 MCUs, dsPIC digital signal controllers and PIC32MX MCUs. Or, use one of the many products from third party language tools vendors. Most integrate into MPLAB IDE to function transparently from the MPLAB project manager, editor and debugger.
So it's looking to me like all I need to spend is 70$ for the little dongle that lets my laptop talk to the microcontroller (+ a little demo board), and then 5$ for the dsPIC30F3010 chip? Am I missing anything?
 
That is what I use the picKit3 and the free MPLAB. They are solid.

I don't think the C compiler is included. Check that to be sure, again there is a free student version IIRC.
 
DOH! I thought MPLAB was the complier; the C compiler costs 495$. I have heard there are free ones too. I'll look into the student license and the free ones.
 
I think all it takes is a university email in the request to get the student C30 compiler.
 
strantor said:
Thanks; that really puts things into perspective. I really had no idea what I was looking for; I just picked something with the highest slew rate I could find. Thank you for your recommendations; I think I will go with what you said.

It's really easy to get caught up in one really spectacular headline spec. In my experience, this goes for picking just about any part. When you read more carefully, there's always an "oh, but..." moment. There are always trade-offs. Picking the best part will involve some trade-offs between these competing goals. It's a learning process!
 
bigmoose said:
I use the MPLAB C30 compiler. I believe they have or had a student edition that was pretty full featured. I program in C, with embedded assembly only where absolutely needed. The C30 compiler supports what I have needed. I am old and never did get C++, a friends son, who I am God father to, has taken me under his wing to try to tutor me on all the nifty features of C++... it may be a long road for Charlie! :oops:

Totally, massively off-topic now :) C++ is a big language. I use it at work and have had the privilege of advising my coworkers as we transitioned from C to C++ on our last big project. You'll see a lot of people saying that C++ is "bloated," or comes with too much "overhead" or other wishy-washy phrases like that. Some features do have a price to pay, in runtime or memory. But I prefer to use facts to judge whether a feature is appropriate or not, rather than dogma or hearsay. ISO/IEC TR 18015 "Technical Report on C++ Performance" goes down the major features of ISO C++98 and tells you in clear terms what the costs are for each of them. If you ever find yourself wondering how much some new technique is going to cost you, this document will help you.
 
Back
Top