Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Mogal on January 01, 2014, 08:47:10 PM

Title: Removed EMI, but still need debounce?
Post by: Mogal on January 01, 2014, 08:47:10 PM
Hello everyone!
Its been awhile since I've cruzed the forums here, but its great to see Mach3 still holding strong, and Mach4 coming soon!

I've been overhauling and upgrading my machine, and have now come into a problem.
I've rewired the machine with shielded cable, and pretty much completely eliminated all noise!
I used to run my debounce at 2000, but now I can reliably run the machine with it at 50!
*EXCEPT*
For when I home my axis in the Y direction!
Both Z and X axis will home correctly with a debounce setting of 50,
but the Y axis requires a minimum debounce of 1250, before it causes the limit switch to trip the machine.

I've been scratching my head or a few hours with this one, but can't nail it down.
any thoughts on why just the Y axis would require the higher debounce setting?

Thanks!
Chris

P.S. I'm not sure if this is a carry over from before the upgrades or not, as the debounce was set at 2000 before.
I'm pretty sure the machine is wired exactly as before, just with new wires.
Title: Re: Removed EMI, but still need debounce?
Post by: Fastest1 on January 01, 2014, 08:50:44 PM
Is the limit wiring parallel to the stepper wiring for any distance? What kind of limit switches?
Title: Re: Removed EMI, but still need debounce?
Post by: Mogal on January 01, 2014, 09:02:30 PM
Hi, thanks,

Yes, the wires are parallel for a small distance, maybe 2 feet.
The switches are mechanical.
Each axis has a 2 limit switches, forms a closed loop, and set active low.

Title: Re: Removed EMI, but still need debounce?
Post by: Fastest1 on January 01, 2014, 09:48:37 PM
I would try to separate the 2 wires if at all possible as a test. What kind of controller? If you are using mechanical switches only. I believe this is a 5 volt circuit and is very susceptible to noise. Do you have a star ground? Are all of your shields connected there?
Title: Re: Removed EMI, but still need debounce?
Post by: Mogal on January 01, 2014, 11:36:41 PM
Yes, I have a star ground now.
My controller is an (older - 7-8yrs) C10 BOB
Yes, it is a 5v system

I also have some ferrite beads on the way...
Title: Re: Removed EMI, but still need debounce?
Post by: HimyKabibble on January 01, 2014, 11:53:20 PM
Ferrite beads will do absolutely NOTHING of value - they are only for reducing radiated and conducted emissions at MUCH higher frequencies - far beyond what logic circuits will respond to.

Regards,
Ray L.
Title: Re: Removed EMI, but still need debounce?
Post by: Mogal on January 01, 2014, 11:56:44 PM
Good to know, thanks!
Title: Re: Removed EMI, but still need debounce?
Post by: Hood on January 02, 2014, 03:46:44 AM
If the axis runs to the switch before you have problems then it is likely a weak switch that is bouncing on its contacts. If the action of the switch is not a nice clean snap open/close action then you will get it triggereing then as Mach reverses it will close then open then close etc, Mach will see that as a limit (assuming it is also set as a limit in Mach)

Hood
Title: Re: Removed EMI, but still need debounce?
Post by: Picengraver on January 02, 2014, 06:49:03 AM
Chris,
In my opinion, the easiest way to "remove" noise from limit and home switch inputs is to bypass it to ground with capacitors.  Installation of a .1 ceramic capacitor on all inputs at the BOB to ground has been proven effective in many instances.

Regards,
John Champlain
Title: Re: Removed EMI, but still need debounce?
Post by: Mogal on January 02, 2014, 03:05:46 PM
100 points out to Hood!
Looks like it was a bum switch. changed it out and all is well!

I do have some caps (but I think they are 0.2uf)
(should I change them out to 0.1uf?)

I have my debounce set at 200 now (just to make sure)

THANK YOU for all that helped!

Chris
Title: Re: Removed EMI, but still need debounce?
Post by: garyhlucas on January 03, 2014, 06:51:43 PM
I used to work with a microprocessor driven product.  It is surprising how much mechanical switches can bounce on closing. I always wire limits, float switches, etc. to operate by opening, less bounce.  A broken wire looks like the limit is hit warning you that it isn't working. Otherwise you could crash into a non-functioning switch. A broken wire indicates a tank is full, warning you that it isn't working before you over fill it.  It pays to always think failsafe.