

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 |
| Contact Configuration | SPDT (Single Pole Double Throw) or DPDT (Double Pole Double Throw) |
| Actuator Type | Roller lever, plunger, or whisker |
| Mechanical Durability | Up to 10 million operations |
| Electrical Durability | Up to 1 million operations |
| Operating Temperature | -25°C to 85°C |
| Mounting Style | Panel or surface mount |
The pin configuration of a limit switch depends on its contact type. Below is a typical configuration for an SPDT limit switch:
| Pin Name | Description |
|---|---|
| Common (COM) | The common terminal where the input voltage or signal is connected. |
| Normally Open (NO) | The terminal that remains open (disconnected) until the actuator is engaged. |
| Normally Closed (NC) | The terminal that remains closed (connected) until the actuator is engaged. |
Below is an example of how to connect and use a limit switch with an Arduino UNO:
// 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() {
// Initialize the limit switch pin as an input with an internal pull-up resistor
pinMode(limitSwitchPin, INPUT_PULLUP);
// 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 == LOW) {
// The switch is pressed (NO terminal is connected to COM)
Serial.println("Limit switch activated!");
} else {
// The switch is not pressed
Serial.println("Limit switch not activated.");
}
// Add a small delay to avoid spamming the serial monitor
delay(200);
}
The switch does not activate when the actuator is engaged:
False triggering or noise in the signal:
The switch wears out quickly:
The switch does not fit the mounting location:
Q: Can I use a limit switch with both AC and DC circuits?
A: Yes, most limit switches are designed to work with both AC and DC circuits. However, ensure the voltage and current ratings are compatible with your application.
Q: What is the difference between NO and NC terminals?
A: The NO (Normally Open) terminal is disconnected from the COM terminal until the actuator is engaged. The NC (Normally Closed) terminal is connected to the COM terminal until the actuator is engaged.
Q: How do I debounce a limit switch?
A: You can debounce a limit switch using a small capacitor across the terminals or by implementing a software delay in your microcontroller code.
Q: Can I use a limit switch in outdoor environments?
A: Yes, but ensure the limit switch has an appropriate IP rating (e.g., IP65 or higher) to protect against dust and water ingress.