Sensing current-torque in a DC motor

Hi,

I'm trying to find out how I could sense current in a DC motor in order to obtain torque. I want to know the torque for setting a desired torque afterwards by modifying the PWM signal the driver receives from Arduino.

I've read that the current meassured would be very noisy. Do you know how to solve this? Has anybody tried this kind of control before?

Thanks for your answers.

PD:
I'm working with this motor: EMG30 data
and with this driver: http://www.pololu.com/product/713

grasshopper:
Hi,

I'm trying to find out how I could sense current in a DC motor in order to obtain torque. I want to know the torque for setting a desired torque afterwards by modifying the PWM signal the driver receives from Arduino.

I've read that the current meassured would be very noisy. Do you know how to solve this? Has anybody tried this kind of control before?

Well the noise is a product of the measurement technique:

Using hall-effect current sensor - yes, often very noisy due to the limits of hall sensors
in low-value magnetic fields - for high currents (20+A) will fare better.

Using GMR-effect current sensor - no, low noise technology as GMR is very sensitive,
GMR sensors are new and typically for quite low values of current.

Using shunt + amp - noise depends on the care in laying out the circuit, but
should be inherently low noise if the signal is amplified before picking up
interference.

Of course the actual current flow could be very noisy itself (for instance the PWM
signal will be huge if you monitor the current into the motor driver.)

Measuring the current can be done in several places - only the current in the motor
winding itself is likely to be low noise as the winding inductance is acting to smooth
the current. This is a good place to use a non-contact sensor such as hall or GMR.

For shunt + amp current measuring the best place is usually the ground-return
from the H-bridge.

If the PWM frequency is high you can usefully low-pass-filter the current measurement
to get a cleaner more meaningful signal.

In general low-pass filtering reduces the importance of noise at the expense of slower
response.

I've used both shunts and hall-devices in current-controlled stepper drive circuits
where the sensor is used to control the winding current via a feedback loop, and
both work but the hall-sensors are noisy enough to be heard as white-noise mechanically
on the motor itself!

raschemmel:
https://www.sparkfun.com/products/11005

Thanks for the suggestion, but I'm trying to meassure currents around 1-2A.

Did you look for it ?

First of all, MarkT, thank you very much for your detailed answer. I'm new in Arduino and electronics in general and it's hard to get to know everything on time. I really appreciate that experienced people like you answer our questions to make mi life easier.

Now, I would like to ask you some things and specify other things about my project.

Well the noise is a product of the measurement technique:

Ok, I understand that there might be noisy due to the meassuring technique, but I also think there is noise due to the fact that I'm providing the driver with a PWM signal, and also due to the fact that this motor has brushes, so the current is fluctuating also due to that (am I right?).

I would also like to ask you about my motor driver. I'm providing it with a PWM signal, but... is it transfering also a PWM signal to my motor? I guess if it does, this would be too bad for getting a stable signal.

Measuring the current can be done in several places - only the current in the motor
winding itself is likely to be low noise as the winding inductance is acting to smooth
the current. This is a good place to use a non-contact sensor such as hall or GMR.

I don't understand this part , is not the same measuring the current at different points in the same wire? I only have 2 wires for supplying current to the motor. I asume this wire is conected to the winding so measuring in this wire should be the same no matter at what point , am I right?

Since I want to supress noise as much as possible, I think I will avoid the hall sensors, and since I presume the GMR sensors are not cheap (I'm trying to measure currents around 0.1-2A and this project is for my studies), should I go for the shunt current measure?

For shunt + amp current measuring the best place is usually the ground-return
from the H-bridge.

The next picture shows the driver I'm using which is made with MOSFET:

(I'm sorry I don't know how to resize the image. It's here: http://a.pololu-files.com/picture/0J4621.1200.jpg)
As you can see, the supply (12V)section is on the left and the logic section is on the right. On the left there are outputs for two motors. Where do you think should I put the shunt resistance? Can you tell me some amp or IC I could use to get that measure in Arduino?

If the PWM frequency is high you can usefully low-pass-filter the current measurement
to get a cleaner more meaningful signal.

I'm using Arduino PWM analogWrite function, so I've read this PWM signal frequency is 490Hz (not high enough, right?). Nevertheless, my motor driver allows frequencies up to 100kHz. Would it be better for me using a higher frequency? Can I do this through software in Arduino? How?
When you say using a low-pass-filter, do you mean build it up on code? How could I do that?

In case I achieve a stable current meassuring, the next step would be making a control loop to get the torque I would like. My basic knowledge tells me that I could get torque knowing that P=Tw (where P=power; T=Torque, w=angular speed) and P=VI (V=voltage; I=current), so that way I could obtain: T=(V*I)/w (am I right?)
In this case I know current because I've meassured it, but what is the voltage? I guess it is directly proportional to the PWM I'm using on the logic side of my driver, right?

So I should create a loop, computing each time the actual Torque using the previous obtained values and calculate the error comparing with the desired torque and processing this error using a typical PID controller to obtain a new PWM signal to supply my motor driver, am I right?

I'm sorry because I know I'm making a lot of stupid basic question for many of you, but I really have very little idea about electronics. I appreciate very much your patience.

PS: Excuse my poor English.

raschemmel:
Did you look for it ?
SparkFun Current Sensor Breakout - ACS723 (Low Current) - SEN-14544 - SparkFun Electronics

Many thanks raschemmel, for your help. I had seen a lot of current sensors, but I hadn't seen this yet. It seems like it reduces the noise.
Do you know if that would be a good option for DC motors? Could I get a stable signal as to make a control loop?
I'm sorry I'm very new in general so I have no clue!

Thanks again

We added an opamp gain stage for more sensitive current measurements. By adjusting the gain (from 4.27 to 47) you can measure very small currents.