Shop Learn
current sensing for stepper/DC motor feedback — Parallax Forums

current sensing for stepper/DC motor feedback

UltraLazerUltraLazer Posts: 30
edited 2009-12-11 22:27 in Propeller 1
Beau Schwabe, tossed in a stepper current sensing idea for stepper motors in 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 StablerGraham Stabler Posts: 2,507
    edited 2009-12-10 18:37
    With a stepper motor I don't think the current will go up with loading.

  • UltraLazerUltraLazer Posts: 30
    edited 2009-12-10 18:46
    really? They get hot when they stall which suggests increased current...? weird.... in any case it's multimeter time.
  • Beau SchwabeBeau Schwabe Posts: 6,479
    edited 2009-12-10 19:47

    "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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 12/10/2009 8:13:46 PM GMT
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2009-12-10 22:40
    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.

  • Chris_DChris_D Posts: 305
    edited 2009-12-10 23:06
    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.

  • UltraLazerUltraLazer Posts: 30
    edited 2009-12-11 20:20
    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 StablerGraham Stabler Posts: 2,507
    edited 2009-12-11 20:37
    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:

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

  • UltraLazerUltraLazer Posts: 30
    edited 2009-12-11 22:27
    haha, bang on. I had been looking at the issue on too small of a scale. Thanks Graham.
Sign In or Register to comment.