|
Re: Limit switches
For switches with both normally open (NO) and normally closed (NC) options, the surest way is to use BOTH. Assuming you have your 3-pin cable color-coded as a standard PWM cable, connect the white pin to common, the red to normally open, and the black to normally closed. This way, you will get a definite 0V (OFF) when the switch is in the normal position, and a definite 5V (ON) when the switch is in the activated position. I don't know if this is critical for a 'RIO based system, but when I've done other microcontrollers (e.g. arduino), having a "floating" signal line gave indeterminate answers. Wire it this way, and you can use it on nearly any system.
Just as important as wiring the limit switch correctly is mounting it correctly. You must ensure that the switch is not part of the "hard" force that brings your load to a crunching stop. This can be accomplished by mounting the limit switch inside the stop, but back far enough so that it will not be crushed (like a push-button refregerator light switch), or on the side of the load so that the switch is activated by being pushed out of the way (like a lever-style refregerator light switch).
|