# Machsupport Forum

## Mach Discussion => General Mach Discussion => Topic started by: metal-n-more on March 05, 2009, 12:58:46 AM

Title: need mach motor tuning explained better
Post by: metal-n-more on March 05, 2009, 12:58:46 AM
Hi I built a 4x4 router with dual x rack system and thought I had it tuned correctly. I did some engraving of signs and they turned out perfect.  I went to drill some holes, 9 inches apart and I gained about .375 after two holes. Tryed tuning with indicators for long distance and came out better but now if you check .500 moves they are off by .010. What am I doing wrong. What I set up was a 16 pitch rack. A 16 teeth 1.0 pitch diameter gears. The gear ratio on the steppers is 4.8 to 1
I could use some help on this matter.
Thanks John
Title: Re: need mach motor tuning explained better
Post by: jimpinder on March 05, 2009, 05:15:36 AM
If you are saying that your machine does not move the correct distance - say 1 inch, when you tell it to move 1 inch, then this is down to the correct number of steps per inch in your motor tuning page.

HOWEVER - you are NOT tuning it.

Steps per inch is a finite number, there is no discussion, no alteration, no adjustment etc, - just a number. It is made up as follows - all numbers multiply the previous answer.

I assume you are using stepper motors. Check, but these are normally now 200 steps per revolution = 200
Your drives will have a microstep facility - e.g. Gheckos at 10, others 4 or 8 or 16 - Ghecko =10   = 200 x 10 =2000
If you have any gear reduction between the motor and leadscrew - I have a 3 to 1 belt reduction = 2000 x 3 = 6000
The pitch of your leadscrew or whatever - mine was 10 turns per inch  10 x 6000 = 60000

For your system - assuming steppers and microsteps - start at 200 for the motors, I will leave out the microsteps for the minute because you don't say what you are using.

If the gear ratio between the stepper and the drive wheel is 4.8 to 1 then  200 x 4.8 = 960
Irrespective of the number of teeth, and the pitch etc. How many turns does your final gear wheel have to make to move down the rack by 1 inch. I don't understand what you mean by 1.0 pitch - is this one mm,cm,inch - my catalogue shows so many variations, I dont see one which matches yours.

In any case - the thing you need to know is - how many turns does the wheel do on the rack to move one inch - multiply 960 by say 1 - if the rack pitch is 16 and the number of teeth on the wheel is 16 = 960

And finally the number of microsteps your drives use - say 8 or 10.= 7680 0r 9600 etc

The thing I must impress on you is that this number is not negotiable. You cannot now try it and  measure the distance the rack moves and adjust the number of pulses, either you have it right, or you have it wrong. There are several reasons why your axis do not move the correct distance, but steps per unit is not one of them.
By all means try and measure to check you are reasonable accurate. - move the carriage to the right - set up your measuring equipment - I use digital calipers - move the carriage by an MD! move again to the right eg. G0 X1 - so x will move exactly an inch, and then measure. On my steel lathe, I expect to be to 1 thou - but I can't measure any more accurately than that. If you always move in the same directiom eg move right, measure, move right, measure you take out all the backlash from the system, i.e. the gears, belt etc have taken up all the spare movement in that direction.

If you make the final measurement to the right, then (again using the MDI) reverse the movement and measure the answer should be 0, but will not be, becasue the gear, belts etc all have to settle in to push the opposite way. This is called backlash. All systems have it (althoug on some it is so small you cannot measure it) and Mach 3 can compensate for it, but that is another story.

To make you testing more reliable, decrease the speed of your traverse on the motor tuning page - I don't know what you have it set at, and decrease the acceleration. This will reduce the chances of the motors missing steps. Once you are satisfied that the machine is accurate, you can up the speed again.

Sorry to be so pedantic - this is one of the Bees in my bonnet - see previous posts on the subject.

Title: Re: need mach motor tuning explained better
Post by: BClemens on March 05, 2009, 08:08:52 AM
Jim, Good read but I have a question...what good is the 'calibrate axis' on the diagnostic page and how does this actually change what should be mechanically concrete?

