Amplifying a mV signal

tom66

Joined May 9, 2009
2,591
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.
I'm figuring that a tenth of the output would be fine, but I'm probably stuck in digital oscilloscope mode... (1 GS/a = 100 MHz square etc...)
 

Audioguru

Joined Dec 20, 2007
11,251
The LM324 has a fairly high frequency response but since it is low power its slew rate is very low. Its slew rate is even less when its power supply voltage is low.
 

Thread Starter

strantor

Joined Oct 3, 2010
5,025
The LM324 has a fairly high frequency response but since it is low power its slew rate is very low. Its slew rate is even less when its power supply voltage is low.
So I should stay away from low power op amps and look for something with a high slew rate? What kind of slew rate should I be looking for?
 

#12

Joined Nov 30, 2010
18,076
For a sine wave, the slew rate is 2piFVpeak, usually stated as "volts per microsecond". Takes a bit of juggling zeros to get it right.

For a square wave, it's gonna be AT LEAST 10 times (2piFVpeak).
This is where the "search" function of a vendor website becomes valuable.
If you're scoping the wave, you can take a guess about whether the rate is more like 100 times 2PiFVpeak.

This isn't a really good answer, but it's a start.
 

Thread Starter

strantor

Joined Oct 3, 2010
5,025
Ok, I am looking at shunt resistors like this one.
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?

BTW this is the opamp I bought. I probably should have consulted you guys before paying for it, but do you think it is good for my application?
 

tom66

Joined May 9, 2009
2,591
Ok, I am looking at shunt resistors like this one.
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?

