584,861 active members*
4,894 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Most accurate home switch for rotary axis
Results 1 to 20 of 20
  1. #1
    Join Date
    Nov 2017
    Posts
    591

    Most accurate home switch for rotary axis

    Thinking about rebuilding my mill turn spindle soon to get more rpm out of it. Right now it's geared 1 to 1 with a 1.8kw dmm servo using a timing belt which gives me a bit under 3k rpm. I'd like to get closer to 4k. Since im geared 1 to 1 right now, I'm able to just use the z pulse from the servo drive for both homing and index pulse when turning. Once I gear it up 1 to 1.3 or so, z pulse will obviously no longer work for home when switching back and forth from turning and 4 axis indexing.

    So what type of switch is gonna give me the best repeatability for homing? Mechanical switch is ruled out since it needs to turn continuously. I've heard optical switches are very accurate but not used often on cnc since a small chip can trigger it, but the belt and sprockets on my mill turn are completely enclosed so I don't think that will be an issue. Is an optical switch gonna be the most accurate choice? Any recommendations for a specific kind? This is run on mach3 and I will be writing a custom homing macro for best speed and accuracy for homing. 2 or 3 stage. First home at high speed, then back off and home again at very low speed, possibly again a third time at ultra low speed. Not sure how exactly these sensors work, but I'd like it to sense out on the edge of my disk brake which is 7 inch diameter. To get the accuracy I want, it needs to be able to repeat within less than a thou, preferably 5 tenths out at this diameter.

    Also to make things more complicated, I might want to use these to improve accuracy on 90 degree indexing. Right now 90 degree indexing accuracy is only as good as about 0.1 degrees because of belt backlash, belt variance, and encoder error. So aside from home, I want it to reference a switch for each 90 degree index. I already edited my post processor to handle the disk brake automatically before and after each A axis move, so I should be able to implement something in the macro used to lock the brake after a move. Before locking, it can back up a couple degrees and index to the switch, then lock. This would require either multiple switches, or multiple pick ups. Either way, each point needs to be adjustable and it needs to know which is home. I'm thinking maybe 2 switches, one of them only sees one pick up for home, the other switch can be at a slightly different radius with 4 90 degree pick ups.

    So really I'm just curious what would be the best choice of switch for this application, how to use it, and what kind of repeatability i can expect.

  2. #2
    Join Date
    Dec 2013
    Posts
    5717

    Re: Most accurate home switch for rotary axis

    I don't think you'll have a problem with chips. I would take a look at Automation Direct's fork sensors. The laser ones have an advertised repeatability of 0.0004''

    https://www.automationdirect.com/adc...ensors#start=0

    Another option might be to use an encoder, attached to the spindle, driven by a belt at 1:1. This is way my lathe is set up.
    Jim Dawson
    Sandy, Oregon, USA

  3. #3
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by Jim Dawson View Post
    I don't think you'll have a problem with chips. I would take a look at Automation Direct's fork sensors. The laser ones have an advertised repeatability of 0.0004''

    https://www.automationdirect.com/adc...ensors#start=0

    Another option might be to use an encoder, attached to the spindle, driven by a belt at 1:1. This is way my lathe is set up.
    Awesome, I'll check out those sensors. 4 tenths would be plenty accurate at the given radius.

    Encoder directly on spindle is what I wanted to do, but after a long email conversation with dmm engineer, I don't think it's going to work out, at least with the accuracy I want. Basically my plan was to gear up the spindle to run faster using the 5mgt timing belt (good hp capability, some backlash), then use a separate light duty finer pitch timing belt to drive an encoder 1 to 1 with spindle which would mostly eliminate backlash and variance between encoder and spindle. Encoder feedback would go directly back to the servo drive in place of the one already mounted to servo. Couple issues with this, the engineer said he's not sure how the feedback loop would behave with the servo and encoder not running at 1 to 1 ratio. It may just fault out. Other issue is, the only encoder that is compatible with the dmm drive is their specific dmm brand encoder. It has 16 bit resolution, but accuracy is only as good as about 0.08 degree. The 65536 points are very repeatable, but specific angles of 0, 90, 180, 270 can be off by 0.08, I actually measured more than that when testing directly on the servo. The only way to make it work would be with a higher quality encoder which means it would need to send feedback to the machine controller instead of the servo drive and mach3 cant handle closed loop control like that. It does accept encoder inputs, but can't use them as closed loop axis control. I might be able to use an encoder input to handle the homing and 90 degree indexing more accurately with a macro, but it would probably end up more expensive and less accurate than the optical sensors.

  4. #4
    Join Date
    Aug 2019
    Posts
    339

    Re: Most accurate home switch for rotary axis

    Not sure if the advertised encoder was typo'ed but 16bits will give you a 0.005deg accuracy, if your servo is also 16bits (or more preferably).

  5. #5
    Join Date
    Dec 2013
    Posts
    5717

    Re: Most accurate home switch for rotary axis

    Yeah, without closed loop feedback it is a bit more complicated.

    I'm getting ready to add a C axis to my lathe. Will be using a DMM 1.8KW servo, but will be closing the loop at the controller using the spindle encoder. Going to clutch the servo in and out as needed using an automotive air conditioner clutch.
    Jim Dawson
    Sandy, Oregon, USA

  6. #6
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by Mecanix View Post
    Not sure if the advertised encoder was typo'ed but 16bits will give you a 0.005deg accuracy, if your servo is also 16bits (or more preferably).
    16 bit gives you 0.005 degree resolution, not 0.005 degree accuracy. Basically that means there are 65536 steps that are all very repeatable, but it is not perfectly linear. It's limited by the positional accuracy of the encoder. If I'm at zero position and command a 180 degree move, it will will be sitting at encoder position 32768, but it's not necessarily an exactly 180 degree move. In my case with my servo, I'm measuring about 0.1 degree of error on thecservo shaft which is a pretty significant amount. At 90 and 270 position there are different amounts of error in a different direction. All these positions are very repeatable, but not accurate angle wise. If I had a screw mapping function for my A axis, i could dial it in to be very accurate, but I don't. Also this is just error at the servo shaft. After that point, there is error from backlash in the drive belt as well as slight belt variance along it's length. These errors are not repeatable and could not be dialed out even if I did have screw mapping. The lighter duty fine pitch belt driving a separate encoder directly off spindle would mostly solve the non repeatable errors, but I would still be left with the encoder error without having a screw mapping fuction. Mach3 does have screw mapping, but doesn't seem to work for rotary axis.

  7. #7
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by Jim Dawson View Post
    Yeah, without closed loop feedback it is a bit more complicated.

    I'm getting ready to add a C axis to my lathe. Will be using a DMM 1.8KW servo, but will be closing the loop at the controller using the spindle encoder. Going to clutch the servo in and out as needed using an automotive air conditioner clutch.
    Nice! Couple things I've learned from that exact configuration, a brake is definitely needed to get good rigid holding for index machining. The belt and servo have excellent torque capability, more than enough, but The servo just can't respond fast enough to give a rigid hold. Since you're clutching it out, are you gonna gear it down? Imagine that would help a lot with the rigidity issue, but still limited to the belt rigidity. If you are using a brake, I'm sure you could use a much smaller servo than the 1.8kw and gear it down a healthy amount. I had to go with the brute 1.8kw and geared 1 to 1 simply because it also drives the lathe for turning so I need good hp and high rpm. If I was clutching a separate servo for C axis, i would go 750w at the very most and gear it like 5 to 1. Maybe even the 400 watt

  8. #8
    Join Date
    Jan 2005
    Posts
    15362

    Re: Most accurate home switch for rotary axis

    Quote Originally Posted by QuinnSjoblom View Post
    16 bit gives you 0.005 degree resolution, not 0.005 degree accuracy. Basically that means there are 65536 steps that are all very repeatable, but it is not perfectly linear. It's limited by the positional accuracy of the encoder. If I'm at zero position and command a 180 degree move, it will will be sitting at encoder position 32768, but it's not necessarily an exactly 180 degree move. In my case with my servo, I'm measuring about 0.1 degree of error on thecservo shaft which is a pretty significant amount. At 90 and 270 position there are different amounts of error in a different direction. All these positions are very repeatable, but not accurate angle wise. If I had a screw mapping function for my A axis, i could dial it in to be very accurate, but I don't. Also this is just error at the servo shaft. After that point, there is error from backlash in the drive belt as well as slight belt variance along it's length. These errors are not repeatable and could not be dialed out even if I did have screw mapping. The lighter duty fine pitch belt driving a separate encoder directly off spindle would mostly solve the non repeatable errors, but I would still be left with the encoder error without having a screw mapping fuction. Mach3 does have screw mapping, but doesn't seem to work for rotary axis.
    But for homing it should not matter as long as it is always in the same place which it is when using the index pulse ( Z pulse ) this will be the same place on the encoder every time you home the axes it can not change

    That is why for any type of servo for a rotary Axes the more bits you can find the better Dmm will have there 20Bit by around the end of the year they have a 32Bit for robots which may work well also for Rotary Axes builds
    Mactec54

  9. #9
    Join Date
    Jan 2005
    Posts
    15362

    Re: Most accurate home switch for rotary axis

    Quote Originally Posted by QuinnSjoblom View Post
    Nice! Couple things I've learned from that exact configuration, a brake is definitely needed to get good rigid holding for index machining. The belt and servo have excellent torque capability, more than enough, but The servo just can't respond fast enough to give a rigid hold. Since you're clutching it out, are you gonna gear it down? Imagine that would help a lot with the rigidity issue, but still limited to the belt rigidity. If you are using a brake, I'm sure you could use a much smaller servo than the 1.8kw and gear it down a healthy amount. I had to go with the brute 1.8kw and geared 1 to 1 simply because it also drives the lathe for turning so I need good hp and high rpm. If I was clutching a separate servo for C axis, i would go 750w at the very most and gear it like 5 to 1. Maybe even the 400 watt
    Unless you use a Megatorque servo motor which are either built into the spindle or bolted to the spindle you always need a brake of some kind for a rotary axes, there are no exceptions
    Mactec54

  10. #10
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by mactec54 View Post
    But for homing it should not matter as long as it is always in the same place which it is when using the index pulse ( Z pulse ) this will be the same place on the encoder every time you home the axes it can not change

    That is why for any type of servo for a rotary Axes the more bits you can find the better Dmm will have there 20Bit by around the end of the year they have a 32Bit for robots which may work well also for Rotary Axes builds
    Yes, right now with my 1 to 1 gearing the z pulse works great as a very repeatable home, the problem arises when I gear up the spindle like mentioned in original post. At that point, the encoder zero point no longer lines up with spindle zero when I'm switching back and forth between turning and indexing. If I was just indexing, it could keep track of that home point even with odd ratio, but once I switch to turning and it turns many thousands of revs, it can no longer reference encoder zero on the servo as spindle home. If it was an even ratio like 1 to 2, it would still line up, but my ratio will be more like 1 to 1.3.

    All that being said, the accuracy of the spindle zero position is still limited by belt backlash even if I did have an even ratio to deal with

    As for the need for a brake on any rotary, yes I have found that to be true even with a huge 1.8kw servo. Pid loop just isnt fast enough to truly hold a rigid positiin. I would say only exceptions is either a beefy harmonic drive, or the huge direct drive ring servos sometimes used in big platters

  11. #11
    Join Date
    Dec 2013
    Posts
    5717

    Re: Most accurate home switch for rotary axis

    Quote Originally Posted by QuinnSjoblom View Post
    Nice! Couple things I've learned from that exact configuration, a brake is definitely needed to get good rigid holding for index machining. The belt and servo have excellent torque capability, more than enough, but The servo just can't respond fast enough to give a rigid hold. Since you're clutching it out, are you gonna gear it down? Imagine that would help a lot with the rigidity issue, but still limited to the belt rigidity. If you are using a brake, I'm sure you could use a much smaller servo than the 1.8kw and gear it down a healthy amount. I had to go with the brute 1.8kw and geared 1 to 1 simply because it also drives the lathe for turning so I need good hp and high rpm. If I was clutching a separate servo for C axis, i would go 750w at the very most and gear it like 5 to 1. Maybe even the 400 watt

    I do have a brake. The reason I'm going with a 1.8KW is because the other 4 servos on the machine are 1.8KW, just keeps all of the hardware the same for interchangeability if needed.

    I may gear it down, haven't gotten that far into the design yet. I could add a gearbox of some type between the servo and clutch. But my inclination is to go with a near 1:1 just because of the poly-V pulley size on the stock air conditioner pump, keeps it simple. It's about 5 inch diameter and a mating pulley of that size will fit the spindle motor pulley hub quite nicely, just enough room for it. I don't think there is enough room on the spindle itself for another pulley. Just using what I have on the shelf
    Jim Dawson
    Sandy, Oregon, USA

  12. #12
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by Jim Dawson View Post
    I do have a brake. The reason I'm going with a 1.8KW is because the other 4 servos on the machine are 1.8KW, just keeps all of the hardware the same for interchangeability if needed.

    I may gear it down, haven't gotten that far into the design yet. I could add a gearbox of some type between the servo and clutch. But my inclination is to go with a near 1:1 just because of the poly-V pulley size on the stock air conditioner pump, keeps it simple. It's about 5 inch diameter and a mating pulley of that size will fit the spindle motor pulley hub quite nicely, just enough room for it. I don't think there is enough room on the spindle itself for another pulley. Just using what I have on the shelf
    Makes sense, should work nicely since you have that encoder feedback directly on spindle. I guess it does make sense for you to stay 1 to 1 so you have plenty of pulley grip. Here's another interesting thing I just found out about the dmm drive, the 500khz frequency limit was apparently just a "conservative" spec. The engineer informed me that the dyn4 can actually handle 1mhz. I tested it myself and was able to lower my electronic gearing from 8:1 to 4:1. Runs fine at nearly 3k rpm and was able to double my step resolution for indexing. Probably irrelevant in your case since you don't need to index your c axis at insane speed. I'm sure you'll be nowhere near 1mhz even with no electronic gearing. I would give it the full 16 bit to work with. Still be able to run your C as fast as 750rpm or so if you wanted.

  13. #13
    Join Date
    Dec 2013
    Posts
    5717

    Re: Most accurate home switch for rotary axis

    Quote Originally Posted by QuinnSjoblom View Post
    Makes sense, should work nicely since you have that encoder feedback directly on spindle. I guess it does make sense for you to stay 1 to 1 so you have plenty of pulley grip. Here's another interesting thing I just found out about the dmm drive, the 500khz frequency limit was apparently just a "conservative" spec. The engineer informed me that the dyn4 can actually handle 1mhz. I tested it myself and was able to lower my electronic gearing from 8:1 to 4:1. Runs fine at nearly 3k rpm and was able to double my step resolution for indexing. Probably irrelevant in your case since you don't need to index your c axis at insane speed. I'm sure you'll be nowhere near 1mhz even with no electronic gearing. I would give it the full 16 bit to work with. Still be able to run your C as fast as 750rpm or so if you wanted.

    I'm running in analog torque mode so the DMM gear ratio does not apply. The only DMM parameter that is even active in that mode is the Torque Filter Constant, which when set to 127 is effectively turned off. All of the control and PID is done at the controller level, the DMM drive just becomes a simple servo amplifier.

    We do keep learning more and more about the DMM servos, their documentation is somewhat lacking in the fine details. But like you I have been in communication with DMM support. They are very responsive.
    Jim Dawson
    Sandy, Oregon, USA

  14. #14
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by Jim Dawson View Post
    I'm running in analog torque mode so the DMM gear ratio does not apply. The only DMM parameter that is even active in that mode is the Torque Filter Constant, which when set to 127 is effectively turned off. All of the control and PID is done at the controller level, the DMM drive just becomes a simple servo amplifier.

    We do keep learning more and more about the DMM servos, their documentation is somewhat lacking in the fine details. But like you I have been in communication with DMM support. They are very responsive.
    Ah ok, yeah right after I typed that I realized you probably aren't running step mode. So your controller reads error between commanded position and encoder position, then applies torque proportional to the amount of error in the correct direction. I wish mach3 was capable of closed loop control like that. Would make this so much more simple for me. In my case, I could probably even use a ring encoder directly on the spindle and get really excellent precision. Not sure there's even software out there designed for diy machines that could handle that. Maybe I should do some research. Been thinking about going mach4 which would solve a few other puzzles, butbi don't think it has closed loop either

  15. #15
    Join Date
    Dec 2013
    Posts
    5717

    Re: Most accurate home switch for rotary axis

    Quote Originally Posted by QuinnSjoblom View Post
    Ah ok, yeah right after I typed that I realized you probably aren't running step mode. So your controller reads error between commanded position and encoder position, then applies torque proportional to the amount of error in the correct direction. I wish mach3 was capable of closed loop control like that. Would make this so much more simple for me. In my case, I could probably even use a ring encoder directly on the spindle and get really excellent precision. Not sure there's even software out there designed for diy machines that could handle that. Maybe I should do some research. Been thinking about going mach4 which would solve a few other puzzles, butbi don't think it has closed loop either
    Dynomotion Kflop/Kanalog will handle that, and is closed loop at the controller, inexpensive and works well. Very well supported. I believe will also work with Mach3, and they also have their own CNC software.

    I use Galil products and my own software, more expensive but I have been working with Galil products for over 20 years and I'm too old to change now. I am thinking about a ring encoder, Renishaw does sell one that is not too expensive. I'll see how the existing encoder system works out first.
    Jim Dawson
    Sandy, Oregon, USA

  16. #16
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by Jim Dawson View Post
    Dynomotion Kflop/Kanalog will handle that, and is closed loop at the controller, inexpensive and works well. Very well supported. I believe will also work with Mach3, and they also have their own CNC software.

    I use Galil products and my own software, more expensive but I have been working with Galil products for over 20 years and I'm too old to change now. I am thinking about a ring encoder, Renishaw does sell one that is not too expensive. I'll see how the existing encoder system works out first.
    I'll have to check out those controllers. I'm not sure how much work I'm gonna put into this machine. I'm already working on plans for a new, much more capable machine. Very similar to the layout of a doosan puma mx mill turn. Pretty much layed out like a sub spindle lathe with y axis, but instead of a turret with static and live tools, it will just have a bt30 milling spindle with 180 degrees of b axis articulation. All milling tools and static turning tools go In bt30 holders, gives radial and axial live tool access to both turning spindles. Bt30 locks stationary for turning. Would be an extremely capable and versatile machine. Bt30 holders are cheap, so just collect like 50 of them and have most tooling setup permanently. Swap what's needed into tool changer for different jobs. Aside from the usual chuck and collet holding in the lathe spindles, I want to build larger fixture plates, maybe 5x5 max to attach to spindles for 3+2 milling, possibly clamps built in that are actuated by drawbar. Parts can transfer from one spindle to the other, possibly even a modified bt30 holder with a gripper built into it for loading and unloading bigger stock into the spindles which is grabbed out of a stock magazine. Full automation possible with larger peices, and of course bar feeding. Pretty much no limit to what type of parts it can do within a certain size (Not designed for big parts), along with full automation. That will be an expensive machine to build though. Epoxy granite main casting, 3 big servos for the 3 spindles, as well as 6 more servos for x,y,z,b,sub, and tool changer. Maybe steppers on tool changer and b axis, but at least closed loop for reliability. Also it will be getting some higher quality linear rails and at least c5 ground screws. Probably 20k to build this, but massive capability compared to what you can buy for 20k.

  17. #17
    Join Date
    Jan 2005
    Posts
    15362

    Re: Most accurate home switch for rotary axis

    Quote Originally Posted by QuinnSjoblom View Post
    Yes, right now with my 1 to 1 gearing the z pulse works great as a very repeatable home, the problem arises when I gear up the spindle like mentioned in original post. At that point, the encoder zero point no longer lines up with spindle zero when I'm switching back and forth between turning and indexing. If I was just indexing, it could keep track of that home point even with odd ratio, but once I switch to turning and it turns many thousands of revs, it can no longer reference encoder zero on the servo as spindle home. If it was an even ratio like 1 to 2, it would still line up, but my ratio will be more like 1 to 1.3.

    All that being said, the accuracy of the spindle zero position is still limited by belt backlash even if I did have an even ratio to deal with

    As for the need for a brake on any rotary, yes I have found that to be true even with a huge 1.8kw servo. Pid loop just isnt fast enough to truly hold a rigid positiin. I would say only exceptions is either a beefy harmonic drive, or the huge direct drive ring servos sometimes used in big platters
    Yes that makes sense I thought you had gone with a direct drive mounting of the motor, so yes you would need to home the spindle you may be able to use your brake disc outside as a trigger point for the Home
    Mactec54

  18. #18
    Join Date
    Dec 2013
    Posts
    5717

    Re: Most accurate home switch for rotary axis

    Quote Originally Posted by QuinnSjoblom View Post
    ........ I'm already working on plans for a new, much more capable machine. Very similar to the layout of a doosan puma mx mill turn. Pretty much layed out like a sub spindle lathe with y axis, but instead of a turret with static and live tools, it will just have a bt30 milling spindle with 180 degrees of b axis articulation. .........
    An ambitious project, I'll be watching for the build thread.
    Jim Dawson
    Sandy, Oregon, USA

  19. #19
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by mactec54 View Post
    Yes that makes sense I thought you had gone with a direct drive mounting of the motor, so yes you would need to home the spindle you may be able to use your brake disc outside as a trigger point for the Home
    Yep, at one point one of my revisions for the mill turn spindle was direct drive coupling. I finished the parts for that version, but before I could finish building it, a smoking deal on a dunham pneumatic closer showed up on ebay (I think paid like 300 bucks), so I abandoned the direct coupling idea since it wouldn't allow the closer and bar pass through, and switched to 5mgt belt drive with disk brake. I'm glad it worked out that way because with the knowledge i have now, i know that the direct coupling still wouldn't have been rigid enough without a brake.

    Not sure if you checked back in on that thread, but I did complete it and it performs fantastic. I learned some post processor editing and vb scripting and am now able to run continuous mill turn parts with a bar puller. The brake is automatic in the post processor. It inserts an m code to open the brake before every A axis move and another m code to close the brake after every A move. Bar pulling is done with interchangeable carbon fiber forks, one for each stock diameter, and is run with an m code using 2 parameters for distance from chuck to drop in, and distance to pull.

    Very happy with the current setup and have ran a few jobs for the drone company I was cutting cf for. Mostly small parts like custom 7075 standoffs which involved some rigid tapping which also worked perfectly. At this point there's just a few things I would like to improve on like max rpm and homing/indexing accuracy. For small diameter parts, the indexing is plenty accurate, but for larger stuff that is 2 or 3 inches diameter, index milled features can be off as much as 5 thou. The optical sensors will be needed for homing once increasing gear ratio and should also be capable of dialing in indexing points for better accuracy.

  20. #20
    Join Date
    Nov 2017
    Posts
    591
    Quote Originally Posted by Jim Dawson View Post
    An ambitious project, I'll be watching for the build thread.
    That one will be quite a ways down the road for many reasons. First of all funds, also need a real shop space, also have a lot to learn in programming to make this work the way I want. Mach3 isn't gonna cut it. mach4 will do it, but I know nothing about lua scripting and that's gonna be a steep learning curve.

Similar Threads

  1. Replies: 2
    Last Post: 06-29-2018, 08:08 PM
  2. Dual X - Axis home switch
    By Biggs427 in forum UCCNC Control Software
    Replies: 2
    Last Post: 04-05-2017, 02:21 AM
  3. VF-0 Z Axis Won't Home to Limit Switch - Help!
    By roofis27 in forum Haas Mills
    Replies: 0
    Last Post: 11-18-2013, 10:55 PM
  4. Home switch addition to rotary table
    By aubreyj in forum Uncategorised MetalWorking Machines
    Replies: 8
    Last Post: 09-06-2012, 04:57 PM
  5. home switch for rotational axis
    By xyz100 in forum DIY CNC Router Table Machines
    Replies: 1
    Last Post: 07-31-2006, 07:14 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
  •