Back to project main page

Reed Switch Development

What is a Reed Switch?

A reed switch is a switch that is activated when a magnet is placed near it. The distance that a switch can be activated over depends on the type of reed switch and the strength of the magnet. Because reed switches can be turned on or off like regular switches, they are very easy to implement and not very susceptible to interference problems. This means that they can operate over a fairly large distance, which is good for our application.

Why Reed Switches?

Reed switches provide a very simple and cheap way to detect if one point is close to another point. In our specific case, we want to see if the door is close to the door frame and if the window is close to the window frame. By using weak magnets, this will let us know if the doors and windows are opened or closed.

How Does It Work?

The reed switch basically acts like any other switch that allows current to pass through or not. When a magnet is near the switch, the metal plates make contact and current passes through. Using pull-up resistors for the digital inputs, the switch is connect one end to the microcontroller input while the other is connected to ground. If the switch is open (i.e. unactivated by a magnet), then the microcontroller sees the voltage from the pull up resistor or a digital high. When the switch is closed (i.e. activated by a magnet), the microcontroller sees ground or a digital low. This way, by putting a magnet on the door and the reed switch on the door frame, the switch would close when the door is shut, thus sending a logical low, or 0 to the microcontroller. A logical high, or 1, would mean the door is open.

Testing

Despite the minuscule size of the reed switches, they worked reliably with an old hard drive magnet to report the closing and opening of the room door.

Back to project main page

 
Back to top
projects/the_efficient_lounge/hardware/reedswitch.txt · Last modified: 2010/02/03 18:50 by Blackthroat
 
 
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0