If you've got a laptop computer
or a cellphone that flips open
like a clamshell, you've probably noticed that it senses when you
open and close it and switches on or off accordingly. But how does it
know? Some kind of switch wired to the hinge so
it can detect the opening and closing movement? If that's what you
think, you're at least half right! Think about it more carefully and
you'll see a standard switch would be quite tricky to wire up in that
way—and probably quite unreliable too: all that opening and closing
would quickly wear it out. So, instead, many laptops and phones use an inexpensive
and very reliable device called a reed switch that turns on or off when a magnet is nearby. Intruder alarms and model railroads often use them too. Let's take a closer look at
how they work!
Photo: A typical reed switch (a Comus RI-23). You can just see the two overlapping metal contacts (reeds) inside the glass envelope. The contacts spring together and touch when the switch is "on"; they spring apart and interrupt the circuit when the switch is "off."
A switch is like a drawbridge in an electric
circuit. When the switch is closed, the "bridge" is down and electric current can
flow around the circuit; when the switch opens, the "bridge" is
up and no current flows. So the purpose of a switch is to activate or
deactivate a circuit at a time of our choosing.
Photo: A "push-to-make" switch makes a connection and completes a circuit when you push it in; a
spring makes it pop back out again when you take your finger away. A reed switch
switches a current on the same way, but a magnet provides the "pushing pressure" instead of your finger.
Most of the electrical switches we encounter are ones we control ourselves. If
you want light in a room, you flick a switch
on the wall. Want to watch TV? Turn on the switch. Want to
listen to your iPod? Push
the wheel at the front and that activates a switch that turns on the
power. But sometimes we want electrical and electronic
circuits to be activated in other ways.
Suppose you want to wire up a bank safe so it
triggers an alarm whenever the door opens. How would that work in practice? You'd need electrical
contacts on both parts of the door frame so when the door opened the
circuit would be broken, triggering the alarm. But think how tricky
it would be to make a reliable electrical connection on a door frame.
What if you painted over it? What if it got dirty? And wouldn't it be so obvious
to a thief that they'd be able to disable it quite easily? There are lots of
ways in which the electrical contact could be rendered inactive and
useless. This is where reed switches can help.
Sponsored links
What is a reed switch?
An ordinary switch has two electrical contacts in it that join
together when you push a button and spring apart when you release it.
Rocker switches on wall lights (push the two contacts together when
the switch is in one position and pull them apart when the switch
flicks the other way.
In a typical reed switch, the two contacts (which look like metal reeds) are made from a ferromagnetic
material (that means something as easy to magnetize as iron), coated with a hardwearing metal such as rhodium or ruthenium (to give them a long life as they switch on and off), and sealed inside a thin glass envelope filled with an unreactive gas (typically nitrogen) to keep them free of dust and dirt. Sometimes the glass has an outer casing of plastic for even greater protection. Typically, the contacts are made from a nickel-iron alloy that's easy to magnetize (technically, we say it has a high magnetic permeability) but doesn't stay that way for long (we say it has a low magnetic retentivity). They take some time to respond to changes in the magnetic field (we say they have quite a bit of hysteresis)—in other words, they move quite slowly and smoothly. Generally both contacts move (not just one) and they make a flat, parallel area of contact with one another (rather than simply touching at a point), because that helps to extend the life and reliability of the switch.
Although most reed switches have two ferromagnetic contacts, some have one contact that's ferromagnetic and one that's non-magnetic, while some (like the original Elwood reed switch illustrated at the bottom of this article) have three.
Photo: Another view of my reed switch, looking down on the moving contacts in their sealed glass envelope. Notice how the contact on the right is just above the one on the left. You can also see here that the contacts are much wider than they appear in the side view shown in the top photo.
How does a reed switch work?
Reed switches come in two main varieties called normally open (normally switched off) and normally closed (normally switched on). The key to understanding how they work is to realize that they don't just work as an electrical bridge but as a magnetic one as well: magnetism flows through them as well as electricity.
Normally open
As you bring a magnet up to the reed switch, the entire switch effectively becomes a part of a "magnetic circuit" that includes the magnet (the dotted line in the artwork shows part of the magnetic field). The two contacts of the reed switch become opposite magnetic poles, which is why they attract and snap together. It doesn't matter which end of the magnet approaches first: the contacts still polarize in opposite ways and attract one another. A reed switch like this is normally open (NO) (normally off), unless a magnet is positioned right next to it, when it switches on, allowing a current to flow through it.
Take the magnet away and the contacts—made from fairly stiff and springy metal—push apart again and return back to their original positions.
Normally closed
You can also get reed switches that work the opposite way: the two contacts are normally snapped together and when you bring a magnet up to the switch, spring apart. Reed switches like this are called normally closed (NC) (normally switched on), so electricity flows through them most of the time. The easiest way of making one is to take a normally open switch and fix a magnet permanently to its glass case, flipping it over from its open to its closed state (as in the second frame in the normally open animation up above). This entire unit (normally open reed switch with magnet attached) becomes our normally closed reed switch. If you bring a second magnet up to it, with a magnetic field of opposite polarity to that of the first magnet, this new field cancels out the field of the first magnet so we have, in effect, exactly what we had in the first frame of the normally open animation: a reed switch with two contacts sprung apart.
In these two artworks, I've massively exaggerated the movement of the contacts. Real reed switches have contacts that are only a few microns (millionths of a meter) apart—roughly ten times thinner than a human hair—so the movement isn't visible to the naked eye. Don't expect to see the blades moving as you bring your magnet up close!
Artwork: The key to understanding reed switches is to realize that they are part of a magnetic circuit, as well as an electrical one: the magnetic field from the bar magnet is carried through the reed switch. That's what
makes it close—and that's what allows electricity to flow through it. Magnetic field artwork sourced from Wikimedia Commons.
Extra complications
Another crucial thing I need to point out is that reed switches don't simply switch on when a magnet moves up close and off when it moves away (in the case of a normally open/off switch): they will typically switch on and off several times as the magnet moves by, creating multiple on and off zones. They'll also respond differently according to the orientation of the magnet (whether it's parallel to the switch or perpendicular), what shape it is (because, as we all learned in school, different shaped magnets create different magnetic field patterns all around them), and how it moves past.
All this is really important when it comes to practical applications: you need to make sure you use the right magnet and that it moves in just the right way to actuate your reed switch. If you're using a reed switch as a counter, for example, it should actuate only once each time the magnet moves by (not three or four times, which would give a false reading). If you're using a reed switch in an alarm, you don't want your intruder switching the alarm on one second and then off again a second later because you put the magnet in the wrong place!
Sponsored links
What are reed switches used for?
Photo: Some flip-style cellphones, like this old Motorola dating from c.2001, are switched on and off by magnetic reed switches. There's a magnet in one part of the case and a reed switch in the other. The phone switches off when the reed switch is near the magnet (when the case is closed) and switches on when the reed switch and magnet separate (when the case is open again).
You can probably see now how a clamshell phone switches on and off
when you open or close it. It has a normally closed reed switch in
the lower part of its body (where the keypad is) and a magnet in the
upper part (where the screen is). When the phone is open, the reed
switch and the magnet are relatively far apart. The contacts on the
reed switch are pushed together and the power flows through the
phone. However, if you close the case, you swing the magnet close to
the reed switch and that pushes apart the contacts inside the switch. A circuit inside the
phone senses this and switches off the power in an orderly way.
Ebook readers, such as Kindles and Sony Readers,
use a similar trick. When you fit them inside a protective leather jacket, you'll find
they switch off automatically when you close the cover—and switch on again
when you open it up. There's no magic here, of course: there's simply a reed switch in the
corner of the ebook device and a magnet in the corresponding part of the cover (test it for yourself by holding a paperclip nearby).
Photo: You can turn on an Amazon Kindle with a fridge magnet thanks to the reed switch hidden inside its case.
You can see how the same idea would work in our bank safe door: you'd
simply have a reed switch on the door frame and a magnet on
the door. Opening the door would separate the magnet and the reed
switch, causing the switch's contacts to spring together and trigger
the alarm. You can get reed switches built inside little pieces of
plastic so you can't even see they're there—perfect for all kinds of security
applications.
Refrigerator doors often have reed-switch sensors built into them too. Generally
they just switch the light on and off, but on some models they operate a timer
that warns you if the door is open for too long.
Photo: Simplified concept of a burglar alarm: you simply mount a reed switch (connected to an alarm circuit) to one part of the door and a magnet to the other part. Separating the two things flips the switch and triggers the alarm.
You can use reed switches in lots of other ways too. LEGO®
enthusiast Bill Ward, who runs the superb
Brickpile blog
(and a Flickr photo page), has built
these ingenious robotic cows for his model
railroad. Whenever a train moves past, they swivel their heads to watch it go by. The whole
thing is worked by a reed switch. Each cow's head is operated by a
small electric motor that's connected to a circuit in which there's a
normally open reed switch. The reed switch is positioned next to the
train track and a little magnet is fitted to the side of the train.
As the train passes by the reed switch, the magnet forces the
contacts to close and activates the circuit that turns the cows'
heads. How neat is that? Some people are just so ingenious!
Photo: LEGO® cows operated by a reed switch. Photo by courtesy of Bill Ward,
published on Flickr
under a Creative Commons Licence.
There are hundreds of other, less obvious applications for reed switches. Some fluid level sensors in
clothes washing machines
and dishwashers use floating magnets that bob up past reed switches to switch off the
valves when enough water is inside. Reed switches are sometimes also fitted to the spinning arms of
dishwashers to detect when they jam, and in the thermal cut-offs in electric showers (to stop the water heating to dangerous levels). Anemometers with rotating cups have reed switches inside that measure the speed of the wind. As the cups turn, they make a reed switch spin past a magnet, generating pulses of current. The harder the wind, the faster the cups spin, and the more frequently the reed switch pulses on and off. An electronic circuit counts the number of pulses per second and uses that to figure out the wind speed.
Artwork: A typical reed switch flow meter works something like this. There's a pipe through which liquid flows (1) with a paddle wheel mounted inside it (2). As the liquid flows, the paddle spins and makes a magnet rotate (3). The rotating magnet makes a reed switch open (4). Then, as it spins around and presents its opposite pole (5), the magnet makes the switch close again (6). The alternately opening and closing reed switch sends pulses of electric current to a circuit. By counting how fast the pulses arrive, the circuit can measure the flow rate. If the current stops altogether or flows all the time, you know the fluid has stopped moving, possibly indicating a jam or a blockage.
Who invented reed switches?
Like many other great inventions, reed switches were born at
Bell Laboratories, invented there in the mid 1930s by Walter B. Elwood. His original patent application for an Electromagnetic switch was filed on June 27, 1940 and officially granted on December 2, 1941. Reading through Elwood's patent, it's very easy to recognize the reed switch that's still in common use today: "When an external magnetic force is applied to this unit the two magnetic members which form part of the magnetic circuit... are moved together... since the external magnetic force acts to diminish the air-gap between the two said magnetic elements."
Artwork: Walter Elwood's original reed switch design taken from US Patent: 2264746: Electromagnetic switch. This is a slightly different design from up above, switching back and forth between two different circuits with one of them always on. We have two nonmagnetic contacts on the left (1,2) and a magnetic contact (3,4) on the right, which snaps back and forth between them when a magnet approaches. The contacts are kept apart by an insulating spacer (5). Original artwork courtesy of US Patent and Trademark Office. (Please note that I've colored and simplified the original slightly to make it easier to follow.)
Sponsored links
Don't want to read our articles? Try listening instead
You'll find quite a few examples of how to use reed switches on the ever-excellent Instructables website and in the popular Evil Genius books; here are a handful to start you off:
50 Model Rocket Projects for the Evil Genius by Gavin Harper. McGraw-Hill, 2006. Project #37 (model rocket video camera) uses a couple of normally closed reed switches to trigger the camera automatically.
Books
Arduino and Raspberry Pi Sensor
Projects for the Evil Genius by Robert Chin. McGraw Hill, 2017. Several of the projects in this book involve hooking up reed switches to Arduinos and Pis (there are complete instructions for a reed-switch door buzzer alarm).
MAKE: Electronics by Charles Platt.
Maker Media, 2015. A great hands-on book that will kick-start your electronics hobby. There's a simple introduction to reed switches in Chapter 3.
Raspberry Pi Projects by Andrew Robinson and Mike Cook.
John Wiley & Sons, 2014. "Chapter 13: Home Automation" describes a reed-switch door sensor hooked up to a Raspberry Pi.
Practical Electronics for Inventors by Paul Monk.
McGraw-Hill, 2016. Once you've digested MAKE: Electronics, you'll want to graduate to something more in-depth; this is a good place to go next.
Electronics: A First Course by Owen Bishop. Newnes, 2011. An easy-to-understand (though rather dry) primer that explains all the basic components, including reed switches.
US Patent 4,038,620: Magnetic reed switch by B. Edward Shlesinger, Jr. and Charlie Dwain Mariner, July 26, 1977. A switch with one magnetic reed and one non-magnetic one.
I'm very grateful to Maurice Baenen of Comus Technology B.V. for suggesting some improvements to this article.
Please do NOT copy our articles onto blogs and other websites
Articles from this website are registered at the US Copyright Office. Copying or otherwise using registered works without permission, removing this or other copyright notices, and/or infringing related rights could make you liable to severe civil or criminal penalties.