555,188 active members*
1,865 visitors online*
Register for free
Login
IndustryArena Forum > Mechanical Engineering > Linear and Rotary Motion > Can linear encoders be combined with digital step drives?
Results 1 to 15 of 15
  1. #1
    Registered
    Join Date
    Nov 2008
    Posts
    522

    Can linear encoders be combined with digital step drives?

    I look at the market and high accuracy linear encoders are pretty cheap now

    Steppers are still probably the best option. I do go for the closed-loop variant..

    But I'm looking to counter backlash and torsional stiffness of the reduction drive by following a linear encoder. I have microcontroller skills.

    That is, say I have a rack and pinion with gearbox reduction system with 0.008" of linear backlash due to gear backlash, not counting the torsional stiffness. It's not terrible, but it is an error. I might do this with a belt-axis CO2 laser too which has a "springiness" error when accelerating. Can we add a linear encoder to get the positioning "perfect"?

    On an analog servo drive, a controller gives a voltage which basically translates into a velocity, and a DAC calcs the diff between commanded position and linear encoder feedback and generates a velocity command voltage. But analog servos don't seem as attractive, esp in terms of power and cost.

    I could imagine instead putting in a microcontroller to insert forward/reverse steps based on encoder feedback.

    But this seems difficult to apply to a digital step drive. This could be a clash from initially adding extra steps due to belt stretch then when it comes to a stop, and then a flurry of high speed positive and negative step pulses to correct as it overshoots back and forth. It seems likely this would be asking the drive for corrections in the reverse direction that will be offset by a command in the other direction before ever reversing. Is such a system possible?

    I ran the low-level through my head. Say it's a springy belt. The controller commands say 10 microsteps from a stop, there's a microcontroller diffing the commanded position and encoder, and it's the equivalent of 5 steps behind because the belt is stretching. Do you command in an extra 5 steps? Hypoththetically, if this were a very springy belt, you might need 50 steps to wind it up and get going. Then as a stop, it's got to do a lot to unwind the belt in that direction and wind up the other way to avoid overshooting. But the diff system is just going to see the linear encoder crosses the target stopping point and overshoots and it won't know if if needs to inject 5 reverse pulses or 500 to wind the belt the other way and prevent overshooting.

    I did wonder about using a closed-loop step drive with an open-loop stepper motor, and replacing the shaft encoder with the linear encoder input and just programming the new ratio into the drive. So then it's just controller steps into the drive and the encoder feedback handles it from there. But doesn't the closed-loop drive adjust the drive current based on the rotor phase versus the commanded position? I actually don't know that, I just assumed.

  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5524

    Re: Can linear encoders be combined with digital step drives?

    Quote Originally Posted by MechanoMan View Post
    I look at the market and high accuracy linear encoders are pretty cheap now
    About $100/axis for 1 micron units, I prefer magnetic linear encoders.

    Steppers are still probably the best option. I do go for the closed-loop variant..

    But I'm looking to counter backlash and torsional stiffness of the reduction drive by following a linear encoder. I have microcontroller skills.

    That is, say I have a rack and pinion with gearbox reduction system with 0.008" of linear backlash due to gear backlash, not counting the torsional stiffness. It's not terrible, but it is an error. I might do this with a belt-axis CO2 laser too which has a "springiness" error when accelerating. Can we add a linear encoder to get the positioning "perfect"?
    It is possible to create a dual loop system. But normally you would look at the load position vs. the commanded position and issue corrections on the fly every few milliseconds or even microseconds. This can be done with steppers, but is normally used with servo systems. I have done this with steppers, but it requires some creative software to make it happen. Using linear encoders with analog servos and closing the loop at the controller level is generally quite accurate and will for the most part automatically compensate for backlash. But there is no substitute for a tight machine.

    On an analog servo drive, a controller gives a voltage which basically translates into a velocity, and a DAC calcs the diff between commanded position and linear encoder feedback and generates a velocity command voltage. But analog servos don't seem as attractive, esp in terms of power and cost.
    I would disagree in terms of power. Any servo drive will far out perform a similar size stepper. Yes, the cost is higher.

    I could imagine instead putting in a microcontroller to insert forward/reverse steps based on encoder feedback.

    But this seems difficult to apply to a digital step drive. This could be a clash from initially adding extra steps due to belt stretch then when it comes to a stop, and then a flurry of high speed positive and negative step pulses to correct as it overshoots back and forth. It seems likely this would be asking the drive for corrections in the reverse direction that will be offset by a command in the other direction before ever reversing. Is such a system possible?

    I ran the low-level through my head. Say it's a springy belt. The controller commands say 10 microsteps from a stop, there's a microcontroller diffing the commanded position and encoder, and it's the equivalent of 5 steps behind because the belt is stretching. Do you command in an extra 5 steps? Hypoththetically, if this were a very springy belt, you might need 50 steps to wind it up and get going. Then as a stop, it's got to do a lot to unwind the belt in that direction and wind up the other way to avoid overshooting. But the diff system is just going to see the linear encoder crosses the target stopping point and overshoots and it won't know if if needs to inject 5 reverse pulses or 500 to wind the belt the other way and prevent overshooting.
    I think what you propose there would result in an incredibly unstable system simply because the overall system can not react fast enough to keep up with the controller. Under all conditions you want to have the actual position slightly lag the commanded position to prevent overshoot. By slightly lag I mean a few encoder pulses, maybe 2 to 3 pulses when moving, but hitting 0 when stopped. Excess lag error is not good either.

    I did wonder about using a closed-loop step drive with an open-loop stepper motor, and replacing the shaft encoder with the linear encoder input and just programming the new ratio into the drive. So then it's just controller steps into the drive and the encoder feedback handles it from there. But doesn't the closed-loop drive adjust the drive current based on the rotor phase versus the commanded position? I actually don't know that, I just assumed.
    I think in most cases this could work. It depends on the update rate of the stepper drive and the maximum read frequency of the encoder input. Closed loop stepper drives are not very high resolution.
    Jim Dawson
    Sandy, Oregon, USA

  3. #3
    Member
    Join Date
    Jul 2018
    Posts
    3895

    Re: Can linear encoders be combined with digital step drives?

    Hi MM - This is positional control and you do have to consider acceleration and jerk to make a system run really smoothly. The spring in a belt is caused by high accelerations or/and an undersized belt. I'm interested in this feedback subject at the moment so please keep posting. Peter

  4. #4
    Registered
    Join Date
    Jun 2005
    Posts
    1536

    Re: Can linear encoders be combined with digital step drives?

    Check out Dynomotion’s KFLOP CNc controller u can use linear encoders with steppers for direct feedback on position

  5. #5
    Member
    Join Date
    Nov 2013
    Posts
    1833

    Re: Can linear encoders be combined with digital step drives?

    Hi,
    I am most familiar with Mach, and Mach, in fact all Windows based CNC software solutions are buffered control systems and due to the buffering delay cannot close the loop by itself.
    There are controllers like the Hicon, Kanalog/Kflop and Galill, that can add that functionality to a Windows based CNC software, at the cost of extra hardware and complexity.

    There is yet another approach that has come about over the ten or so years. Many servos are now dual loop.

    Such a servo has a built in rotary encoder, and is essential for Field Oriented Control, the underlying mechanism by which AC servos work, but in addition have a second encoder input for
    a linear encoder for example. This is called 'load sensing' where a feedback device is connected directly to the load, or axis or workpiece or whatever, and the position loop is closed on that
    secondary encoder. Its the last word in accuracy.

    Note that the loop is closed by the servo drive....you don't need any special motion controller, or a genuine realtime CNC software like LinuxCNC so you can have a closed loop, just the servo drive itself.

    For example I use Delta (Taiwanese brand made in China) B2 series servos. They have a 160,000 count per rev encoder, but do NOT have the feature I have talked about, the B2 series is Delta's
    entry level servo. I pay $435USD for a 750W servo/drive/ cable kit. The A2 series (1,280,000 count per rev) from the same company DO have dual loop sensing and cost about $50-$75 more the the B2 series.

    So you can 'load sensing position loop' performance, but I'm not aware of any stepper system. closed or open loop that has that ability, but particular model servos from most of the leading servo manufacturers do.

    Craig

  6. #6
    Registered
    Join Date
    Nov 2008
    Posts
    522

    Re: Can linear encoders be combined with digital step drives?

    >I would disagree in terms of power. Any servo drive will far out perform a similar size stepper. Yes, the cost is higher.

    More in terms of torque. I have a Chinese 180W NEMA23 ac servo that is only 0.57nm, or 80oz-in. It does retain its torque to 3000 rpm, whereas steppers drop off to like 25% torque by 1500rpm. And that one's not an analog velocity command, but still steps. That's the long end of NEMA 23 motors, and an equivalent NEMA 23 stepper would be the 425 oz-in.

    That can be compensated for with more gearing, but that usually comes with more backlash, thus this idea. The best right angle gearbox claims are 8-10 arcmin for low reductions.

    Then for high servo reductions it says "first level ?20 second ?30 third ?65" and I think that's cumulative. Thus, yes, we want a tight system to begin with, but I still see backlash is a limiting factor. And larger pinions improve rack engagement but the backlash is angular so the linear backlash increases with pinion diameter. But also I can see that the linear encoder's correction could easily make the rotor oscillate at a standstill as the gearing bounces back and forth across the dead zone.

    It wouldn't be hard to write some code for an STM32 to try, though. I just wonder what the drive does if it gets a slew of contradictory pulses to correct one way then flip the DIR pin and go the other way. before stepping through the first ones. I presume it will just sign it and subtract the reverse command pulses, and subtract pulses stepped out, and keep a running balance

    I can do a belt reduction for a low reduction stepper that doesn't really have hard backlash, but it has significant torsional stiffness probs, a bit springy. I've been using AvidCNC's, they're pretty good.

  7. #7
    Member
    Join Date
    Nov 2013
    Posts
    1833

    Re: Can linear encoders be combined with digital step drives?

    Hi,
    yes steppers have prodigous torque at low speed but run out of puff at speed, whereas servos just carry on right up to rated, and sometimes beyond rated speed.

    My experience is that servos outperform steppers hands down. What we tend to overlook is that a stepper, even the merest hint of torque overload and it misses steps or stalls
    whereas a servo just digs into it's 3 or 4 fold overload torque. While you can't rely for long periods of time on that overload it certainly close the gap between steppers and
    servos.

    I've seen manufacturers of closed loop steppers say 'more power, more speed, never misses steps'....all pure BS.If an open loop stepper loses torque at speed the so does a
    closed loop stepper, nor does closing the loop make it go any faster. If it misses a step, that means its marginally overloaded, the drive will insert an extra step to catch up, but
    guess what.... the extra step is just as likely to be missed as a regular step, the motor is marginally overloaded after all.

    Any motor, servo or stepper will lag if its overloaded, its just that servos have SO MUCH MORE overload capacity and seem therefore to perform much better
    that the specs would suggest.

    Craig

  8. #8
    Member
    Join Date
    Jun 2010
    Posts
    4151

    Re: Can linear encoders be combined with digital step drives?

    At the risk of being contentious, can I suggest that what you really need to do is to replace all the rack and pinion stuff with decent ball screws, and good bearings. Rack and pinion just will not give precision.

    Then you would not need to 'close the loop'. Either a good stepper drive or a good servo drive will complete that.

    Cheers
    Roger

  9. #9
    Member
    Join Date
    Jul 2018
    Posts
    3895

    Re: Can linear encoders be combined with digital step drives?

    Hi Roger- MM may have a very big machine which kills the ballscrew idea. MM how big/small is your machine? If its small enough to use ballscrews then that's a very good solution. Ballscrews are available in a range of accuracies that will suit your application .... Peter

  10. #10
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5524

    Re: Can linear encoders be combined with digital step drives?

    Quote Originally Posted by MechanoMan View Post
    >I would disagree in terms of power. Any servo drive will far out perform a similar size stepper. Yes, the cost is higher.

    More in terms of torque. I have a Chinese 180W NEMA23 ac servo that is only 0.57nm, or 80oz-in. It does retain its torque to 3000 rpm, whereas steppers drop off to like 25% torque by 1500rpm. And that one's not an analog velocity command, but still steps. That's the long end of NEMA 23 motors, and an equivalent NEMA 23 stepper would be the 425 oz-in.
    No matter how hard you try, you are not going to turn a $5000 machine into a $500,000 machine by adding linear scales. But it's possible to make a bit more accurate machine with linear scales and some creative software.

    That can be compensated for with more gearing, but that usually comes with more backlash, thus this idea. The best right angle gearbox claims are 8-10 arcmin for low reductions.

    Then for high servo reductions it says "first level ?20 second ?30 third ?65" and I think that's cumulative. Thus, yes, we want a tight system to begin with, but I still see backlash is a limiting factor. And larger pinions improve rack engagement but the backlash is angular so the linear backlash increases with pinion diameter.
    With one exception, the maximum reduction I have ever seen on a machine is 3:1. Normally using about a 1'' diameter pinion gear, thus about 3'' per pinion rev, and about one motor rev/inch of travel. By using a pneumatic backlash compensator it is possible to have zero backlash, but this does create a situation of asymmetrical torque requirement. When using steppers it is generally better to operate them in the sub 600 RPM range to take advantage of the available torque.

    But also I can see that the linear encoder's correction could easily make the rotor oscillate at a standstill as the gearing bounces back and forth across the dead zone.
    Normally you would create a deadband of +/- 2 or so encoder pulses to prevent ''hunting''

    It wouldn't be hard to write some code for an STM32 to try, though. I just wonder what the drive does if it gets a slew of contradictory pulses to correct one way then flip the DIR pin and go the other way. before stepping through the first ones. I presume it will just sign it and subtract the reverse command pulses, and subtract pulses stepped out, and keep a running balance
    In general steppers only lose steps on acceleration or under an overload when operating at the commanded speed. It would be a very rare condition for a stepper to lose steps when decelerating. Thus the correction would only need to be applied in one direction, and there would be no need to apply conflicting direction signals. If you are overshooting the target position, especially with steppers, then something is seriously wrong. The actual position should always lag the commanded position by a very small amount until the system reaches the target position.

    I can do a belt reduction for a low reduction stepper that doesn't really have hard backlash, but it has significant torsional stiffness probs, a bit springy.
    A properly applied belt drive will give plenty of system stiffness for any work that we might be doing. If you need greater repeatability than that, then it's time to look at a bit higher end equipment.
    Jim Dawson
    Sandy, Oregon, USA

  11. #11
    Registered
    Join Date
    Nov 2008
    Posts
    522

    Re: Can linear encoders be combined with digital step drives?

    Hey, how necessary is it to have some sort of spring tension on a helical rack vs just static mounting?

    I have a NEMA 34 belt reduction to pinion, but it's just 4 static bolt holes. Seems like it would be difficult to avoid getting too tight at some spots and bind up or get too loose and show backlash elsewhere

  12. #12
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5524

    Re: Can linear encoders be combined with digital step drives?

    I guess you could have spring tensioned pinion engagement. I don't think I have ever seen it done, but it should work OK.
    Jim Dawson
    Sandy, Oregon, USA

  13. #13
    Registered
    Join Date
    Nov 2008
    Posts
    522

    Re: Can linear encoders be combined with digital step drives?


  14. #14
    Member
    Join Date
    Nov 2013
    Posts
    1833

    Re: Can linear encoders be combined with digital step drives?

    Hi,
    that arrangement is quite common in smaller and less than mega dollar machines, but there are other ways.

    Atlanta Drives, is a company specialising in rack and pinion drives. Most interesting web-site, and worth a look.

    https://www.atlantadrives.com/

    One option they use is to have two pinions, one to drive in one direction and the other to drive in the other direction with either spring, or its
    electrical equivalent counter rotating the two pinions to 'occupy the lash'. There is another version which, in principle, works identically but
    the pinion is split into two but on the same shaft with the second pinon held under tension by a torsion spring...very clever.

    Atlanta Drives stuff is very expensive, but maybe you could use the ideas to do something similar on your machine. I would suspect that
    effort would produce greater results in accuracy than linear scales etc. Even linear scales in a closed loop will not prevail against lash.

    Craig

  15. #15
    Registered
    Join Date
    Nov 2008
    Posts
    522

    Re: Can linear encoders be combined with digital step drives?

    OK this is interesting:
    https://www.omc-stepperonline.com/mo...8-80vac-cl86rs
    Has some new features inside

    Two different ways this might work:
    1. Ditch the encoder on the motor (well, select ordinary open-loop) and used the linear encode. The drive, in theory, allows programming any number from 0 to 51,200 encoder counts/rev.

    2. This new one has a mode to replace with STEP/DIR a logical JOG+/- input. If you max'ed out JOG velocity and accel in the drive, left the motor's encoder connected, and then wrote a microcontroller to compare the commanded STEP count with the encoder pulses and just give a JOG+/- command. There's no amplitude. It's a command to accelerate until told not to. There's some drive implementations where I could see that working and others where it doesn't work.

    The goals in mind would be
    1. to make a large belt-driven CO2 laser gantry able to start and stop with greater accelerations without a "bounce", by yanking it back as the rotor decelerates and the linear encoder on the head is going past the commanded position. Yes, it is entirely possible this could cause oscillation in the head position. Fun to try, though. This does make sense as it should be more gradual. The motion controller (Ruida) of course has acceleration rules and, like, on a decel the belt will begin to stretch and will have some error the whole time it's decelerating, This would see the lag/overshoot during the whole process and could keep it following the command more accurately.
    2. Allow for precision movement from gearboxes that naturally have backlash with hardware, instead of software backlash compensation. Again, yes, this could go badly and the rotor accelerating too hard over the backlash "dead zone" so it can do a compensation in the other direction, only to knock it too hard and throw itself again across the dead zone in the other direction, thus chattering even at a standstill.

Similar Threads

  1. mounting US digital encoders
    By SwampDonkey in forum Servo Motors / Drives
    Replies: 1
    Last Post: 03-02-2016, 05:43 PM
  2. Serial/digital encoders
    By Eson in forum Granite Devices
    Replies: 1
    Last Post: 03-27-2013, 10:21 PM
  3. Low Cost Linear Encoders For Linear Servo's
    By protomate in forum Want To Buy...Need help!
    Replies: 0
    Last Post: 12-15-2010, 03:08 AM
  4. Just saw a linear motor XY table with linear encoders today...nice
    By guru_florida in forum General MetalWork Discussion
    Replies: 6
    Last Post: 04-29-2009, 01:39 AM
  5. Combined Rack and Linear Guide
    By Dizzy_G in forum Linear and Rotary Motion
    Replies: 5
    Last Post: 11-23-2007, 05:33 PM

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
  •