Hello Guest it is March 28, 2024, 09:57:56 AM

Author Topic: servo motor tuning help needed!  (Read 1143 times)

0 Members and 1 Guest are viewing this topic.

servo motor tuning help needed!
« on: May 07, 2022, 05:31:28 PM »
Hi there
I have been trying to retrofit an espirit lightning plasma table using a csmio ip/a motion controller and i have to say i have gotten on better than i thought i would ;D

I had quite a number of small issues along the way, but i have managed to get x and y axis moving,
The Y axis auto tuned pretty good (max error 140 at 200mm per minute set in motor tuning, not sure if that is any good or not!) but auto tune sends the X axis all over the shop,

Part of the reason is because i fiddled with the pots on the servo drive card itself, but didnt on the Y axis,
I have a manual for the servo drives (digiplan UD12) but the settings in the manual dont match up to what i have on the drive,

The other problem i think might be the motor settings in mach 3, i dont know exactly how to get the correct 'steps per'
My encoders say they are 500ppr, they are fitted on the gearbox spindle not the motor spindle itself, not sure if that makes a difference.
The gear reduction is 15:1, the motor max rpm is 4700,
feed is (fairly accurately measured:laughing: ) 12mm per motor rev, or 180mm per pulley rev for the Y axis
and 8mm per motor rev or 120mm per pulley rev for the X axis
Anyone able to help me calculate steps per?

also, is it normal for the axis to overshoot and bounce back when you are jogging it around? or should it stop dead?
Im new to this so sorry for the million stupid questions!!
Any other tips for motor tuning greatly received!!

cheers!!

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: servo motor tuning help needed!
« Reply #1 on: May 08, 2022, 02:01:51 AM »
I am assuming you are using Mach3. Section 5.5 of the Mach3 Mill Installation & Configuration manual should provide the information you need to check and setup your Steps per Unit and adjust your Motor Tuning.  https://www.machsupport.com/wp-content/uploads/2013/02/Mach3Mill_Install_Config.pdf

Hope this helps.
PEACE
Re: servo motor tuning help needed!
« Reply #2 on: May 08, 2022, 06:34:05 AM »
That gives me some very interesting reading!! thanks very much!

i will report back with how i get on!
cheers
Re: servo motor tuning help needed!
« Reply #3 on: May 08, 2022, 07:50:15 AM »
I am getting confused with my maths here and wondered if you can help,
I have calculated my motor revolutions per unit (in mm) to be 0.13, after the 15.1 gear box and taking into account the rack and pinion,
This actually tallies up quite well with my rough measurements earlier of 8mm of travel per one revolution of the motor shaft,
The next bit is confusing me know though, as my encoder (500ppr) is after the gear reduction of 15.1, do i need to multiply that by 15 to get it in line with the motor shaft?

cheers!

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: servo motor tuning help needed!
« Reply #4 on: May 08, 2022, 10:46:21 AM »
Quote
The next bit is confusing me know though, as my encoder (500ppr) is after the gear reduction of 15.1, do i need to multiply that by 15 to get it in line with the motor shaft?

I would think so.

You could avoid the math calculation by using the Axis Calibration facility (Set Steps per Unit) which is on the Mach3 Settings page. Specify a reasonable distance of 300mm perhaps and check the distance moved against a rule. The instructions for use are all presented on-screen once you have clicked the button.
PEACE
Re: servo motor tuning help needed!
« Reply #5 on: May 08, 2022, 04:52:37 PM »
Hi,
in contrast to Tweakie I've always used calculation to arrive at the Steps per Unit value. If you find the calculation too confusing then the 'suck it and see' approach
works really well.

Quote
The next bit is confusing me know though, as my encoder (500ppr) is after the gear reduction

To clear some confusion, (or perhaps make it worse!) a 500ppr encoder means that the optical disc has 500 lines in the A channel and another 500 lines in the B channel.
If you observed either channel and rotated the motor one revolution you would indeed get 500 pulses. The two channel lines are in phase quadrature to each other so when
they are combined they constitute a 2000 count per revolution encoder, that is 500 x 4.

