ENGINEERING

Home of TurboCNC, the best open-source CNC control around...

 
web www.dakeng.com
 
  You are here:
  Homepage -> Articles -> CNC threading
Latest release of TurboCNC is v4.01 build 050312
released March 13
 

CNC Threading


  Hardware Software  
Articles HOME FAQ's
  Manuals User
Forum
 
About
DAK
Ordering Contact
DAK
  Sitemap Links  

  One of the most critical capabilities of a lathe is it's ability to single-point thread.  CNC threading extends this enormously by allowing an infinite number of thread pitches, tapered threads, and even multiple lead threads - without playing around with change gears.

1/2-20 UNF thread cut by TurboCNC.

  Threading requires the control computer to keep track of the angular position of the spindle continuously while cutting.  To do this, an device called an encoder is attached to the spindle.  Encoders come in all stripes, but for TurboCNC you need one that produces one pulse per revolution of the spindle only.

  An encoder like that is easy to make for a home machinist.  You'll need to acquire some electrical apparatus from Radio Shack and spend about an evening or two soldering and building brackets.  Here's the schematic:

  You can order this circuit already assembled from CNC4PC if you're not inclined to make it yourself.

  This device works by sending an infra-red beam between an emitter (the LED) and a detector (photo-transistor).  Normally, the signal output is a low logic level (near 0V)  When the beam is broken by some object, the output of the circuit switches high.  The comparator and inverter serve to clean up the signal before sending it on to the computer.  Observe good wiring practice, and shield the signal lines, if not the entire assembly.  You'll have trouble with electrical noise otherwise.  Use one of pins 10-13, or 15 on the parallel port for the signal.

  The mechanics of this encoder are extremely simple.  Turn up a disk, and attach a thin tab of sheet metal to the rim so that it sticks out a bit.  Then arrange the whole shebang on the backside of your spindle so that it rotates with it, and the sheet metal tab passes between the LED and transistor.  You can machine it all in one piece as an alternative.

  Make it big enough that you don't obstruct the spindle bore in the process!  Here's what mine looks like, without the shielding over the electronics.

 In TurboCNC set up the Spindle Index input using the machine configuration menu and save the new configuration.  

  You can test it with the M50 command in MDI mode, which reads the spindle encoder and reports the speed in rpm.  If the spindle is off, it'll time out and tell you after a few seconds.  Alternately, you can use FKEYBIT (it's in the TurboCNC download) to monitor the index pulse to make sure it's working as it should.


  The command to single point thread is G33, which takes two parameters, a target dimension and a lead length.  Here's a simple example:

G33 Z-1.00  K0.020  

  which cuts a 50 TPI thread from the current position to Z=-1.00

  K is the lead, or 1 over the pitch.  20 TPI would be 0.050 for example.

  The cutting action is synchronized to the spindle based on the start position, so you can recut a thread as many times as needed.

  If you return to the same Z value as before with each pass, you're using radial infeed.  Offset the Z by a small amount for each pass to feed on a 29 deg angle as you would manually, using this formula:

  offset = infeed  x tan (angle)

  where angle is 0 for radial infeed.  For example, feeding in .010 in X per pass at a 29 degree angle means that the startpoint in Z should be offset by 0.00554" each time.  Make sure your calculator is in degree mode when you do this!

  If you've never seen CNC threading before, you're in for a treat.  Zip-zip-zip-zip and done.  No watching that silly dial or concentrating so you can disengage the feed just an instant before the tool rams into a shoulder.

  A common problem is noise on the encoder signal.  TurboCNC will stop with an error if the spindle seems to be going faster than 5000 rpm.  Use shielded cable, chassis ground (star ground fashion), and twist signal wires if possible.  It pays to keep the boards and wiring away from your spindle motor if you possibly can.

 
 

 

 

© 2001-2020 DAK Engineering.  

All rights reserved.

This page last updated on January 11, 2015 . 

Email: admin@dakeng.com