523,766 active members*
1,891 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 39
  1. #1
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Lets talk about encoders

    Hi everyone...So I'm fairly new to the world of encoders and I'm trying to understand why a lot of servo drives have options for different count/rev encoders. I come from the world of Mach3, and it would seem that the servo drive could be dumb to that so long as the steps/unit is set correctly in mach3 config.

    So the real reason behind my questioning, is I want to add linear encoders to my mill, but I highly doubt the counts/distance will be an even number line on a rotary encoder. so how does that effect the drive? I would think that so long as I have a quadrature encoder and set my steps/distance correctly in mach3 that this would work fine. maybe?

  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Posts
    34989

    Re: Lets talk about encoders

    What are you doing with the encoders? And what kind of motors/drives are you using? Typically, the encoder data has nothing to do with the drives in Mach3.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    currently I'm running some closed loop steppers from leadshine, which have a shaft encoder built into the stepper. I'd like to actually use a linear encoder to replace it the rotary encoder.

    Yeah, and I guess I don't understand the relationship between mach3, the drive, and the encoder. I know mach3 has nothing to do with the feedback loop, but how does the drive interperate the signal from mach and from the encoder? logically I would think if mach sent 5 pulse signals, the drive would want to read 5 encoder signals. and any deviation from that is the error read by the drive.

  4. #4
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4304

    Re: Lets talk about encoders

    Linear encoders are all metric as far as I know. Normally available in resolutions of 0.1, 0.5, 1, 2, 5, and 10 microns, this is true for both glass and magnetic scales. 1 micron resolution = 25400 pulses / inch, or 0.000039 inch / pulse.

    If you are planning on closing the loop at the drive level, I don't know how a drive would react to being fed with an encoder that it was not calibrated for. Depending on the drive, it may be possible to set the scaling.

    To really take advantage of linear encoders, you would need a real motion controller between Mach3 and the drives and close the loop at the controller. Dynamotion or Galil would be good choices.

    I have 1 micron magnetic linear encoders on all of my machines and have had very good luck with them.
    Jim Dawson
    Sandy, Oregon, USA

  5. #5
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Posts
    34989

    Re: Lets talk about encoders

    but how does the drive interperate the signal from mach and from the encoder?
    I think that they are two separate loops. Or the steps/unit is locked to the encoder resolution.

    Mach3 knows nothing about the encoder. It just sends steps to the drive.

    The drive just makes sure the motor goes where the steps have told it to go.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  6. #6
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    thanks for the responses guys. I'll take a look at my drivers to see if the encoder is truly configurable or if it's just preset values.

    I've never really looked at the dynamotion board as I din't know they had a mach3 plugin. But I wish I had known about it before I bought my smoothstepper boards. haha.

  7. #7
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    According to the manual, I can set that to be any value I want. So maybe I'll give that a try first.

    but i guess on that topic, what exactly does the drive do with that information? Maybe for this drive it helps determine the microstepping?

  8. #8
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4304

    Re: Lets talk about encoders

    Quote Originally Posted by CS900 View Post
    .............. what exactly does the drive do with that information? Maybe for this drive it helps determine the microstepping?
    Lets say Mach3 sends out 100,000 pulses, that drive takes that information and moves the motor (or table) 100,000 encoder pulses. With the loop closed at the drive, the drive looks at the current position and keeps moving the motor until the 100,000 pulse distance is reached.
    Jim Dawson
    Sandy, Oregon, USA

  9. #9
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    That's what I thought was happening. Seems like the encoder itself it's fairly arbitrary and pretty hopeful I can close the position loop at the drive.

  10. #10
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Posts
    34989

    Re: Lets talk about encoders

    What drives do you have?
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  11. #11
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    there's a link in post #3 to them.

  12. #12
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Posts
    34989

    Re: Lets talk about encoders

    I would think that the encoder resolution needs to match the one on the motor, or it won't work correctly, as the drive is expecting 1000 counts/rev? (Or is it 4000?)
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  13. #13
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    it's 4000 in quadrature.

    That said, I can go into the software for the drive and edit the encoder resolution. I think. I didn't get a chance to try it out last night.

  14. #14
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    So looked at the software today, and sure enough I can edit the encoder count. I'm going to order an encoder and give it a try.

  15. #15
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Posts
    23356

    Re: Lets talk about encoders

    Quote Originally Posted by CS900 View Post
    it's 4000 in quadrature.

    .
    The term Quadrature encoder refers to the two detected signals being 90° apart.
    I don't know of any controller where you could not scale the encoder count to the machine resolution, it would make the whole system of integration useless.
    The encoder IS 'Quadrature' the way it comes out of the box, it can then be then be multiplied X1, X2 or X4 quadrature in order to set the resolution.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  16. #16
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    Quote Originally Posted by Al_The_Man View Post
    The term Quadrature encoder refers to the two detected signals being 90° apart.
    I don't know of any controller where you could not scale the encoder count to the machine resolution, it would make the whole system of integration useless.
    The encoder IS 'Quadrature' the way it comes out of the box, it can then be then be multiplied X1, X2 or X4 quadrature in order to set the resolution.
    Al.
    Thanks for the info. What exactly do you mean scale? The driver scales the input signal from the encoder.

    And if I'm understanding this correctly, you get a quadrature signal from the encoder having 2 sensors 90* out of phase and reading the leading and trailing edge of each encoder "tick"?

  17. #17
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Posts
    23356

    Re: Lets talk about encoders

    Quote Originally Posted by CS900 View Post
    Thanks for the info. What exactly do you mean scale? The driver scales the input signal from the encoder.

    And if I'm understanding this correctly, you get a quadrature signal from the encoder having 2 sensors 90* out of phase and reading the leading and trailing edge of each encoder "tick"?
    Many use the term incorrectly, the origin of the term quadrature for these is the fact that there are two signals generated that are 90° (quadrature) apart, for an optical encoder the signals originate at the sensor output as generally two sine waves, Heidenhain and other manuf often leave the signal as this in order for a control to greatly increase the resolution by using a co-tangent calculation, other simply square them up and this allows the option of using either 1 edge, 2 edges or all 4 to increase the basic resolution/count.
    Scale means you set a number of encoder counts to represent a distance moved.l.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  18. #18
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    i see. I learn something new everyday. Thanks for the explanation.

  19. #19
    Registered
    Join Date
    Aug 2006
    Posts
    613

    Re: Lets talk about encoders

    update...I got the encoder received in, installed, and wired up yesterday.
    https://i.imgur.com/CMvZkfU.jpg

    So, I fired up the tuning software for the drives and tried jogging it around and immediately got a positioning fault. ok...kind of saw that coming. So I did the math and figured that I get 5080 pulses/in from the 5micron encoder. Plug that in, also got a fault. I didn't have time to mess with it any more last night, but I got thinking this morning that it needs to be in pulses per rev (PPR) of the stepper. So feel free to double check my math, but I have a .2" pitch on the ballscrew with a .005mm pitch on the encoder. That would give me 1016 pulses/rev

    So onto my next question. The spec sheet for the stepper says it's "1000 pulses per revolution" of the original encoder. However, when I go into the software the PPR is set to 4000. I had originally though it was because of the "quadrature signal", but having since learned that's not a real thing why is it 4x the actual encoder count? I the manual it says to multiply the actual count by 4, but why is that?

    Also for anyone wondering, these are the settings I can change in the firmware. You can see I already changed the PPR from 4000.
    https://i.imgur.com/Hr9AfpP.jpg

  20. #20
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4304

    Re: Lets talk about encoders

    Your math is correct, 1016 pulses per motor revolution. This is what you should set your PPR to in the drive software.

    Don't confuse encoder line count with output pulses. A 1000 line encoder normally will be read as 4000 counts by the reading device. The counter reads both rising and falling edges of the output pulses. A rising = 1 pulse, B rising = 1 pulse, A falling = 1 pulse, and B falling = 1 pulse, added together = 4 pulses/line
    Jim Dawson
    Sandy, Oregon, USA

Page 1 of 2 12

Similar Threads

  1. Lets talk spindle lubrication
    By CS900 in forum Benchtop Machines
    Replies: 2
    Last Post: 03-30-2016, 06:08 PM
  2. Lets Talk About End Mills
    By Evanrigs in forum Uncategorised WoodWorking Machines
    Replies: 1
    Last Post: 09-03-2014, 01:29 AM
  3. lets talk bearings (Mini Mill x2)
    By ZipSnipe in forum Mechanical Calculations/Engineering Design
    Replies: 9
    Last Post: 05-03-2013, 06:57 AM
  4. Lets talk about BRUTE machines....WOW
    By carbidecraters in forum Uncategorised MetalWorking Machines
    Replies: 13
    Last Post: 05-16-2010, 08:23 PM
  5. Lets talk financing
    By carbidecraters in forum General MetalWork Discussion
    Replies: 11
    Last Post: 04-18-2006, 08:00 AM

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
  •