Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: spiwrx on March 08, 2008, 12:41:20 AM

Title: phantom limit switch
Post by: spiwrx on March 08, 2008, 12:41:20 AM
Just finished our build on our first CNC router, trying to get it up and running and keep getting a limiit switch triggered stop. I have all limits hooked up through my campbell BOB and test out fine on the diagnostics page. But if you sit there and stare it for a while you see a limit mysteriously light up and instantly go back out. Any suggestions??

Also, I'm getting very poor movement (jerky and slow) from my motors regardless of Velocity and Accel settings. I'm using Gecko 201 and have 1.8degree stepper motors and have it set to 2000 steps per(10 tpi x 200 rev), to the best of my knowledge this is correct.  Any suggestions as to what the step pulse and DIR settings should be for the 201 drives??

Title: Re: phantom limit switch
Post by: Chip on March 08, 2008, 03:18:31 AM
Hi, Spiwrx

In General Configuration, Top Rt. Corner set the "De-bounce Interval" to 1000 for a start, (Helps with stray/spurious signal reduction).

Your Geckos are "10 micro step", Steps Per, In Motor Tunning should be 20000, (10 tpi x 200 stp-rev x 10 micro-stp = 20000).

In Ports & Pins, Motor Outputs, set the Dir & Steps to a "Checked".

If any axis runs backwards.

Opt. 1, Swap the wires on "one coil" (Phase A & Phase B) or (Coil A & Coil A-), Depending on how it's Marked.
Opt. 2, In Home & Limits, Set Reversed to "Checked" for the Axis.

The following steps are a short cut to Tuning Mach3, If you follow this, I think it will expedite your setup and understanding of mach3.

(Mach3 download defaults are a little confusing, Feed-Rate Setting Defaults to 6.0 and causes many to tune to this value).

Under "Operator" (Top row, Click On "Auto Calculator", This turns on a Pop-Up calculator).

Click on the Feedrate Number "Disp.Box" on "Program Run" Screen, Enter the value as described below, 150 or greater.

Your Velocity and Acceleration settings in Config, Motor Tuning set's your max speed's.

If the velocity top's out you need to turn up the "Kernel Speed" in Ports & pins and Re- Start Mach3. 

If you haven't setup/calibrated your Step's Per to inch or mm, You need to do that first. (Steps Per set to number of steps to move one Inch or MM)

On the Program Run page set the feed-rate to 150.00 or higher for fast machines, (This puts your feed-rate well above what your Max Velocity will be).

Hit the TAB key for pop-out Jog window, Set the Slow Jog Rate to 100 %, Jog Mode to "Cont.", (Axis will move as long as you hold the key down).

Now your Setup to use the axis arrow key's or mouse arrow button's to set up your velosity and acceleration, (Setting up vel/accl is a balancing act).

Set your vel. to 45 and accl to 15 for a start (Vel is typically 3 times higher than accl (more or less).

Increase the accl up till your servo trips or your steppers slip then back it off 10 % or so,

Then set the vel. up till it trips or slips also, Back it off 10% or so, Or till you think it's fast enough (Speed's can get scary on big servo or steppers).

Then after you get the max'es set, Your slower G01 with F speeds should be fine.

With G00 moves you'll get max speed for your Machine up to your "Velocity Setting".

This should get you pretty close, As your experience grows with Mach, You'll need to adjust accordingly.

Be Careful As You Go.

Hope this Helps, Chip
Title: Re: phantom limit switch
Post by: spiwrx on March 08, 2008, 04:34:48 PM
Lot's of great info, I'll apply to the machine when I return to work monday.

Much appreciated...
Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 02:00:13 AM
O.K. all that helped a great deal. I got my motors running and limits aren't acting up anymore.  However:

The motors are not very fast at all and run smooth as silk for a couple inches and then get jerky, stall and/or seem to slip. If I jog it a few times I get about the same result - runs smooth for a couple inches and then stalls or jerks. Manually all the axis run without much trouble so I'm doubtful of the motors or mechanics. I suspect I still have something set less than 100%.

I'm suspicious of the laptop it's running on as it sometimes is also choppy switching between programs or open windows.

Any more direction would be equally appreciated!

Title: Re: phantom limit switch
Post by: BluePinnacle on March 11, 2008, 05:41:15 AM
I have this as well, on G00 the motor spins up fine then clunks and bangs horribly. I slowed it down and it stopped doing this, was it just going too fast or do i need to be cleverer? mine's quite a big machine so i could do with a decent fast-move rate.
Title: Re: phantom limit switch
Post by: stirling on March 11, 2008, 07:59:46 AM
I have to respectfully disagree with Chip on the use of debounce in this caseĀ  :). Here you're not using debounce to debounce, you're using it to hide a problem instead of actually fixing it (In my view anyway). My starting guess would be that you may have a bad sig gnd. That could explain your bogus limit and your dodgy motion.

Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 11:03:53 AM
Signals grounds are direct to my BOB which apparently has a floating ground as was told not to ground to case/earth.

