

A limit switch is an electromechanical device that detects the presence or absence of an object or the position of a moving part. It operates by making or breaking an electrical connection when a physical actuator is engaged. Limit switches are widely used in industrial automation, robotics, and safety systems to control machinery and provide feedback to control systems.








Below are the general technical specifications for a standard limit switch. Note that specific models may vary, so always refer to the datasheet of your particular switch.
| Parameter | Value |
|---|---|
| Operating Voltage | 5V to 250V AC/DC |
| Operating Current | 0.1A to 10A (depending on model) |
| Contact Configuration | SPDT (Single Pole Double Throw) or DPDT (Double Pole Double Throw) |
| Actuator Type | Roller lever, plunger, or whisker |
| Mechanical Life | 1 million to 10 million operations |
| Electrical Life | 100,000 to 1 million operations |
| Operating Temperature | -25°C to 85°C |
| Mounting Style | Panel or surface mount |
The pin configuration of a limit switch typically includes three terminals: Common (COM), Normally Open (NO), and Normally Closed (NC). Below is a description of each terminal:
| Pin | Description |
|---|---|
| COM | Common terminal where the input voltage or signal is connected. |
| NO | Normally Open terminal; the circuit is open until the actuator is engaged. |
| NC | Normally Closed terminal; the circuit is closed until the actuator is engaged. |
Below is an example of how to connect a limit switch to an Arduino UNO to detect the position of a moving part.
// Define the pin connected to the limit switch
const int limitSwitchPin = 2;
// Variable to store the state of the limit switch
int switchState = 0;
void setup() {
// Set the limit switch pin as input
pinMode(limitSwitchPin, INPUT);
// Start the serial communication for debugging
Serial.begin(9600);
}
void loop() {
// Read the state of the limit switch
switchState = digitalRead(limitSwitchPin);
// Check if the limit switch is pressed
if (switchState == HIGH) {
Serial.println("Limit switch is NOT pressed.");
} else {
Serial.println("Limit switch is pressed!");
}
// Add a small delay to avoid spamming the serial monitor
delay(100);
}
The limit switch does not respond when actuated:
The Arduino does not detect the switch state:
Switch produces erratic or noisy signals:
Q: Can I use a limit switch with high-voltage AC circuits?
A: Yes, but ensure the switch is rated for the voltage and current of your AC circuit. Use proper insulation and safety precautions.
Q: What type of actuator should I choose?
A: The actuator type depends on your application. Roller levers are ideal for sliding or rotating parts, while plungers are better for direct contact.
Q: How do I test a limit switch with a multimeter?
A: Set the multimeter to continuity mode. Connect the probes to the COM and NO terminals, then actuate the switch. The multimeter should beep when the circuit closes. Repeat for the NC terminal.
By following this documentation, you can effectively integrate a limit switch into your projects and troubleshoot common issues.