PDA

View Full Version : current sensing for stepper/DC motor feedback



UltraLazer
12-11-2009, 01:35 AM
Beau Schwabe, tossed in a stepper current sensing idea for stepper motors in http://forums.parallax.com/forums/default.aspx?f=25&m=408791 and think it includes for some very interesting design problems. Especially if you are looking for high accuracy and speed... and barley know what you are doing (like me)


I was looking at a current control scheme for two stepper motors. I want to use the motors for positioning but also force censing in a human interface application.
The principle is kind of a similar to those exoskeleton robot suits but not nearly as cool. I bought 2 precision micro stepper linear actuators at a surplus store on the cheap. They are super nice at .001"/step and about 1" travel. If the current consumed with each step is measured it should be reasonable to determine the amount of force exerted by a person on the actuator as it moves. As long as they don't exceed the stall current of the motor... The actuator uses a tiny acme screw so no force exerted by the user may spin the motor.


I am still in the research phase but to I was thinking of using some TSC101 High side current sensing amplifiers and a MCP3208 8 channel ADC
The TSC101s measure the current across a shunt resistor on each coil and outputs .3 - VCC . The shunt resistors are chosen that I may overvolt my motors while staying within my max motor specs.

The problem is that the 2 measuring inputs on the TSC101 have polarity. Each coil on the motor would need 2 shunt resistors and two current sensing amplifiers to deal with the alternating DC voltage. That leads to multiplexing the current sensing amplifiers in sync with the step frequency of the motor... and this scheme is starting to get a bit messy on the hardware side.

There must be a better way...

@beau mentioned that he had employed a current control scheme on a dc motor, does any one have any information on this?

Graham Stabler
12-11-2009, 01:37 AM
With a stepper motor I don't think the current will go up with loading.

Graham

UltraLazer
12-11-2009, 01:46 AM
really? They get hot when they stall which suggests increased current...? weird.... in any case it's multimeter time.

Beau Schwabe (Parallax)
12-11-2009, 02:47 AM
UltraLazer,

"There must be a better way...

@beau mentioned that he had employed a current control scheme on a dc motor, does any one have any information on this?"

When doing this, I basically applied a variable voltage switch mode power supply of my own design to control the motor speed. This kept the voltage constant across the motor regardless of the load. Free-spinning the motor would settle on a specific speed, introducing a mechanical load to the motor caused the switch mode power supply to dynamically adjust to maintain a constant voltage as well as speed to the motor.

The variable voltage switch mode power supply is really nothing more than standard PWM motor control. The difference is that you add voltage feedback to the existing PWM method to create a PID control loop.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 12/10/2009 8:13:46 PM GMT

Graham Stabler
12-11-2009, 05:40 AM
Ultralaser, they are current limited so at stall they are still drawing the rated current (unless the driver lowers the current after a certain time without pulses as some do) and so they get hot, they also get hot when they are running doing things. I might be wrong but as the stepper motor is open loop it does not know anything about the load applied to it, if you applied enough force to stall it things might be different but otherwise what the drive sees will not change.

DC servos on the other hand do not draw any current unless they have to so if they are stopped they draw no current and if you "flight them" they will draw more current to counteract that so could be used for force feedback.

Graham

Chris_D
12-11-2009, 06:06 AM
Being an absolute newbie to electronics, please take what I am saying with a grain of salt.

From what I have learned about steppers this far is that they are ALWAYs drawing full current which is why they have the torque at low speed.· So, if at idle or·at speed it is drawing full current, then sensing current isn't possible.· Furthermore, you cannot over "current" a stepper motor without damage.· Inversely, you cannot reduce current without risk of the motor losing position if there are forces acting against it.·

I had hashed this out with Mariss at Gecko drives about a year ago as I was attempting to do something like this.· However, he did get deeper into the "magic" of electronics and suggested there could be some way of doing it but I recall it seeming to be impractical for some reason.· Anyway, just wanted to try and prevent someone from chasing a ghost that can't be caught.

Chris

UltraLazer
12-12-2009, 03:20 AM
Thanks for the tips guys, there goes that idea. Although It would be neat to try a similar thing with a DC servo setup. The problem concerning the "polarity" of the current sensors in relation to the load would still persist if the motor was to spin in both directions. If there was a shunt resistor and current sensor on each side of the motors coil maybe a diode on each pair could be used to source current through the correct resistor..? ...would have to compensate for the voltage drop across the diode. can any one make recommendations in terms of hardware?

Graham Stabler
12-12-2009, 03:37 AM
The current will only ever be drawn from the supply in one direction even if you drive the motor in both directions so it is not a problem.

Look at:

http://roko.ca/robotics/h-bridge-fundamentals/3

You just put your current sensing resistor from V- to ground and V+ to your supply.

Graham

UltraLazer
12-12-2009, 05:27 AM
haha, bang on. I had been looking at the issue on too small of a scale. Thanks Graham.