Table of contents
You have probably used a micro switch today without even noticing it.
They are hidden inside computer mice, appliances, 3D printers, vending machines, door sensors, safety mechanisms, and many other small electronic devices.
A micro switch is a small mechanical switch that changes its electrical state when it is pressed. In simple terms, it helps an electronic device detect that something physical has happened.
That makes it one of the most useful components for beginners learning electronics. It is simple enough to understand quickly, but practical enough to appear in real projects, from basic LED circuits to Arduino-compatible devices, counters, alarms, robot bumpers, and smart home sensors.
In this guide, we’ll explain what a micro switch is, how it works, what COM, NO, and NC mean, and how you can use micro switches in beginner electronics projects.
What is a micro switch?
A micro switch is a small mechanical switch that changes its electrical state when it is pressed, pushed, or triggered by movement. It usually has a small button, lever, or actuator that reacts when something touches it.
Think of it as a tiny yes/no sensor.
Has a door opened? Has a robot reached a wall? Has a button been pressed? Has a moving part reached the end of its path?
That is why micro switches are often used to detect position, movement, pressure, or contact in electronic devices.
How does a micro switch work?
A micro switch works by converting a small physical movement into an electrical signal.
When something presses the actuator, the contacts inside the switch move. This either opens or closes the circuit. A microcontroller, board, LED, buzzer, motor, or other connected device can then react to that change.
Object presses switch > Internal contact changes position > Circuit opens or closes > Connected device reacts
Many micro switches use a snap-action mechanism. This means the contacts change state quickly once enough pressure is applied, instead of moving slowly or loosely. That quick “snap” makes the switch more reliable and gives micro switches their familiar clicky feel.
How to use a micro switch with Arduino
Using a micro switch with an Arduino-compatible board is one of the easiest ways to learn how digital inputs work. The switch does not measure a value like a temperature sensor. Instead, it gives the board a simple signal: pressed or not pressed.
For most beginner projects, you can connect a micro switch to a digital input pin and use the board’s internal pull-up resistor.
A basic setup looks like this:
Micro switch COM - GND
Micro switch NO - Digital input pin
In this setup, the input pin reads one state when the switch is not pressed and changes when the switch is pressed. You can then use that change to turn on an LED, trigger a buzzer, count an object, stop a motor, or send a signal to another part of your project.
Micro switch pressed
↓
Arduino-compatible board detects input change
↓
Code reacts
↓
LED, buzzer, motor, display, or counter updates
For example, a simple door detector could turn on an LED when a box is opened. A robot bumper could stop the motors when the switch hits an obstacle. A small counter could increase a number every time an object presses the switch.
A beginner-friendly Arduino-compatible board such as Dasduino Core is a good fit for this type of project because it keeps the focus on learning inputs, outputs, and simple logic.
If you want a more guided starting point, a learning kit is usually easier than buying random components separately. It gives you a board, basic parts, and a more structured path for learning how switches, LEDs, resistors, and simple circuits work together.
You can also make the project more useful by adding a display. For example, instead of only turning on an LED, you could show how many times the switch has been pressed, display whether a door is open or closed, or create a simple menu controlled by physical input.
For connected projects, you can use a board with wireless connectivity. A micro switch connected to an ESP32-based board can become a smart door sensor, mailbox notifier, drawer alarm, or Home Assistant input device.
Beginner micro switch project ideas
Once you understand the basic idea behind a micro switch, the best way to learn is to build something small with it. A micro switch can detect a simple physical action, but that action can trigger all kinds of outputs: an LED, buzzer, counter, motor, display, or smart home automation.
Here are a few beginner-friendly project ideas you can build around micro switches.
1. Door open detector
A door open detector is one of the simplest micro switch projects. Mount the switch so that the door, drawer, box, or cabinet presses it when closed. When the door opens, the switch changes state and your board can detect it.
Start simple by turning on an LED when the door opens. Once that works, you can add a buzzer, display a status message, or send the signal to a smart home system.
Basic process:
-
Mount the micro switch where the door can press it
-
Connect COM to GND and NO or NC to a digital input pin
-
Read the switch state in code
-
Turn on an LED, buzzer, or status message when the state changes.
A simple Arduino-compatible board is enough for the first version.
For a connected version, you can use an ESP32-based board and turn it into a smart door, drawer, or mailbox sensor.
2. Robot bumper sensor
A micro switch works really well as a bumper sensor for small robots. Attach one or two switches to the front of the robot so they are pressed when the robot hits an obstacle.
The basic idea is simple: when the switch is pressed, the robot stops, reverses, or turns in another direction. This teaches kids and beginners how robots react to the physical world.
Basic process:
-
Attach a micro switch to the front of the robot
-
Connect the switch to a digital input
-
Connect motors through a motor driver
-
Write code that checks whether the switch is pressed
-
Stop or reverse the motors when the bumper is triggered
For this type of project, you can pair a development board with a motor driver and small DC motors or servos.
If the robot uses servo movement instead of DC motors, a small servo is also a good fit.
3. Simple alarm system
A micro switch can act as a trigger for a very simple alarm. You can place it on a box, cabinet, window, or door. When the switch changes state, the board turns on a buzzer, flashes an LED, or shows a warning message.
This is a great beginner project because the logic is easy to understand: if the switch is triggered, activate the alarm.
Basic process you can follow:
-
Place the micro switch where movement should be detected
-
Connect the switch to your board
-
Add an LED or buzzer as the output
-
Write a simple if statement that checks the switch state
-
Turn the alarm output on when the switch is triggered
A beginner kit is useful here because it gives you the basic parts needed for learning inputs and outputs.
You can also make the alarm more visual by displaying the current status on a small LCD screen.
4. Object counter with a display
A micro switch can count physical actions. For example, every time a ball rolls past, a drawer opens, a lever moves, or a small object presses the switch, your code can add one to a counter.
This is a useful project for learning variables, digital inputs, and displays. It also feels more practical than only turning an LED on and off.
Basic process:
-
Mount the micro switch where an object can press it
-
Connect it to a digital input pin
-
Create a counter variable in code
-
Increase the counter when the switch is pressed
-
Show the result on a display
For a simple version, use an LCD display.
For a more polished low-power counter, you could show the number on a small e-paper display. This works especially well if the count only changes occasionally, because e-paper stays readable without constantly using power.
5. Limit switch for moving parts
Micro switches are often used as limit switches in machines and moving mechanisms. The switch tells the controller when a moving part has reached the end of its travel.
This idea appears in 3D printers, CNC machines, robot arms, sliding doors, and automated mechanisms. For a beginner version, you can build a small sliding platform or rotating arm and use the switch to stop movement at the end.
Basic process:
-
Place the micro switch at the end of the movement path
-
Connect the switch to a digital input.
-
Connect the motor or servo to your boar
-
Move the mechanism until the switch is pressed
-
Stop or reverse movement when the switch is triggered
This is a great project for learning how electronics and mechanics work together because it gives you both
6. Smart mailbox notifier
A micro switch can detect when a mailbox door opens. When the door is opened, the switch changes state and your board can record the event or send a notification.
The simplest version can turn on an LED inside the house. A more advanced version can use Wi-Fi to send a message to a dashboard or smart home platform.
Basic process:
-
Mount the micro switch inside the mailbox door
-
Connect it to a wireless development board
-
Detect when the door opens
-
Send a notification or update a dashboard
-
Optionally show the last-opened time on a display
For a connected mailbox notifier, an ESP32-based board is a strong fit.
If you want to display the mailbox status somewhere at home, an e-paper dashboard can show a simple message such as “Mail delivered” or “Mailbox last opened at 14:30.”
7. E-paper status dashboard
A micro switch can become part of a larger dashboard project. Instead of only reacting with an LED, you can show the switch status on an e-paper display.
For example, you could build a small dashboard that shows:
-
Door open or closed
-
Mailbox opened
-
Drawer status
-
Machine end-stop reached
-
Number of times a switch was pressed
-
Last trigger time
Basic process:
-
Connect one or more micro switches to a board
-
Read their states in code
-
Format the status as simple text or icons
-
Display the result on an e-paper screen
-
Refresh the display only when the status changes
This is where Inkplate displays are especially useful. A status dashboard does not need to update every second, but it should stay visible all day. E-paper is ideal for that because it remains readable even when the content is not actively refreshing.
For a compact status display, use:
For a room, workshop, or classroom dashboard, use a larger Inkplate display:
For projects where touch interaction is useful, such as resetting a counter or switching dashboard views, Inkplate 6FLICK is a better fit.
Micro switch terminals explained: COM, NO, and NC
Most micro switches have three terminals: COM, NO, and NC. These labels tell you how the switch behaves when it is not being pressed and what changes when the actuator is triggered.
“Normally” simply means the default state of the switch when nobody is pressing it.
|
Terminal |
Meaning |
What it does |
|
COM |
Common |
The shared connection point |
|
NO |
Normally open |
The circuit is open until the switch is pressed |
|
NC |
Normally closed |
The circuit is closed until the switch is pressed |
If you use NO, the circuit only becomes active when the switch is pressed. This is useful for projects where you want something to happen after contact, such as turning on an LED, counting an object, or detecting when a robot bumper touches an obstacle.
If you use NC, the circuit is active by default and changes when the switch is pressed or released. This can be useful when you want to detect when a connection is broken, a door opens, or a safety condition changes.
For beginner projects, COM + NO is usually the easiest setup to understand because the action happens only when the switch is pressed.
Micro switch vs. push button vs. limit switch
Micro switches, push buttons, and limit switches all detect physical action, but they are usually used in slightly different ways.
|
Component |
Best for |
Example |
|
Push button |
Human input |
Start button, game button |
|
Micro switch |
Detecting movement or contact |
Door sensor, mouse click |
|
Limit switch |
Detecting end position |
3D printer axis, robot arm |
A push button is usually pressed directly by a person. You use it when someone needs to start, stop, select, reset, or control something.
A micro switch is often triggered by an object, lever, door, mechanism, or moving part. It is still a switch, but it is commonly used as a small sensor for detecting contact or movement.
A limit switch is usually used to detect when something has reached the end of its travel. For example, a 3D printer, CNC machine, sliding mechanism, or robot arm might use a limit switch to know when to stop moving.
Why Soldered is a great place to start learning switches, sensors, and electronics in general
A micro switch may be a small component, but it teaches one of the most important ideas in electronics: how a physical action becomes an electrical signal.
Once you understand that, many projects start to make more sense. A door can trigger an alarm. A robot can detect when it hits an obstacle. A moving part can stop at the right position. A counter can increase every time something presses a switch. A simple input can become the beginning of a much larger system.
That is why micro switches are such a good starting point for beginners. They are easy to understand, simple to wire, and useful in real projects. With the right board, display, sensor, or kit, you can quickly move from a basic pressed/not pressed circuit to something more practical, like a smart mailbox notifier, robot bumper, limit switch, or e-paper status dashboard.
At Soldered, you can find beginner-friendly boards, solder kits, displays, motors, drivers, and accessories that help you build those projects step by step. Start with a simple switch and LED, then add a display, motor, wireless connection, or Inkplate dashboard as your confidence grows.
Whether you are learning electronics for the first time, building a classroom project, or prototyping a smart device, Soldered gives you the tools to turn small components into working ideas.
Micro switch: FAQs
What is a micro switch?
A micro switch is a small mechanical switch that changes its electrical state when it is pressed or triggered. It is often used to detect movement, position, pressure, or contact in electronic devices.
What is a micro switch used for?
Micro switches are used when a device needs to know that something has moved, opened, closed, pressed, or reached a certain position. You can find them in computer mice, appliances, 3D printers, robot bumpers, door sensors, vending machines, safety switches, and many other devices.
How does a micro switch work?
A micro switch works by moving internal contacts when its button, lever, or actuator is pressed. This either opens or closes the circuit, allowing a connected device or microcontroller to detect the change and react.
What does COM mean on a micro switch?
COM stands for common. It is the shared terminal on a micro switch and is usually connected together with either the NO or NC terminal, depending on how you want the switch to behave.
What does NO mean on a micro switch?
NO stands for normally open. This means the circuit is open when the switch is not pressed. When you press the switch, the circuit closes and allows the signal or current to pass.
What does NC mean on a micro switch?
NC stands for normally closed. This means the circuit is closed when the switch is not pressed. When you press the switch, the circuit opens and the signal changes.
Should I use NO or NC on a micro switch?
Use NO if you want something to happen only when the switch is pressed, such as turning on an LED or counting a button press. Use NC if you want to detect when a connection is interrupted, such as when a door opens or a safety condition changes.
Is a micro switch the same as a limit switch?
Not exactly. A micro switch is the physical component, while a limit switch describes how the switch is used. Many limit switches are micro switches placed at the end of a movement path to detect when a machine, robot, or mechanism should stop.