threading - spindle encoder synchonization issues

More
07 Mar 2022 00:11 #236546 by carson
Hi, I'm trying to get consistent threading working on my lathe which is a Taig lathe that I converted to CNC and is running Linuxcnc.  For a while I was trying to cut threads with just one encoder output pulse per revolution.  This seemed to work okay for coarse threads but the carriage was visibly jerky due to insufficient feedback rates. 

So now I have a 60 pulse per revolution encoder, in addition to the single pulse index.  This is a home-built encoder made by printing out 60 stripes around a circle on a transparency which is adhered to a transparent piece of plastic.  This disc runs through an optical interrupter switch. 

Now the carriage moves much more smoothly and seems to cut decent threads but not consistently.  During a threading operation, things will be going fine and then I'll get a very ragged cut that seems to be removing a lot more material than previous cuts.  Sometimes it's so bad that the tool will get clogged behind the chip and stall the spindle (these tests were mostly on aluminum, 20 tpi, 1/2" to 1" diameters). 
I'm wondering if the spindle synchronization is not working perfectly, so that occasionally the tool enters the work slightly out of phase with previous cuts, resulting in a much larger depth of cut. 

Does anyone know of any good ways to diagnose this issue?  I've done some pulse counting with a logic analyzer to verify that I'm getting the right number of pulses per revolution.  I also verified that the cross feed is advancing the correct amount each pass.  But it seems tricky to measure the precise phase of the spindle at the point when the tool enters the work. 

It could be a mechanical issue, like my tool isn't sharp enough, or maybe the tool gets deflected and ends up taking a heavy cut occasionally.  But the resulting threads look a little strange to me: not quite v shaped trenches.  More like a "u", indicating that the tool wasn't quite overlapping each pass. 

Carson

Please Log in or Create an account to join the conversation.

More
07 Mar 2022 10:27 #236574 by andypugh
I wonder if you are getting spurious index pulses, or if there is some variation in index pulse timing?

If you are using the parallel port and software encoder make sure that you are using the encoder.N.position-interpolated output, rather than the plain position one. That gives smoother results.

There is a chance that what you are seeing is Z backlash, check that the leadscrew isn't shifting position in the bearings tha control endfloat.

Please Log in or Create an account to join the conversation.

More
08 Mar 2022 17:45 #236697 by Todd Zuercher
Replied by Todd Zuercher on topic threading - spindle encoder synchonization issues
Things to check; Make sure that your encoder pulse and index signals are clean and without noise that could cause bad results. Make sure there is no possibility of a lost steps in any of the axis motion. If the encoder is software counted, make sure that you are operating well away from it's counting limits.

Please Log in or Create an account to join the conversation.

More
08 Mar 2022 23:21 #236722 by BigJohnT
You can actually start a thread without the spindle running and turn the spindle by hand back and forth and the Z should stay in position.

JT

Please Log in or Create an account to join the conversation.

More
09 Mar 2022 21:26 #236786 by jpg
Good evening, as here:

Please Log in or Create an account to join the conversation.

More
14 May 2022 06:09 #242940 by frede7
Is there any value for having a spindle encoder if the spindle is simply an AC motor with a VFD?
I see the value if it is a servo drive. If I understand correctly, threading operations simply use an index pulse.

Please Log in or Create an account to join the conversation.

More
14 May 2022 06:35 - 14 May 2022 06:35 #242942 by PCW
Its actually the opposite, a servo motor can maintain a precise speed but a VFD cannot...

If you only have an index, accurate threading is relying on perfect speed control for a
complete spindle rotation, since the control must guess the spindle angular  position between
index pulses. Having an encoder allows the control to "gear" X motion to spindle rotation
so even without precise spindle speed control, accurate threads can be cut.
Last edit: 14 May 2022 06:35 by PCW.

Please Log in or Create an account to join the conversation.

More
28 Jun 2022 02:47 #246048 by smc.collins
Replied by smc.collins on topic threading - spindle encoder synchonization issues
yes, more accuracy

Please Log in or Create an account to join the conversation.

More
24 Jul 2025 15:15 #332264 by grossman83
Replied by grossman83 on topic threading - spindle encoder synchonization issues
I'm having threading issues where the machine cuts a slightly different thread each time. This has always been the case since I retrofitted a late 70's CNC lathe 8 years ago. Recently I've decided I've had enough and want it running "perfectly" which is why I'm finally digging into the issue.

Initially I thought the issue was due to noise on my encoder lines. I finally tracked down the source of the noise I had and it was EMI from my cheap chinesium servo drives. I've thoroughly isolated those now and have very clean encoder signals so I really doubt it's that.
  • I'm running LinuxCNC 2.7.4
  • The OS is: Debian 7.10 (Wheezy) and the kernel is 3.2.0-4-rt-686-pae
  • The encoder is a US Digital HI-1024-IE-D with a differential sort of backpack that connects to the single ended encoder and drives differential signals to my mesa 7i76 breakout board.
  • The 7i76 is connected to a mesa 7i92
  • I keep doing test runs on a thread and every pass is slightly different. It's as if it's not getting correct the index pulse and I suspected that to be the case which is why I put so much effort into getting rid of any noise. However this does not appear to be the case.
  • When I turn the spindle manually 10 turns I expect to see 4096*10 or 40960 counts in motion.spindle_revs, but it seems to undercount by about 5-10 counts per revolution. I've swapped in a different encoder and I have basically the same issue. What is strange is that if I rotate the spindle back and forth +- 45 degrees or so a few times and go back to the original position I'll have accumulated a couple hundred encoder counts. What I think I've discovered is that the system undercounts in the forward spindle direction, but seems to count properly in reverse.
Attached is my .hal file.

Any ideas?
Attachments:

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
24 Jul 2025 15:41 #332265 by tommylight
Replied by tommylight on topic threading - spindle encoder synchonization issues

What I think I've discovered is that the system undercounts in the forward spindle direction, but seems to count properly in reverse.

Do you have a scope to monitor A and B encoder lines?
-
I had something similar a few years back with a china encoder where the pulses were correct in one direction, but would get thinner with speed on the other direction.
This was a new out of box encoder, the same make/model encoder worked properly after replacing it.

Please Log in or Create an account to join the conversation.

Moderators: piasdom
Time to create page: 0.630 seconds
Powered by Kunena Forum