PDA

View Full Version : Motor Speed Problems.....



Fish4Fun
04-20-2011, 09:33 AM
First let's start with the configuration:

PC: New
OS: Win7 Ultimate
Application: Mach3
Controller: G540
No Current Limit Resistors
"Trim" adjusted as per G540 Instructions
Charge Pump HAS to be disabled for "Green Light"
Steppers: KL23H2100-35-4B
PS: Sola SFL12-48-100 (48V 12A)
Router: MicroCrave A4 w/12TPI Acme Lead Screws
Mach3 Settings:
Motor Tuning:
24k steps/inch

Now, the "problem": I am getting "stepper freezing" and "lost steps" at various feed rates. I have adjusted the motor tuning feed rate from 20IPM to the default 60IPM. In general I get pretty good results at feed rates of <20IPM, but this seems awfully "slow". Running some "test gcode" of s simple Box with an "X" through it and a circle around it, I will occasionally get good results @ up to 35IPM, but more frequently either the X, Y or Both will "freeze" during the run. To get back to "Home" will take between 0.01in and 3in. At 25IPM the same "test" generally has considerably less error, and will run w/o error ~ 25% of the time. At 20IPM the test pattern runs correctly 90% of the time (No Errors); when there are "errors" they are generally small (<0.01in). At 15IPM I have not noted any errors.

The problems can be tested directly using "jogging" in "cont mode". Everything works well all the way up to the 60IPM maximum for some period, then suddenly the stepper will "lock". Sometimes a full travel of the axis will go w/o a hitch, then it will "lock" almost constantly. As the feed rate is decreased the success ratio improves, but the results are inconsistent at best.

I have run DriveTest.Exe and it stated "system excellent" and showed a max deviation of < 10uS with most max deviations < 1uS (this was visual observation over a few dozen "runs").

My Questions:

1) Where do I start looking for the problem? Should I start with the PC, the PS, the G540 or Mach3? (I simply cannot believe I am having trouble with 3 new steppers, though I do have some other steppers I could test).

2) What would a reasonable feed rate to expect reliable results from? Here is what I come up with:



12 Rev/in * 200 Steps/Rev * 10 Steps/Step = 24k Steps/in

14k Steps/in * 60in/min * 1/60 min/second = 24,000 Steps/s = 24kHz (~41uS)

24,000 Steps/Second * 1/2000 Rev/Step * 60Sec/Min = 720RPM



There is not a torque curve posted for the KL23H2100-35-4B that I could find, is it possible that 720RPM is just too fast? If so, is 180RPM really the best I can hope for reliably?

Thanks for taking the time to read this, hopefully I have made some NEWBIE mistake....

Fish

ger21
04-20-2011, 11:53 AM
I'd expect to be able to get about 1000rpm or more with that setup. What kernel speed are you using, and what is the pulse width in motor tuning? Try upping it to 10-15.

Fish4Fun
04-20-2011, 12:17 PM
Gerry,

Thanks for the Response! Kernel speed = 25kHz.

Pulse Width WAS 5uS (Default). I tried 10uS & 15uS, still problems @ 30ipm.

Do you think it would be worth the effort to take one of the steppers off and try it w/o the table connected? When I set it up, all axis moved freely, but I guess it is possible I knocked all three axis out of alignment....except the "freezes" occur randomly along each axis, and work fine after pause or direction change...