xylotek /sound logic / campbell design BOB

Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 11:58:34 AM
Hi, Spiwrx

Do a "DriverTest" and see if your computer has vertical random spikes, If it dose there is a Optimize document bottom of the download page that may help.

Driver test is located in C:\Mach3 folder.

Check your laptop printer port output for 0 and 5 volts, Test one of the dir pins, Moving with arrow key one dir, should be 0 volts and the other dir should be 5 volts.

Some laptops only have 3.5 volt outputs that will not work very well at all. What's the CPU speed ?

As far as the De bounce setting, Mach's Default is 0 which is often unrealistic.

Just trying to get to a starting point hear, Guess I should have sed Turn them Off, First Post go figure, Just a starting point hear.

Sure it could be Allot of things, Bad Gng, Gnd loop, Wire Induction issues, Lose connection, Bad switch or contacts. 

On the Diagnostics Page do you see any flickering of the limit led's at all now ?

Let me now what you find.

Thanks, Chip
Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 12:27:06 PM
Did, the driver test initially almost perfectly flat, Also my BOB has it's own power supply for the 5v drivers, I haven't tested the actually output but it's not being powered by the laptop. Changed the Kernel speed to no effective difference. 

The Debounce seemed to fix my limit switch issue, although I think that error is also a pin setting as the results are:
 x limits show on the m1++, m1--, m1 home and m2--
 y limits show m2++ and m2Home
 z limits show all m3

I'm sure I can figure the pin settings myself, I'm really more concerned about getting the motors to a better place. I'll try some of the optimizing...

BTW, on the Gecko drives should I be messing with the trim pot at all or not yet?? Not very clear in the gecko literature.
Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 12:27:11 PM
Hi, BluePinnacle

Velocity and acceleration is a balancing act, Velocity to high or acceleration to steep/quick/aggressive can do it.

Using G00 moves or Mach's feed settings set higher than your velocity setting, Will help you find the balancing point.

Also do some X, Y diagonal moves when testing, You nay need to decrease  Velocity and acceleration a little more.

Hope this Helps, Chip
Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 01:01:30 PM
Hi, Spiwrx

I'd check the laptop volt's any way, low volts to the opto diodes in the BoB  can cause problems also.

in Config, Motor Tuning, Set the Step/Dir Pulse's to 5, See if that helps,(It gives the OPTO's a little more time to see the Pulses)

On the Gecko's, It depends on the size of your steppers, There are some jumpers inside the box.

What's your power supply Voltage and amp's rating, It should be close to 75 volts minimum for top speed.

Your steppers should be hot to the touch after being on for awhile if your current resistor is set properly for your stepper's.

Thanks, Chip
Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 01:32:10 PM
I have a solid 5v on the DIR and about 1.5v on the STEP.

From another post on this thread I suspicious now of the GND on the printer port. Would this just be common between the BOB and laptop/printerport or should/must there be an earth ground?
Title: Re: phantom limit switch
Post by: docltf on March 11, 2008, 01:42:12 PM
           after reading your post in this thread and all the good setup info for the new users.and other post in the mach forum over the last 20 come you and the
           other moderaters have not compiled this info under  the F&Q department for quick referance.

Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 02:12:27 PM
Hi, Spiwrx

Your BoB isolates the machine from the computer to protect the computer port's from machine generated spikes.

Both are/should be grounded to a Earth Gnd. at your power panel through,  Neutral and Gnd, Pin's, On Both.

Thanks, Chip
Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 02:22:22 PM
There is no 120vac ground connection on my BoB. I doubt my Dell laptop power supply has a GND connection either.

I'll refer to the BoB manufacturer for direction.
Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 02:29:05 PM
Hi, Bill

It's an all volunteer group around hear, I've started to several time's, Have a list I work from (Note Pad File).

Just haven't got around to it, No Good Reason.

Thanks, Chip, 
Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 02:43:21 PM
BTW, my motors are NEMA 23 269in/oz and have ratings of phase current = 4.2 amps & phase resistance = 0.46 ohms
My power supply is measuring out at 44vdc..
Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 04:29:58 PM
Hi, Spiwrx

With 45 volts your not gong to get top speed, The faster a stepper goes, More volt's are needed to keep the current/speed up.

When the volt's top out the stepper will start to lose there Torque/slip, So basically your losing about 30-40 % of your top speed.

What are your current Velocity and Acceleration, Sounds like you need to reduce the Velocity some more.

Yes some laptops don't have Ground's, But there even more isolated, Don't think this is the problem though.

If you have a variac and your gecko power supply is Transformer type.