Bill C.
Title: Re: need mach motor tuning explained better
Post by: metal-n-more on March 05, 2009, 10:07:04 PM
Hi Jim I am running 3 ea Gecko 203V "Vampire Drives"
2 ea G-STEP-II Dual Gecko Stepper Interface Cards
I have a 16 tooth gear and a 16 pitch rack  one rev on the gear appears to move 3.0"
I'm sorry if I sound ??? I just am not understanding the issue sometimes things need time to sink in. I understand the number is not negotiable. I have set up to mills and a lathe with a flashcut system and they are just fine. The rack is kicking me
so when you say 16 tooth and 16 pitch one rev should be 1" that is not the case.
In the mach manual it talks about diametrical pitch
I hope you have enough to help.
Thanks John
Title: Re: need mach motor tuning explained better
Post by: Hood on March 06, 2009, 03:06:48 AM
If you have 16 teeth on the motors gear then it will mean that one revolution will travel 16 teeth on the rack.
You say 16 pitch, is that mm? If so then 16 x 16 = 256mm per motor rev, so 200 steps per rev of motor x 10 microsteps of drive  = 2000 multiply by gearing of 4.8 = 9600 divided by 256 = 37.5 steps per mm. or if you are setting up in inches it will be 25.4 x 37.5 = 952.5 steps per inch.
Hood
Title: Re: need mach motor tuning explained better
Post by: jimpinder on March 06, 2009, 04:58:02 AM
Bill -

I don't know - my problem is that I am pedantic (that means stubborn Hood). I see most things as black and white, and in the case of the number of pulses it takes to move something 1 unit, then this is one of them. I don't care what the unit is, or indeed any of the other figures, but the final figure must be finite. So - if I have the same components as you, I need the same number of steps as you do, to move one inch - not four or five more or less, the answer is the answer.

Since everything is made to a finite tolerance these days (after Whitworth), this means that all our equipment can be accurate. I could understand where, say, you made your own leadscrew, and were unsure of the final pitch, but that is not so with modern items. The only time I saw this was on the American market recently, when some enterprising sole was selling ball screws said to be 5 turns per inch, when in fact they were imported metric screws at 5mm pitch - and totally ignoring the 0.4 (16 thou) difference.

The facility for measuring, on Mach 3, is one which I have never used, but is an ideal way of checking your calculations BUT you can never be entirly accurate when measuring, even with some pretty good equipment.By this I mean if you have calculated 60,000 pulses per inch and you check by measuring and get the same answer + or - 60 pulses, then you can be sure your 60,000 is accurate - if you only get 45,000 then you have made a serious error somewhere and need to check your figures.

I repeat that this facility cannot be for "tuning" the number of steps per inch, becasue - as I have already said, if I have the same equipment as you, I must get the same answer.

I'll have to post this now, so I can read the rest of the posts

Title: Re: need mach motor tuning explained better
Post by: BClemens on March 06, 2009, 05:17:16 AM
Hi Jim I am running 3 ea Gecko 203V "Vampire Drives"
2 ea G-STEP-II Dual Gecko Stepper Interface Cards
I have a 16 tooth gear and a 16 pitch rack  one rev on the gear appears to move 3.0"
I'm sorry if I sound ??? I just am not understanding the issue sometimes things need time to sink in. I understand the number is not negotiable. I have set up to mills and a lathe with a flashcut system and they are just fine. The rack is kicking me
so when you say 16 tooth and 16 pitch one rev should be 1" that is not the case.
In the mach manual it talks about diametrical pitch
I hope you have enough to help.
Thanks John

John,

Please allow me to help with this (confusion!). If you have a 16 toothed pinion that is 16 Diametral Pitch then the pitch  diameter is 1 inch. So, one revolution of the pinion in the rack would be Pi or 3.1416...traveled. This is why using a rack to transfer precision movements is problematic. Module gearing is somewhat more precise because it is easier to derive a sensible mathematical outcome for these figures.

Thanks Jim. I understand what you say.

