071013-1132 EST USA
glentner:
You may have ground problems, but since your current problem seems to be related to limit switches, then we need to know what your limit switch circuits look like.
If you have a mechanical contact limit switch, then ideally this should be normally closed prior to being made. This means you have a low impedance, near zero, at the switch when the switch is closed and you are moving and running the spindle. When the switch opens it is a very high impedance. Once you make the limit switch there is probably less concern about noise.
Neither terminal of your limit switch should be grounded at the limit switch. You should use a twisted pair cable, probably shielded, from the limit switch to the control input. Further at the control input should be a shunt capacitor to ground with a low resistance pull-up resistor, and a schmidt trigger input gate.
A resistance of 390 ohms from +5 V and a 0.1 mfd ceramic capacitor will give you a time constant of 390 * 0.1 * 10 exp -6, or about 39 microseconds.
If you insert a 1000 ohm resistor from the non-ground lead from the limit switch to the capacitor, and move the pullup to that node, then time constant for incoming noise is 100 microseconds.
The maximum magnitude for the 1000 ohm resistor will depend upon the input current to the gate. For more filtering (longer time constant) increase the capacitance.
. |