A limit switch is a simple sensor that tells a robot when a moving part has reached a specific position. In many machines, it is placed at the end of travel for a sliding carriage, rotating arm, elevator, or gantry axis. When the machine presses the lever, the switch changes its electrical state and sends a clear signal to the controller.
This matters because accurate end stops help robots home themselves, avoid crashes, and repeat motion safely.
Understanding Robotics: Limit Switch
Inside a mechanical limit switch are spring contacts. The moving lever stores a small amount of force, then a snap mechanism moves the contacts quickly from one state to the other. This rapid action makes the signal more definite than a slowly bending metal contact.
Even so, the contacts can bounce for a few milliseconds. During bounce, the controller may see several rapid changes instead of one clean press. Robot code usually handles this with debouncing.
It waits for the signal to remain stable for a short time before accepting it. Without debounce, one contact event can be counted as several events, which can confuse a position routine.
The choice between normally open and normally closed wiring affects fault detection. A normally closed circuit carries a signal during ordinary operation. If a wire breaks, a connector comes loose, or power to that circuit is lost, the controller sees an open circuit.
It can treat that condition as a fault or a reached limit. This is often safer for a stop circuit because many failures produce a warning state.
A normally open circuit can still work well, especially for simple school projects, but a broken wire may look the same as a switch that has never been pressed. Students should read the wiring diagram carefully because the labels on the switch describe its resting state, not the state wanted by the program.
A limit switch does not stop a heavy mechanism by itself. It only provides information. The motor controller and robot code must reduce or remove motor power after receiving that information.
There is always delay from signal processing, program timing, motor response, and moving mass. A fast carriage keeps moving while these delays occur. At constant speed, stopping distance equals speed times stopping time.
Real machines may need more distance because friction changes, loads vary, and a motor may have momentum. The switch must be placed far enough before the hard physical end of travel. A solid mechanical stop is still useful as a last barrier, but repeated impacts with it can bend parts or damage gears.
Many robots use a limit switch during homing. At startup, the controller does not automatically know where an axis is. It moves slowly toward a reference switch, detects contact, then often backs away until the switch releases.
It may approach again at a lower speed for better repeatability. This process gives the software a known starting reference, though it does not guarantee perfect accuracy. Lever position, mounting stiffness, vibration, and the shape of the part pressing the lever all affect the trigger point.
Mount the switch so the actuator is pressed smoothly rather than struck sideways. Test it by moving the mechanism slowly, checking the input value in software, then testing at the highest safe speed. Regular checks for loose brackets, worn rollers, damaged cables, and unreliable readings prevent small sensor problems from becoming crashes.
Key Facts
- A lever limit switch changes state when a moving part pushes the roller lever far enough to actuate the internal contacts.
- Normally open means the circuit is open when not pressed and closes when actuated.
- Normally closed means the circuit is closed when not pressed and opens when actuated.
- For a pull-up input, Vinput is usually high when the switch is open and low when the switch connects the input to ground.
- Travel margin = stop distance available - stopping distance required, and it should be greater than 0 for safe motion.
- If speed is constant, stopping distance can be estimated by d = v t, where v is speed and t is stopping time.
Vocabulary
- Limit switch
- A limit switch is an electromechanical sensor that changes its electrical contact state when a machine part reaches a set position.
- Roller lever
- A roller lever is the hinged arm on a limit switch that is pushed by a moving part, often with a small roller to reduce friction.
- Normally open
- Normally open describes a switch contact that does not conduct current until the switch is actuated.
- Normally closed
- Normally closed describes a switch contact that conducts current until the switch is actuated.
- Homing
- Homing is the process of moving a robot axis until it detects a reference sensor so the controller can define a known position.
Common Mistakes to Avoid
- Confusing normally open with normally closed is wrong because the words describe the unpressed state, not what happens after the switch is pressed.
- Placing the switch exactly at the crash point is wrong because the robot needs extra distance to slow down after the signal is detected.
- Ignoring switch bounce is wrong because mechanical contacts can rapidly open and close for a few milliseconds, causing false multiple triggers.
- Wiring a limit switch without checking the controller input type is wrong because pull-up, pull-down, sinking, and sourcing inputs require different connections.
Practice Questions
- 1 A sliding carriage moves at 0.40 m/s and the controller takes 0.15 s to stop it after the limit switch triggers. What minimum stopping distance is needed?
- 2 A robot axis has 25 mm of space between the limit switch trigger point and the hard stop. If it moves at 0.10 m/s and stops in 0.18 s, how much travel margin remains?
- 3 A safety system uses a normally closed limit switch at the end of travel. Explain why normally closed wiring can be safer than normally open wiring if a wire breaks.