
This circuit connects a limit switch to a CNC machine, allowing the CNC to receive signals from the limit switch. The limit switch is powered by the CNC's 3.3V supply and shares a common ground with the CNC.
A limit switch is an electromechanical device that operates on the principle of physical contact to control an electrical circuit. It consists of an actuator mechanically linked to a set of contacts. When an object comes into contact with the actuator, the limit switch activates, causing the contacts to either make or break an electrical connection. This simple yet reliable mechanism makes limit switches a staple in various applications, particularly in industrial control systems for detecting the presence or position of objects, and in safety interlock systems.
Common applications include:

This circuit connects a limit switch to a CNC machine, allowing the CNC to receive signals from the limit switch. The limit switch is powered by the CNC's 3.3V supply and shares a common ground with the CNC.

This circuit is designed to activate a buzzer when a limit switch is in its normally closed (NC) position. The 9V battery provides power to the circuit. When the limit switch is open, the circuit is broken, and the buzzer will not sound.

This circuit features an Arduino UNO microcontroller interfaced with multiple pushbuttons and a limit switch, each connected through 10k Ohm pull-down resistors. The pushbuttons and limit switch are used as input devices, likely for user interaction or control, with the Arduino handling the logic and processing.

This circuit includes an Arduino Nano microcontroller interfaced with multiple pushbuttons, limit switches, an emergency stop, a 2-channel relay module, and a 1-channel relay module. The Arduino controls the relay modules based on inputs from the pushbuttons and limit switches, which likely serve as user interfaces and position or safety sensors. The circuit is powered by a 5V power supply unit (PSU), which is connected to an AC supply, and the emergency stop is configured to potentially interrupt the circuit for safety purposes.
| Specification | Value | Description |
|---|---|---|
| Operating Voltage | 5V to 250V AC/DC | The range of voltages over which the switch can operate safely. |
| Current Rating | 5A to 10A | Maximum current the switch can handle. |
| Contact Configuration | SPDT (Single Pole, Double Throw) | Type of switch contacts, can connect to either of two outputs. |
| Actuator Type | Roller Lever | The type of actuator attached to the switch. |
| Mechanical Life | 1,000,000 cycles | Number of actuations before mechanical wear may occur. |
| Electrical Life | 100,000 cycles | Number of actuations before electrical wear may occur. |
| Operating Temperature | -25°C to 85°C | The temperature range within which the switch can operate reliably. |
| Pin Number | Name | Description |
|---|---|---|
| 1 | C | Common terminal connected to the power supply. |
| 2 | NO | Normally Open contact, closed when actuator is pressed. |
| 3 | NC | Normally Closed contact, open when actuator is pressed. |
Q: Can I use the limit switch with an Arduino? A: Yes, limit switches can be used with an Arduino. They are typically connected to a digital input pin, and the Arduino can detect whether the switch is open or closed.
Q: What is the difference between NO and NC contacts? A: NO stands for Normally Open, meaning the contact is open when the actuator is not engaged, and closes when the actuator is pressed. NC stands for Normally Closed, meaning the contact is closed when the actuator is not engaged, and opens when the actuator is pressed.
Q: How do I know if my limit switch is working? A: You can test the switch using a multimeter to check for continuity when the actuator is pressed and released.
// Define the pin connected to the limit switch
const int limitSwitchPin = 2;
void setup() {
// Set the limit switch pin as an input
pinMode(limitSwitchPin, INPUT_PULLUP);
// Initialize serial communication
Serial.begin(9600);
}
void loop() {
// Read the state of the limit switch
int switchState = digitalRead(limitSwitchPin);
// Check if the switch is pressed (assuming NO configuration)
if (switchState == LOW) {
// The switch is pressed
Serial.println("Limit switch is engaged.");
} else {
// The switch is not pressed
Serial.println("Limit switch is not engaged.");
}
// Add a small delay to prevent serial message spam
delay(100);
}
In this example, the limit switch is connected to digital pin 2 of the Arduino. The INPUT_PULLUP mode is used to enable the internal pull-up resistor, which ensures the pin is HIGH when the switch is open and goes LOW when the switch is closed (pressed). This code will print a message to the serial monitor indicating whether the limit switch is engaged or not.