Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: studysession on December 18, 2010, 04:24:18 PM

Title: Help needed
Post by: studysession on December 18, 2010, 04:24:18 PM
Hi -

I am not new to CNC but I am new to setting up some of these settings in Mach3. How do I calculate steps per inch in Mach3? I am not getting accurate when I use the setup wizard thing.

I have a DIY cnc machine

My board is set to FULL step

1/2" 10 tpi ACME screw rods.
Direct drive
Kelling KL23H276 bipolar stepper motor
NEMA 23
Dual Shaft  Front shaft=1/4" x 7/8"  Back shaft= 1/4" x 5/8"
200 steps per revolution
1.8 degrees per step
No. of wires=8
Bipolar series Volts=3.86,  Amps=2.1, Ohms=1.84, Holding torque=2.0 Nm. 0r 282 oz-in
Bipolar parallel Volts=1.93, Amps=4.2, Ohms=.0.46 Holding torque= 2.0 Nm. or 282 oz-in


THANKS
Title: Re: Help needed
Post by: Hood on December 18, 2010, 04:42:18 PM
Ok, one bit of info missing is what the microstepping is that you have the drives set to.

How it works is this
200 steps to turn the motor one turn in full step but as you will have some microstepping you need to multiply by that to get the amount of steps to turn the motor one turn. Say you have the drive set at 8 microsteps (sometimes written as 1/8 or also sometimes 1600 on the Chinese drives) That would mean to turn your motor 1 turn it would require 200 x 8 = 1,600 steps. Because you are direct drive that rotates your screw one turn but as you need to turn it ten times for 1 inch (10TPI) it means 1,600 x 10 = 16,000 is your steps per inch.
Hood
Title: Re: Help needed
Post by: Hood on December 18, 2010, 04:44:23 PM
OOPS I need to learn to read, I see you have it in bold that it is full step, so 2,000 is your steps per.
Suggest however you set to 8 or 10 microsteps as you will get much better motion.
Hood
Title: Re: Help needed
Post by: studysession on December 18, 2010, 04:46:47 PM
I have it set to 1 FULL step -
I have options for 1/8 or 1/2 and something else, but left at 1 FULL step.

What is better - Should I change it 1/8 or something else? Is one better than the other?
Title: Re: Help needed
Post by: studysession on December 18, 2010, 04:47:26 PM
Thanks Hood -

This helps a lot.
Title: Re: Help needed
Post by: Hood on December 18, 2010, 04:49:13 PM
1/8 is probably your best bet and should give you smoothest motion, Geckos say 10 is the optimum if I recall.
So if you set to 1/8 your steps per will be 16,000
If 1/4 it will be 8,000
If 1/2 it will be 4000
If full it will be 2000
Hood
Title: Re: Help needed
Post by: studysession on December 18, 2010, 04:50:59 PM
Thanks!!!!

How does velocity and acceleration affect steps or does it even matter?
Title: Re: Help needed
Post by: Hood on December 18, 2010, 04:59:46 PM
It doesnt really, obviously if you have either the velocity or the Accel set too high your motor will stall and you may actually get higher on both of them with 1/8 stepping than you would with full stepping.

What the steps per do affect is the max velocity you can run at a certain kernel frequency in Mach.
For example if your steps per were 10,000 and the kernel was 25KHz you could theoretically get a max rapid speed(Velocity)  of 25000/10000=2.5 inch per second or 150IPM
If your steps per were 25,000 and kernel was 25KHz that would mean 1 inch per second or 60 per min.

Dont however set the kernel higher than you need as it may impact on your computers stability.
Hood
Title: Re: Help needed
Post by: studysession on December 18, 2010, 05:02:29 PM
I have always left it at the default because I never knew what to change or what I can change things to.
Title: Re: Help needed
Post by: studysession on December 18, 2010, 05:03:35 PM
Thanks again!!!
Title: Re: Help needed
Post by: Hood on December 18, 2010, 05:09:53 PM
I think 25KHz should be fast enough for you even at 1/8 microstepping as that would mean you could achieve (25,000/16,000) x 60 = 93.75IPM.
If you find your motors are fine at that max Velocity and you want more then you can increase the Kernel to 35KHz and that would allow a theoretical max Vel of (35,000/16,000) x 60 = 131.25IPM

45KHz would  allow a max of 168.75
etc etc
  45KHZ may be the max your computer is happy at, some people can easily run 60KHz or even 100KHz but others can get unstable at anything over 25KHz.
Hood
Title: Re: Help needed
Post by: studysession on December 18, 2010, 06:31:35 PM
Thanks again -

With 1 FULL STEP and all the other stuff mentioned before - I am usually right under an 1/8" short almost every time. Frustrating
Title: Re: Help needed
Post by: Hood on December 18, 2010, 06:45:52 PM
Increase the pulse width and Dir Prechange  to  5 and see if that helps, they are on Motor Tuning page.

One thing though, is it always 1/8 inch off, for example if you command a 1 inch move does it go 7/8 and if you command a 2 inch move does it move 17/8 or does it move 13/4?
Hood
Title: Re: Help needed
Post by: studysession on December 18, 2010, 07:21:09 PM
Man this is so much fun.... :)
I did not change anything....
Anyway - I do not know if it is my Y or X axis because I did not mark the material. I cut a 2"x2" square and it ended up being 2" exactly on one side and 1.98" on the other side.

That is pretty close. :)

Is it worth trying any further or do you think that is close as it gets?

Thanks -
Keith
Title: Re: Help needed
Post by: Hood on December 18, 2010, 07:35:31 PM
Depends on the machine, for a metal working machine that would be a massive error but on a wood working machine it may not matter.

Could it be backlash on the axis that is coming out small?
How to test is move the axis in a positive direction by jogging then zero the DRO for that axis now move via the MDI line by typing G0X1 (or G0Y1) and see if it moves the full 1 inch. If it does then command a G0X0 and see if it is off. If it is then it is definitely backlash.

How you will actually measure the distance travelled depends on what you have available, dial gauge is good. If however you dont have one  you could move positive, zero the axis and then lower the Z and bore a hole in some material then raise Z and command the 1 inch move then   command the move to back to zero and lower the Z again, you will see if its going in the same hole or if its off a bit.
Hood
Title: Re: Help needed
Post by: studysession on December 18, 2010, 07:36:39 PM
Just did a couple of wooden gears.   :)
Title: Re: Help needed
Post by: studysession on December 18, 2010, 07:38:24 PM
Thanks Hood!! Will try those steps.

I appreciate all the help.
Title: Re: Help needed
Post by: Hood on December 18, 2010, 07:38:43 PM
Looks good :)
Hood