

The Limit Switch KW12-3 is a compact and reliable mechanical switch designed to detect the presence or position of an object. It is widely used in industrial automation systems, machinery, and safety applications. The switch operates by physically interacting with a moving object, triggering its internal mechanism to open or close an electrical circuit. Its robust design and versatility make it suitable for a variety of environments, including manufacturing lines, robotics, and home automation projects.








The KW12-3 limit switch is designed for low-voltage and low-current applications, making it ideal for control circuits. Below are its key technical details:
The KW12-3 has three terminals, corresponding to its SPDT configuration. The table below describes each terminal:
| Pin Name | Description |
|---|---|
| COM | Common terminal. This is the main input terminal for the switch. |
| NO | Normally Open terminal. This terminal is connected to COM when the switch |
| is actuated (pressed). | |
| NC | Normally Closed terminal. This terminal is connected to COM when the switch |
| is not actuated (released). |
Wiring the Switch:
Mounting:
Testing:
The KW12-3 can be used with an Arduino UNO for position detection. 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 for status indication
void setup() {
pinMode(switchPin, INPUT_PULLUP); // Set switch pin as input with internal pull-up
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 connected to COM)
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Switch Pressed");
} else { // Switch is not pressed (NO disconnected from COM)
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("Switch Released");
}
delay(100); // Small delay to avoid rapid state changes
}
Switch Not Responding:
Inconsistent Behavior:
Switch Fails to Actuate:
Arduino Not Detecting the Switch:
Q1: Can the KW12-3 handle high-current loads?
A1: No, the KW12-3 is rated for a maximum current of 5A. For higher loads, use a relay or contactor.
Q2: Is the KW12-3 waterproof?
A2: No, the KW12-3 is not waterproof. Use a protective enclosure if operating in wet environments.
Q3: Can I use the KW12-3 with a Raspberry Pi?
A3: Yes, the KW12-3 can be used with a Raspberry Pi. Connect it to a GPIO pin and use a pull-up or pull-down resistor as needed.
Q4: How do I prevent false triggering due to vibration?
A4: Use debounce circuitry or software to filter out noise caused by vibrations.