Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Micro Switch: Examples, Pinouts, and Specs

Image of Micro SwitchDesign with Micro Switch in Cirkit Designer

Introduction

A micro switch, also known as a miniature snap-action switch, is a small, high-precision switch that operates using a tipping-point mechanism with very little physical force. It is widely used in various applications, including home appliances, industrial equipment, and consumer electronics, to detect the presence or absence of objects, changes in position, or to provide a user with tactile feedback.

Explore Projects Built with Micro Switch

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of SparkFun Pro Micro with Micro Switch Interface: A project utilizing Micro Switch in a practical application
SparkFun Pro Micro with Micro Switch Interface

This circuit consists of a SparkFun Pro Micro microcontroller connected to a micro switch. The common (COM) terminal of the switch is connected to the ground (GND) of the microcontroller, and the normally open (NO) terminal is connected to digital pin D10 on the Pro Micro. The circuit is likely designed to detect a switch press, which the microcontroller can then respond to programmatically.

Open Project in Cirkit Designer
Image of Arduino-Controlled Input Interface with Momentary Switches and Rotary Encoders: A project utilizing Micro Switch in a practical application
Arduino-Controlled Input Interface with Momentary Switches and Rotary Encoders

This circuit includes an array of momentary switches (both red and black), toggle switches, and rotary encoders, all interfaced with an Arduino Micro Pro microcontroller. The momentary switches and toggle switches are likely used for input commands, while the rotary encoders provide both rotational position input and additional switch inputs. The microcontroller's pins are connected to the signal pins of these input devices, suggesting that it is configured to read their states and react accordingly, although without embedded code, the specific behavior cannot be determined.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Description Notes
1 Common (COM) Connects to the moving contact
2 Normally Open (NO) Closed when the actuator is engaged
3 Normally Closed (NC) Closed when the actuator is at rest

Usage Instructions

How to Use the Micro Switch in a Circuit

  1. Identify the Pins: Refer to the pin configuration table to identify the Common (COM), Normally Open (NO), and Normally Closed (NC) pins.
  2. Wiring: Connect the COM pin to one side of the control circuit. Connect either the NO or NC pin to the other side, depending on whether you want the circuit to be closed by default or only when the switch is actuated.
  3. Mounting: Secure the micro switch in place so that the actuator will be properly engaged by the moving part of your application.
  4. Testing: Before finalizing the installation, test the switch to ensure it actuates correctly and the circuit behaves as expected.

Important Considerations and Best Practices

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can I use a micro switch with an Arduino? A: Yes, micro switches can be used with an Arduino for input detection. Ensure that the switch's voltage and current ratings are compatible with the Arduino's I/O pins.

Q: How do I know if my micro switch is working? A: You can test it with a multimeter set to the continuity function. When the actuator is pressed, you should hear a beep if the switch is functioning correctly.

Q: What is the difference between NO and NC contacts? A: NO contacts are open when the switch is at rest and close when actuated. NC contacts are closed at rest and open when actuated.

Example Arduino Code

// Define the pin connected to the micro switch
const int microSwitchPin = 2;

void setup() {
  // Set the micro switch pin as an input
  pinMode(microSwitchPin, INPUT_PULLUP);
  Serial.begin(9600);
}

void loop() {
  // Read the state of the micro switch
  int switchState = digitalRead(microSwitchPin);

  // Check if the switch is pressed (assuming NO configuration)
  if (switchState == LOW) {
    // The switch is pressed
    Serial.println("Switch is pressed");
  } else {
    // The switch is not pressed
    Serial.println("Switch is not pressed");
  }

  // Add a small delay to prevent bouncing issues
  delay(50);
}

Note: The INPUT_PULLUP mode is used to enable the internal pull-up resistor, which ensures a stable state when the switch is open. The switch is connected between the pin and ground. When pressed, the pin reads LOW; when released, it reads HIGH due to the pull-up resistor.