By continuing to use this site, you agree to our use of cookies. Find out more

Member postings for John Haine

Here is a list of all the postings John Haine has made in our forums. Click on a thread name to jump to the thread.

Thread: Myford ML7 accuracy
13/09/2021 09:32:45

New Myford lathes cost silly money, as do used ones (worn or not), and you could find it difficult to decide if a used one is in good condition or not. I am a Myford S7 owner, from new, and though it's a decent lathe I wouldn't buy another one. I certainly wouldn't buy a used one.

Cowells are very nice, British, accurate, but hideously expensive.

From the US, Taig lathes are nice but quirky. Sold in the UK by Peatol. There is also the Sherline range, not sure who the current stockist is, but owners seem to be very satisfied. Both these are quite small so that may limit you. (Actually UK Sherline stockist is Millhill.)

Accuracy has at least as much to do with the operator as the machine. In your place I would consider buying a new far eastern machine from a reputable stockist who can provide backup - I have had nothing but excellent service from Arc Eurotrade. They have a range of lathes of different sizes and can provide good advice.


Thread: 12volt three wire fan connections,
12/09/2021 18:28:23

You are overthinking this. If the maximum input voltage is 10V then feed the control wire from a potential divider with a 2.2 K resistor to +12V and 10 K to ground. This will give just under 10V on the control wire. Or use a 10 K potentiometer with one end grounded and the other connected to +12 V through a 2.2 K resistor, the slider on the violet wire for speed control. You won't need things like voltage stabilsers etc.

Thread: CNC Knurling
12/09/2021 10:03:17



And the finished result.

12/09/2021 09:55:15

Here's a g-code example for 12.7mm diameter and 37 teeth.

G0 G49 G40 G17 G80 G50 G90
G00 Z 67.595
G00 X0 Y0
G00 A 5
G01 Z -1.397 F 50.0
F 500.0
G01 X 10.783 A 97.297 ( 0 )
G01 X -10.783 A 97.297
G01 X 10.783 A 97.297 ( 1 )
G01 X -10.783 A 97.297
G01 X 10.783 A 97.297 ( 2 )
G01 X -10.783 A 97.297
G01 X 10.783 A 97.297 ( 3 )
G01 X -10.783 A 97.297
G01 X 10.783 A 97.297 ( 4 )
G01 X -10.783 A 97.297

G01 X -10.783 A 97.297
G01 X 10.783 A 97.297 ( 35 )
G01 X -10.783 A 97.297
G01 X 10.783 A 97.297 ( 36 )
G01 X -10.783 A 97.297
G00 Z 67.595
M5 M30

I've taken out a big block of lines in the middle to save space. Note that the code puts the "zig-zag" number in as a comment so you can keep track of what's happening on the Mach3 screen. For this example it counts 0 to 36, or 37 zigzags.

