Quote Originally Posted by Doddy View Post
The first time I attached a scope to my spindle encoder on the lathe my jaw hit the floor with the noise from the 3-phase motor, so I appreciate where you're coming from. I'm surprised you're seeing that behaviour on short cables though comms theory was never my strong point - I'll believe your experience over my memory any day. I still think using cheap (or expensive!) BoBs with opto-isolated inputs offers a lot of advantages, if only for the pathetic frequency response that will filter any amount of HF noise as well as providing much better noise immunity level than HC-series logic.
What gobsmacked me the most was the amount of noise before I ever put mains on to the VFD. It's enabling the motors that introduces all the trouble. And the fact that the same noise is on the ground of the BOB. I thought the screening and earthing was quite reasonable but noooooo!

One thing that all this does point out is how noise-resistant it is to use NC microswitches on the limits. Under normal operation all the limit inputs have a hard-wired, all metal connection short circuit on them. This is why I've never had any of this trouble before. Ironically I did briefly consider using miniature relays to act as the 12 or 24V to 5V interface but considered it unprofessional and was in fear of being laughed at by my forum fellows. Actually it would work a treat! I doubt if the variation in triggering delay would noticeably affect the accuracy of the homing and the low-pass filtering effect would be even better than your suggested opto-couplers!

Re the 'experience', which isn't really as great as you so kindly implied: When I was a trainee at the BBC, back when Boris Johnson had a poster of Prime Minister Thatcher on his school dormitory wall, one of the trainers gave a demonstration of how there's no such thing as an earth connection at radio frequencies. This was at the Daventry short wave station which is now long gone. We went out into the antenna field and he took a coin out of his pocket and dragged it at head height down the side of a steel support post which carried one of the feeders to an antenna. This post was about 20cm or so in diameter and solidly concreted into the ground. There were distinct, bright sparks between the coin and the post!