Opamp Input Filter

Thread Starter

scubasteve_911

Joined Dec 27, 2007
1,203
Hello everyone,

I'm struggling with the best way to create a current sense circuit. At first, I decided to use an instrumentation amplifier for this. I have used two sense resistors, one per leg of an H-Bridge. These are run differentially into an instrumentation amplifier and produce an output that is indicitive of direction and magnitude of current. During slow-decay of the bridge, I will switch the instrumentation amplifier's gain from 10 to 5 to compensate for the 'double' current problem.

I went ahead and built this and wasn't impressed with the noise present in the circuit. I made a post about how to lay it out a bit better for the final design, but I have accepted that a lot of it had to do with the circuit design.

I want to use an opamp, like in the schematic attached, to filter out as much noise as possible. I am having a lot of trouble selecting the values for the schematic, even though there are suggestions. My sense resistor is 0.1 Ohms. Does 1K count as much greater than 0.1 Ohms, or should I go a bit lower? Also, if I am switching at 50KHz, what should I set my cutoff frequency to?

I am using an inductive load of roughly 50mH and 0.8 Ohms. I want the dynamic response to be as quick as possible.

Would connecting this value load to the bridge and monitoring the frequency content shed more light into this?

The plan is to use two of these circuits on each leg of the h-bridge, then feed them directly into an instrumentation amplifier. Another reason I wanted to do this, instead of putting an input filter on the instrumentation amplifier, is because I wanted to run a kelvin ground from the 'ground' side of the sense resistor. I can use this differentially to help cancel any noise buildup.

Any suggestions??

Steve

My other thread about layout and noise can be found here. My original 'noisy' schematic and layout are shown.

http://forum.allaboutcircuits.com/showthread.php?t=9011
 

SgtWookie

Joined Jul 17, 2007
22,230
Hi Steve,
You would not want to be anywhere near that high (1K) for a sense resistor, as you would be dissipating all of your power across the sense resistor instead of the inductive load. Your current sense resistors must be non-inductive, of course. Even at very low resistance, they can consume quite a bit of power depending upon your load.

I suggest that you place the sense resistors on the ground side of the load instead of the supply side. You'll also need caps and diodes across your load, and across the legs of your H-bridge. The purpose of the caps is to absorb the reverse EMF during the time it takes for the diodes to switch on. They don't have to be very large; something between 400pF and 2nF should work fine.

Which instrumentation amp did you use?

Since you're using a 50kHz chopper drive, you'll have lots of fun with harmonics. :rolleyes: You might want to filter much of that out.

Your 9th harmonic is around 195Hz. Consider a Butterworth filter with a cutoff frequency below that.

I threw together a 170Hz differential Butterworth active filter using TI's filter design software (see attached). It may not be low enough for the cutoff frequency; but I was trying to compromise between performance and surpression while minimizing the poles.

[eta]
Note that in ANY differential amp/filter/etc, the matching of the resistors is critical. 0.1% is not good enough, as your CMRR will tank. 0.01% is OK.
 

Attachments

Thread Starter

scubasteve_911

Joined Dec 27, 2007
1,203
Hi Wookie,

Sorry, I didn't mean I was planning on using 1K for the sense resistor. It's actually 0.1 Ohms, but the input resistor from the attached schematic I was suggesting to be 1K. This is because of the recommendation that Rin >> Rsense. I'm using a metal oxide sense resistor meant for current sensing, so I am hoping that it will serve me well. Thanks for the heads up though!

I wasn't clear with the way I was sensing, it is actually low-side. That is shown on the linked page's schematic. Sorry about that. The high-side circuit attached is actually equivalent to its low side counterpart. Except, of course, the common-mode voltage requirements are much lower.

I used this instrumentation amplifier.

There are a ton of harmonics and general noise that I need to rid of. The biggest issue is the performance to suppression tradeoff. Since my inductor is at 50mH and its internal resistance is 0.8Ohm and the driver's on-resistance is 0.15Ohm, then can I choose a pole that would represent the maximum rate that it can change? My supply voltage is set to 42Vdc @ 8A.

The 170Hz figure would be pretty good for the control loop of the system, but it will not be good for what I intend to do. I am PWMing a sinewave at about 5KHz into the system, and I need to read the current from that particular waveform. Then, I compare the voltage in (calculated from PWM and control PWM through digital filtering) with the current out (1st harmonic, filtered) to get the inductance. This is used as a 'self-sensing' scheme for a magnetic bearing. Basically, a way to estimate position of the rotor via inductance and other out of scope parameters.