(I dunno why the smileys don't appear here...)

This is about as short as the code can be without using a subroutine but can be used on a controller that doesn't support these.

Edited By John Haine on 12/09/2021 09:59:12

Edited By John Haine on 12/09/2021 10:02:06

12/09/2021 09:49:50

Well, thanks to SoD and Dave S I have written a little Python wizard to generate g-code for knurling for any length. The first try for simplicity as shown above I just cut a full lead length, which for a diamond knurl is pi x diameter of stock. Even for 12.7mm this is nearly 40mm long which is much too long for practical purposes - larger diameter knurls would be very wasteful. I realised though that if one made a knurl with an integer number of diamonds in the axial direction you can cut each "tooth" with just a zig-zag motion where the work rotates for say N teeth axially while it moves N diamonds axially, then continues to rotate for another N teeth while it moves back N diamonds. What one would then like to do is just cut another zig-zag an carry on until one has gone right round the blank, without having to make a pure rotational move to index to the next tooth. With a bit of playing around for this to happen the number of teeth and number of diamonds have to be "relatively prime", that is have no common factor other than 1. Or, one can just make the number of teeth "M" prime, in which case any number of axial diamonds up to (M-1) can be cut just with repeated zig-zag moves. I think this is the easiest approach since there isn't a particular reason to have any specific number as long as the knurl looks and feels right.

For my previous example M=37 is a nearby prime to 42 - I wanted something rather smaller than 42 to get a coarser pattern, 37 gives about a 1.08mm pitch. Here's the Python code.

import math
# Python program to generate G Code for a diamond knurl using a rotary axis on the mill.
# Parameters required:
    # Initial stock diameter
    # Number of circumferential "teeth" - this should be PRIME
    # Length of knurl defined as the number of longitudinal teeth
    # Feedrate
    # Horizontal axis height above machine zero.
diameter = float(input("Stock diameter: ")
teeth = int(input("# teeth (prime): ")
length = int(input("# axial diamonds: ")
feed = float(input("feedrate: " ))
Z_feedrate = float(input("Downfeed rate; ")
height = float(input("axis height: ")
name = input("Output filename: " #include .txt or other extension

# Now do geometry calcs
pi = 4*math.atan(1)
lead = pi * diameter
tooth_angle = 360 / teeth
L_pitch = lead / teeth
X_feed = round(length*L_pitch,3)
A_feed = round(length*tooth_angle,3)
Z_feed = round((diameter / (2*math.sqrt(2)))*(1 - math.sqrt(2)*math.sin(pi*(.25-1/teeth))),3)
Z_safe = height + diameter/2 + 1
# print(lead, tooth_angle, L_pitch, X_feed, A_feed, Z_feed, Z_safe)
myFile = open(name, 'a'
# Now start generating g-code
print(f"G0 G49 G40  G17 G80 G50 G90", file = myFile)
print(f"G00 Z", Z_safe, file = myFile)
print(f"G00 X0 Y0", file = myFile)
print(f"G91", file = myFile)
print(f"G00 A",5, file = myFile)
print(f"G01 Z", -1-Z_feed, "  F", Z_feedrate, file = myFile)
count = 0
print(f"F", feed, file = myFile)
while count < teeth:
    print(f"G01 X",X_feed,"  A", A_feed, "   (", count, "", file = myFile)
    print(f"G01 X", -X_feed,"  A", A_feed, file = myFile)
    count += 1
print(f"G90", file = myFile)
print(f"G00 Z", Z_safe, file = myFile)
print(f"M5 M30", file = myFile)

******ing Smileys!  They should be closing brackets. 

Thonny is free and comes as the built-in tool on the R-Pi, but I also use it on my PC. When you run it it asks for various parameters of the cut as listed, and the name of the file you want to put the results in (which will be in the same folder as the code). To get a text file include .txt on the end of the name. Note that the machine should be referenced so that X=0 is at the start or the knurl and Y=0 is on the A-axis. Z=0 for the tool tip is the machine table.


Edited By John Haine on 12/09/2021 09:50:51

Edited By John Haine on 12/09/2021 09:57:17

Edited By John Haine on 12/09/2021 09:58:32

Thread: I dont think its 3phase but what is it ?!
11/09/2021 13:02:00

Well, if they are currently live then you know there's a problem. If they aren't, then cut off most of the wires and carefull insulate them so if the neighbour does switch something on it doesn't matter. Or of course short 'em together...maybe not!

11/09/2021 12:13:42

Can one still get "mains tester" screwdrivers with a neon that can safely show if a conductor is live? Could be worth checking if there are actually any voltages on those conductors before spending money on an electrician...

Thread: To laser cut or to water cut
11/09/2021 12:06:58


Thread: I dont think its 3phase but what is it ?!
11/09/2021 08:34:59

I don't think the iBoost will have anything to do with it. I's battery powered, and links to the immersion controller via Zigbee wirless. Current clamp around the live, also isolated from the mains.

As a matter of interest, how many times have you had to replace the Solar iBoost controller at the immersion end? I'm on my third, but has been going for 18 months so I think they must have sorted the bug now!

Thread: Hole in tool post
10/09/2021 14:02:53

Yes it's for a locking pin, and no there isn't normally a hole drilled for it on the topslide since lathe and toolpost are from separate suppliers. You have to drill your own hole in your topslide to fit..


I gave up using the topslide on my Myford as it's tool flimsy and tapers are done with the CNC. I made a block to fit the cross slide to support the QCTP and drilled it for a dowel pin as I want to get precise re-registration of tools when removed/replaced - without a pin the TP will move if even a tiny bit, for example when parting.

Thread: Attaching a wooden disc to a Rotary Table without break through
09/09/2021 21:31:48

Go to B&Q and buy a roll of 2 inch wide blue masking tape and a squeezy bottle of their superglue.

Cover the surface of the table with blue tape, also the underside of the wood.

Squeeze & spread superglue thinly on the table; attach the disc and clamp down firmly for a few minutes.

When you have finished, be fairly brutal about pulling the wood off. The blue tape stops the glue actually sticking to the wood or the table.

This method will hold down plate for CNC milling so should be plenty strong enough for your purpose.

Thread: CNC Knurling
09/09/2021 19:21:13


Thread: What to drive a J & S with ?
09/09/2021 19:20:01

No not a rotary converter!! I guess the company you called sells RCs and is desperate to ship them!! Just get an appropriately sized VFD, ring up Newton Tesla and explain what you have and I'm sure they will recommend something suitable.

Thread: CNC Knurling
09/09/2021 17:13:21
Posted by SillyOldDuffer on 09/09/2021 15:58:42:



Thanks Dave. Does "print" put a newline after each instance or should that be added? And I notice you are using a "w" method, would it be better to use "a"?

09/09/2021 16:18:45

Thanks Martin. The code I used from the spreadsheet, using a subroutine, is this.

G00 X1 Y0 Z67.595 (Start position)
G91 (Incremental)
G00 A5 (Take out angular backlash)
G01 Z-1.492 (Apply downfeed)
G01 A360 (Cut groove)
G00 Z1.492 (Lift tool)
G00 X40.898 (Move for other groove)
G01 Z-1.492 (Apply downfeed)
G01 A360 (Cut groove)
M98 p2000 L42 (Call helix sub)
G00 X1 Y0 Z67.595 (Start)
G90 (Absolute mode)

o2000 (Helix sub)
G91 (Enter incremental mode)
G01 X-39.898 A360 (Cut helix at current depth)
G01 X39.898 A360 (Cut back to start)
G01 A8.571 (feed one tooth)
M99 (Return)

One thing to try to avoid in this is long positioning rotations of the A axis which take a long time. This is avoided in my code in this case by making 360 degree rotations as part of the cut but I am aking a long knurl for demo purposes. I've realised that if one slightly constrains the problem one can make shorter knurls with no re-positioning of the rotary axis at all. The subroutine though only works as long as the controller supports them - Mach 3 does but GRBL for example doesn't, so I'd like to produce in-line code as you have which has no looping or branching. Still I think one should need only twice as many G-code lines as there are "teeth" around the knurl except for a few extras at the start and end.

09/09/2021 11:01:29
Posted by DC31k on 06/09/2021 14:18:52:

Could I bang the drum a little for learning a programming language (e.g. Python) for this task?

I'm looking further into writing a wizard for this - not a true wizard since it won't run inside Mach3 since I don't want to lose it when my Mach3 PC finally collapses and I move to a different CNC package. Also don't want to tie the code to a superannuated visual basic (not even Microsoft's). So I think Python, I've done a little bit of Python programming and I like the language. So what I want to do is to write code that asks for input parameters such as diameter, knurl length, and number of teeth, plus a few other things, and generates the g code as a text file. I have written code that writes data to a csv file but don't have experience with text files in Python.

I know there are Pythoneers here, could anyone point me at or otherwise give an example of code that writes to a text file? I'd rather have an example to "be inspired by" (= copy!) than links to tutorial stuff, since the latter in my experience assumes Python knowledge I don't have!

Thanks in advance!

Thread: It would be nice to know........
09/09/2021 10:48:13

As Andrew says, for tapping - most of my tapping is now done on the manual mill using the VFD to reverse the tap out of the hole at low speed.

And the Hemingway speed increaser kit to improve usage of small cutters in normal mills also reverses the direction, so you need to run the main spindle in reverse.

Thread: I need to cut chamfers into x64 pieces of mild steel - any advice?
07/09/2021 16:45:10

Video at **LINK**

Basically it uses a pointed engraving-style "D bit" with a 90 degree point. This is rotating in a recess inn the base which has a fence machined into it. You hold the material to be cut against the fence and push it past the cutter which mills the edge. As the material is hand held and fingers are close to the cutter you'd need to be very careful especially cutting steel where the cutting forces will be much larger than the engraving plastic shown. But basically a variant on the "milling with a mitred cutter" approach.

For production I do suggest that you consult on the best manufacturing approach for this component - which may involve a re-design.

Thread: CNC Knurling
07/09/2021 06:50:20

Jason, thanks for the tool suggestion, I'll investigate.

06/09/2021 14:56:00

Actually no looping at all in the spreadsheet, the g code uses a subroutine and the calling statement includes an L word, L42 in this case, which calls the subroutine 42 times.

But I agree that a programming language would be better. In this case Mach3 includes an ancient dialect of Visual Basic which is the natural though unfortunate choice as all its native wizards use it.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
walker midge
JD Metals
rapid Direct
Eccentric July 5 2018
Eccentric Engineering
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest