about limit switches connected to Arduino

Thread Starter

LAOADAM

Joined Nov 21, 2018
956
If you are concerned about reliability it's better to use a normally-closed contact for the limit switch, which then opens when the switch is actuated.
That way an open-circuit anywhere (including a failed-open switch) will be recorded as a limit condition.
Open-circuit failures are generally more common than short-circuit failures.
Thanks
a very experienced suggestions.
Best
 

Reloadron

Joined Jan 15, 2015
7,899
Thanks.
trying to use 6 inputs with one resistor is what I asked, not test yet, just wonder what will be?
Why not configure per post #10 and use 6 channels of DIO configured with internal pullup? Configure the switches as N/O (Normally Open) so your inputs will all be a logic 1. When any switch goes active your logic will be Logic 0. Really very simple with no external resistors needed and each channel is independent of the others.

Ron
 

Thread Starter

LAOADAM

Joined Nov 21, 2018
956
Why not configure per post #10 and use 6 channels of DIO configured with internal pullup? Configure the switches as N/O (Normally Open) so your inputs will all be a logic 1. When any switch goes active your logic will be Logic 0. Really very simple with no external resistors needed and each channel is independent of the others.

Ron
Thanks,
I'll do it this way.
Best
 

crutschow

Joined Mar 14, 2008
38,668
For better reliability, as I previously mentioned, you could connect all NC (normally-closed) contacts in series with one end of the string to ground and the other to the input with the internal pullup.
The input will be logic 0 unless one of the contacts opens.
That way you always know that all switches are connected, and any open (switch or connection) will give a limit condition.
 

MaxHeadRoom

Joined Jul 18, 2013
30,771
For better reliability, as I previously mentioned, you could connect all NC (normally-closed) contacts in series with one end of the string to ground and the other to the input with the internal pullup.
The input will be logic 0 unless one of the contacts opens.
That way you always know that all switches are connected, and any open (switch or connection) will give a limit condition.
That is the method typically used in a machine E-Stop circuit, all limits etc are NAND'ed together.
Any one sets an E-stop.
Max.
 
Top