Hood, As always, you're a wealth of info for a mere boat yard technician - or is it engineer?
Title: Re: need mach motor tuning explained better
Post by: jimpinder on March 06, 2009, 05:39:43 AM
John - Looking at the Gecko, these are 10 microstep devices, so you have 10 micro steps, then 200 per rev for the motor - this equals 2000. And you said previously you have a 4.8 to one reduction to the final gear wheel.

The problem seems to be calculating how far this will move your table down the rack.

Here we are going to have to impinge on measuring (which I have just pooh poohed in the last post) although I am sure you could tell me the pitch. However, although I don't know where you are, this could be metric or imperial.

What I would do is paint one of the teeth on the rack white, and a slot on your pinion white, or mark with a felt tip pen will do - just so you have no doubt where you started. Enter 9600 in the steps per unit on the Mach motor tuning page, and keep the speed down fairly low, say at 10 units per minute. Keep acceleration at 1 upsps. Then I would try the command on the MDI line (with everything zeroed) of G0 X10 (you seem to have a fairly big table).

The cog should have turned 10 times, and the marked tooth should be back on the bottom. Accurately mark which tooth on the rack the cog has reached, and now measure the distance from start to stop. You can do this with a ruler, since we are looking at 10 times the unit size, and as I said before this should be a fnite number (of some sort). I you lay a tape along the rack, then, as Hood said, the carriage should have moved 160 teeth up the rack (if it is a 16 tooth cog) - what is that distance - 10 inches - fine. If it does not line up with inches - try millimeters - 100, 500.

If it is 10 inches, then your pulses per inch is 9600/10 = 960 (although this seems low, since it gives an accuracy of less than a thou) - but you get the general idea.
Calculate your pulses to give one turn of the final cog, then if you are saying there are 16 teeth on the final cog, then what is the distance between 16 teeth- because that is your unit - if you get that far, converting into inches or mm's is just maths.

Title: Re: need mach motor tuning explained better
Post by: jimpinder on March 06, 2009, 05:55:09 AM
Bill, you typed your last post while I was replying to John -

You are getting confused with pitch diameter, and all the other measurments there are for cogs. They are very simple. The number of teeth. The other measurements are included for us so that, for example, I make gearboxes for my trains. I need to know the ptich diameters of gears so that I can drill the centres for positioning the gears the correct distance apart. I need to know the overall diameter of the gears so I can machine clearances. However, the working part of the gear is the number of teeth.

If you have  two gears, one with 10 teeth and one with 20, and mesh them, the small one has to turn twice to drive the large one once. If you convert the large one to a flat rack, the small gear, if it turns twice, will move along the rack by 20 teeth - it doesn't matter what physical size the gear is. If you then measure the distance on the rack between 20 teeth, that is the distance travelled. If we assume the teeth are uniform, which most are, then the centre of one tooth to the centre of the other will be the same along the rack, and through all the teeth, so wear or shape does not matter.
Title: Re: need mach motor tuning explained better
Post by: Hood on March 06, 2009, 05:56:35 AM
I don't know - my problem is that I am pedantic (that means stubborn Hood).

