Homebrew axes calibration
04 Jul 2022 00:48 - 04 Jul 2022 15:55 #246552
by Earlton2
Homebrew axes calibration was created by Earlton2
This describes how I have calibrated my CNC Y-axis on a home-brew machine using hardware store threaded rod. The axis errors never showed up until working on a 1/2 scale aircraft. A template cut for a router jig wing section didn't fit. Two 1/4"dia alignment holes set 22" apart didn't fit the tee-nut locations in the jig. I resolved this by scaling the G-code axis data by 0.99626. i.e. a difference of 82TH over 22", nearly 3/16". As most of my work is small single items or even joints this scale factor is seldom used.
Of late I've been trying to cut a Dove Tail joint in the end of a piece of 2x4". My Y-bed is 43.5" long, The wood is 40" long so wasn't a whole lot of elbow room. Another error was coming into play, the y-axis origin. The home switches are three micro-switches in X, Y and Z. They also received some attention in this process but could still be improved.
My initial idea was to drill a series of holes along the Y-axis and measure their location with a standard hardware store tape measure, although this one is RED and marked hydro-one!
The data is copied into a spreadsheet (LibreOffice-Calc) in millimeters. (See cncytest02B.png) which is converted into inches. In the left-hand column is the G-code value starting at 4.5" and skipping 4" to the end of the wood. The DELTA is the difference between the G-code Y and the measured inch. Remember we are using a tape measure so I'll understand if you roll your eyes. The RUN and 'inch' data is fed into a chart in which I generated a Trend line. This gave the parameters for a straight line y=mx+c where m is the gradient and c is the offset. These are copied to the TREND column.
YM = 1.000872 :1 ( 1:1 would be nice )
YC = 0.000173 inch
The AS-RUN column shows the present configuration file data which I grab using cat and grep commands in a Terminal i.e.
cat ../EAI202206.stepconf | grep -e ypulleyden -e yhomesw -e yhomepos, giving:
Y-HOME = 4.919215 ( the positionafter homing )
Y-HOME-SW = 4.762965 ( the position of the home switch )
Y-MOTOR = 1.003712 ( the number of 'teeth' on the motor pulley )
Should we wish to go further the UPDATE for the Y-MOTOR parameter is found by multiplying the AS-RUN and YM data. i.e.
1.003712 x 1.000872 = 1.0045870.
In the Stepconf Wizard this is edited into 'Pulley teeth (Motor:Leadscrew)' as 1.0045870 : 1
The UPDATE for the Y-HOME-SW and Y-HOME are found by adding the YC offset i.e.
Y-HOME-SW 4.762965 + 0.000173 = 4.763183, edited into Home Switch Location, and
Y-HOME 4.919215 + 0.000173 = 4.919388, edited into Home Location.
There's likely some chicken and egg happening here as modifying Y-MOTOR would itself change the offset.
As these smaller changes appeared I found my ability to read fractions of a millimeter needed help. For this I created a small Vernier scale I could move along the tape measure which is attached as vernierscale.pdf.
Of late I've been trying to cut a Dove Tail joint in the end of a piece of 2x4". My Y-bed is 43.5" long, The wood is 40" long so wasn't a whole lot of elbow room. Another error was coming into play, the y-axis origin. The home switches are three micro-switches in X, Y and Z. They also received some attention in this process but could still be improved.
My initial idea was to drill a series of holes along the Y-axis and measure their location with a standard hardware store tape measure, although this one is RED and marked hydro-one!
The data is copied into a spreadsheet (LibreOffice-Calc) in millimeters. (See cncytest02B.png) which is converted into inches. In the left-hand column is the G-code value starting at 4.5" and skipping 4" to the end of the wood. The DELTA is the difference between the G-code Y and the measured inch. Remember we are using a tape measure so I'll understand if you roll your eyes. The RUN and 'inch' data is fed into a chart in which I generated a Trend line. This gave the parameters for a straight line y=mx+c where m is the gradient and c is the offset. These are copied to the TREND column.
YM = 1.000872 :1 ( 1:1 would be nice )
YC = 0.000173 inch
The AS-RUN column shows the present configuration file data which I grab using cat and grep commands in a Terminal i.e.
cat ../EAI202206.stepconf | grep -e ypulleyden -e yhomesw -e yhomepos, giving:
Y-HOME = 4.919215 ( the positionafter homing )
Y-HOME-SW = 4.762965 ( the position of the home switch )
Y-MOTOR = 1.003712 ( the number of 'teeth' on the motor pulley )
Should we wish to go further the UPDATE for the Y-MOTOR parameter is found by multiplying the AS-RUN and YM data. i.e.
1.003712 x 1.000872 = 1.0045870.
In the Stepconf Wizard this is edited into 'Pulley teeth (Motor:Leadscrew)' as 1.0045870 : 1
The UPDATE for the Y-HOME-SW and Y-HOME are found by adding the YC offset i.e.
Y-HOME-SW 4.762965 + 0.000173 = 4.763183, edited into Home Switch Location, and
Y-HOME 4.919215 + 0.000173 = 4.919388, edited into Home Location.
There's likely some chicken and egg happening here as modifying Y-MOTOR would itself change the offset.
As these smaller changes appeared I found my ability to read fractions of a millimeter needed help. For this I created a small Vernier scale I could move along the tape measure which is attached as vernierscale.pdf.
Last edit: 04 Jul 2022 15:55 by Earlton2. Reason: Done
Please Log in or Create an account to join the conversation.
04 Jul 2022 09:54 #246568
by andypugh
Replied by andypugh on topic Homebrew axes calibration
A more flexible way to do this, rather that an fixed scale offset, is with a screw mapping file. (you can account for backlash this way too)
You still need a way to accurately measure the actual position relative to the commanded position.
See COMP_FILE and COMP_FILE_TYPE here:
linuxcnc.org/docs/stable/html/config/ini...t__lt_num_gt_section
(I thought that there was more than this, but haven't yet found it)
You still need a way to accurately measure the actual position relative to the commanded position.
See COMP_FILE and COMP_FILE_TYPE here:
linuxcnc.org/docs/stable/html/config/ini...t__lt_num_gt_section
(I thought that there was more than this, but haven't yet found it)
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.063 seconds