The matching you bring up is a great point. In the attached schematic, C3 is meant to help compensate for mismatch of each input low-pass RC filter. I won't cheap out on the resistors and will get the best ones digikey has to offer.

Thanks !!

Steve
 

SgtWookie

Joined Jul 17, 2007
22,230
You could buy a bunch of the lower tolerance resistors, and measure/match them yourself - but you're going to need some mighty sensitive equipment to do that.
 

Thread Starter

scubasteve_911

Joined Dec 27, 2007
1,203
Ron,

I'm using two AD8675 operational amplifiers, one per sense resistor 'leg'. These are going to be used as per the schematic, but with a +/-5V supply.

Anyone have any more suggestions? I'm not sure where to put the pole frequency, but I was thinking about twice my maximum intelligence frequency.

Steve
 

Ron H

Joined Apr 14, 2005
7,063
That circuit you posted (sense filter.jpg) is definitely not the way to make a differential-input lowpass filter/amplifier. See below.
I simulated both circuits. What is your maximum intelligence frequency?
 

Attachments

Thread Starter

scubasteve_911

Joined Dec 27, 2007
1,203
Ron,

Wow, I'm really confused about that circuit. It was mentioned in Microchip's AN894. (Figure 8, Page 7)

Thank you very much for looking into this for me, to tell you the truth, I was going to trust their calculations without any simulation effort, as foolish as that sounds. My intelligence frequency is going to be around 5KHz, but I would not like any attenuation whatsoever at that frequency. I was thinking it would be appropriate to have the pole at about twice this, maybe 3 X. I'm using the feedback for measurement, so it is very important.

Regards,

Stephen
 

SgtWookie

Joined Jul 17, 2007
22,230
3db point vs stopband frequency will depend upon how many poles you have, and type of filter you use.

I suggested a Butterworth because of the flat passband and smooth transition - but there are lots of different designs out there.

With your intel being around 5kHz and your chopper at 50kHz, you have a tough choice to make. Your 50kHz has both low and high harmonics which will be problematic, and your 5kHz intel freq is made up of harmonics from higher frequencies.

Any way you look at it, you're going to have to make compromises. If you're running 8 channels, even 3-pole filters are going to require quite a few components, and the resistors/caps will have to be VERY closely matched. You may have to resort to using SMT components to minimize your trace lengths - but that's a mixed blessing, as you'll have more room to mix/match resistors/caps in series/parallel configurations. Now would be a very handy time for you to have collections of E96 (or preferably E192) resistors and caps. ;)
 

Ron H

Joined Apr 14, 2005
7,063
Ron,

Wow, I'm really confused about that circuit. It was mentioned in Microchip's AN894. (Figure 8, Page 7)

Thank you very much for looking into this for me, to tell you the truth, I was going to trust their calculations without any simulation effort, as foolish as that sounds. My intelligence frequency is going to be around 5KHz, but I would not like any attenuation whatsoever at that frequency. I was thinking it would be appropriate to have the pole at about twice this, maybe 3 X. I'm using the feedback for measurement, so it is very important.

Regards,

Stephen
You may want to use sgtWookie's circuit, but here is a comparison of a "conventional" lowpass diff amp and the one in the Microchip app note. I dubbed the Microchip circuit "bogus". Hope I'm not wrong.:eek:
And I hope you understand Bode plots. :)
 

Attachments

Thread Starter

scubasteve_911

Joined Dec 27, 2007
1,203
Thank you two very much for your replies!! I just wanted to check in and say that I am considering this issue and don't have time to figure it out today, I don't like to abandon a thread. I will be back into it tomorrow evening :)

Steve
 

Thread Starter

scubasteve_911

Joined Dec 27, 2007
1,203
Ron,

After checking out your circuit, it makes complete sense! I cannot believe that Microchip would publish that garbage. I'm definitely going to use that circuit, since it is nothing more than an active first-order low-pass filter mirrored for differential use.

I'm still a bit confused about how to set my cutoff frequency. I am planning to sample at about 100KHz whilst switching at 50KHz. Should I set my -3dB point at 100KHz then? I have control over my intelligence frequency, should I set this to, say, an odd frequency?

Steve
 

Ron H

Joined Apr 14, 2005
7,063
Steve, with a 50% duty cycle at 100kHz, the current through your inductor will be a triangle wave:
I=V*T/L,
I=42*10us/.05
I=8.4mA p-p.

You'll be getting 840uV across each sense resistor. What are you going to do with this?
Am I missing something?
 
Top