Well Jim, I was sure it meant something else (http://forums.pcper.com/images/smilies/extras/yllol.gif)

Hood...for a mere boat yard technician - or is it engineer?
Neither, an ex North Sea Fisherman, have done a few other things but thats what I have done the most of.
Hood
Title: Re: need mach motor tuning explained better
Post by: BClemens on March 06, 2009, 06:16:07 AM
Bill, you typed your last post while I was replying to John -

You are getting confused with pitch diameter, and all the other measurments there are for cogs. They are very simple. The number of teeth. The other measurements are included for us so that, for example, I make gearboxes for my trains. I need to know the ptich diameters of gears so that I can drill the centres for positioning the gears the correct distance apart. I need to know the overall diameter of the gears so I can machine clearances. However, the working part of the gear is the number of teeth.

If you have  two gears, one with 10 teeth and one with 20, and mesh them, the small one has to turn twice to drive the large one once. If you convert the large one to a flat rack, the small gear, if it turns twice, will move along the rack by 20 teeth - it doesn't matter what physical size the gear is. If you then measure the distance on the rack between 20 teeth, that is the distance travelled. If we assume the teeth are uniform, which most are, then the centre of one tooth to the centre of the other will be the same along the rack, and through all the teeth, so wear or shape does not matter.

Yes, that is diametral pitch - or modular pitch which are derived the same way. The distance between the teeth or pitch for nonstandard gears is still a factor to contend with. Open out the pitch curve, pitch circle or 'rolling circle' into a rack and the pitch circle becomes a straight line but the distance between the teeth - pitch - remains the same. So as I was saying; that 16 toothed pinion at 16 diametral pitch has a pitch circle of one inch. It's the conversion to or opening out to a rack that becomes an indefinite figure - rounded to 3.1416 in the diametral or inch method. I brought this up because John mentioned a 16 DP, 16 toothed gear....

Do you recall the gear hobbing machine that a modeler in the UK designed years ago? The first one was built of pieces of barstock and structural shapes - angle and channel then castings were made of the machine and it was offered as a rough casting set. I still use the one I built back in the early 70's. I like gears, and the more angle of contact - the better I like them. I've made cutters for helical gears and cut them on this machine.
Title: Re: need mach motor tuning explained better
Post by: jimpinder on March 06, 2009, 12:10:34 PM
Yes - I agree with you, the ptich circle is a crucial measurement - but, if you open it out into a straight rack. if the pitch is 16 teeth per inch, then the distance between the tips of 16 teeth is 1 inch irrespective of where the pitch circle is (usually about 1/2 way down the tooth). This is because the tooth is roughly trianglar and therefore the centre point of the tooth will be in the same position for the whole of its depth.

The distance between the tip of the teeth when it is  in a circle or pinion will be in excess of this, but as you "straighten it out" into a rack, all what were the spokes of the wheel become vertical and parallel, and therefore all the same distance apart.

In the diagram you have posted this shows the distance between the teeth is regular - and is equal to the pitch circle of your cog. What is crucial in this debate is - what is the distance between the 16 teeth (on the rack)
Title: Re: need mach motor tuning explained better
Post by: BClemens on March 06, 2009, 12:59:30 PM
In the diagram you have posted this shows the distance between the teeth is regular - and is equal to the pitch circle of your cog. What is crucial in this debate is - what is the distance between the 16 teeth (on the rack)

The distance would be for the 16 toothed 16 DP gear: 1 inch pitch diameter X Pi = total distance for one revolution of the pinion on the rack = 3.1416; so Pi /16 = .1963 (16DP) between teeth (same as it is in the pitch circle and pitch diameter).

If the pinion were 20 teeth with the same diametral pitch (16), the pitch dia would be 1.25" so the distance for one revolution of the pinion on the rack will be Pi X 1.25" = 3.927" and the same .1963 (16DP).

It is in very rare cases that these figures among DP gears will equal an even number.

The tooth is divided on the pitch line or pitch circle with the addendum =1/DP and the dedendum = 1.157/DP with a working depth of 2 X 1/DP and the clearance is .2/DP    ---     that's all I can remember.

Bill C.
Title: Re: need mach motor tuning explained better
Post by: Mainer on March 06, 2009, 02:01:48 PM
".... then the distance between the tips of 16 teeth is 1 inch irrespective of where the pitch circle is (usually about 1/2 way down the tooth)."

No, that is incorrect. A 16dp gear with 16 teeth is 1" in DIAMETER. The CIRCUMFERENCE occupied by 16 teeth is pi*D, so 16 teeth occupy a distance of 3.14159.... inches.

Title: Re: need mach motor tuning explained better
Post by: Overloaded on March 06, 2009, 03:49:15 PM
Quote
A 16dp gear with 16 teeth is 1" in DIAMETER
.................has a pitch diameter of 1".....not th OD of the gear.
RC
Title: Re: need mach motor tuning explained better
Post by: BClemens on March 06, 2009, 04:37:36 PM
John,

Now with all this gear stuff straight in your mind, go back to Jim's first response post to you and it will all fit. Use what you know about these gears and racks and do the math that Jim explains.

Bill C.