BTW this is the opamp I bought. I probably should have consulted you guys before paying for it, but do you think it is good for my application?
I don't think the amplifier you selected is a normal op-amp, it is a current feedback amplifier. However, it should still be possible to get that working, you'll just need a different schematic. (Don't ask me! :rolleyes:) It's also SMD - are you competent with that?

If you need 0-150A, with 300A surge capability, consider an Allegro hall effect 200A current sensor - they can survive up to 1200A (but only read accurately to 200A). Or you can buy a standard hall effect sensor, and calibrate it to read magnetic field as current - almost like a DC current transformer.

PS. If the current you are measuring is in pulses an AC current transformer may be fine.

The Prius uses two current sensors (hall effect) on the 3-phase motor, so maybe look if you can buy those as spare parts? (Two are only used, because the sum of U, V, W currents is always zero, so if you know U, V you can work out W etc.)
 
Last edited:

Thread Starter

strantor

Joined Oct 3, 2010
5,025
I don't think the amplifier you selected is a normal op-amp, it is a current feedback amplifier. However, it should still be possible to get that working, you'll just need a different schematic. (Don't ask me! :rolleyes:)
Admittedly, I just made assumptions on that without reading up on it first. I assumed it was an opamp that measured it's output and compensated for high current draw (voltage sag). Now I'm reading about it, and it looks like it still might work.
http://en.wikipedia.org/wiki/Current-feedback_operational_amplifier
In simple configurations, such as linear amplifiers, a CFA can be used in place of a VFA with no circuit modifications, but in other cases, such as integrators, a different circuit design is required....CFAs can be orders of magnitude faster than VFAs. With CFAs, the amplifier gain may be controlled independently of bandwidth...Disadvantages of CFAs include poorer input offset voltage and input bias current characteristics. Additionally, the DC loop gains are generally smaller by about three decimal orders of magnitude. Given their substantially greater bandwidths, they also tend to be noisier
It's also SMD - are you competent with that?
nope. and it's tiny SMD to boot. That was a kick in the pants when I opened the ESD envelope package and couldn't see the IC inside. I guess I'll have to get one of those breakout boards from sparkfun and have a professional at work solder it on there for me. but then I won't be able to desolder it and put it on my PCB when I'm done breadboarding (or can I?).
If you need 0-150A, with 300A surge capability, consider an Allegro hall effect 200A current sensor - they can survive up to 1200A (but only read accurately to 200A). Or you can buy a standard hall effect sensor, and calibrate it to read magnetic field as current - almost like a DC current transformer.
I briefly read up on the allegro, and their current path splitting scheme. It looked like more trouble than it was worth. It has a rise time of 3μS. I'm still unsure whether my motor's inductance is .06H or .06mH (or some completely different number). If it's .06mH, then it could rise well past it's current limit in 3μS. I won't know until later today when I get it to the RCL meter. But in any case, I would like the controller to work with any motor, which is why I preferred the shunt, as there is zero delay.
 

tom66

Joined May 9, 2009
2,591
nope. and it's tiny SMD to boot. That was a kick in the pants when I opened the ESD envelope package and couldn't see the IC inside. I guess I'll have to get one of those breakout boards from sparkfun and have a professional at work solder it on there for me. but then I won't be able to desolder it and put it on my PCB when I'm done breadboarding (or can I?).
I've soldered the D-8 (SOIC-8) and DGK-8 (MSOP-8) packages before. The SOIC-8 by hand was tricky, but not impossible. The MSOP-8 was reflow soldered using a hot plate. A skilled solderer could easily solder an MSOP-8, but I couldn't.

I briefly read up on the allegro, and their current path splitting scheme. It looked like more trouble than it was worth. It has a rise time of 3μS. I'm still unsure whether my motor's inductance is .06H or .06mH (or some completely different number). If it's .06mH, then it could rise well past it's current limit in 3μS. I won't know until later today when I get it to the RCL meter. But in any case, I would like the controller to work with any motor, which is why I preferred the shunt, as there is zero delay.
Well, it doesn't matter *too* much, measuring peak current, does it...? You are measuring average current, right? 3uS is fast enough to react to sudden load changes and motor stalls. In fact, I would recommend an RC filter on the output.
 

Thread Starter

strantor

Joined Oct 3, 2010
5,025
ok, so my motor has a *verified (with calibrated RCL meter)* inductance of 45μH, and resistance of 110mΩ. according to LTSpice, in 3μS my current can go from 0 to 18A. my simulation also shows that with these numbers, my current limiting (using shunt current sense) is no longer working. it is shooting up past 32A, while limited to 20A.
 

Attachments

Thread Starter

strantor

Joined Oct 3, 2010
5,025
Well, it doesn't matter *too* much, measuring peak current, does it...? You are measuring average current, right? 3uS is fast enough to react to sudden load changes and motor stalls. In fact, I would recommend an RC filter on the output.
Yes, it matters. This is a current-controlled controller. throttle corresponds to current (or vise versa). The current limiting is pulse-by pulse. It's not simply an "over-current alarm".
 

tom66

Joined May 9, 2009
2,591
Yes, it matters. This is a current-controlled controller. throttle corresponds to current (or vise versa). The current limiting is pulse-by pulse. It's not simply an "over-current alarm".
Oh, okay. Didn't realise you were using pulse by pulse limiting.

As you are measuring such a small current, it's going to be crucial to place the sense wires right next to the shunt, to eliminate wire resistance.
 

Thread Starter

strantor

Joined Oct 3, 2010
5,025
Oh, okay. Didn't realise you were using pulse by pulse limiting.

As you are measuring such a small current, it's going to be crucial to place the sense wires right next to the shunt, to eliminate wire resistance.
Ok, will do. thanks. do you think that will be enough? do you think noise will be an issue?

do you still recommend a filter now that you know it's pulse-by-pulse? I was and still am confused about that; I was thinking that since it's pulse by pulse and I'm trying to make the circuit as fast as possibly conceivable, that I would not want to use a filter as that would ruin my precision, but you are not the first to recommend the filter.
 

tom66

Joined May 9, 2009
2,591
Ok, will do. thanks. do you think that will be enough? do you think noise will be an issue?

do you still recommend a filter now that you know it's pulse-by-pulse? I was and still am confused about that; I was thinking that since it's pulse by pulse and I'm trying to make the circuit as fast as possibly conceivable, that I would not want to use a filter as that would ruin my precision, but you are not the first to recommend the filter.
I don't think a filter is necessary for pulse by pulse. I think the problem you will be encountering is the inductance of the wires carrying the current will make for a less than smooth spikes.

I'm not entirely sure why you need to do pulse by pulse current limiting, but I've never driven a motor of any appreciable power before!
 

Thread Starter

strantor

Joined Oct 3, 2010
5,025
I'm not entirely sure why you need to do pulse by pulse current limiting, but I've never driven a motor of any appreciable power before!
To make it more like an accelerator pedal than a speed knob. "pedal to the floor" in your car doesn't correspond to 135mph, it corresponds to "lots of torque". In an EV (go cart here), torque = current, so accelerator = current, not duty cycle. duty cycle will be totally dependent on the amount of torque needed. I have a fixed 99% duty cycle PWM; the pulse-by-pulse kicks in at the beginning of the cycle and as soon as the current limit is reached (within the cycle), the PWM is terminated until the beginning of the next cycle.
 
Top