# Thread: Q: Motor tuning. Servo/Encoders

1. ## Q: Motor tuning. Servo/Encoders

Hello,

I tried to look this up, but didn't seem to have much lock.

How do I calculate the information needed for the motor tuning page.

I have 250oz servos, equiped with 300CPR encoders.

They are attached to 5mm ballscrews.

How do I calculate my "steps per" Velocity and Acceleration?

Finally have my machinics all done, trying to get mach 3 setup so I can watch the machine make magic.

2. Hi Deviant,

If you don't have any belt reduction or anything between your motor and screw and you have a servodrive with 4X quadrature decoding (most common) you get 1200 steps per rev. So 1200 steps will give you 5mm and 240steps will give you 1mm...(1200 / 5 = 240)

The acceleration and velcoity tuning is mostly done by trial and error.

Have you looked at the Setup Tutorial on the MachSupport website? It should cover pretty much everything.

/Henrik Olsson.

3. Awesome, that's what I was thinking... but I wasn't 100%...

I've been out in the garage driving the axis around. *grins*

I have a 2to1 on the zaxis. I'm going to assume that it would 480 steps to go 1mm on the Z?

4. Yes, 480 would be right for the Z axis.

Basicly it's A * B * C / D where
A is the number of lines on encoder
B is decoding scheme of servo drive, usually 4
C is reduction ratio
D is screw pitch in mm/rev

So in you your case with the Z axis:
300 * 4 * 2 / 5 = 480

Have fun!

• Any ideas on how to calculate the velocity/acceleration?

Currently, I have the steps per set to 240 on the x/y.

I have the velocity/acceleration set to the max, which is somewhere around 6000.

Little mill will scoop back and forth. But what should I be using?

• There's really not much to calculate. You just start out with quite low values and work your way up until either you or the machine can't take it anymore ;-) If you have a servodrive where you can monitor following error you can use that to determine if you have the accelration set to high but other that that it's just trial and error.

The speed you set in the motor tuning is the rapid speed. When you are machining you set speed with the F word, something like:G1 X25 Y10 F75 will move the machine to X25, Y10 at a speed of 75mm per minute.