Motor current sensing

Status
Not open for further replies.

ptewright

New Member
What methods can be used to detect the current drawn by a 12V 5A motor? (This is so that I can tell whether there is full load, no load in the system) I would like to be able to get some sort of voltage output which corresponds to the current drawn and feed it into the ADC of a PIC.
From my searches, I saw some mosfet drivers with current sensing...but they seem to just shut off the output when it's above a certain current level.....they don't generate an output that I could use to feed into a microcontroller. Am I not searching for the right component?
Could somehow measure the voltage on both the + and - sides of the motor, and somehow get a current out of it?
I am out of ideas..........
 
Voltage

To measure voltage and figure out current, that would be the sensorless feedback stuff, but then you need a model of the motor.

I think on the 4QD website it had something like that (I am trying to figure out how to do it myself, but with much higher currents). I kind of fellback onto monitoring motor temperature instead with using the new Maxim RTD signal conditioner...but if that doesn't work for you, I read somewhere about using MOSFETs current mirrors:

Here is how I would do it in theory...(haven't tried it yet):
-Large MOSFET
-Small MOSFET

1. Make sure the they have properly sized channel widths- this means make sure the small MOSFET has a smaller channel width than the large MOSFET (that shouldn't be a problem since one MOSFET is large and the other is small). Also make sure the proportions between the sizes are what you want them to be. This width-ratio between the two MOSFETs determines the factor by which current in the small MOSFET will be compared to the current in the large MOSFET.
2. Have motor current run through the source-drain of the large transistor.
3. Diode-connect the small transistor and connect the gates of both transistors together
4. The small MOSFET now acts as a current source and since it is smaller width than the large MOSFET, the same current will flow in both transistors, except the current in the small MOSFET is proportionally stepped down by the width ratio of the two transistors
5. Since it is a current source, you can connect a resistor in series with its source-drain of the small MOSFET and measure the voltage across that resistor to determine the current in the smaller transistor, and from that you can figure out the current in the large transistor.

Correct me if I am wrong, but the large transistor may be the diode-connected transistor (although I am getting more and more sure that I have it right.).

I'll draw a schematic in a bit...this is too wordy.
 
Last edited:
Schematic

Here we go. The concept is that the diode-connected transistor (like how the left transistor has those 2 terminals connected) will mirror the current on the other branch. It does not have be mirrored exactly though- the current in left branch will be a multiplied by a factor of the current in the right branch. This factor is the ratio of the widths of the two transistors.

Left width < Right width -> lefthand current smaller than righthand current by a factor of (Left Width/Right Width)
Left width > Right width -> lefthand current is larger than righthand current by a factor of (Left Width/Right Width)
Left width = Right width -> same current in both branches

Hence,
I_left = I_right*(W_left/W_right)

Its the simplest form of a current mirror.

Seeing as how this is not VLSI design (we aren't designing the transistors on a chip, and therefore have no control over their widths, you may have to hunt around spec sheets to find the width or try different transistors until the current is stepped down enough to be read into an MCU ADC.

I have never used a current mirror with a motor like this yet, so tell me if you try it and how it works!
 

Attachments

  • Mirror.jpg
    17.4 KB · Views: 212
Last edited:
Normally, a small value resistor with one end connected to ground is used to sense the current. A fast OP amp is used to amplify the signal to match the range of the ADC. Since you didn't show any schematic, I don't know if this will work for your circuit.

In theory, you may also use the MOSFET's Rds(on) resistance for this. However, the amp circuit might not take the high voltage when the FET turns OFF.

You can also use a hall current sensor to measure current. You can place it anywhere in the circuit since it generates an isolated output.

I don't think you can just measure the voltage on the + and - terminals of your motor because it generates a back EMF while in motion. This masks the voltage drop through the internal resistance.
 
Last edited:
Logic

Not to mention the voltage spikes from measuring the voltage across the motor will totally destroy your logic if you don't interface it right...just don't go that way.

Hall current sensors are nice. For such a small motor though it seems a bit excessive and more expensive than it needs to be. They are bulky too (to my knowledge). They are like a ring of material or a coil. you insert/wrap the +V motor wire through/around the ring and it outputs a current based on the currents in the motor wire generating a magnetic field which is picked up by the coil. I dont know how accurate they are at low currents. Plus...no learning...hehe.
 
Last edited:
Don't try it. You'll never get enough gate drive to switch the power MOSFET on hard enough to drive a motor unless you drop at least several volts across the resistor, and then you won't have a predictable current mirror. Besides, a current source is not a good match for a motor. For good torque, you need a low resistance source.
The whole idea of current sensing is to sense the current, not to force it. Your circuit forces current. A motor needs to be driven by a voltage source, and the current varies with load on the shaft.
 
Last edited:
Test

Am I missing something? The gates are connected to +5V aren't they? Shouldn't that put Vgs to be large enough for both transistors to be in saturation? (Or am I mixing up the operation modes of a MOSFET)?

I am starting to think the diode-connected MOSFET should be the right MOSFET instead of the left MOSFET. After going over some notes I think that the right branch is mirroring the left branch (instead of the left branch mirroring the right branch).

BTW I mean for the transistors to be MOSFETs (not BJTs) but was too lazy to look for them in the symbol library.
 
Last edited:
I am going to have to agree with Ron H, the method "suggested" wount proporly work and is over-complicated.

Remember you are trying to sense the current in the stator.

in the return-path put a low-ohmage resistor, then use a differential-amp to measure the voltage that is developed across that resistor. You wont have yr cct destoyed by "voltage spikes" as has been suggested because you are not trying to sense the voltage at the machine terminals, you are sensing the current in the machine windings.

for currents lowing the 20A sense resistor is ideal, for higher some form of hall-effect is needed
 
Well, I do have to confess that I didn't notice you had connected the gate to +5V. I guess I was assuming it was connected to a current source. However, I don't think you could find a MOSFET that can handle that operating point. For example, a 2N7000 would be typically drawing 800mA and dissipating 4 watts, for a few milliseconds. After that, it would smoke, and then slowly cool off.
Besides, all my other points still stand.
 
As suggested by Styx, use a low value resistor and measure the voltage across it.

If you use a 0.1 ohm resistor, when 5 amps flows through it, the will be 0.5 volts across the resistor.
If your motor cant stand the loss of 0.5v, use a lower value resistor to get less volt drop, but then you have to amplify it a bit more before feeding the ADC.

See the attached picture of a 10Amp 100mV current shunt.

JimB
 

Attachments

  • Shunt.JPG
    146.1 KB · Views: 1,355

How would I hook up the shunt resistor then? In series with the supply voltage? Do I have it on the high side or low side? Then do I use an opamp to compare the voltage on each side of the resistor, amplify it, n feed into the PIC ADC? I don't have a software to make a schematic of what I mean......sorry......

Couldn't I just use a higher duty cycle to compensate for the voltage drop across the motor?
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…