Vex Limit Switch




The limit switch is used to determine the proximity of equipment (the Applications section illustrates a few examples). The limit switch can output only two signals: ON and OFF. It outputs a digital ON signal when the lever arm is depressed and a digital signal OFF when the lever arm is not depressed (see Figure 2 below). External forces, such as collisions, produce a digital ON signal, which remains ON until the lever arm is released.
Limit Switch Figure 2.jpg
Figure 2. (a) Limit switch OFF or not triggered; (b) Limit switch ON or triggered


Limit switches expand the functionality of robots by allowing controlled motion in moving components (e.g., gripper arm). They also allow the robot to better detect its surroundings, by detecting collisions with external objects.


Limit switches provide the capability to limit action in programmed behaviors. For example, a robot can be programmed to stop forward motion if the switch is triggered ON. Figure 3 below shows a limit switch placed on the front of Squarebot. If this Squarebot were to run into a wall or another obstacle, the limit switch would be triggered ON and the robot would stop, as programmed.
Limit Switch Figure 3.jpg
Figure 3. Squarebot with limit switch
Similarly, triggering the limit switch can tell the microcontroller to stop rotating robot components, such as arms. A Programming Kit is needed to implement this (see easyC sample code below).
Limit Switch Figure 4.jpg
Figure 4. Protobot utilizing a limit switch to stop a rotating arm
Figure 5 shows a close-up of the limit switch placement on Protobot. As the limit switch runs into the horizontal bar below the lever arm, the limit switch is triggered ON and the microcontroller stops the arm from rotating.
Limit Switch Figure 5.jpg
Figure 5. Protobot limit switch close-up

Range Limits

The limit switch will be either in the ON or OFF state. The torque required to change from OFF to ON (i.e., depress the lever arm) for an unmodified limit switch is approximately 0.005N-m, which is equivalent to applying approximately 0.03lb 2in away from the lever arm pivot point. Figure 6 below shows the location of the pivot point. If the limit switch is modified this torque will vary. If necessary the specific torque or amount of force required to trigger the limit switch at a specific distance can be calculated using basic torque equations.
Limit Switch Figure 6.jpg
Figure 6. Side view of limit switch showing lever arm pivot point

Technical Information

  • Switch Type
    • SPDT
  • Switch Connection
    • Wired to normally open (OFF)
  • Typical Trigger Force
    • 0.38oz to trigger (varies with location of applied torque on actuator)
  • Actuator Length
    • Length 2.0in total
  • Unit Dimensions
    • (Length) 1.26in x (Width) 1.21in x (Height) 0.5in
  • Weight
    • 0.03lb per switch
  • Wiring
    • Black – ground; Red – NC (no connect); White – control signal

ROBOTC Sample Code


CMU Robotics Academy Resources

easyC Sample Code

Limit Switch Figure 7.jpg