Edit: Just tried Kernel = 60kHz. Still having problems :-( (Yes, I re-booted).

Again, Thanks for the reply!

Fish

ger21
04-20-2011, 05:55 PM
I'd try to set the kernel at either 35 or 45 Khz. Make sure you redo your motor tuning after changing the kernel speed. 25Khz will only allow you 60ipm max. You should be able to get a bit more than that.

disconnecting the motors is not a good idea, as motors not mounted to anything can run worse, due to resonance.

Try using Sherline mode.

When you did the driver test, was it a flat line, or were there a lot of spikes?

Also, with power off, can you turn the screws by hand? You should be able to fairly easily with just your fingers.

Fish4Fun
04-21-2011, 08:28 AM
Gerry,

Thank you so much for your responses!

Driver test shows very small "spikes" occasionally (I wouldn't have noticed them if I weren't looking for them). It takes the driver test a few seconds to respond to speed changes...that is from 25khz to 35 khz takes 1-3 seconds to "stabilize". During this period the "bar" turns red or yellow stating "System Pulsing Too Slow" or "System Pulsing Too Fast". After the "settling period" the driver test shows "System Excellent" until the test completes.

I am REALLY struggling here. Against advice, I dismounted the x-axis motor. The lead screw turns MUCH easier than the "detent torque" of the stepper ; that is, with the stepper connected to the lead screw, but "unmounted", turning the entire motor results in lead screw movement w/o turning the motor shaft relative to the motor. (I hope that made sense). The primary resistance is the motor "detent torque" itself by a considerable margin. I am going to ASS-U-ME that the problem is NOT in the axis itself, but is most likely in the motor/driver/PC.

I am an absolute NEWBIE to a "real" set up, I am quite familiar with stepper theory, electronics and PCs, but this is the FIRST "real" set up, so I am perfectly capable of making silly mistakes, so please DO NOT assume I have not have made stupid ( (chair) ) errors!

I tried "Sherline Mode" as per your request, if there is a difference I cannot distinguish it. I changed kernel speed to 45khz, again, if there is a change I cannot distinguish it. (In both cases I still get frozen steppers and missed steps seemingly randomly).

Sadly my DSO is on the fritz, so I cannot currently check the actual voltage/timing of the LPT port, but should I worry about the LPT port voltage? The MOBO is a GIGABYTE GA-G41M, the specs state the LPT port is 100% EPP V1.7 & 1.9 Compliant (it uses the iTE IT8718 controller, a fairly standard I/O controller). In general when using the LPT port for I/O using 10k "pull-up" resistors is considered "good practice", should I consider adding these and/or an active buffer between my LPT port & G540, or am I just grasping @ straws?

While I have NO reason to suspect my power supply, should I consider adding some capacitance close to the G540? I am using 16ga stranded speaker wire from the PS to the G540 (less than 3ft). I have some 63V 10,000uF Capacitors on hand...though the power supply has 6 * 680uF 200V (~4,000uF) capacitors in its output filter. (Again, grasping @ straws?).

LPT Port Settings:
BIOS ==> LPT = EPP

OS Driver Settings:
"Never Use Interrupts" = True
"Enable Legacy Plug & Play Detection = False
Port Number = LPT1
I/O Range = 0x378-0x37F

I am doing my best to fully test all of your suggestions so far; I cannot help but think I am missing something very simple, but what that might be eludes me! Any thoughts you, or anyone else has would be much appreciated!

Fish

Jay C
04-22-2011, 02:50 PM
Gerry,
I am REALLY struggling here. Against advice, I dismounted the x-axis motor. The lead screw turns MUCH easier than the "detent torque" of the stepper ; that is, with the stepper connected to the lead screw, but "unmounted", turning the entire motor results in lead screw movement w/o turning the motor shaft relative to the motor. (I hope that made sense).
Made sense to me, now did you wire the steppers or were they pre-wired? If the former, then did you maybe mix the phases or have a short. Is it only one motor?

Also, just a clarification, when you say "lock" do you mean stop turn and hold the axis solid so you can't turn it by hand? Or do you mean stopped and squealing like a stuck pig? If the latter, that's a stall and you motor rotor is unable to "catch up" with the stator magnetic field spinning around it. It's not good and may be a sign of an acceleration set too high. I didn't see where you posted your acceleration so please do.

Also, you should try to post a video of the issue too.

Fish4Fun
04-23-2011, 11:33 AM
Jay_C,

Thanks for Posting!

Ahhh, "Stuck Pig" is pretty much what it sounds like, the "result" is a stepper that is "squealing" but NOT moving. This may last for a uS or the entire direction pulse train. "Solid" may be a bit strong because the motor is actually much easier to turn when "squealing" than when in "stand-by" with the G540 "enabled" & no command being executed.

Sadly i have fragmented this thread by posting in this thread: http://www.cnczone.com/forums/diy-cnc_router_table_machines/109390-my_newest_desktop_machine-61.html .

John, the machine builder, seems convinced my problem is with Win7. He has not led me astray yet, so I am going to attack the problem form that direction. I will format a new boot disk w/WXP and re-install Mach3 onto it. I am having a very difficult problem thinking this is a hardware issue, so his thoughts coincide with mine. What I really want to do is replace the PC with a uController that I am in COMPLETE control over, but doing an OS install is quick and easy, writing firmware & building the circuit is 20+ hours of work, and an OS install is an hour or two, so I will take the shorter path.

As far as "Acceleration Settings", I have tried 1IPM to 15IPM settings in Mach3. Even with Acceleration set to 1IPM & the motor "tuned" to 15IPM I get what "sounds like" missed steps. My Dial Indicator is only has 0.001" graduations, and there is certainly some backlash, but repeated 1in "jogs" "sounds" like some run fine, others "miss steps", and the dial indicator shows as much as 0.100in variations when the feed rate > ~20IPM. Even @ 15IPM 10 "jogs" will "go right", but the 11th jog might "miss" by 0.001 or so. What is completely silly is how random the missed steps are. I can do MANY tests w/o ANY problem, then I will "hear" a missed step, and the dial indicator will tattle (Obviously more than a "single" missed step).

Even with an F10 gcode setting my simple "Box w/circle" proggy will loose steps, and end up +/-.010 "off" of original "home" in both Axis.



F10
G1 X-1 Y-1 z-.3
G02 X-1 Y-1 I1 J1
G1 X0 Y-1
G1 X0 Y0
G1 X-1 Y-1
G1 X-1 Y0
G1 X1 Y0
G1 X1 Y-1
G1 X-1 Y1
G1 X1 Y1
G1 X0 Y0
G1 X1 Y-1
G1 X0 Y-1
G1 X0 Y1
G1 X-1 Y0
G1 X-1 Y1
G1 X0 Y0
G1 X1 Y0
G1 X0 Y1
G1 X1 Y1
G1 X1 Y0
G1 X0 Y-1
G1 X-1 Y-1
G02 X-1 Y-1 I.25 J2
G1 X0 Y0


What is completely crazy is that I can "jog" in/out on either axis a large number of times w/o any error, but when I "hear" a missed step(s), the error is ALWAYS there on the dial indicator. If the problem were consistent I would be much happier, but 10 attempts @ F10 might yield 1 error. 1 Attempt @ > 25IPM ALWAYS yields an error. At 60IPM I want to fire up the grill because I KNOW the pig is near death.

Thanks Again for the response, when I get home this evening I will try to avoid the keg and do a clean install of WXP & Mach3. Hopefully this will "solve the issue". As stated, John hasn't led me wrong yet, so I have some confidence.

With my birthday being next week I have told my wife I am ordering a new DSO; I should really work on my old one (BUT, I know WHY it's on the fritz, it involved a 20uH inductor being switched @ 180Vdc & 20+ Amps, heck, it threw the breaker in the panel box and fried most of the components on the breadboard, LOL, so I know I messed up more than the buffers. I didn't see any smoke come out of the DSO, but there was plenty of smoke coming from my "test circuit" HEHE DSO hasn't worked since...imagine that). Anyway, with a DSO I can quickly determine if the parallel port "step/dir" signals are the problem.

As far as motor connections....I am 100% certain all three motors are wired the same..correctly? Hrmmm, with less than perfect documentation I cannot assert 100% that they are wired correctly. The intermittent nature of the issue seems to suggest a wiring error is unlikely; however, I won't rule it out. and will double check it.

One GLARING issue that bothers me that MAY or MAY NOT indicate a PC/Software issue is that I cannot get the G540 to "Green Light" with the "Charge Pump" enabled. As I understand it, the charge pump is suppose to be "enabled" by ~10khz pulse train that it is apparently not receiving regardless of Mach3 settings. This APPEARS to me to be a good indicator that something is amiss with the PC side of things.

Jay_c, Gerry, thank you both for taking the time to help me. It is VERY frustrating on my end, and I know it is difficult to troubleshoot something that you do not have direct control over. I posted this in Keling's sub-forum because I assumed my problem was a stupid NEWBY issue & I purchased the motors/controller from them and figured they could point out my silly mistake. I guess I will have to call them if I cannot resolve the issue, but I had hoped for some response in the forum so that others could learn from my error(s).

Thanks,

Fish

ger21
04-23-2011, 11:50 AM
One GLARING issue that bothers me that MAY or MAY NOT indicate a PC/Software issue is that I cannot get the G540 to "Green Light" with the "Charge Pump" enabled. As I understand it, the charge pump is suppose to be "enabled" by ~10khz pulse train that it is apparently not receiving regardless of Mach3 settings. This APPEARS to me to be a good indicator that something is amiss with the PC side of things.

I thought I posted this somewhere the other day, but I believe this is a bug in the current version(s) of Mach3. Apparently Mach3 is only outputting 6.7-6.9kHz for the charge pump, and it's been that way for a while. It might only be on certain PC's. Most breakout boards seem to tolerate it, but not the G540.

If you want to read more, see the Mach3 yahoo group. Look for the posts on April 9th.


It's been fixed, but not released yet (I don't think.)


Good news, Art and I worked on this and we have something that is
working better then it ever did in the past! Due to phase jitter the
worst frequency for 12.5KHz is 35KHz but it seems to be working well and
my G540 loves it!

So thanks too Art for the driver code and the changes in Mach3 are done
as well.. I still have the run script command that I need to work on
(The code is done just needs to have the final testing done) .

Thanks
Brian

Bubba
04-23-2011, 12:45 PM
Fish,
In your last post, you said "As far as "Acceleration Settings", I have tried 1IPM to 15IPM settings in Mach3. Even with Acceleration set to 1IPM & the motor "tuned" to 15IPM I get what "sounds like" missed steps."
I think you might be actually missing the acceleration settings. IPM is velocity not acceleration. As shown on the attached screenshot, you need to lower the acceleration in the tuning screen.

If I am offbase, sorry but just trying to help.

Fish4Fun
04-24-2011, 12:07 PM
Jay_C, Gerry, Bubba,

Thank you all for your advice! The problem seems to be resolved; I formatted a new HD and installed WinXP, and then re-installed Mach3; I have only tested it briefly because I had to go to work, but it appears to be running perfectly. I ran a few tests @ 30IPM and 60IPM and everything came out very close. I assume when I get the backlash offsets adjusted it will be near perfect (I was off ~0.005" on the X-Axis, and 0.002" off in the Y-Axis after the simple test above). The motors "sounded" 1000% better (no "Squealing", "Thumping" or "Vibrating"!).

I knew there had to be something simple going on, everything is brand-new. I have no doubt some folks have had success with Mach3 & Win7, but I was CERTAINLY NOT one of them, LOL. I will say that Mach3 is the first thing I have found more stable in XP than Win7.

Again, thanks to all who read and offered advice!

Fish