Log in

View Full Version : Hooking Up a Micro Switch


Unoquadium
15-02-2011, 18:17
So we need to somehow plug a limit switch (Micro Switch) into the robot. I heard stuff about plugging it into an analog input board and other stuff about plugging it into the digital sidecar and we don't know which one it is.

Can someone clear this up for us? We ultimately just need to get a 0 or 1 output from it.

Thanks.

StevenB
15-02-2011, 19:10
Connect it to a digital input on the digital sidecar. One side of the switch should go to ground, the other to the signal line. The +5V line is unused, since the digital inputs have internal pullup resistors.

Unoquadium
16-02-2011, 16:40
Connect it to a digital input on the digital sidecar. One side of the switch should go to ground, the other to the signal line. The +5V line is unused, since the digital inputs have internal pullup resistors.
The switch has 3 contacts, NC2, NC3, and COM1. Which one would go to signal and which one to ground?

Alan Anderson
16-02-2011, 19:11
The switch has 3 contacts, NC2, NC3, and COM1. Which one would go to signal and which one to ground?

Read the labels again. I think you'll find that terminal 1 is labeled COM (for COMmon), terminal 2 is NC (for Normally Closed), and terminal 3 is NO (for Normally Open).

Typically, COM is connected to ground, and either NC or NO is connected to signal depending on whether you want the input to read "true" or "false" when the switch is activated.

WizenedEE
21-02-2011, 01:28
Typically, COM is connected to ground...

Although it doesn't matter if you connect COM to common (ground/black) and NC/NO to signal.

If you're looking to use the microswitch as a true limit switch to stop the motor and you're using the CAN bus, look into wiring the switch up to the jaguar itself. It's much safer because it's a hardware thing (it's also faster, so no more bent/crushed switches).