Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: geone on September 19, 2011, 12:48:44 PM

Title: series limit switch configuration using one for the home as well
Post by: geone on September 19, 2011, 12:48:44 PM
The documentation indicates that limit switch(s) can also be assigned as a home switch.  I have all limit switches set to port 1, pin 11 (in this case) and used the autoset for each.  Using limit switch only configuration, the system identifies the switches and they work as expected.  Assigning one on each axis as a home switch will cause the axis to begin to home, but when the switch is hit, the system just reacts as a limit switch and will not back off....any suggestions

thanks
geo
Title: Re: series limit switch configuration using one for the home as well
Post by: BR549 on September 19, 2011, 12:57:33 PM
It is probably switch bounce causing the problem. IF the switch contact bounces (most do) then it see it as a SET/Reset and does not move further. AS then you are still sitting on the switch when it switches BACK to limit mode it thinks it has tripped the limit (catch22)   

Try adding in some Debounce start at 2000.  Then if needed adjust it down until you see the problem then split the difference.

Just a thought, (;-) TP
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on September 22, 2011, 01:35:14 PM
is there a value that is too high.....I seem to get stability at about 4500?
thanks
geo
Title: Re: series limit switch configuration using one for the home as well
Post by: Fastest1 on September 25, 2011, 12:43:17 PM
geo, The number used for the debounce is a measure of time that Mach must see the signal to be recognized. In your case if you are using a time interval of 4500, your machine is still moving after the initial signal was begun. At high rates of speed this could be detrimental i.e. a crash. The ideal number would be 0. This is not an unobtainable number but you will have to pay attention to wiring detail, grounds and shielding.
Title: Re: series limit switch configuration using one for the home as well
Post by: Fastest1 on September 25, 2011, 12:56:43 PM
Let me elaborate on my calculation just to clarify it in my own head. Each unit on the debounce setting is 40us (40 microseconds). So if you are setting your debounce at 4500. This is 40us x 4500=180,000 microseconds. Or .18 of a second. That is an eternity. How far does your machine travel in this time at full rapid? How delicate are your switches?  
Title: Re: series limit switch configuration using one for the home as well
Post by: Fastest1 on September 25, 2011, 01:01:37 PM
Does your Reset start flashing for no apparent reason? Have you run your limit switches successfully (not as home switches) with a low (under 250?) or "0" debounce setting? If you are having to set your debounce that high there must be a lot of noise, I would sure think it was triggering a fault in Mach.
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on September 27, 2011, 01:46:29 PM
I have wired the switches in series with a woven wire shielded conductor (stranded) and tested all to confirm proper working condition.  I talked to another gentleman who indicated that the noise may be coming from my power supply (which is right next to the input terminals on the breakout board.  He suggested that I power the board with another power supply other than the one powering the drivers (any thoughts there?).  Beyond that, I am lost for a solution other than to install expensive shielded micro switches or run with soft limits.

thanks for all the info
geo

I am using a C35 breakout board from CNC4PC
SD-2H086MB drivers (80vdc)
PS-6N80 power supply (AnTek Inc)
Mach3 latest locked version


Title: Re: series limit switch configuration using one for the home as well
Post by: Hood on September 27, 2011, 02:49:07 PM
Do you have the shield connected only at the control end to a single Earth stud in your control?
Hood
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on September 27, 2011, 03:31:19 PM
i may have a misunderstanding of how the shield works....I presumed that the shield (ground and alum) in and of themselves would divert noise.  I have not actually grounded the lead to a ground source on the breakout board.  I am using a usb power line to the board (it is grounded at the power source, but shield ground portion of the cable has not be connected to a ground port on the board.  So call me dumb...but if I were to connect the outer portion of the cable (not the alum wrap) to the ground on the board...good to go?
thanks
geo 
Title: Re: series limit switch configuration using one for the home as well
Post by: Hood on September 27, 2011, 03:38:32 PM
Gnd and Earth (where the shield connects) are different things. You should really have a stud of some kind in your cabinet that is connected to your supplies Earth connection and all shields should be connected to that stud. Some breakout boards do provide connections for Shield but most dont.
Hood
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on September 28, 2011, 01:58:21 PM
Just a thought...I fabricated the control box of wood, thinking it might provide some resistance to noise...maybe the problem rather than a solution.  I grounded the cable to a ground terminal in the board...a little reduction but still resets every 3-4 minutes.  Currently, the only thing that is not grounded is the drives (he power supply is grounded with the input voltage cable).  Is there any sense in replacing the switches?

thanks
geo
Title: Re: series limit switch configuration using one for the home as well
Post by: Hood on September 28, 2011, 03:35:21 PM
When you say you grounded to a Gnd terminal, are you meaning a Gnd on your breakout? If yes then they are not the same thing as the shield should go straight to a terminal that is connected to what we here in the UK call Earth.
Hood
Title: series limit switch configuration using one for the home as well
Post by: Fastest1 on September 29, 2011, 11:27:12 AM
First let's call the shield and it's bare cable a "drain". This needs to be connected to a star ground (this is also where the ground of your AC supply should terminate. This will be connected in the controller cabinet only, not on the machine side. Connecting the shield on both sides will cause ground loops. This connection is only to drain the stray signals. This is how I have come to understand it. A separate wall wart to provide the necessary voltage seems to be better than sharing a supply.
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on September 29, 2011, 12:54:10 PM
I have now grounded the power supply (with the ground from power source: a 2/12 w/ground power cable),  I  have run a chassis ground from each drive to the same ground as the power supply.  I have also grounded the machine frame to the same ground.  The breakout board is grounded with the power source (USB shielded cable with ground) of it's own.  Noise still rules....still resets.

I used a meter to check the continuity between all units in the system.  There was an unusual signal from the main power supply to ground:  the signal pulsed rather than continuous sound....must be the source of the noise.  None of the other components produced the pulsing sound.  Maybe a metal housing just for the power supply might help?

thoughts?
thanks
geo
Title: Re: series limit switch configuration using one for the home as well
Post by: Overloaded on September 29, 2011, 01:34:53 PM
  Have you run your limit switches successfully (not as home switches) with a low (under 250?) or "0" debounce setting? 

F1 has a good point here and I don't see where you have verified that the machine will or will not fault when running without the homes enabled.
Other than vibration, if the machine runs OK this way it's likely not noise, more like just really crappy switches.

What is the brand/make ?
New or used ?

Just thinkin'
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on September 29, 2011, 03:49:52 PM
The only way it runs without fault is to disable the limit and home pins.  I have attached a external power supply to the system and can make it run with the debounce set @3500....not so good.  I am in the process of adding ferrite cores to all cords, cables and driver feeds.  I am also building separate housings for the power supply, drivers and breakout board.  The micro switches are not expensive and not cheap.  I think my problems are related to other components, but if all else fails, I will invest in shielded switches. Any suggestions on the switches....I don't want to buy them twice...thanks
geo
 
Title: Re: series limit switch configuration using one for the home as well
Post by: Overloaded on September 29, 2011, 04:43:55 PM

One other possibility.
 I had a cnc4pc board that had 1 goofy input pin.
Did similar to what you're describing. Even with the pin configured but nothing connected to it, it would fault out.
Changed to another pin and it ran with debounce at 0.
Might try that if you have another available input pin, and it's easy to access.
Title: Re: series limit switch configuration using one for the home as well
Post by: RICH on September 29, 2011, 06:14:14 PM
Quote
I presumed that the shield (ground and alum) in and of themselves would divert noise

The shield can keep unwanted  noise out or it can also keep noise inside and the intent is to provide a low resistive
ground path. The shield is connected to a different / specific ground path. Shielding varies from 100% to lesser amounts
the amount varying based on intended use. Once noise, and i will use that term loosely, is mixed with the signal it can be extremely
difficult ( even impossible) to remove . The noise may take the easier path to the ground.

Just high level tid bits......FWIW,
RICH

Title: Re: series limit switch configuration using one for the home as well
Post by: geone on September 30, 2011, 02:51:21 PM
Go figure...I changed the pin on the limit and home switches and guess what....debounce @ 50 and NOT ONE RESET.  I think I'll declare victory.  Putting the original power supply back and see what happens....thanks to all.
geo
Title: series limit switch configuration using one for the home as well
Post by: Fastest1 on September 30, 2011, 08:32:09 PM
Great to hear. Hopefully it will work well. What happens at 0?
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on October 01, 2011, 03:57:03 PM
it will reset @ 0.....still working on total total grounding and better shielding.  I can live with 50 (so far).
best to all
geo
Title: Re: series limit switch configuration using one for the home as well
Post by: RICH on October 01, 2011, 05:57:32 PM
Quote
Just a thought...I fabricated the control box of wood, thinking it might provide some resistance to noise

Glad you getting there. A wooden box will keep noise out when it's a pressure wave and can attenuate / diminish the intensity of the wave. The reason we can hear is because pressure waves at some some frequency  and within distance can vibrate the ear drum which in turns converts the pressure wave to impulses to the brain and the brain interprets it as something we understand or maybe understand. It does nothing for electrical noise. Electrical noise are numerous electrical fields / waves which you can't see and are composed of numerous frequencies. The electrical frequencies can be created numerous ways, mixed, transmitted, and even altered to pressure waves so we can hear them.

Now if you were to line or wrap the wooden box with metal ( say Al wrapping foil ), the metal linning can keep  the electrical noise out. You just created a shield.

Heck, while i am probably confusing you, have a read of this:

A shield is nothing more than a metal enclosure which provides a low reisistive path to ground.
Lets use the analogy that the air around us is really a snow storm full of electromagnetic
 energy ( noise ( signals we can't understand ), TV, radio signals, high and low signals, anything sparking, etc.
 They are there but we can't see them. A shield will keep what's inside from going outside and vise versa.
The shield can be totaly closed 100% or maybe have holes / an open braid say 50% which is open.
 Now that open braid shield can become closed if the snow is big ( so allowable openings, electricaly speaking
are dependent on frequency if your trying to keep radiating ( signal getting out of shield ) or
 conducting ( signal getting past / into or onto the conductor inside the shield).
 An accumilatiion of snow may not bother you while walking outside but if you never shook it off it may
 overpower your ability to walk. In order for the snow to stick it has to have a source
 ( something creating it/ motor, pulse frequency, transformer, kid playing with a sparkler ) and addtionaly it
needs to stick to you ( conduction, unlikely induction, sometimes a combination of conduction and radiation ( rain and snow mix ).
 Now if your snow clothes ( shield) lets the snow go easily to ground you don't have to worry about it bothering
 your walking, but....  watch out if a whole bunch comes down on you at once from a tree
( overload / a motor turning on and generating a lot of noise), right on your butt you go
( computer locks up, signal interference , loss of or addititons to  the steppers).
Now since your only walking back and forth and the snow falls equaly on each side of you
 ( common ground with equal resistance values) no big pile will form and interfere with the small
 pile of snow getting to the ground ( ground loop ) happens.

Earth ground is a term misunderstood in application. I will spare you another snow storm analogy ...... ;)
Have a read of the attached.


RICH



  
Title: Re: series limit switch configuration using one for the home as well
Post by: geone on October 04, 2011, 01:48:38 PM
Rich:

Thanks for taking the time to explain (quite eloquently I might add) the concept.  I will forever be on guard for a snow storm.  I think my noise is coming from the power supply (inside the box) and would not benefit from interior shielding since the breakout board is is the same box.  I have been able to reduce noise to a minimum by using a separate power supply for the breakout board and another for the drivers.  I am now considering a limit and home board that has additional filters and pin buffering.  I am running debounce @ 50 and the system runs consistently with no noise reset.  My goal is to get it down to 0 with off the shelf components.  thanks again for all your help

geo