False Limit Switch Triggering

Picengraver
Posts: 42
Joined: Sun May 11, 2014 5:05 pm
Location: Florida
Contact:

Re: False Limit Switch Triggering

Post by Picengraver » Thu Jan 14, 2016 6:20 pm

I used one of your circuits with the Schmitt trigger IC, but not sure now of the other component values. I have long used just .1uf ceramic caps on my Mach3 setups, but wanted to try the Schmitt circuit on my S2 setup. Figured my cheap limit switches just might have too much contact bounce. Had to add the caps after the trigger IC for some unknown reason to stop sporadic noise faulting(?), and just stopped checking when things became stable. Probably something to do with my wiring harness. :(

Thanks.
John
www.picengrave.com

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: False Limit Switch Triggering

Post by cvoinescu » Thu Jan 14, 2016 6:28 pm

Ok, I understand. That can happen if the Schmitt trigger isn't right next to the Arduino, and/or not decoupled properly itself.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

lordmundi
Posts: 207
Joined: Wed Jan 01, 2014 4:02 am
Location: Friendswood, TX
Contact:

Re: False Limit Switch Triggering

Post by lordmundi » Thu Jan 14, 2016 6:31 pm

the Schmitt trigger certainly helps, but in my opinion it isn't enough. I think you can safely assume a 3 or 4 Vpp signal hitting your limit switch wires (someone has some osciliscope screenshots on this forum with voltages like that)... I believe the Schmitt trigger is still going to trigger a digital state change in those cases depending on what transistors it is using. The Schmitt trigger is most useful in getting rid of consecutive bounces from noise, such as debouncing a switch (basically a hysteresis like your home thermostat has). But it isn't going to keep that single noise event from EMI from hitting the microcontroller.

You NEED something current driven... or possibly a differential circuit... but I don't think RC circuits are enough.

By the way, I think the idea someone had about potentially gcode sending it to 0,0 is a great one... its possible this isn't noise related. I just wanted to get on my soapbox and get some of these CNC electronics controllers to have opto-isolated inputs and not have users needing to build custom circuits to hook up limit switches.

Post Reply