You could see the difference by boosting the power supply primary volts up some "temporarily" and see the difference.

Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 05:29:56 PM
O.K. I can try that, I have another transformer but we calc'd the output to near 78VDC and the drives are limited to 80 so I opted for this other I had laying around , however just for good measure I did the Driver test again and now I have crazy spikes.....

Almost a solid wide black line...

Perhaps I didn't have the driver loaded properly on the previous test???

What can be done now??

I was shooting for crazy high speed, I just really want the motors to smooth.
Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 06:04:51 PM
Hi, Spiwrx

78 volts is at the top, But Mories at gecko drives, Sed there drives have 100 volt mosfet's in them.

Thy de-rate them so people won't use over 80 volts, Safety margin, And need a Good Heat Sinks.

That's 80 volts 7 Amp's, 560 Watt's, You would be at 80 volts 4.5 Amp's, Watt's 360

Rutex another MFG. Rates there drives at 100 volts, Thy Both use the same type Mosfet's.

If you don't have another computer to test then go through this Link.

It describes things to turn off in windows, do some of the first items then re-boot and try the driver test again.

See if Quick-Time is installed, It causes problems also.

Thanks, Chip 
Title: Re: phantom limit switch
Post by: spiwrx on March 11, 2008, 08:28:27 PM
O.K. I had to do everything on the list and step 9 was last, and what it finally took. The motors are running great, BTW Geck suggest 20x phase voltage and thats puts us around 48v.

Now the Phantom limit switch is back though......

I set the debounce up to 2000 and seems to be OK for initial test.

Speed is satisfactory for me on motor tuning at 150 feed.

These is still an occasional spike in the driver test but nothing continuous like before, mostly flat..

There's a slight chop in the motor but I think I can tune it to a minimal with more time.

I'll call it success for now, unless you have any better ideas for the phantom limit. It's consistantly on the Y axis only. 

Title: Re: phantom limit switch
Post by: Chip on March 11, 2008, 09:16:28 PM
Hi, Spiwrx

Sounds good, If Your Happy with the Speed, Lot's of figure's get bounced around on Stepper's

On the Y limit, Maybe a bad SW/Contacts, Some have put small .01 disk capacitors across the SW terminals, pull up or Pull down resistor's, Re-check the wiring, Swap the Switch's

around, or Let it work for a while,.

Are your SW's N.C. in Series  or N.O. in Parr.

If you have a O-Scope you should be able to track it down at some Point.

Have Some Fun Sounds Better, Chip
Title: Re: phantom limit switch
Post by: spiwrx on March 12, 2008, 12:26:39 PM
Switches, are 2 per axis NC wired in series. They're new but something thats been laying around are warehouse for a decade or so...

Didn't quite understand your ref to the pull up / pull down resistor though.

I have a scope, but it's buried in my garage, antique tube type HP unit... (Lets hope we don't need to get that out)

Was going to use proximity switches but with the design of the machine being fairly open, I was concered with debris/chips setting of the proximity sensors
Title: Re: phantom limit switch
Post by: Chip on March 12, 2008, 02:47:54 PM
Hi, Spiwrx

Doing  a little research hear on De-bounce, 1000 is 40ms. 10000 is 400ms. The time is the amount a switch has to be on to

be consider "on", Per Art, In lot's of posts set it to 2000-3000.

I would think that the 2000 isn't to bad, If you think the Y axis is causing the problem.

Install a jumper on one of the switches, Reduce the de-bounce and test, Then test the other switch.

The comment on,  pull up or Pull down resistor's there used on some TTL encoders to keep them from floating between Hi or Lo state

Thanks, Chip
Title: Re: phantom limit switch
Post by: spiwrx on March 19, 2008, 03:34:02 PM
One Last thing ( I Know famous last words ) Anyway, everything previously seems to be cured. We switched to NO limit switches in parallel as well as replacing them all, also added sheilded cables to the limits, thought only the motors had to be.

Anyway, the current issue, and hopefully the last is on a Ref. All Home command, about 1 out of 3 times it engages a limit swicth stop as it's reversing out whichever axis homing (all three have this issue randomly however it's usually just one axis each time).

So it doesn't back away enough to release the switch before the limit switch takes over. I tried changing the speed, and debounce, neither seemed to help. Is there another setting I can tweak??
Title: Re: phantom limit switch
Post by: Jeff_Birt on March 19, 2008, 04:20:25 PM
We switched to NO limit switches in parallel as

Normally open limit switches should really be avoided at all costs. When a limit switch fails or its lead is open it should fail safe (limit on). Normally open switches can't so this. I've seen $250,000 machine crash doing $10,000 of damage as they were made with NO limits.

I don't know what switches you are using but I have found that running limits at 24V through a opto-isolator with 5V on the other side of the opto for the controller provides very reliable operation.