Have you ever wondered how doors in shops automatically trigger an alarm when someone enters? Or how some windows have hidden sensors that let you know if they’re open or closed? Behind many of these everyday “magic” tricks is a tiny but powerful component called a reed switch.
In this blog, we’ll explore what a reed switch is, how it works with an Arduino, and what fun things you can build with it—explained in plain English, no engineering degree required!
What is a Reed Switch?
A reed switch is a small electronic part that reacts to magnets. Inside its glass tube, there are two thin metal strips (called “reeds”).
- When a magnet comes close, the metal strips touch each other—acting like a simple ON switch.
- When the magnet moves away, the strips separate—acting like an OFF switch.
Think of it like a light switch, but instead of using your hand to flip it, a magnet does the job without touching it directly.
Reed Switch Overview
A reed switch has two thin metal strips (called reeds) made from a material that becomes magnetic easily but loses that magnetism just as quickly once the magnetic field is gone. To make the switch last through millions of on/off cycles, the contact surfaces are coated with tough metals like rhodium, ruthenium, palladium, or iridium.
These reeds are sealed inside a small glass tube that keeps out dust and dirt. Because the tube is airtight, reed switches can be used safely in explosive environments where even tiny sparks from regular switches might be dangerous. The tube is filled with nitrogen or sometimes left as a vacuum so the contacts don’t oxidize. The reeds themselves are usually made from a nickel-iron alloy that magnetizes quickly (high permeability) but doesn’t stay magnetic (low retentivity).
Since reed switches are mechanical, they don’t respond instantly—they switch on or off in less than a millisecond, which is slower than electronic components. When a magnetic field is present, both reeds bend toward each other and meet with a flat, parallel contact area. This design improves durability and reliability over time.
Why Use a Reed Switch with Arduino?
On its own, a reed switch is just a tiny sensor. But when we connect it to an Arduino, we can teach it to "react" to nearby magnets. For example:
- Detect if a door is open or closed
- Make a bike speedometer (counting wheel spins)
- Build a secret drawer alarm
- Track how many times something moves
In short, the Arduino is the “brain,” and the reed switch is the “sense of touch.” Together, they unlock creative projects, both literally and metaphorically.
How Does It Work with Arduino?
Let’s keep it simple:
- Connect the Reed Switch—You connect one side of the reed switch to the Arduino’s input pin and the other side to ground (the return path for electricity).
- Add a Pull-Up Resistor—This just keeps the circuit stable (don’t worry, Arduino has a built-in feature for this).
- Write Simple Code – The Arduino can read whether the reed switch is “ON” (magnet close) or “OFF” (magnet far).
- Make It React – You decide what happens. For example:
- If reed switch = ON → turn on LED
- If reed switch = OFF → turn off LED
| Typical Connection (Not included Resistor) |
Example Project: Door Alarm
Here’s a fun beginner project: Make an alarm that beeps when the door opens.
What you need:
- Arduino board (like Arduino Uno)
- Reed switch
- Small magnet
- Buzzer or LED light
- A few wires
How it works:
- Stick the magnet on your door and the reed switch on the frame.
- When the door is closed, the magnet is near the switch (so it’s OFF).
- When the door opens, the magnet moves away → the switch turns ON → Arduino notices → the buzzer makes a sound or the LED lights up.
Congratulations, you’ve made your own security alarm!
Everyday Uses of Reed Switches
You might not realize it, but reed switches are everywhere:
- Security systems – doors, windows, safes
- Bicycles – speed and distance trackers
- Smart appliances – washing machines (lid open/close detection)
- Medical devices – counting rotations or detecting positions.
So, learning how to use one with Arduino isn’t just a fun hobby—it’s a peek into real-world technology.
Final Thoughts
The Arduino magnetic reed switch is one of the easiest sensors to start with. It doesn’t need complicated wiring or coding, and you can quickly see results. Whether you’re making a door alarm, a DIY counter, or just experimenting, this tiny switch can add big possibilities to your projects.
0 Comments