A few years ago I built a Hobby Cnc Pro board (which besides this particular issue has performed very well). It has controlled the steppers on my mills, lathes and or printer when asked to do so. When I assembled this controller I did install it in a metal enclosure instead of the plastic box but other than that pretty much just like the instructions said to do.
As I learned more I decided I wanted limit/homing switches. I had run the machines without them just fine but recovery was not possible if I crashed, over fed or broke a tool.
First I ran mechanical microswitches. They were great for repitition and find a place to call home. Sure enough during long runs and sometimes during short runs the inevitable "limit switch triggered" would pop up for no particular reason. I blamed it on cheap switches, vibration etc.
Then during reading about these noise issues I read about installing optical switches. Again I learned enough to assemble the switches. During testing of these switches on the bench, they performed flawlessly. I get a reading of -.01v if the gate is unobstructed and 4.69-4.7v if gate is obstructed. Thinking my problems were over i installed these only to find the noise gremlin still there.
I do know that my original controller box might not have been the best wiring or organizational attempt (especially compared to some of the absolutely beautiful examples provided here on a regular basis). No reason to chase any further til this was cleaned up or so I thought.
After much procrastination, I dove in. I undid all of the wiring. During the rewire, I twisted all pairs that powered any other power supplies or peripherals. I used a star ground and grounded everything there, the pc case, the machine, and all drains from the shielded wires used for steppers and the limit switches. I tried to makes sure no wires ran parallel to other wires. I attempted to make all wire intersections 90 degrees. All shields are connected at the controller end only.
I have tried capacitors across the input pins, raising the debounce levels, seemingly everything I have read. Still no luck.
Today during the reassmbly I still had my limit switches powered by a wall wart. With my controllers power off but my limit switches powered up and Mach open, my limit switches perform flawlessly. No random flickering or nonsense just an led when the gate is obstructed.
Then I turned on the controllers power all of a sudden this random flickering shows up on the diagnostics/hardware page. It flickers with no rhyme or reason across pins 10-13. Sometimes it is only pin 11, sometimes all 3 or 4 pins. It is happening often and debounce doesnt seem to have an effect. I have not even turned on a spindle or moved the steppers to cause this and doing either of these doesnt make it worse oddly enough.
I guess if I had an oscilloscope and or had a clue how to use it I could most likely see a spike causing this.
What is my next logical step in solving this issue? The power supply is a combination of a transformer, rectifier and capacitor (the parts HCNC recommended) and it tests for voltage as it should.