

The Limit Switch KW12-3 is a mechanical switch designed to detect the presence, absence, or position of an object. It is widely used in industrial automation, machinery, and safety systems. This compact and durable switch is ideal for applications requiring precise control and reliable operation. The KW12-3 is commonly employed in CNC machines, 3D printers, conveyor systems, and robotic arms to ensure safe and efficient operation.








The KW12-3 limit switch has three terminals: Common (COM), Normally Open (NO), and Normally Closed (NC). The table below describes their functions:
| Pin Name | Description |
|---|---|
| COM | Common terminal. Connects to either NO or NC depending on the switch state. |
| NO | Normally Open terminal. Closed when the switch is activated. |
| NC | Normally Closed terminal. Open when the switch is activated. |
The KW12-3 can be used with an Arduino UNO to detect the position of an object. Below is an example circuit and code:
// Example code for using the KW12-3 limit switch with Arduino UNO
const int switchPin = 2; // Pin connected to the NO terminal of the switch
const int ledPin = 13; // Built-in LED pin on Arduino
void setup() {
pinMode(switchPin, INPUT_PULLUP); // Set switch pin as input with pull-up resistor
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int switchState = digitalRead(switchPin); // Read the state of the switch
if (switchState == LOW) { // Switch is pressed (NO terminal connected to COM)
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Switch Pressed");
} else { // Switch is not pressed
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("Switch Released");
}
delay(100); // Small delay for stability
}
Switch Not Responding:
Unstable or Erratic Behavior:
Switch Fails to Activate:
Overheating or Burnt Contacts:
Q: Can the KW12-3 be used with DC circuits?
A: Yes, the KW12-3 can be used with DC circuits as long as the voltage and current ratings are not exceeded.
Q: How do I mount the KW12-3 on a PCB?
A: The KW12-3 has solderable pins for PCB mounting. Ensure proper alignment and solder securely.
Q: Is the KW12-3 waterproof?
A: No, the KW12-3 is not waterproof. Use a protective enclosure for outdoor or wet environments.
Q: Can I use the KW12-3 for safety-critical applications?
A: While the KW12-3 is reliable, it is recommended to use certified safety-rated switches for critical applications.