Hello Guest it is September 22, 2021, 10:28:28 AM

Author Topic: My first servo conversion, Tuning advice needed.  (Read 6079 times)

0 Members and 1 Guest are viewing this topic.

My first servo conversion, Tuning advice needed.
« on: June 05, 2008, 05:25:58 PM »

Hi, Just need to pick someones brains on a problem I have.

I'm in the process of a mill servo conversion and have completed the X axis.

I spent some time tuning the Gecko G320 and started tweeking the Mach3 accel and
velocity settings. I calculated that I'd need to set the kernal speed at 100k as my
max theoretical pulse speed being 128kHz

I set the required "steps per" and the velocity to a brave but safe setting and tryed
it out jogging from the keyboard arrow keys. The servo drive faulted and so half an hour
fiddling with the accel and velocity settings, I got the servo working a treat using the
jog keys.

Then using the MDI, I commanded a few G0 X50 and then G0 X0 and every time the drive
faulted right at the end of the move.
Even moderate velocity settings and accel setting of less than 1.5 seconds faulted the drive.

I then reduced the kernal speed to 75k and started tuning the servo again using a looping
code G0 X50 , G0 X0. I found that the max settings that worked without faulting the drive

velocity setting of 2800 and an accel of 200

This setting is about half the max rapid traverse I wanted and planned for so I'm scratching
my head right now.

The one thing I noticed is that the drive only faults on the end of a move and only when
using the MDI or running code, To see how far from the end I reduced the accel settings
until I could hear the motor winding down and it faults about halfway in the decel stage.

Question 1, Is this what you would expect to see from just an out of tune servo. Is more tuning required.

I got to thinking that maybe there just isn't enough power in the servo so I reset the
velocity and accel to those mentioned above and ran the looping code for about 5 minutes
just to see that everything is running fine.

Still having the axis locks attached to the machine I used them to increase the friction on
the table ways, I didn't want to go too mad but to a point where I couldn't turn the 90mm
timing pulley on the end of the ballscrew by hand. I used the MDI to command a G0 X50 and
expected the drive to fault straight away.

It didn't. I could hear that the servo was working harder but it went to X 50 just fine.
So I commanded a G0 X0 and it went back again ok.

Not wanting to stress anything too much I declared that theory well and truly unfounded.
The servo,power supply is more that capable of driving a heavier load.

More head scratching and so I kept the same settings and changed the kernal speed to 100k.
Faulted every time.

So I am now thinking that the problem may be the computor is the culprit, it is only a
1.2ghz Athlon.

Question 2, If I can set high velocitys and jog using the keys without faulting the
drive, but when using the MDI or running code I have to set lower velocitys without
faulting, basicly the computer is doing more work and not keeping up. Could this be the problem.

I have noticed that the gain setting on the drive doesn't seem to do much visually to the
motor although some settings are better than others, I have it set just over half way.
I'm under the illusion that more velocity will require more gain. Is that right?

The damping setting however, if I reduce the pot counter clockwise from it's
position (about 1/3 way round) sets the axis vibing like a table being dragged across
a polished wood floor.

If anyone has an idea where I should be looking to achieve higher velocities or answer the few questions above I'd be grateful. Relevant specs of the axis below.

Athlon 1.2ghz ,256m memory, 200FSB Running latest version of Mach3 only.

Drive             Gecko G320
Powersupply       Dc 74v 750W

Motor             PM ordinary motor
Motor Max V       96v
Motor Max speed   5000 rpm
Motor power       8A - 500W

(Note max speed from motor using 74v power supply is 3854rpm)

Encoder           QEDS type
Resolution        500 ppr

Drive reduction   4-1
Ballscrew         25mm dia 5mm pitch

Axis table        800mm x 240mm x 60mm


Offline comet

  •  325 325
    • View Profile
Re: My first servo conversion, Tuning advice needed.
« Reply #1 on: June 06, 2008, 08:07:17 AM »
   On your set up I would say that you really need the g340,because you require two many pulses.
I would be wary of using above 35k on you computer.
you can uprate your 320 by buying the encoder step divider board from gecko.
  I had a mill with a similar set up to yours except gearing 3;1 reduction and I had to use  2;1 encoder step reduction.
Beware of using  encoder step reductions of above 5:1 especially on high feed rates such as on a router.
Download the g340 manual for a better understanding.
otherwise your setup looks fine.
« Last Edit: June 06, 2008, 08:11:28 AM by comet »
Re: My first servo conversion, Tuning advice needed.
« Reply #2 on: June 06, 2008, 10:52:28 AM »
Hi Thanks for posting, I take on board that I could have gone for 3;1 reduction on the pulleys that might of helped but
Building the best I can afford, I still want a high resolution and speed (dont we all, LOL).

I turned my attention to the computer today and using a scope, looked at the printer port waveform at the max velocity
the drive will run ok. The pulses looked awful, deformed rounded edges and leaning. I slowed the pulse rate and the pulses started looking a bit normal again.

