Absolute encoders


Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: Absolute encoders

  1. #1
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Absolute encoders

    i have a question for you guys , i have a cnc router with nema23 hybrid stepper motors . the breakout board is the C10s my drivers are KL-4030's and im also running the C15 relay board...i would like to add absolute encoders to my stepper.. is there any encoders available to do this.

    Similar Threads:


  2. #2
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    23226
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Why absolute?
    What advantages do you see?
    And to steppers?
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

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


  3. #3
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Because I want it to know it's postiin is at all times..



  4. #4
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    23226
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    The only thing you may gain is not having to register zero (home) at power up.
    After this it is the same.
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

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


  5. #5
    Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    230
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    There may be a bit of confusion here...

    Absolute encoders output a position value, usually many bits wide (although some may have a serial interface). For the same physical position, they will output the same value; and this value is unique.

    Relative encoders - the most common type - output a movement signal; usually two bits wide (and sometimes, especially for rotary encoders, with an "index" bit that goes active once per rotation). The signal they output is in what is called "quadrature" encoding. This movement signal is kept track of by the electronics that it is connected to; in order to translate the movement signal into a position value. Usually the translation is done in hardware; but if the machine moves slow enough and/or the processor is fast enough, it can be done in software (for example, encoders used for the user interface knobs of many products - like car stereos - are often managed in software).

    Absolute encoders never need to be "homed" - they always output the same position value for where they are. Relative encoders (as the name would indicate) do need this; as the system can tell exactly how far it has moved; but needs to be told where it's starting from. Open loop systems, such as the stepper system you have now; are also completely relative - you need to perform a homing cycle at power up.

    Very few CNC systems have the ability to interface to absolute encoders; those that do tend to be very high end. All the rest are set up to use relative encoders; because as Al_The_Man said, the only functional advantage for a typical CNC is not needing a homing cycle.

    Which control software are you using? If I recall correctly, Mach 3 needed a plugin to do what you want; TurboCNC didn't do it at all; I think LinuxCNC needed hardware assistance (such as a Mesa FPGA card) but as I'm not a LinuxCNC user I'm not sure on that one. At this time, Grbl has no ability to interface directly to encoders; to use them they would have to be interfaced to the motor drivers (like the "closed loop" stepper drivers now available; or something like a G320 from GeckoDrive, which is a servo motor system).





  6. #6
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    10699
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Quote Originally Posted by __Britt View Post
    There may be a bit of confusion here...

    Absolute encoders output a position value, usually many bits wide (although some may have a serial interface). For the same physical position, they will output the same value; and this value is unique.

    Relative encoders - the most common type - output a movement signal; usually two bits wide (and sometimes, especially for rotary encoders, with an "index" bit that goes active once per rotation). The signal they output is in what is called "quadrature" encoding. This movement signal is kept track of by the electronics that it is connected to; in order to translate the movement signal into a position value. Usually the translation is done in hardware; but if the machine moves slow enough and/or the processor is fast enough, it can be done in software (for example, encoders used for the user interface knobs of many products - like car stereos - are often managed in software).

    Absolute encoders never need to be "homed" - they always output the same position value for where they are. Relative encoders (as the name would indicate) do need this; as the system can tell exactly how far it has moved; but needs to be told where it's starting from. Open loop systems, such as the stepper system you have now; are also completely relative - you need to perform a homing cycle at power up.)
    You have some misconceptions with Encoders

    If an Encoder has many Bits wide positioning, it would be no good for anything ( 1 Bit 1024 ) that's 1024 PPR

    Absolute Encoders you have to Home just the same as Incremental Encoders, there are 2 types of Absolute Encoders one that remembers position for a short while which has a built in power memory storage to keep it active for around 1 hour, and Battery powered which will remember the position when the power goes off

    This does not mean you don't home the machine because it has Absolute Encoders, a good example of this is any Hass mill they use Absolute Encoders, and the machine won't do anything until it is Homed

    Most all CNC Machines use Absolute Encoders

    Any non Hobby CNC system have no problem interfacing with Absolute or Incremental Encoders, on all good systems the Encoder goes first to the Servo Drives then to the control which can output anything to suit the control

    Mactec54


  7. #7
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    10699
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Quote Originally Posted by rick027 View Post
    Because I want it to know it's postiin is at all times..
    You should of brought stepper system with Encoders already, that close the loop in the stepper drive, or a Ac Servo system

    Mactec54


  8. #8
    Member Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    3989
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Quote Originally Posted by rick027 View Post
    i have a question for you guys , i have a cnc router with nema23 hybrid stepper motors . the breakout board is the C10s my drivers are KL-4030's and im also running the C15 relay board...i would like to add absolute encoders to my stepper.. is there any encoders available to do this.

    What do you plan to connect the encoders to? The C10 boards have no encoder inputs, and the drives also have no provision for encoder connection, absolute or otherwise.

    Jim Dawson
    Sandy, Oregon, USA


  9. #9
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    23226
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Absolute Encoders you have to Home just the same as Incremental Encoders,
    Jeez!! all the robots that I have programmed must have been wrong, all had absolute encoders, which is the industry norm for robots (Fanuc, Mitsubishi etc)
    All continued functioning without homing at power up!
    The vast majority of run of the mill CNC milling-turning machines have historically always used incremental encoders, GE Fanuc, Mitsubishi, Siemens, down to the PC based Galil motion, all these require a homing routine.
    It is only in recent history where the big names have gone to using sine wave co-tangent encoders, and these also do require homing.
    Also it is a misconception that you need a double feedback loop, the drive can be a simple trans conductance amplifier and the PID loop passed to the controller only.
    This has been proved many times.
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

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


  10. #10
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Britt ,you hit it right on the button... That's what I want, I want it to know it's postion and also don't wanna keep homing the machine ...I want to start it up and go



  11. #11
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Well mactec54 at the time I bought these I wasn't thinking about putting encoders on , but know after three years I'm deciding to put some on if I can



  12. #12
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Well Jim that's why I was asking if I could do it with the stuff I already have. If I can't I can't, I would have to buy new drivers etc.



  13. #13
    Member Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    3989
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Quote Originally Posted by rick027 View Post
    Well Jim that's why I was asking if I could do it with the stuff I already have. If I can't I can't, I would have to buy new drivers etc.

    OK, you are going to have to buy some control hardware. You need a new controller, Dynomotion Kflop at a minimum. Galil would be a good option also. Both are compatible with Mach3 but Mach3 is an open loop system, so connecting an encoder really won't do you much good. Mach3 has no idea where the axes are at, even with an encoder connected to the system. I think I see some new CNC control software in your future.

    Let's take the case of my milling machine, it has no home position at all, or maybe I should say that it has a floating zero, settable anywhere relative to the work. It has linear incremental encoders and never loses position unless the computer is powered down. I pretty much never turn the computer off. If I have a setup that I need to leave overnight or something, I just move the axes to a known position and hit the E-stop, but the position remains known unless there is a power fail that takes down the computer. Even at that, I can plug the known position into the software and continue on.

    What is your budget for this project?

    Jim Dawson
    Sandy, Oregon, USA


  14. #14
    Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    230
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    You have some misconceptions with Encoders
    Well, I will be the first to admit that there are limits to my knowledge. I am primarily a software guy, specializing on the Mac and iOS platforms; however I do dabble in electronics hardware as well. My CNC knowledge is mostly self-taught; so there could well be gaps there.

    However, there are things that I am quite certain of; because of direct hands-on experience. The incremental encoders output signal is one of them; as I have one in my other hand right now...

    If an Encoder has many Bits wide positioning, it would be no good for anything ( 1 Bit 1024 ) that's 1024 PPR
    I'm going to presume that's a typo; and you meant to say ten bits (which is indeed 1024 possible values), not one bit...

    A ten bit absolute encoder is not useless in the general sense; it's just not really adequate for CNC positioning applications; and certainly not as a linear encoder for CNC. A good use for a ten bit absolute rotary encoder might be for a volume control on a high-end stereo.

    For CNC positioning, especially with linear encoders, you need many more bits than ten... how many depends on the length of the encoder; and how many counts per unit (inches or centimeters) it has. For example, for an encoder with 0.0001 resolution, with a length of 20 inches, there are 200,000 total counts from one end to the other. This will fit into 18 bits (2^18 = 262144).

    Absolute Encoders you have to Home just the same as Incremental Encoders, there are 2 types of Absolute Encoders one that remembers position for a short while which has a built in power memory storage to keep it active for around 1 hour, and Battery powered which will remember the position when the power goes off

    This does not mean you don't home the machine because it has Absolute Encoders, a good example of this is any Hass mill they use Absolute Encoders, and the machine won't do anything until it is Homed

    Most all CNC Machines use Absolute Encoders
    I have never seen what you are describing advertised. This does not necessarily mean it doesn't exist... just that I've never seen it. Every absolute encoder I've seen advertised has no battery or capacitor backup; it just outputs the value corresponding to it's current position when powered, no matter what. This is typically done using Grey code; so that there is only one bit changing at any given time (see https://en.wikipedia.org/wiki/Gray_code for more info).

    Perhaps you know more about the insides of a Haas control than I do (likely, considering I've never taken one apart)... how are the axis encoders interfaced to the control? Quadrature? High-speed serial? Where is the backup power supply located? If it's quadrature, is there a hardware counter that's kept powered up by the backup power supply?

    Any non Hobby CNC system have no problem interfacing with Absolute or Incremental Encoders, on all good systems the Encoder goes first to the Servo Drives then to the control which can output anything to suit the control
    I prefer the terms "low end", "mid-range" and "high end", instead of "hobby CNC" - because there are people who make money using machines built with open-loop stepper systems and controls like Grbl or Mach 3... and some of these systems are commercially manufactured and marketed at certain kinds of professionals... and as time goes by, features that were once solely in the domain of high end machines migrate downwards, until they are available on the cheapest of control systems.

    I had missed the fact that this thread is in the LinuxCNC forum (I got here via the "Today's Posts" button); so I will now infer that the control we are talking about is, in fact, LinuxCNC; interfaced via parallel ports to CNC4PC C10 cards.

    As stated earlier; I think the original poster is going to need to upgrade his control system to use something with a FPGA in it; such as one of the Mesa boards; in order to add encoders at all. As LinuxCNC is an open-source system; it should be possible to interface a true absolute multi-bit Grey-code encoded set of linear encoders to the system; but I suspect that doing this will involve writing code, both C/C++ for the Linux side, and Verilog/VHDL for the FPGA side. Co-operation of Mesa might be required as well.

    FWIW, these Wikipedia articles may shed some more light on the subject:

    https://en.wikipedia.org/wiki/Linear_encoder
    https://en.wikipedia.org/wiki/Rotary_encoder

    Also, just in case anybody was wondering, Verilog code for a FPGA card to do quadrature decoding might look something like this:
    Code:
    module quadratureDecoder(
    					clock,
    					A,
    					B,
    					increment,
    					count
    				);
    	input clock;
    	input A;
    	input B;
    	input [7:0] increment;
    	output signed [31:0] count;
    
    	reg [2:0] A_delayed;
    	reg [2:0] B_delayed;
    	always @(posedge clock) A_delayed <= {A_delayed[1:0], A};
    	always @(posedge clock) B_delayed <= {B_delayed[1:0], B};
    
    	wire count_enable = A_delayed[1] ^ A_delayed[2] ^ B_delayed[1] ^ B_delayed[2];
    	wire count_direction = A_delayed[1] ^ B_delayed[2];
    
    	reg signed [31:0] count;
    	always @(posedge clock)
    	begin
    		if(count_enable)
    		begin
    			if(count_direction)
    				count <= count + $signed(increment);
    			else
    				count <= count - $signed(increment);
    		end
    	end
    
    endmodule
    That's from something that I'm experimenting with to add closed-loop functionality to Grbl... it hasn't been tested yet on actual hardware (I'm waiting to get all the modules into the project so I can figure out how big of an FPGA development board to order), so don't hook any motors up to it yet! However, I can say that it at least compiles with the Icestorm toolchain for Lattice Ice40 FPGAs...
    Multi-bit Grey-code interfacing would be a bit different; but still have the same general feel to it (in other words... it's still Verilog).





  15. #15
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Have to disagree with mactec54 on the absolutes, because I run a weeke 050 and a nester they both have absolute encoders and these machines know where they're positions are at all the time..



  16. #16
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Thanks Britt , for all this info. I'm not running Linux I'm running mach3. Thanks for your help, now I know what I have to do. Thanks again guys..



  17. #17
    Member
    Join Date
    Feb 2008
    Location
    USA
    Posts
    603
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Quote Originally Posted by __Britt View Post
    Well, I will be the first to admit that there are limits to my knowledge. I am primarily a software guy, specializing on the Mac and iOS platforms; however I do dabble in electronics hardware as well. My CNC knowledge is mostly self-taught; so there could well be gaps there.

    However, there are things that I am quite certain of; because of direct hands-on experience. The incremental encoders output signal is one of them; as I have one in my other hand right now...


    I'm going to presume that's a typo; and you meant to say ten bits (which is indeed 1024 possible values), not one bit...

    A ten bit absolute encoder is not useless in the general sense; it's just not really adequate for CNC positioning applications; and certainly not as a linear encoder for CNC. A good use for a ten bit absolute rotary encoder might be for a volume control on a high-end stereo.

    For CNC positioning, especially with linear encoders, you need many more bits than ten... how many depends on the length of the encoder; and how many counts per unit (inches or centimeters) it has. For example, for an encoder with 0.0001 resolution, with a length of 20 inches, there are 200,000 total counts from one end to the other. This will fit into 18 bits (2^18 = 262144).



    I have never seen what you are describing advertised. This does not necessarily mean it doesn't exist... just that I've never seen it. Every absolute encoder I've seen advertised has no battery or capacitor backup; it just outputs the value corresponding to it's current position when powered, no matter what. This is typically done using Grey code; so that there is only one bit changing at any given time (see https://en.wikipedia.org/wiki/Gray_code for more info).

    Perhaps you know more about the insides of a Haas control than I do (likely, considering I've never taken one apart)... how are the axis encoders interfaced to the control? Quadrature? High-speed serial? Where is the backup power supply located? If it's quadrature, is there a hardware counter that's kept powered up by the backup power supply?



    I prefer the terms "low end", "mid-range" and "high end", instead of "hobby CNC" - because there are people who make money using machines built with open-loop stepper systems and controls like Grbl or Mach 3... and some of these systems are commercially manufactured and marketed at certain kinds of professionals... and as time goes by, features that were once solely in the domain of high end machines migrate downwards, until they are available on the cheapest of control systems.

    I had missed the fact that this thread is in the LinuxCNC forum (I got here via the "Today's Posts" button); so I will now infer that the control we are talking about is, in fact, LinuxCNC; interfaced via parallel ports to CNC4PC C10 cards.

    As stated earlier; I think the original poster is going to need to upgrade his control system to use something with a FPGA in it; such as one of the Mesa boards; in order to add encoders at all. As LinuxCNC is an open-source system; it should be possible to interface a true absolute multi-bit Grey-code encoded set of linear encoders to the system; but I suspect that doing this will involve writing code, both C/C++ for the Linux side, and Verilog/VHDL for the FPGA side. Co-operation of Mesa might be required as well.

    FWIW, these Wikipedia articles may shed some more light on the subject:

    https://en.wikipedia.org/wiki/Linear_encoder
    https://en.wikipedia.org/wiki/Rotary_encoder

    Also, just in case anybody was wondering, Verilog code for a FPGA card to do quadrature decoding might look something like this:
    Code:
    module quadratureDecoder(
    					clock,
    					A,
    					B,
    					increment,
    					count
    				);
    	input clock;
    	input A;
    	input B;
    	input [7:0] increment;
    	output signed [31:0] count;
    
    	reg [2:0] A_delayed;
    	reg [2:0] B_delayed;
    	always @(posedge clock) A_delayed <= {A_delayed[1:0], A};
    	always @(posedge clock) B_delayed <= {B_delayed[1:0], B};
    
    	wire count_enable = A_delayed[1] ^ A_delayed[2] ^ B_delayed[1] ^ B_delayed[2];
    	wire count_direction = A_delayed[1] ^ B_delayed[2];
    
    	reg signed [31:0] count;
    	always @(posedge clock)
    	begin
    		if(count_enable)
    		begin
    			if(count_direction)
    				count <= count + $signed(increment);
    			else
    				count <= count - $signed(increment);
    		end
    	end
    
    endmodule
    That's from something that I'm experimenting with to add closed-loop functionality to Grbl... it hasn't been tested yet on actual hardware (I'm waiting to get all the modules into the project so I can figure out how big of an FPGA development board to order), so don't hook any motors up to it yet! However, I can say that it at least compiles with the Icestorm toolchain for Lattice Ice40 FPGAs...
    Multi-bit Grey-code interfacing would be a bit different; but still have the same general feel to it (in other words... it's still Verilog).

    LinuxCNC already supports absolute encoders and like most CNC systems using multi-turn or linear absolute encoders, homing is not needed unless you have a problem.

    Mesa hardware supports SSI, Fanuc, and BISS absolute encoder data formats. Note that there are many types of multi-turn absolute encoders, The older types used gears
    (Older Okumas use these) many use battery or super capacitor backup (Fanuc, Yaskawa etc), The latest use the Wigand effect so require no backup power!



  18. #18
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Jim my budget is about 1200



  19. #19
    Member Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    3989
    Downloads
    0
    Uploads
    0

    Default Re: Absolute encoders

    Quote Originally Posted by rick027 View Post
    Jim my budget is about 1200
    That's a lot of money to spend just to not have to home your machine. And may be a bit light, $1200 will almost buy 3 absolute position encoders. Then there is the other needed hardware to buy. Without pricing it all out, I'm guessing the total cost would be in the $2500 range on the low end. If you want to make the controls a real industrial class control system then you are up into the $5000+ range, not including new motors & drives.

    In my opinion your money would be better spent buying some new motors and drives, closed loop steppers or AC servos. Either would increase the speed and accuracy of your machine......... But you would still have to hit the Home All button

    Jim Dawson
    Sandy, Oregon, USA


  20. #20
    Member rick027's Avatar
    Join Date
    Jun 2007
    Location
    usa
    Posts
    37
    Downloads
    1
    Uploads
    0

    Default Re: Absolute encoders

    Ok Jim, I'm gonna take your advice on this one..thanks for your help



Page 1 of 2 12 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Absolute encoders

Absolute encoders

Absolute encoders