If you want to provide a few more details like the rack and pinion I may be able to help you calculate the Step per Unit value. It would certainly be close enough for an initial guess for
the method Tweakie advocates.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: servo motor tuning help needed!
« Reply #6 on: May 09, 2022, 08:40:51 AM »
Ok well, i did some maths and some measuring!
here is my working if you want to have a look over for interest,

rack is 5mm pitch with a 23 tooth pinion
so shaft revs per unit is 1/(5x23)=0.008696...
but that is at the pinion shaft, so times that by 15 of the reduction gearbox to get the motor shaft revs per unit, ends up at 0.13044.
to get my feed per motor rev I did 1/0.13044 that got me 7.7mm, which was very close to my turn the motor 1 rev by hand and measured 8mm with a crappy set of calipers!
I then got encoder steps per motor rev, so 2000/15 (the gear reduction between encoder and motor) = 133.33,
then for some reason i did encoder steps per motor rev/feed per motor revs ;
133.33/7.7 = 17.3 being my steps per number...

does that working look right?!
any way, i have played around with a dial indicator and with that 17.3 number it is within 1thou of a mm over 5mm.

as for the Y axis i actually tried the auto steps per calibration and it got it to the same tolerance,
I need to try and measure both over a much bigger distance but i was reasonably happy with that for now.

The only issue i have though is when i go into the PID tuning within the csmio plugin and use the move axis function it seems off? only moves 2mm when i tell it to move 5mm

any thoughts on where i go from here?

thanks very much by the way, you have all been a great help so far!!
cheers

Re: servo motor tuning help needed!
« Reply #7 on: May 09, 2022, 04:24:20 PM »
Hi,
your calculation is close, but I think you have include the reduction (15:1) twice.

Quote
rack is 5mm pitch with a 23 tooth pinion
so shaft revs per unit is 1/(5x23)=0.008696...
but that is at the pinion shaft, so times that by 15 of the reduction gearbox to get the motor shaft revs per unit, ends up at 0.13044.
to get my feed per motor rev I did 1/0.13044 that got me 7.7mm, which was very close to my turn the motor 1 rev by hand and measured 8mm with a crappy set of calipers!

Yes that is correct. One motor shaft revolution results in 7.7mm movement, that sounds about right.

Quote
I then got encoder steps per motor rev, so 2000/15 (the gear reduction between encoder and motor) = 133.33,

No, this is not right, one motor shaft revolution requires 2000 pulses, but you have already included the gear reduction in the gearbox calculation. So the value you want is:

Steps per Unit=2000 / 7.7
  =259.74

Just as a reality check: if Mach/BoB supplies 260 pulses then the axis would advance 1mm....does that sound right? It does to me. That also means that the smallest step Mach can make
is just one step or 1/260 =0.00385mm or 4um approx. That is your resolution, and that's pretty damn good.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: servo motor tuning help needed!
« Reply #8 on: May 09, 2022, 06:41:33 PM »
Wee update again,
been playing around some more, figured out a way of measuring the axis movement, fairly advanced.. its a sharpie line and a tape measure.... :D  i am getting reasonable and repeatable results now though, and i am pretty bloody accurate over the 3 meters of x axis travel,
Interestingly enough i got there using my calculation of 17.3 steps per to get it close, then with quite some trial and error i have ended up at 17.43,
I actually havent tried it at the 260 ish mark, but i must have been right with where i included the gear reductions

Anyway, i will have a go at tweeking the Y axis in tomorrow,
I also managed to get the homing working perfect today which is rather satisfying!!

cheers for you help again!   
Re: servo motor tuning help needed!
« Reply #9 on: May 09, 2022, 06:52:00 PM »
Hi,

Quote
Interestingly enough i got there using my calculation of 17.3 steps per to get it close, then with quite some trial and error i have ended up at 17.43,
I actually havent tried it at the 260 ish mark, but i must have been right with where i included the gear reductions

Quite agree, 'the proof of the pudding is in the eating', and if 17.43 is what makes your machine tick then that's what it is.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'