I took the belt off the motor so I had only the motor to listen to whilst fiddling with settings and when jogging in either direction there is a rythmic thump sounding in the motor about once a second. Raising or reducing the jog speed does not alter the once a second thump.

I have no idea what that is, but i'm betting it's coming from the printer port. So first thing to do is upgrade the processor and maybe put a better motherboard in it.

Would it be advisable to purchase on of those plugin pci printer ports that output speeds over 100khz or would a standard port do it as long as the cpu is capable?


Offline Hood

  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: My first servo conversion, Tuning advice needed.
« Reply #3 on: June 06, 2008, 01:26:35 PM »
You might want to look at a SmoothStepper, more expensive than a parallel port card but would give you the resolution and a super nice silky smooth pulse :)


Offline jimpinder

  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: My first servo conversion, Tuning advice needed.
« Reply #4 on: June 06, 2008, 01:45:25 PM »
Check that the SmoothStepper - a new plug in for Mach 3 - which runs from a PC via your USB port - will not give you the additional speed you need.

The SmoothStepper has it's own bult in pulse generator, and does not rely on the P.C.

Generating the extra pulses may be a better idea than step reduction.
Not me driving the engine - I'm better looking.
Re: My first servo conversion, Tuning advice needed.
« Reply #5 on: June 06, 2008, 08:51:01 PM »
Hi, yep I was pretty much sold on the Smoothstepper, good idea. Once I've sorted the other axis (axii?) I'll be investing in one.

Thanks for all the advice guys.

Cheers John.

Offline Chip

  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: My first servo conversion, Tuning advice needed.
« Reply #6 on: June 07, 2008, 03:25:56 AM »
Hi, John

Make sure when you use the arrow keys that you set the Program Run screen, Feed-rate to above the value in Motor Tuning, Velocity setting and that your Slow Jog Rate is set to 100%.

Shift + Arrow keys & MDI G00 moves by-pass the feed-rate value and Jog % settings.

Re-Start & Motors Re-Tuning is required after kernel speed changes.

Just Some Thought's, Chip
Re: My first servo conversion, Tuning advice needed.
« Reply #7 on: June 07, 2008, 07:36:05 AM »
Hi, Sure thats another thing I need to do, I've been mainly using Mach with a lathe so the milling screen is a bit new for me. I'll check those settings.

I spent most of yesterday running code. I loaded the roadrunner code and ran that, adjusting the scale several times and the axis performed very well. I did notice that at some low rpms there was a vibration on the table. I expect I still need to tune the Gecko.

Problem being is that Gecko have missed a trick here.

I'm probably like most other diy cnc builders, I mount the drive on good heatsink with a nice coating of thermal paste. It's in an enclosure which doesn't have alot of space, all nice and secure for the first switch-on.

Then once you've pushed the switch and nothing has gone bang you set about fiddling with the tuning controls on the drive.
After a few hours mucking about with it and not getting it spot on you realise that this is the time to read the Gecko tuning instructions a little closer.

I now realise in order to get my oscilloscope connected I have to remove the cover which now entails de-wiring the drive because I cannot get my fingers under the connector blocks to pull them off the circuit board pins (don't want to bust the circuit board do I).
Then I'm confronted with the task of removing the thermal goo, get the cover off remount the whole thing and then once you're happy with tuning, do it all again to put the cover back on.

Why oh why hasn't Gecko put a small plug socket at the rear of the drive for the setpoint measurment. I would have be quite happy to pay an extra few bob just for the convenience.

So at the moment I'm still at the stage I'm confident i'll persevere manually twiddling in the hope I get it tuned right.
Who knows.

I've just picked up an Athlon XP2700 cpu for a tenner (good old Ebay) and with a spare motherboard I have, should provide a massive upgrade computer wise.

I should see better high speed pulses. If this makes a small difference to the rapid jog without faulting I'll post the results here for all.

Re: My first servo conversion, Tuning advice needed.
« Reply #8 on: June 10, 2008, 01:43:08 PM »
Well I just come in from the workshop after fitting the new XP +2700 processor and a PC-Chips M848 mobo into the setup.

First thing I noticed was now I can move the axis without faulting on the 100kHz kernel speed. I reconfigured tuning the axis and now I can jog and MDI at 3.2 meters a minute instead of the old 2.8 m/min without faulting the drive.

Not alot of increase you might say, Yes I was suprised considering almost doubling processor speed.

I guess the computer hardware will never be upto outputting clean high speed pulses which is why the good folks have provided us with the Smooth-Stepper.

Still I think 3.2 meters/min is a reasonably fast rapid for a mill that has an X axis traverse width of only 400mm.

I'm going to get the rest of the machine done and if I've got spare cash at the end I might treat myself to one of those Smooth-thingy's.

Cheers all.


Offline Hood

  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: My first servo conversion, Tuning advice needed.
« Reply #9 on: June 10, 2008, 05:33:17 PM »
Nice one John, my Bridgeport only does 2500mm/min so you are up on me but its just steppers, the new mill I am working on at the moment has a much bigger travel on all axis but it will have servos and I am planning on 10m/min but 20 should be attainable if I am feeling bave :D