584,842 active members*
4,287 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2015
    Posts
    8

    Using Encoder with stepper motor and Kstep

    Hi All,

    I've got a simple machine that uses a single stepper motor controlled by a kstep. That's working fine but now I want to add an encoder to it. Problem is that I don't know where to attach it. Seeing as the kstep hogs all the JP7 pins I was thinking of putting it on the JP5 connector on IO 36 and 37.

    Problem is that I don't know how to properly set the input and output channels. I've got the output channels set to 8 since that is what the kstep requires, but I don't know the reason why. I don't know how to set the input channels to use encoder input from the IO I have selected. Or if only certain IO can be used for encoders.

    What should I set my input channel to be in order to use an encoder on IO 36 and IO 37? Can someone point me to some documentation that would explain this.

    Encoder is a generic quadrature type with A and B pulses.

    Brad

  2. #2
    Join Date
    Jun 2010
    Posts
    4252

    Re: Using Encoder with stepper motor and Kstep

    There is very little point in ever using an encoder on a stepper. No-one ever does.

    If the stepper has sufficient torque it will turn, and the encoder is pointless.
    If the stepper does not have enough torque to step onwards, then you are already dead in the water and an encoder will nothing for you.

    Rethink.

    Cheers
    Roger

  3. #3
    Join Date
    Dec 2012
    Posts
    390

    Re: Using Encoder with stepper motor and Kstep

    Quote Originally Posted by RCaffin View Post
    There is very little point in ever using an encoder on a stepper. No-one ever does.
    If the stepper does not have enough torque to step onwards, then you are already dead in the water and an encoder will nothing for you.
    Not quite true, Roger. Ever heard of the Clearpath motors? They are steppers with built-in encoders.
    In addition, with encoders on the steppers, if you lose steps, the system can stop and give you an alarm and you don't waste potentially a lot of time on a bad part.

  4. #4
    Join Date
    Jun 2010
    Posts
    4252

    Re: Using Encoder with stepper motor and Kstep

    if you lose steps, the system can stop and give you an alarm
    Well, yes, I know that you can do that, but the part WILL be trashed by then. You cannot proceed.
    I still fail to see any virtue in it. That is of course just my opinion.

    Cheers
    Roger

  5. #5
    Join Date
    Dec 2012
    Posts
    390

    Re: Using Encoder with stepper motor and Kstep

    Quote Originally Posted by RCaffin View Post
    Well, yes, I know that you can do that, but the part WILL be trashed by then. You cannot proceed.
    Not necessarily. It depends on where it is in the cut and why it lost the position. Sometimes you can just reset the position and continue. And even if the part is trashed, if the operation is a multi-hour job and the problem happens right at the start, you don't waste several hours on a scrapped part.

    An example, if I had had an encoder on my mill when I tried to mill a spacer for my lathe, the controller would have noticed that the axis stalled on a rapid and stopped the program instead of rapiding into the steel block and breaking my cutter. And before you say anything, yes, I know that a properly tuned axis doesn't stall, even on rapids... :-)

  6. #6
    Join Date
    Apr 2015
    Posts
    8
    The reason I want to use an encoder with the stepper is that I have a rig set up where I am testing a small transmission to failure. The stepper is driving the transmission back and forth and the encoder is being used on the output to verify that the transmission is working.

    Each cycle will be timed using a watchdog timer and if the movement takes to long it will register that the transmission has failed and stop the stepper.

  7. #7
    Join Date
    May 2006
    Posts
    4043

    Re: Using Encoder with stepper motor and Kstep

    Hi henradrie,

    What should I set my input channel to be in order to use an encoder on IO 36 and IO 37? Can someone point me to some documentation that would explain this.
    That would be Input Channel 4. See JP5 description here and the KFLOP Functional Diagram here.
    TK
    http://dynomotion.com

  8. #8
    Join Date
    Apr 2015
    Posts
    8
    Thanks, it's starting to make sense now, but the diagram lists 8 input channels, 8 output channels, and 8 PWM but my configuration screen lists 16 input channels and 64 output channels.

    What are those extra channels for?

  9. #9
    Join Date
    May 2006
    Posts
    4043

    Re: Using Encoder with stepper motor and Kstep

    Hi henradrie,

    Thanks, it's starting to make sense now, but the diagram lists 8 input channels, 8 output channels, and 8 PWM but my configuration screen lists 16 input channels and 64 output channels.

    What are those extra channels for?
    For Encoders - Input Channels 8-15 are used to address SnapAmp Encoder Inputs if you were to add SnapAmps. See this description.

    For Step/Dir Mode - the Output channels 0-63 allow you to address the 8 Step/Dir Generators in 8 different ways to operate in different modes. See this description.
    TK
    http://dynomotion.com

  10. #10
    Join Date
    Feb 2008
    Posts
    644

    Re: Using Encoder with stepper motor and Kstep

    Quote Originally Posted by RCaffin View Post
    There is very little point in ever using an encoder on a stepper. No-one ever does.

    If the stepper has sufficient torque it will turn, and the encoder is pointless.
    If the stepper does not have enough torque to step onwards, then you are already dead in the water and an encoder will nothing for you.

    Rethink.

    Cheers
    Roger
    Not entirely true, an encoder can improve the stiffness of a step motor control system and
    has measurable benefits especially if a step motor is combined with a linear encoder.

    Here's an example of someone doing this with LinuxCNC
    (This would be doable with Kflop also)

    https://www.youtube.com/watch?v=dRJMk4hkUvY

  11. #11
    Join Date
    Jun 2010
    Posts
    4252

    Re: Using Encoder with stepper motor and Kstep

    Not entirely true, an encoder can improve the stiffness of a step motor control system and
    has measurable benefits especially if a step motor is combined with a linear encoder.


    I think I need that explained to me in simple words. Are you suggesting that you need the linear encoder to deal with elasticity (or backlash or slop) in the axis drive? I could understand that, with the proviso that I would never build a system like that.

    Cheers
    Roger

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •